Skip to content

Commit 0c6c4ee

Browse files
committed
misc: formatting fixes & cleanup
1 parent ff7ed8f commit 0c6c4ee

File tree

17 files changed

+178
-233
lines changed

17 files changed

+178
-233
lines changed

_includes/ad.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client={{ site.google_adsense }}" crossorigin="anonymous"></script>
33
<!-- Ad -->
44
<ins class="adsbygoogle"
5-
style="display:block"
6-
data-ad-client="{{ site.google_adsense }}"
7-
data-ad-slot="1530678571"
8-
data-ad-format="auto"
9-
data-full-width-responsive="true"></ins>
5+
style="display:block"
6+
data-ad-client="{{ site.google_adsense }}"
7+
data-ad-slot="1530678571"
8+
data-ad-format="auto"
9+
data-full-width-responsive="true"></ins>
1010
<script>
1111
(adsbygoogle = window.adsbygoogle || []).push({});
1212
</script>

_includes/disqus.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
{%- if site.disqus -%}
2-
<div class="comments">
1+
{% if site.disqus %}
2+
<div class="comments">
33
<div id="disqus_thread"></div>
44
<script type="text/javascript">
5-
var disqus_shortname = '{{ site.disqus }}';
6-
/* ensure that pages with query string get the same discussion */
7-
var url_parts = window.location.href.split("?");
8-
var disqus_url = url_parts[0];
9-
(function() {
10-
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
11-
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
12-
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
13-
})();
5+
var disqus_shortname = '{{ site.disqus }}';
6+
/* ensure that pages with query string get the same discussion */
7+
var url_parts = window.location.href.split("?");
8+
var disqus_url = url_parts[0];
9+
(function() {
10+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
11+
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
12+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
13+
})();
1414
</script>
1515
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
1616
</div>
17-
{%- endif -%}
17+
{% endif %}

_includes/footer-minimal.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

_includes/head.html

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,22 @@
33
<meta http-equiv="X-UA-Compatible" content="IE=edge">
44
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
55

6-
<title>{% if page.use-site-title %}{{ site.title }}{% elsif page.title and page.subtitle %}{{ page.title }} {{ page.subtitle }}{% elsif page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
6+
<title>
7+
{% if page.use-site-title %}
8+
{{ site.title }}
9+
{% elsif page.title and page.subtitle %}
10+
{{ page.title }} {{ page.subtitle }}
11+
{% elsif page.title %}
12+
{{ page.title }}
13+
{% else %}
14+
{{ site.title }}
15+
{% endif %}
16+
</title>
717

818
<meta name="author" content="{{ site.author.name }}" />
919

1020
{% if page.subtitle %}
11-
<meta name="description" content="{{ page.subtitle }}">
21+
<meta name="description" content="{{ page.subtitle }}">
1222
{% endif %}
1323

1424
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ site.baseurl }}/feed.xml" />
@@ -52,36 +62,36 @@
5262
{% endif %}
5363

5464
{% if page.meta-title %}
55-
<meta property="og:title" content="{{ page.meta-title }}" />
65+
<meta property="og:title" content="{{ page.meta-title }}" />
5666
{% elsif page.title %}
57-
<meta property="og:title" content="{{ page.title }}" />
67+
<meta property="og:title" content="{{ page.title }}" />
5868
{% else %}
59-
<meta property="og:title" content="{{ site.title }}" />
69+
<meta property="og:title" content="{{ site.title }}" />
6070
{% endif %}
6171

62-
{% if page.meta-description %}
63-
<meta property="og:description" content="{{ page.meta-description }}">
72+
{% if page.meta-description %}
73+
<meta property="og:description" content="{{ page.meta-description }}">
6474
{% elsif page.subtitle %}
65-
<meta property="og:description" content="{{ page.subtitle }}">
75+
<meta property="og:description" content="{{ page.subtitle }}">
6676
{% else %}
67-
<meta property="og:description" content="{{ page.content | strip_html | xml_escape | truncatewords: 50 }}">
77+
<meta property="og:description" content="{{ page.content | strip_html | xml_escape | truncatewords: 50 }}">
6878
{% endif %}
6979

7080

7181
<meta property="og:type" content="website" />
7282

7383
{% if page.id %}
74-
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
75-
<link rel="canonical" href="{{ site.url }}{{ page.url }}" />
84+
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
85+
<link rel="canonical" href="{{ site.url }}{{ page.url }}" />
7686
{% else %}
77-
<meta property="og:url" content="{{ site.url }}{{ page.url | remove: '/index.html' | remove: '.html' }}" />
78-
<link rel="canonical" href="{{ site.url }}{{ page.url | remove: '/index.html' | remove: '.html' }}" />
87+
<meta property="og:url" content="{{ site.url }}{{ page.url | remove: '/index.html' | remove: '.html' }}" />
88+
<link rel="canonical" href="{{ site.url }}{{ page.url | remove: '/index.html' | remove: '.html' }}" />
7989
{% endif %}
8090

