Refactor.

This commit is contained in:
Alexandre Vicenzi 2015-11-24 23:55:55 -02:00
parent 17e9f0b43e
commit 8ecbec719d
7 changed files with 44 additions and 31 deletions

View file

@ -35,7 +35,9 @@
<title>{{ SITENAME }}{% block title %}{% endblock %}</title> <title>{{ SITENAME }}{% block title %}{% endblock %}</title>
</head> </head>
<body> <body>
{% include "partial/gtm.html" %} {% if GOOGLE_TAG_MANAGER %}
{% include "partial/gtm.html" %}
{% endif %}
<aside> <aside>
<div> <div>
<a href="{{ SITEURL }}"> <a href="{{ SITEURL }}">
@ -87,37 +89,31 @@
{% if CC_LICENSE %} {% if CC_LICENSE %}
{% include "partial/cc_license.html" %} {% include "partial/cc_license.html" %}
{% else %} {% else %}
<p>&copy; {{ AUTHOR }} {{ COPYRIGHT_YEAR }}</p> <p>&copy; {{ AUTHOR }} {{ COPYRIGHT_YEAR }}</p>
{% include "partial/flex.html" %} {% include "partial/flex.html" %}
{% include "partial/statuscake.html" %} {% if STATUSCAKE %}
{% include "partial/statuscake.html" %}
{% endif %}
{% endif %} {% endif %}
</footer> </footer>
</main> </main>
{% include "partial/ga.html" %}
{% if GOOGLE_ANALYTICS %}
{% include "partial/ga.html" %}
{% endif %}
{% if GUAGES %} {% if GUAGES %}
{% include "partial/guages.html" %} {% include "partial/guages.html" %}
{% endif %} {% endif %}
{% if ADD_THIS_ID %} {% if ADD_THIS_ID %}
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ ADD_THIS_ID }}" async="async"></script> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ ADD_THIS_ID }}" async="async"></script>
{% endif %} {% endif %}
{% block additional_js %}{% endblock %}
{% if PIWIK_URL and PIWIK_SITE_ID %} {% if PIWIK_URL and PIWIK_SITE_ID %}
<!-- Piwik --> {% include "partial/piwik.html" %}
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//{{ PIWIK_URL }}/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', {{ PIWIK_SITE_ID }}]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//bnjbvr.alwaysdata.net/piwik/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
{% endif %} {% endif %}
{% block additional_js %}{% endblock %}
</body> </body>
</html> </html>

View file

@ -13,5 +13,7 @@
width="80" width="80"
height="15"/> height="15"/>
</a> </a>
{% include "partial/statuscake.html" %} {% if STATUSCAKE %}
</p> {% include "partial/statuscake.html" %}
{% endif %}
</p>

View file

@ -1,4 +1,4 @@
{% if GOOGLE_ANALYTICS %} <!-- Google Analytics -->
<script type="text/javascript"> <script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -8,4 +8,4 @@
ga('create', '{{ GOOGLE_ANALYTICS }}', 'auto'); ga('create', '{{ GOOGLE_ANALYTICS }}', 'auto');
ga('send', 'pageview'); ga('send', 'pageview');
</script> </script>
{% endif %} <!-- End Google Analytics -->

View file

@ -1,4 +1,3 @@
{% if GOOGLE_TAG_MANAGER %}
<!-- Google Tag Manager --> <!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id={{ GOOGLE_TAG_MANAGER }}" <noscript><iframe src="//www.googletagmanager.com/ns.html?id={{ GOOGLE_TAG_MANAGER }}"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
@ -8,4 +7,3 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','{{ GOOGLE_TAG_MANAGER }}');</script> })(window,document,'script','dataLayer','{{ GOOGLE_TAG_MANAGER }}');</script>
<!-- End Google Tag Manager --> <!-- End Google Tag Manager -->
{% endif %}

View file

@ -1,3 +1,4 @@
<!-- Gauges -->
<script type="text/javascript"> <script type="text/javascript">
var _gauges = _gauges || []; var _gauges = _gauges || [];
(function() { (function() {
@ -12,3 +13,4 @@
s.parentNode.insertBefore(t, s); s.parentNode.insertBefore(t, s);
})(); })();
</script> </script>
<!-- End Gauges -->

View file

@ -0,0 +1,15 @@
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//{{ PIWIK_URL }}/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', {{ PIWIK_SITE_ID }}]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//bnjbvr.alwaysdata.net/piwik/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->

View file

@ -1,5 +1,5 @@
{% if STATUSCAKE %} <!-- StatusCake -->
<a href="https://www.statuscake.com" title="{{ SITENAME }} Uptime"> <a href="https://www.statuscake.com" title="{{ SITENAME }} Uptime">
<img src="https://www.statuscake.com/App/button/index.php?Track={{ STATUSCAKE['trackid'] }}&amp;Days={{ STATUSCAKE['days'] }}&amp;Design=6" alt="{{ SITENAME }} Uptime" width="96" height="15"/> <img src="https://www.statuscake.com/App/button/index.php?Track={{ STATUSCAKE['trackid'] }}&amp;Days={{ STATUSCAKE['days'] }}&amp;Design=6" alt="{{ SITENAME }} Uptime" width="96" height="15"/>
</a> </a>
{% endif %} <!-- End StatusCake -->