Skip to content

Commit 865c0ed

Browse files
committed
Add footer to includes
1 parent da0ff7e commit 865c0ed

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

docs/_includes/footer.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{% if page.url contains "/about" %}
2+
{% assign about = true %}
3+
{% endif %}
4+
{% if page.url contains "/en/" %}
5+
{% assign en = true %}
6+
{% assign lang = "en" %}
7+
{% endif %}
8+
<div id="footer">
9+
<span class="credits left">&copy; 2016-{{ 'now' | date: "%Y" }}</span>
10+
{% if en %}
11+
<span class="credits right">{% if about %}About this site{% else %}<a href="/{{ lang }}/about">About this site</a>{% endif %}</span>
12+
{% else %}
13+
<span class="credits right">{% if about %}Об этом сайте{% else %}<a href="/about">Об этом сайте</a>{% endif %}</span>
14+
{% endif %}
15+
</div>
16+
{% if site.google_analytics %}
17+
<script type="text/javascript">
18+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
19+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
20+
</script>
21+
<script type="text/javascript">
22+
try {
23+
var pageTracker = _gat._getTracker("{{ site.google_analytics }}");
24+
pageTracker._trackPageview();
25+
} catch(err) {}
26+
</script>
27+
{% endif %}

docs/_layouts/default.html

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -133,34 +133,7 @@ <h2>Downloads</h2>
133133
{% endif %}
134134
{% endif %}
135135
</section>
136-
<div id="footer">
137-
<table>
138-
<tbody>
139-
<tr>
140-
<td>&copy; 2016-2017</td>
141-
{% if about %}
142-
<td> </td>
143-
{% elsif en %}
144-
<td style="text-align: right;"><a href="/about{{ langx }}">About this site</a></td>
145-
{% else %}
146-
<td style="text-align: right;"><a href="/about">Об этом сайте</a></td>
147-
{% endif %}
148-
</tr>
149-
</tbody>
150-
</table>
151-
</div>
136+
{% include footer.html %}
152137
</div>
153-
{% if site.google_analytics %}
154-
<script type="text/javascript">
155-
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
156-
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
157-
</script>
158-
<script type="text/javascript">
159-
try {
160-
var pageTracker = _gat._getTracker("{{ site.google_analytics }}");
161-
pageTracker._trackPageview();
162-
} catch(err) {}
163-
</script>
164-
{% endif %}
165138
</body>
166139
</html>

0 commit comments

Comments
 (0)