8191
{% if page.share-img %}
82-
<meta property="og:image" content="{{ page.share-img }}" />
92+
<meta property="og:image" content="{{ page.share-img }}" />
8393
{% elsif site.avatar %}
84-
<meta property="og:image" content="{{ site.url }}{{ site.avatar }}" />
94+
<meta property="og:image" content="{{ site.url }}{{ site.avatar }}" />
8595
{% endif %}
8696

8797
<!-- Twitter summary cards -->
@@ -90,32 +100,32 @@
90100
<meta name="twitter:creator" content="@{{ site.author.twitter }}" />
91101

92102
{% if page.meta-title %}
93-
<meta name="twitter:title" content="{{ page.meta-title }}" />
103+
<meta name="twitter:title" content="{{ page.meta-title }}" />
94104
{% elsif page.title %}
95-
<meta name="twitter:title" content="{{ page.title }}" />
105+
<meta name="twitter:title" content="{{ page.title }}" />
96106
{% else %}
97-
<meta name="twitter:title" content="{{ site.title }}" />
107+
<meta name="twitter:title" content="{{ site.title }}" />
98108
{% endif %}
99109

100110
{% if page.meta-description %}
101-
<meta name="twitter:description" content="{{ page.meta-description }}">
111+
<meta name="twitter:description" content="{{ page.meta-description }}">
102112
{% elsif page.subtitle %}
103-
<meta name="twitter:description" content="{{ page.subtitle }}">
113+
<meta name="twitter:description" content="{{ page.subtitle }}">
104114
{% else %}
105-
<meta name="twitter:description" content="{{ page.content | strip_html | xml_escape | truncatewords: 50 }}">
115+
<meta name="twitter:description" content="{{ page.content | strip_html | xml_escape | truncatewords: 50 }}">
106116
{% endif %}
107117

108118
{% if page.share-img %}
109-
<meta name="twitter:image" content="{{ page.share-img }}" />
119+
<meta name="twitter:image" content="{{ page.share-img }}" />
110120
{% elsif site.avatar %}
111-
<meta name="twitter:image" content="{{ site.url }}{{ site.avatar }}" />
121+
<meta name="twitter:image" content="{{ site.url }}{{ site.avatar }}" />
112122
{% endif %}
113123

114124
{% if site.avatar %}
115-
<link rel="icon" type="image/png" href="{{ site.avatar }}">
125+
<link rel="icon" type="image/png" href="{{ site.avatar }}">
116126
{% endif %}
117127

118128
{% if site.google_adsense %}
119-
{% include google_adsense.html %}
129+
{% include google_adsense.html %}
120130
{% endif %}
121131
</head>

_includes/header.html

Lines changed: 59 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,73 @@
1-
<!-- TODO this file has become a mess, refactor it -->
2-
31
{% if (page.bigimg or page.title) and (include.type == "page" or include.type == "post") %}
42

5-
{% if page.bigimg %}
6-
<div id="header-big-imgs" data-num-img={% if page.bigimg.first %}{{ page.bigimg.size }}{% else %}1{% endif %}
7-
{% for bigimg in page.bigimg %}
8-
{% assign imgnum = forloop.index %}
9-
{% for imginfo in bigimg %}
10-
{% if imginfo[0] %}
11-
data-img-src-{{ imgnum }}="{{ imginfo[0] | prepend: site.baseurl | replace: '//', '/' }}"
12-
data-img-desc-{{ imgnum }}="{{ imginfo[1] }}"
13-
{% else %}
14-
data-img-src-{{ imgnum }}="{{ imginfo | prepend: site.baseurl | replace: '//', '/' }}"
15-
{% endif %}
3+
{% if page.bigimg %}
4+
<div id="header-big-imgs" data-num-img={% if page.bigimg.first %}{{ page.bigimg.size }}{% else %}1{% endif %}
5+
{% for bigimg in page.bigimg %}
6+
{% assign imgnum = forloop.index %}
7+
{% for imginfo in bigimg %}
8+
{% if imginfo[0] %}
9+
data-img-src-{{ imgnum }}="{{ imginfo[0] | prepend: site.baseurl | replace: '//', '/' }}"
10+
data-img-desc-{{ imgnum }}="{{ imginfo[1] }}"
11+
{% else %}
12+
data-img-src-{{ imgnum }}="{{ imginfo | prepend: site.baseurl | replace: '//', '/' }}"
13+
{% endif %}
14+
{% endfor %}
1615
{% endfor %}
17-
{% endfor %}
18-
></div>
19-
{% endif %}
16+
></div>
17+
{% endif %}
2018

