mirror of
https://github.com/clockworkpi/wiki.clockworkpi.com.git
synced 2025-12-12 16:58:50 +01:00
Issue #4 Footer with (empty) analytics and powered-by
This commit is contained in:
parent
e9ee1f40d4
commit
45bc42f572
0
_includes/analytics.html
Normal file
0
_includes/analytics.html
Normal file
@ -1,11 +1,17 @@
|
||||
<footer>
|
||||
<div id="footer-left">
|
||||
<a href="https://creativecommons.org/licenses/by-sa/4.0/" id="license">
|
||||
<img src="https://creativecommons.org/images/public/somerights20.png">
|
||||
</a>
|
||||
</div>
|
||||
<div id="footer-center">
|
||||
{{ site.data.i18n[site.lang].label.modified }}: {{ page.modified }}<br/>
|
||||
{{ site.data.i18n[site.lang].label.created }}: {{ page.created }}
|
||||
</div>
|
||||
<div id="footer-right">
|
||||
<a href="https://creativecommons.org/licenses/by-sa/4.0/"></a>
|
||||
<a href="https://jekyllrb.com/" title="Jekyll" id="poweredby">
|
||||
<span>Powered by</span><img src="/img/jekyll-tube-bw.png">
|
||||
</a>
|
||||
{%- include analytics.html -%}
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@ -1,61 +0,0 @@
|
||||
{% comment %}
|
||||
See https://github.com/oncleben31/jekyll-date-basic-i18n/
|
||||
{% endcomment %}
|
||||
|
||||
{% comment %}
|
||||
This include allows to translate the days and months in the date by using strings in _data/locales/[lang].yml
|
||||
This include can be called with three parameters:
|
||||
- include.date: the date to be processed
|
||||
- include.format: the date format. (If empty a default format will be used)
|
||||
- include.lang: lang to use for translation.
|
||||
{% endcomment %}
|
||||
|
||||
{% comment %}
|
||||
If the parameter date format is empty the default format set in _config.yml is used.
|
||||
If there is no default in _config, "%b %-d, %Y" is used.
|
||||
{% endcomment %}
|
||||
|
||||
{% assign date_format_to_be_translated = include.format | default: site.date_format | default: "%-d %b %Y" %}
|
||||
|
||||
{% comment %}
|
||||
Init to have the indice of the day in the week (num_day) and the indice of the month in the year (num_mont)
|
||||
Init the lang parameter depending if it's set in the include call, in the page or in the site settings
|
||||
{% endcomment %}
|
||||
|
||||
{% assign num_day = include.date | date: "%w" | plus: 0 %}
|
||||
{% assign num_month = include.date | date: "%-m" | plus: -1 %}
|
||||
{% assign lang = include.lang | default: page.lang | default: site.lang %}
|
||||
|
||||
{% comment %}
|
||||
Use translated abbreviated weekday if "%a" is used in the format and the translation is available in _data/locales/[lang].yml
|
||||
{% endcomment %}
|
||||
|
||||
{% if site.data.locales[lang].abbreviated_weekday[num_day] %}
|
||||
{% assign date_format_to_be_translated = date_format_to_be_translated | replace: "%a", site.data.locales[lang].abbreviated_weekday[num_day] %}
|
||||
{% endif %}
|
||||
|
||||
{% comment %}
|
||||
Use translated full weekday if "%A" is used in the format and the translation is available in _data/locales/[lang].yml
|
||||
{% endcomment %}
|
||||
|
||||
{% if site.data.locales[lang].full_weekday[num_day] %}
|
||||
{% assign date_format_to_be_translated = date_format_to_be_translated | replace: "%A", site.data.locales[lang].full_weekday[num_day] %}
|
||||
{% endif %}
|
||||
|
||||
{% comment %}
|
||||
Use translated abbreviated month if "%b" is used in the format and the translation is available in _data/locales/[lang].yml
|
||||
{% endcomment %}
|
||||
|
||||
{% if site.data.locales[lang].abbreviated_month[num_month] %}
|
||||
{% assign date_format_to_be_translated = date_format_to_be_translated | replace: "%b", site.data.locales[lang].abbreviated_month[num_month] %}
|
||||
{% endif %}
|
||||
|
||||
{% comment %}
|
||||
Use translated abbreviated weekday if "%B" is used in the format and the translation is available in _data/locales/[lang].yml
|
||||
{% endcomment %}
|
||||
|
||||
{% if site.data.locales[lang].full_month[num_month] %}
|
||||
{% assign date_format_to_be_translated = date_format_to_be_translated | replace: "%B", site.data.locales[lang].full_month[num_month] %}
|
||||
{% endif %}
|
||||
|
||||
{{ include.date | date: date_format_to_be_translated }}
|
||||
@ -6,24 +6,28 @@ body > footer {
|
||||
footer {
|
||||
display: grid;
|
||||
grid-template-columns: 20% 60% 20%;
|
||||
font-size: 80%;
|
||||
|
||||
* {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
background-repeat: no-repeat;
|
||||
color: #424242
|
||||
}
|
||||
|
||||
#footer-center {
|
||||
align-self: center;
|
||||
justify-self: center;
|
||||
text-align: center;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
#footer-right {
|
||||
align-self: center;
|
||||
justify-self: end;
|
||||
|
||||
a {
|
||||
background-image: url(https://creativecommons.org/images/public/somerights20.png);
|
||||
width: 88px;
|
||||
height: 31px;
|
||||
display: block;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
padding-right: 3px;
|
||||
font-size: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
BIN
img/jekyll-tube-bw.png
Normal file
BIN
img/jekyll-tube-bw.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 954 B |
Loading…
x
Reference in New Issue
Block a user