From 02eaa36d8d4362ddb8a288c18a4ac9998c630854 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Tue, 3 Nov 2020 02:27:54 +0100 Subject: Add RSS feed Source of feed-icon.svg: https://en.wikipedia.org/wiki/File:Feed-icon.svg (License: GPL2 or later) --- assets/css/ace.scss | 6 +++++- layouts/partials/head.html | 5 ++++- layouts/partials/header.html | 5 +++++ static/img/feed-icon.svg | 18 ++++++++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 static/img/feed-icon.svg diff --git a/assets/css/ace.scss b/assets/css/ace.scss index 7ad4ae9..f604038 100644 --- a/assets/css/ace.scss +++ b/assets/css/ace.scss @@ -49,6 +49,10 @@ $dark: #343a40; height: 3rem; } +.feed-icons img { + height: 1.5rem; +} + /* Side navigation menus */ .docs-sidenav span.badge.badge-primary, .docs-toc span.badge.badge-primary{ font-size: 10px; @@ -120,4 +124,4 @@ table > tbody > tr > td, .bd-content > table > tbody > tr > th, .bd-content > ta padding: .75rem; vertical-align: top; border: 1px solid #dee2e6; -} \ No newline at end of file +} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 1e7e079..1aa83a3 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,8 +1,11 @@ - + + {{ range .AlternativeOutputFormats -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 61e9479..eca14c9 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -29,4 +29,9 @@ </div> {{- end}} </div> + {{ with .OutputFormats.Get "rss" -}} + <div class="feed-icons"> + <a href=".Permalink"><img src="/img/feed-icon.svg" alt="RSS feed" /></a> + </div> + {{ end -}} </nav> diff --git a/static/img/feed-icon.svg b/static/img/feed-icon.svg new file mode 100644 index 0000000..b325149 --- /dev/null +++ b/static/img/feed-icon.svg @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="128px" height="128px" id="RSSicon" viewBox="0 0 256 256"> +<defs> +<linearGradient x1="0.085" y1="0.085" x2="0.915" y2="0.915" id="RSSg"> +<stop offset="0.0" stop-color="#E3702D"/><stop offset="0.1071" stop-color="#EA7D31"/> +<stop offset="0.3503" stop-color="#F69537"/><stop offset="0.5" stop-color="#FB9E3A"/> +<stop offset="0.7016" stop-color="#EA7C31"/><stop offset="0.8866" stop-color="#DE642B"/> +<stop offset="1.0" stop-color="#D95B29"/> +</linearGradient> +</defs> +<rect width="256" height="256" rx="55" ry="55" x="0" y="0" fill="#CC5D15"/> +<rect width="246" height="246" rx="50" ry="50" x="5" y="5" fill="#F49C52"/> +<rect width="236" height="236" rx="47" ry="47" x="10" y="10" fill="url(#RSSg)"/> +<circle cx="68" cy="189" r="24" fill="#FFF"/> +<path d="M160 213h-34a82 82 0 0 0 -82 -82v-34a116 116 0 0 1 116 116z" fill="#FFF"/> +<path d="M184 213A140 140 0 0 0 44 73 V 38a175 175 0 0 1 175 175z" fill="#FFF"/> +</svg> -- cgit v1.2.3