Skip to content

Commit 8c932ce

Browse files
author
Fidel Ramos
committed
Refactor footer templates
Avoid duplication of includes. Correct footer link to Reflex theme instead of Flex.
1 parent eb59ee8 commit 8c932ce

File tree

5 files changed

+20
-23
lines changed

5 files changed

+20
-23
lines changed

templates/partial/cc_license.html

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,3 @@
77
© {{ COPYRIGHT_YEAR }} {{ COPYRIGHT_NAME }} - {{ _('This work is licensed under a %(cc)s',
88
cc='<a rel="license" href="{}" target="_blank">{}</a>'.format(cc_url, cc_name) |safe) }}
99
</p>
10-
{% include "partial/flex.html" %}
11-
<p>
12-
{% if CC_LICENSE['icon'] != False %}
13-
<a rel="license"
14-
href="http://creativecommons.org/licenses/{{ CC_LICENSE['slug'] }}/{{ CC_LICENSE['version'] }}/"
15-
target="_blank">
16-
<img alt="Creative Commons License"
17-
title="Creative Commons License"
18-
style="border-width:0"
19-
{% if CC_LICENSE['local_icons'] %} src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/img/cc/{{ CC_LICENSE['slug'] }}.png" {% else %} src="https://i.creativecommons.org/l/{{ CC_LICENSE['slug'] }}/{{ CC_LICENSE['version'] }}/80x15.png" {% endif %}
20-
width="80"
21-
height="15" />
22-
</a>
23-
{% endif %}
24-
{% if STATUSCAKE %}
25-
{% include "partial/statuscake.html" %}
26-
{% endif %}
27-
</p>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<a rel="license"
2+
href="https://creativecommons.org/licenses/{{ CC_LICENSE['slug'] }}/{{ CC_LICENSE['version'] }}/"
3+
target="_blank">
4+
<img alt="Creative Commons License"
5+
title="Creative Commons License"
6+
style="border-width:0"
7+
{% if CC_LICENSE['local_icons'] %} src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/img/cc/{{ CC_LICENSE['slug'] }}.png" {% else %} src="https://i.creativecommons.org/l/{{ CC_LICENSE['slug'] }}/{{ CC_LICENSE['version'] }}/80x15.png" {% endif %}
8+
width="80"
9+
height="15" />
10+
</a>

templates/partial/copyright.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
11
<p>&copy; {{ COPYRIGHT_YEAR }} {{ COPYRIGHT_NAME }}</p>
2-
{% include "partial/flex.html" %}
3-
{% if STATUSCAKE %}
4-
{% include "partial/statuscake.html" %}
5-
{% endif %}

templates/partial/footer.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,13 @@
44
{% else %}
55
{% include "partial/copyright.html" %}
66
{% endif %}
7+
{% include "partial/reflex.html" %}
8+
<p>
9+
{% if CC_LICENSE['icon'] == True %}
10+
{% include "partial/cc_license_icon.html" %}
11+
{% endif %}
12+
{% if STATUSCAKE %}
13+
{% include "partial/statuscake.html" %}
14+
{% endif %}
15+
</p>
716
</footer>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<p>
22
{% set built_with = _('Built with %(pelican_url)s using %(flex_url)s theme',
33
pelican_url='<a href="https://getpelican.com" target="_blank">Pelican</a>',
4-
flex_url='<a href="http://bit.ly/flex-pelican" target="_blank">Flex</a>'|safe) %}
4+
flex_url='<a href="https://github.com/haplo/pelican-theme-reflex" target="_blank">Reflex</a>'|safe) %}
55
{{ built_with }}
66
{% if THEME_COLOR_ENABLE_USER_OVERRIDE %}
77
{% set theme_switch = _('Switch to the %(dark_url)s | %(light_url)s | %(browser_url)s theme',

0 commit comments

Comments
 (0)