Replace twitter icon with mastodon.

Add attribution for SVG.
This commit is contained in:
Lyle Mantooth 2022-11-13 11:42:25 -05:00
parent ad307dad23
commit d0e40059b0
Signed by: IslandUsurper
GPG key ID: 6DB52EAE123A5789
3 changed files with 126 additions and 2 deletions

View file

@ -39,8 +39,8 @@ hermit_menu = [
hermit_social = [
{ name = "github", link = "https://github.com/IslandUsurper" },
{ name = "twitter", link = "https://fosstodon.org/@IslandUsurper" },
{ name = "twitter", link = "https://theres.life/@IslandUsurper" }
{ name = "mastodon", link = "https://fosstodon.org/@IslandUsurper" },
{ name = "mastodon", link = "https://theres.life/@IslandUsurper" }
]
[extra.author]

122
templates/index.html Normal file
View file

@ -0,0 +1,122 @@
{% import "macros.html" as macros %}
<!DOCTYPE html>
<html lang="en-us">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta itemprop="name" content="{{config.title}}" />
<meta itemprop="description" content="{{config.description}}" />
<link rel="apple-touch-icon" sizes="180x180" href="{{get_url(path="apple-touch-icon.png")}}"/>
<link rel="icon" type="image/png" sizes="32x32" href="{{get_url(path="favicon-32x32.png")}}" />
<link
rel="icon"
type="image/png"
sizes="16x16"
href="{{get_url(path="favicon-16x16.png")}}"
/>
<link
rel="shortcut icon"
href="{{get_url(path="favicon.ico")}}"
/>
<link rel="stylesheet" href="{{get_url(path="style.css")}}"/>
{% if page.title %}
<title>{{page.title}}</title>
{% else %}
<title>{{config.title}}</title>
{% endif %}
{% if config.generate_feed %}
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path=config.feed_filename, trailing_slash=false) }}">
{% endif %}
<body id="page">
{% block header %}
{% endblock header %}
{% block title %}
<div id="spotlight" class="animated fadeIn">
<div id="home-center">
<h1 id="home-title">{{config.title}}</h1>
<p id="home-subtitle">{{config.extra.home_subtitle}}</p>
<div id="home-social">
{{macros::render_social_icons()}}
</div>
{% endblock title %}
{% block main %}
<nav id="home-nav" class="site-nav">
{% for s in config.extra.hermit_menu %}
<a href="{{config.base_url ~ s.link}}">{{s.name}}</a>
{% endfor %}
</nav>
{% endblock main %}
</div>
{% block footer %}
<div id="home-footer">
<p>&copy; {{ now() | date(format="%Y")}}
<a href="{{config.base_url}}">{{config.extra.author.name}}</a>
{% if config.generate_feed %}
&#183; <a href="{{ get_url(path=config.feed_filename, trailing_slash=false) }}" target="_blank" title="rss">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>
{% endif %}
<a target="_blank" href="https://icons8.com/icon/SjG6BzZwdP2-/mastodon">Mastodon</a> icon by <a target="_blank" href="https://icons8.com">Icons8</a>
</a>
</p>
</div>
{% endblock footer %}
</div>
<script src="{{get_url(path="js/main.js")}}"></script>
<!-- Math rendering -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous"
onload="renderMathInElement(document.body, { delimiters: [ {left: '$$', right: '$$', display: true}, {left: '$', right: '$', display: false}, {left: '\\[', right: '\\]', display: true}, {left: '\\(', right: '\\)', display: false}]});"></script>
{% if config.extra.highlightjs.enable %}
<link href="https://unpkg.com/highlightjs-badge/highlightjs/styles/{{config.extra.highlightjs.theme}}.css" rel="stylesheet">
<!-- https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.1.1/build/styles/ for min version -->
<script src="https://unpkg.com/highlightjs-badge/highlightjs/highlight.pack.js"></script>
<script src="https://unpkg.com/highlightjs-badge/highlightjs-badge.min.js"></script>
<script>
var pres = document.querySelectorAll("pre>code");
for (var i = 0; i < pres.length; i++) {
hljs.highlightBlock(pres[i]);
}
</script>
{% if config.extra.highlightjs.clipboard %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js"></script>
<script>
var options = {
copyIconClass: "gg-clipboard",
checkIconClass: "gg-check"
};
window.highlightJsBadge(options);
</script>
{% endif %}
{% endif %}
{% if not config.extra.highlightjs.enable %}
<script src="{{get_url(path="js/copy.js")}}"></script>
{% endif %}
<script src="{{get_url(path="js/main.js")}}"></script>
{% block js_footer %}
{% endblock js_footer %}
{% if config.extra.google_analytics.enable %}
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ config.extra.google_analytics.id }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ config.extra.google_analytics.id }}');
</script>
{% endif %}
</body>
</html>

