layout.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <!DOCTYPE html>
  2. <!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js" lang="{{=T.accepted_language or 'en'}}"> <!--<![endif]-->
  3. <head>
  4. <meta charset="utf-8">
  5. <!-- www.phpied.com/conditional-comments-block-downloads/ -->
  6. <!-- Always force latest IE rendering engine
  7. (even in intranet) & Chrome Frame
  8. Remove this if you use the .htaccess -->
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge{{=not request.is_local and ',chrome=1' or ''}}">
  10. <!-- Mobile Viewport Fix
  11. j.mp/mobileviewport & davidbcalhoun.com/2010/viewport-metatag
  12. device-width: Occupy full width of the screen in its current orientation
  13. initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height
  14. user-scalable = yes allows the user to zoom in -->
  15. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  16. <title>{{=response.title or request.application}}</title>
  17. <!-- http://dev.w3.org/html5/markup/meta.name.html -->
  18. <meta name="application-name" content="{{=request.application}}">
  19. <!-- Speaking of Google, don't forget to set your site up:
  20. http://google.com/webmasters -->
  21. <meta name="google-site-verification" content="">
  22. <!-- include stylesheets -->
  23. <link rel="stylesheet" href="{{=URL('static','css/bootstrap.min.css')}}"/>
  24. <link rel="stylesheet" href="{{=URL('static','css/web2py-bootstrap3.css')}}"/>
  25. <link rel="shortcut icon" href="{{=URL('static','images/favicon.ico')}}" type="image/x-icon">
  26. <link rel="apple-touch-icon" href="{{=URL('static','images/favicon.png')}}">
  27. <!-- All JavaScript at the bottom, except for Modernizr which enables
  28. HTML5 elements & feature detects -->
  29. <script src="{{=URL('static','js/modernizr-2.8.3.min.js')}}"></script>
  30. <!--[if lt IE 9]>
  31. <script src="{{=URL('static','js/respond-1.4.2.min.js')}}"></script>
  32. <![endif]-->
  33. <!-- Favicons -->
  34. {{include 'web2py_ajax.html'}} <!-- this includes jquery.js, calendar.js/.css and web2py.js -->
  35. {{block head}}{{end}}
  36. {{
  37. # using sidebars need to know what sidebar you want to use
  38. mc0 = 'col-md-12'
  39. mc1 = 'col-md-9'
  40. mc2 = 'col-md-6'
  41. left_sidebar_enabled = globals().get('left_sidebar_enabled', False)
  42. right_sidebar_enabled = globals().get('right_sidebar_enabled', False)
  43. middle_column = {0: mc0, 1: mc1, 2: mc2}[
  44. (left_sidebar_enabled and 1 or 0)+(right_sidebar_enabled and 1 or 0)]
  45. }}
  46. </head>
  47. <body>
  48. <!--[if lt IE 8]><p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p><![endif]-->
  49. <div class="w2p_flash alert alert-dismissable">{{=response.flash or ''}}</div>
  50. <!-- Navbar ======================================= -->
  51. <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
  52. <div class="container-fluid">
  53. <div class="navbar-header">
  54. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
  55. <span class="sr-only">Toggle navigation</span>
  56. <span class="icon-bar"></span>
  57. <span class="icon-bar"></span>
  58. <span class="icon-bar"></span>
  59. </button>
  60. {{=response.logo or ''}}
  61. </div>
  62. <div class="collapse navbar-collapse navbar-ex1-collapse">
  63. <ul class="nav navbar-nav navbar-right">
  64. {{='auth' in globals() and auth.navbar('Welcome',mode='dropdown') or ''}}
  65. </ul>
  66. {{if response.menu:}}
  67. {{=MENU(response.menu, _class='nav navbar-nav',li_class='dropdown',ul_class='dropdown-menu')}}
  68. {{pass}}
  69. </div>
  70. </div>
  71. </nav>
  72. <!-- Masthead ===================================== -->
  73. {{block header}}
  74. {{end}}
  75. <!-- Main ========================================= -->
  76. <!-- Begin page content -->
  77. <div class="container-fluid main-container">
  78. {{if left_sidebar_enabled:}}
  79. <div class="col-md-3 left-sidebar">
  80. {{block left_sidebar}}
  81. <h3>Left Sidebar</h3>
  82. <p></p>
  83. {{end}}
  84. </div>
  85. {{pass}}
  86. <div class="{{=middle_column}}">
  87. {{block center}}
  88. {{include}}
  89. {{end}}
  90. </div>
  91. {{if right_sidebar_enabled:}}
  92. <div class="col-md-3">
  93. {{block right_sidebar}}
  94. <h3>Right Sidebar</h3>
  95. <p></p>
  96. {{end}}
  97. </div>
  98. {{pass}}
  99. </div>
  100. {{block footer}} <!-- this is default footer -->
  101. <footer class="footer">
  102. <div class="container-fluid">
  103. <div class="copyright pull-left">{{=T('Copyright')}} &#169; {{=request.now.year}}</div>
  104. <div id="poweredBy" class="pull-right">
  105. {{=T('Powered by')}}
  106. <a href="http://www.web2py.com/">web2py</a>
  107. </div>
  108. </div>
  109. </footer>
  110. {{end}}
  111. <!-- The javascript =============================== -->
  112. <script src="{{=URL('static','js/bootstrap.min.js')}}"></script>
  113. <script src="{{=URL('static','js/web2py-bootstrap3.js')}}"></script>
  114. {{block page_js}}{{end page_js}}
  115. {{if response.google_analytics_id:}}
  116. <!-- Analytics ==================================== -->
  117. <script src="{{=URL('static','js/analytics.min.js')}}"></script>
  118. <script type="text/javascript">
  119. analytics.initialize({
  120. 'Google Analytics':{trackingId:'{{=response.google_analytics_id}}'}
  121. });
  122. </script>
  123. {{pass}}
  124. <!-- Share ============================y============ -->
  125. <script src="{{=URL('static','js/share.js',vars=dict(static=URL('static','images')))}}"></script>
  126. </body>
  127. </html>