html.tpl.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <?php
  2. /**
  3. * @file
  4. * Default theme implementation to display the basic html structure of a single
  5. * Drupal page.
  6. *
  7. * Variables:
  8. * - $css: An array of CSS files for the current page.
  9. * - $language: (object) The language the site is being displayed in.
  10. * $language->language contains its textual representation.
  11. * $language->dir contains the language direction. It will either be 'ltr' or 'rtl'.
  12. * - $rdf_namespaces: All the RDF namespace prefixes used in the HTML document.
  13. * - $grddl_profile: A GRDDL profile allowing agents to extract the RDF data.
  14. * - $head_title: A modified version of the page title, for use in the TITLE
  15. * tag.
  16. * - $head_title_array: (array) An associative array containing the string parts
  17. * that were used to generate the $head_title variable, already prepared to be
  18. * output as TITLE tag. The key/value pairs may contain one or more of the
  19. * following, depending on conditions:
  20. * - title: The title of the current page, if any.
  21. * - name: The name of the site.
  22. * - slogan: The slogan of the site, if any, and if there is no title.
  23. * - $head: Markup for the HEAD section (including meta tags, keyword tags, and
  24. * so on).
  25. * - $styles: Style tags necessary to import all CSS files for the page.
  26. * - $scripts: Script tags necessary to load the JavaScript files and settings
  27. * for the page.
  28. * - $page_top: Initial markup from any modules that have altered the
  29. * page. This variable should always be output first, before all other dynamic
  30. * content.
  31. * - $page: The rendered page content.
  32. * - $page_bottom: Final closing markup from any modules that have altered the
  33. * page. This variable should always be output last, after all other dynamic
  34. * content.
  35. * - $classes String of classes that can be used to style contextually through
  36. * CSS.
  37. *
  38. * @see template_preprocess()
  39. * @see template_preprocess_html()
  40. * @see template_process()
  41. */
  42. ?>
  43. <?php print $doctype; ?>
  44. <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
  45. <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="<?php print $language->language; ?>" dir="<?php print $language->dir; ?>" <?php print $rdf_namespaces; ?>> <![endif]-->
  46. <!--[if IE 7]> <html class="no-js ie7 oldie" lang="<?php print $language->language; ?>" dir="<?php print $language->dir; ?>" <?php print $rdf_namespaces; ?>> <![endif]-->
  47. <!--[if IE 8]> <html class="no-js ie8 oldie" lang="<?php print $language->language; ?>" dir="<?php print $language->dir; ?>" <?php print $rdf_namespaces; ?>> <![endif]-->
  48. <!-- Consider adding an manifest.appcache: h5bp.com/d/Offline -->
  49. <!--[if gt IE 8]><!--> <html class="no-js" lang="<?php print $language->language; ?>" dir="<?php print $language->dir; ?>" <?php print $rdf_namespaces; ?>> <!--<![endif]-->
  50. <head<?php print $rdf_profile; ?>>
  51. <!-- remove the no-js as fast as possible -->
  52. <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
  53. <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
  54. Remove this if you use the .htaccess -->
  55. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  56. <meta http-equiv="imagetoolbar" content="no">
  57. <?php print $head; ?>
  58. <title><?php print $head_title; ?></title>
  59. <?php print $styles; ?>
  60. <!-- All JavaScript at the bottom, except for Modernizr / Respond.
  61. Modernizr enables HTML5 elements & feature detects; Respond is a polyfill for min/max-width CSS3 Media Queries
  62. For optimal performance, use a custom Modernizr build: www.modernizr.com/download/ -->
  63. <script src="<?php print $theme_path ?>/js/libs/modernizr-2.0.6.min.js" type="text/javascript"></script>
  64. <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
  65. </head>
  66. <body class="<?php print $classes; ?>"<?php print $attributes; ?>>
  67. <div id="container">
  68. <div class="inner">
  69. <?php print $page_top; ?>
  70. <?php print $page; ?>
  71. <?php print $page_bottom; ?>
  72. </div>
  73. </div>
  74. <!-- /container -->
  75. <img src="<?php print $theme_path ?>/images/blank.gif" alt="">
  76. <!-- Javascript at the bottom for fast page loading -->
  77. <?php print $scripts; ?>
  78. <!-- Prompt IE 6 users to install Chrome Frame. Remove this if you want to support IE 6.
  79. chromium.org/developers/how-tos/chrome-frame-getting-started -->
  80. <!--[if lt IE 7 ]>
  81. <script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
  82. <script>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script>
  83. <![endif]-->
  84. </body>
  85. </html>