21-
<header class="header-section {% if page.bigimg %}has-img{% endif %}">
19+
<header class="header-section {% if page.bigimg %}has-img{% endif %}">
20+
{% if page.bigimg %}
21+
<div class="big-img intro-header">
22+
<div class="container">
23+
<div class="row">
24+
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
25+
<div class="{{ include.type }}-heading">
26+
<h1>{% if page.title %}{{ page.title }}{% else %}<br/>{% endif %}</h1>
27+
{% if page.subtitle %}
28+
{% if include.type == "page" %}
29+
<hr class="small">
30+
<span class="{{ include.type }}-subheading">{{ page.subtitle }}</span>
31+
{% else %}
32+
<h2 class="{{ include.type }}-subheading">{{ page.subtitle }}</h2>
33+
{% endif %}
34+
{% endif %}
2235

23-
{% if page.bigimg %}
24-
<div class="big-img intro-header">
25-
<div class="container">
26-
<div class="row">
27-
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
28-
<div class="{{ include.type }}-heading">
29-
<h1>{% if page.title %}{{ page.title }}{% else %}<br/>{% endif %}</h1>
30-
{% if page.subtitle %}
31-
{% if include.type == "page" %}
32-
<hr class="small">
33-
<span class="{{ include.type }}-subheading">{{ page.subtitle }}</span>
34-
{% else %}
35-
<h2 class="{{ include.type }}-subheading">{{ page.subtitle }}</h2>
36-
{% endif %}
37-
{% endif %}
38-
39-
{% if include.type == "post" %}
40-
<span class="post-meta">{{ page.date | date: "%B %-d, %Y" }}</span>
41-
{% endif %}
36+
{% if include.type == "post" %}
37+
<span class="post-meta">{{ page.date | date: "%B %-d, %Y" }}</span>
38+
{% endif %}
39+
</div>
40+
</div>
41+
</div>
4242
</div>
43+
<span class='img-desc'></span>
4344
</div>
44-
</div>
45-
</div>
46-
<span class='img-desc'></span>
47-
</div>
48-
{% endif %}
45+
{% endif %}
46+
<div class="intro-header no-img">
47+
<div class="container">
48+
<div class="row">
49+
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
50+
<div class="{{ include.type }}-heading">
51+
<h1>{% if page.title %}{{ page.title }}{% else %}<br/>{% endif %}</h1>
52+
{% if page.subtitle %}
53+
{% if include.type == "page" %}
54+
<hr class="small">
55+
<span class="{{ include.type }}-subheading">{{ page.subtitle }}</span>
56+
{% else %}
57+
<h2 class="{{ include.type }}-subheading">{{ page.subtitle }}</h2>
58+
{% endif %}
59+
{% endif %}
4960

50-
<div class="intro-header no-img">
51-
<div class="container">
52-
<div class="row">
53-
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
54-
<div class="{{ include.type }}-heading">
55-
<h1>{% if page.title %}{{ page.title }}{% else %}<br/>{% endif %}</h1>
56-
{% if page.subtitle %}
57-
{% if include.type == "page" %}
58-
<hr class="small">
59-
<span class="{{ include.type }}-subheading">{{ page.subtitle }}</span>
60-
{% else %}
61-
<h2 class="{{ include.type }}-subheading">{{ page.subtitle }}</h2>
62-
{% endif %}
63-
{% endif %}
64-
65-
{% if include.type == "post" %}
66-
<span class="post-meta">{{ page.date | date: "%B %-d, %Y" }}</span>
67-
{% endif %}
61+
{% if include.type == "post" %}
62+
<span class="post-meta">{{ page.date | date: "%B %-d, %Y" }}</span>
63+
{% endif %}
64+
</div>
65+
</div>
6866
</div>
6967
</div>
7068
</div>
71-
</div>
72-
</div>
73-
</header>
69+
</header>
7470

7571
{% else %}
76-
<div class="intro-header"></div>
72+
<div class="intro-header"></div>
7773
{% endif %}

_includes/nav.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
{% include navbarlink.html link=link %}
3030
</li>
3131
{% endif %}
32-
{% endfor %}
32+
{% endfor %}
3333
</ul>
3434
</div>
3535

_layouts/default.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

_layouts/device.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
{% include ad.html %}
1313
{% endif %}
1414

15-
<article role="main" class="blog-post">
15+
<article class="blog-post">
1616
{{ content }}
1717
</article>
1818

1919
{% if site.google_adsense %}
2020
{% include ad.html %}
2121
{% endif %}
22+
2223
</div>
2324
</div>
2425
</div>

_layouts/minimal.html

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)