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 

4def _container( 

5 responsive=True, 

6 content='', 

7 htmlId=False, 

8 htmlClass=False, 

9 onPhone=True, 

10 onTablet=True, 

11 onDesktop=True, 

12): 

13 """ *The over-all content container for the twitter bootstrap webpage* 

14 

15 **Key Arguments** 

16 

17 - ``responsive`` -- fluid layout if true, fixed if false 

18 - ``content`` -- html content of the container div 

19 - ``htmlId`` -- the id of the container 

20 - ``htmlClass`` -- the class of the container 

21 - ``onPhone`` -- does this container get displayed on a phone sized screen 

22 - ``onTablet`` -- does this container get displayed on a tablet sized screen 

23 - ``onDesktop`` -- does this container get displayed on a desktop sized screen 

24  

25 

26 **Return** 

27 

28 - ``container``  

29  

30 """ 

31 

32 if responsive: 

33 responsive = '-fluid' 

34 else: 

35 responsive = '' 

36 if htmlId: 

37 htmlId = """id="%(htmlId)s" """ % locals() 

38 else: 

39 htmlId = '' 

40 if not htmlClass: 

41 htmlClass = '' 

42 if onPhone: 

43 onPhone = '' 

44 else: 

45 onPhone = 'hidden-phone' 

46 if onTablet: 

47 onTablet = '' 

48 else: 

49 onTablet = 'hidden-tablet' 

50 if onDesktop: 

51 onDesktop = '' 

52 else: 

53 onDesktop = 'hidden-desktop' 

54 container = """ 

55 <div class="container%(responsive)s %(htmlClass)s %(onPhone)s %(onTablet)s %(onDesktop)s" %(htmlId)s> 

56 %(content)s 

57 </div> 

58 """ % locals() 

59 return container