This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
oliverdavies.uk-old-sculpin/source/_includes/scripts.html.twig
Oliver Davies cc9eac3c78 Add mobile nav
Fixes #43
2017-12-28 16:37:56 +00:00

15 lines
774 B
Twig

<script src="{{ site.url }}/assets/js/site.js"></script>
<script>
document.querySelector('.nav-toggle').onclick = function() {
document.querySelector('.navbar nav').classList.toggle('hidden').toggle('block');
return false;
};
</script>
{% if site.google_analytics_tracking_id %}
<script>(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),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', '{{ site.google_analytics_tracking_id }}', 'auto'); ga('send', 'pageview');</script>
{% endif %}
{% block scripts %}{% endblock %}