Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# encoding: utf-8 

2from . import * 

3 

4 

5def pagination( 

6 listItems="", 

7 size="default", 

8 align="left"): 

9 """ 

10 *Generate pagination - TBS style. Simple pagination inspired by Rdio, great for apps and search results.* 

11 

12 **Key Arguments** 

13 

14 - ``listItems`` -- the numbered items to be listed within the `<ul>` of the pagination block 

15 - ``size`` -- additional pagination block sizes [ "mini" | "small" | "default" | "large" ] 

16 - ``align`` -- change the alignment of pagination links [ "left" | "center" | "right" ] 

17 

18 

19 **Return** 

20 

21 - ``pagination`` -- the pagination 

22 

23 """ 

24 if size == "default": 

25 size = "" 

26 else: 

27 size = "pagination-%(size)s" % locals() 

28 if align == "left": 

29 align = "" 

30 else: 

31 align = "pagination-%(align)s" % locals() 

32 

33 pagination = """ 

34 <div class="pagination %(size)s %(align)s" id=" "> 

35 <ul> 

36 %(listItems)s 

37 </ul> 

38 </div>""" % locals() 

39 

40 return pagination