View file

@ -47,6 +47,8 @@
<svg xmlns="http://www.w3.org/2000/svg" class="feather" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21.198 2.433a2.242 2.242 0 0 0-1.022.215l-8.609 3.33c-2.068.8-4.133 1.598-5.724 2.21a405.15 405.15 0 0 1-2.849 1.09c-.42.147-.99.332-1.473.901-.728.968.193 1.798.919 2.286 1.61.516 3.275 1.009 4.654 1.472.509 1.793.997 3.592 1.48 5.388.16.36.506.494.864.498l-.002.018s.281.028.555-.038a2.1 2.1 0 0 0 .933-.517c.345-.324 1.28-1.244 1.811-1.764l3.999 2.952.032.018s.442.311 1.09.355c.324.022.75-.04 1.116-.308.37-.27.613-.702.728-1.196.342-1.492 2.61-12.285 2.997-14.072l-.01.042c.27-1.006.17-1.928-.455-2.474a1.654 1.654 0 0 0-1.034-.407z"/></svg>
{% elif icon.name == "twitter" %}
<svg xmlns="http://www.w3.org/2000/svg" class="feather" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>
{% elif icon.name == "mastodon" %}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32px" height="32px" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M 15.9375 4.03125 C 12.917 4.0435 9.9179219 4.4269844 8.3574219 5.1464844 C 8.3574219 5.1464844 5 6.6748594 5 11.880859 C 5 18.077859 4.9955 25.860234 10.5625 27.365234 C 12.6945 27.938234 14.527953 28.061562 16.001953 27.976562 C 18.676953 27.825562 20 27.005859 20 27.005859 L 19.910156 25.029297 C 19.910156 25.029297 18.176297 25.640313 16.029297 25.570312 C 13.902297 25.495313 11.6615 25.335688 11.3125 22.679688 C 11.2805 22.432688 11.264625 22.182594 11.265625 21.933594 C 15.772625 23.052594 19.615828 22.420969 20.673828 22.292969 C 23.627828 21.933969 26.199344 20.081672 26.527344 18.388672 C 27.041344 15.720672 26.998047 11.880859 26.998047 11.880859 C 26.998047 6.6748594 23.646484 5.1464844 23.646484 5.1464844 C 22.000984 4.3779844 18.958 4.019 15.9375 4.03125 z M 12.705078 8.0019531 C 13.739953 8.0297031 14.762578 8.4927031 15.392578 9.4707031 L 16.001953 10.505859 L 16.609375 9.4707031 C 17.874375 7.5037031 20.709594 7.6264375 22.058594 9.1484375 C 23.302594 10.596438 23.025391 11.531 23.025391 18 L 23.025391 18.001953 L 20.578125 18.001953 L 20.578125 12.373047 C 20.578125 9.7380469 17.21875 9.6362812 17.21875 12.738281 L 17.21875 16 L 14.787109 16 L 14.787109 12.738281 C 14.787109 9.6362812 11.429688 9.7360938 11.429688 12.371094 L 11.429688 18 L 8.9765625 18 C 8.9765625 11.526 8.7043594 10.585438 9.9433594 9.1484375 C 10.622859 8.3824375 11.670203 7.9742031 12.705078 8.0019531 z"/></svg>
{% elif icon.name == "youtube" %}
<svg xmlns="http://www.w3.org/2000/svg" class="feather" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon></svg>
{% elif icon.name == "email" %}