Browse Source

Completed base template

main
Lakshmi Vyasarajan 14 years ago
parent
commit
933dbe4b13
3 changed files with 49 additions and 34 deletions
  1. +14
    -0
      data/templates/basic/layout/analytics.html
  2. +29
    -34
      data/templates/basic/layout/base.html
  3. +6
    -0
      data/templates/basic/layout/devmode.html

+ 14
- 0
data/templates/basic/layout/analytics.html View File

@@ -0,0 +1,14 @@
{% if site.in_production_mode %}
<!-- asynchronous google analytics: mathiasbynens.be/notes/async-analytics-snippet
change the UA-XXXXX-X to be your site's ID -->
<script>
var _gaq = [['_setAccount', '{{site.meta.GAID}}'], ['_trackPageview']];
(function(d, t) {
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0];
g.async = true;
g.src = ('https:' == location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
s.parentNode.insertBefore(g, s);
})(document, 'script');
</script>
{% endif %}

+ 29
- 34
data/templates/basic/layout/base.html View File

@@ -47,61 +47,56 @@
{% block endhead %}{% endblock endhead %} {% block endhead %}{% endblock endhead %}
</head> </head>
<body id="{{page.id if page.id else page.name_without_extension}}"> <body id="{{page.id if page.id else page.name_without_extension}}">
{% block content %}
<div id="container"> <div id="container">
{% block container %}
<header> <header>
{% block header %}{% endblock header %}
</header> </header>

<div id="main" role="main"> <div id="main" role="main">
{% block main %}{% endblock main %}
</div> </div>

<footer> <footer>
{% block footer %}{% endblock %}
</footer> </footer>
{% endblock container%}
</div> <!--! end of #container --> </div> <!--! end of #container -->
{% endblock content%}


{% block js %}
<!-- Javascript at the bottom for fast page loading --> <!-- Javascript at the bottom for fast page loading -->
{% block jquery %}
<!-- Grab Google CDN's jQuery. fall back to local if necessary --> <!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.4.4.js"%3E%3C/script%3E'))</script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="{% media 'js/libs/jquery-1.4.4.js' %}"%3E%3C/script%3E'))</script>
{% endblock jquery %}


{% block scripts %}
<!-- scripts concatenated and minified via ant build script--> <!-- scripts concatenated and minified via ant build script-->
<script src="js/plugins.js"></script>
<script src="js/script.js"></script>
<script src="{% media 'js/plugins.js' %}"></script>
<script src="{% media 'js/script.js' %}"></script>
<!-- end concatenated and minified scripts--> <!-- end concatenated and minified scripts-->
{% endblock scripts %}


{% block pngfix %}
<!--[if lt IE 7 ]> <!--[if lt IE 7 ]>
<script> <script>
// More information on tackling transparent PNGs for IE goo.gl/mZiyb // More information on tackling transparent PNGs for IE goo.gl/mZiyb
//fix any <img> or .png_bg background-images //fix any <img> or .png_bg background-images
$.getScript("js/libs/dd_belatedpng.js",function(){ DD_belatedPNG.fix('img, .png_bg'); });
$.getScript("{% media 'js/libs/dd_belatedpng.js' %}",function(){ DD_belatedPNG.fix('img, .png_bg'); });
</script> </script>
<![endif]--> <![endif]-->

<!-- yui profiler and profileviewer - remove for production -->
<script src="js/profiling/yahoo-profiling.min.js"></script>
<script src="js/profiling/config.js"></script>
<!-- end profiling code -->


<!-- asynchronous google analytics: mathiasbynens.be/notes/async-analytics-snippet
change the UA-XXXXX-X to be your site's ID -->
<script>
var _gaq = [['_setAccount', 'UA-XXXXX-X'], ['_trackPageview']];
(function(d, t) {
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0];
g.async = true;
g.src = ('https:' == location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
s.parentNode.insertBefore(g, s);
})(document, 'script');
</script>

{% endblock pngfix %}

{% block debug %}
{% include "devmode.html" %}
{% endblock debug %}
{%block analytics %}
{% include "analytics.html" %}
{% endblock analytics %}
{% endblock js %}
</body> </body>
</html> </html>
{% endblock %}
{% endblock all %}

+ 6
- 0
data/templates/basic/layout/devmode.html View File

@@ -0,0 +1,6 @@
{%if not site.in_production_mode %}
<!-- yui profiler and profileviewer - remove for production -->
<script src="js/profiling/yahoo-profiling.min.js"></script>
<script src="js/profiling/config.js"></script>
<!-- end profiling code -->
{% endif %}

Loading…
Cancel
Save