added source code link to footer
This commit is contained in:
@@ -29,3 +29,5 @@ main_menu = [
|
||||
|
||||
copyright = "© $YEAR $AUTHOR"
|
||||
favicon_emoji = "🐧"
|
||||
|
||||
source_code = "https://git.rbitton.com/rbitton/Website"
|
||||
|
49
src/templates/partials/footer.html
Normal file
49
src/templates/partials/footer.html
Normal file
@@ -0,0 +1,49 @@
|
||||
{%- if config.generate_feeds or config.extra.socials -%}
|
||||
<address class="socials">
|
||||
<ul>
|
||||
{%- if config.generate_feeds -%}
|
||||
{%- for feed in config.feed_filenames %}
|
||||
<li>
|
||||
<a class="social-link" href="{{ get_url(path=feed) }}" title="{{ feed | trim_end_matches(pat=".xml") }} feed">
|
||||
<svg role="img" aria-label="feed">
|
||||
{%- if feed == "atom.xml" -%}
|
||||
<use aria-hidden="true" href="{{ get_url(path="images/social_icons/atom.svg") | safe }}#icon" />
|
||||
{%- else -%}
|
||||
<use aria-hidden="true" href="{{ get_url(path="images/social_icons/rss.svg") | safe }}#icon" />
|
||||
{%- endif -%}
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
{%- endfor %}
|
||||
{%- endif -%}
|
||||
{%- for social in config.extra.socials | default(value=[]) %}
|
||||
<li>
|
||||
<a class="social-link" rel="me" href="{{ social.url | safe }}" title="{{ social.name }}">
|
||||
<svg role="img" aria-label="{{ social.name }}">
|
||||
<use aria-hidden="true" href="{{ get_url(path="images/social_icons/" ~ social.name ~ ".svg") | safe }}#icon" />
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
</address>
|
||||
{% endif -%}
|
||||
|
||||
{%- if config.extra.copyright -%}
|
||||
<p class="copyright">
|
||||
{%- for line in config.extra.copyright | split(pat="::") %}
|
||||
{% set year_string = ["<time>", now() | date(format="%Y"), "</time>"] | join -%}
|
||||
{%- set templated = line | trim | replace(from="$YEAR", to=year_string) | replace(from="$AUTHOR", to=config.author | default(value="")) -%}
|
||||
<span>{{ templated | markdown(inline=true) | safe }}</span>
|
||||
{%- endfor %}
|
||||
|
||||
{% if config.extra.source_code %}
|
||||
<span><a href="{{ config.extra.source_code | safe }}" rel="noopener noreferrer">Site Source Code</a></span>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% else -%}
|
||||
<p class="copyright">
|
||||
<span>© <time>{{ now() | date(format="%Y") }}</time> {{ config.author }}</span>
|
||||
<span>Powered by <a href="https://www.getzola.org">Zola</a></span>
|
||||
</p>
|
||||
{% endif -%}
|
Reference in New Issue
Block a user