Modularize components and add Links menu for mobile
- Various components - disqus, analytics modularized better. - List of links moved into it's own file. - Links menu for mobile, hidden on larger screen, since the sidebar is hidden on mobile. - Add comments to config
This commit is contained in:
parent
4b89bb0695
commit
acc2283546
16
_config.yml
16
_config.yml
@ -1,16 +1,28 @@
|
||||
# Jekyll configuration
|
||||
|
||||
name: My blog
|
||||
description: A jekyll theme
|
||||
|
||||
# url is currently only used only for the RSS feed in atom.xml
|
||||
url: http://scotte.github.io
|
||||
|
||||
# baseurl will usually be ''
|
||||
baseurl: /jekyll-clean
|
||||
|
||||
# Set the following to enable these features, leave as '' to disable them
|
||||
# This can be '' to hide the Github nav button
|
||||
github: 'scotte/jekyll-clean'
|
||||
|
||||
# Set this to your UA-# value, or '' to disable the block completely
|
||||
gaaccount: ''
|
||||
|
||||
# Set this to your disqus shortname to enable comments. Note that the 'comments'
|
||||
# setting below must also be true. Individual posts can override 'comments' to
|
||||
# disable on a post-by-post basis
|
||||
disqus: ''
|
||||
comments: true
|
||||
|
||||
permalink: /:year/:month/:title
|
||||
paginate: 3
|
||||
comments: true
|
||||
|
||||
highlighter: pygments
|
||||
markdown: redcarpet
|
||||
|
11
_includes/analytics.html
Normal file
11
_includes/analytics.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% if site.gaaccount != '' %}
|
||||
<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.gaaccount }}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
{% endif %}
|
11
_includes/disqus-comments.html
Normal file
11
_includes/disqus-comments.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% if page.comments %}
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = '{{ site.disqus }}';
|
||||
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
12
_includes/disqus-counts.html
Normal file
12
_includes/disqus-counts.html
Normal file
@ -0,0 +1,12 @@
|
||||
{% if site.comments == true and site.disqus != '' %}
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = '{{ site.disqus }}';
|
||||
|
||||
(function () {
|
||||
var s = document.createElement('script'); s.async = true;
|
||||
s.type = 'text/javascript';
|
||||
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
|
||||
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
|
||||
}());
|
||||
</script>
|
||||
{% endif %}
|
@ -3,37 +3,13 @@
|
||||
<div class="span12 footer navbar-inverse navbar-fixed-bottom">
|
||||
<p class="copyright">Copyright © {{ site.time | date: '%Y' }} {{ site.name }}. Powered by <a href="http://jekyllrb.com">Jekyll</a>, theme by <a href="https://github.com/scotte/jekyll-clean">Scott Emmons</a>.
|
||||
<a href="http://creativecommons.org/licenses/by/4.0/"><img src="https://i.creativecommons.org/l/by/4.0/80x15.png"/></a>
|
||||
Licensed under a <a href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.</p>
|
||||
Licensed under a <a href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution License</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if site.comments == true and site.disqus != '' %}
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = '{{ site.disqus }}';
|
||||
|
||||
(function () {
|
||||
var s = document.createElement('script'); s.async = true;
|
||||
s.type = 'text/javascript';
|
||||
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
|
||||
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
|
||||
}());
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if site.gaaccount != '' %}
|
||||
<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.gaaccount }}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
{% endif %}
|
||||
{% include disqus-counts.html %}
|
||||
{% include analytics.html %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -28,6 +28,7 @@
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="{{ site.baseurl }}/">Home</a></li>
|
||||
<li class="active visible-xs-block"><a href="{{ site.baseurl }}/links.html">Links</a></li>
|
||||
<li class="active"><a href="{{ site.baseurl }}/archive.html">Archive</a></li>
|
||||
<li class="active"><a href="{{ site.baseurl }}/about.html">About</a></li>
|
||||
<li class="active"><a href="{{ site.baseurl }}/atom.xml">RSS</a></li>
|
||||
|
7
_includes/links-list.html
Normal file
7
_includes/links-list.html
Normal file
@ -0,0 +1,7 @@
|
||||
<h1>Links</h1>
|
||||
<ul>
|
||||
<li><a href="#">One</a></li>
|
||||
<li><a href="#">Two</a></li>
|
||||
<li><a href="#">Three</a></li>
|
||||
<li><a href="#">Four</a></li>
|
||||
</ul>
|
@ -12,11 +12,5 @@
|
||||
</div>
|
||||
|
||||
<div class="sidebar well">
|
||||
<h1>Links</h1>
|
||||
<ul>
|
||||
<li><a href="#">One</a></li>
|
||||
<li><a href="#">Two</a></li>
|
||||
<li><a href="#">Three</a></li>
|
||||
<li><a href="#">Four</a></li>
|
||||
</ul>
|
||||
{% include links-list.html %}
|
||||
</div>
|
||||
|
@ -36,18 +36,5 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% if page.comments %}
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = '{{ site.disqus }}';
|
||||
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% include disqus-comments.html %}
|
||||
{% include footer.html %}
|
||||
|
9
links.html
Normal file
9
links.html
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<!-- This page provides the sidebar links for mobile, where the sidebar is hidden -->
|
||||
|
||||
<div class="well">
|
||||
{% include links-list.html %}
|
||||
</div>
|
Reference in New Issue
Block a user