Repos / s4g / b8ef28d8c7
commit b8ef28d8c70def0f4c7f423b5329c519fdea889c
Author: Nhân <hi@imnhan.com>
Date:   Tue Jul 4 00:41:44 2023 +0700

    link to atom feed

diff --git a/www/_theme/base.tmpl b/www/_theme/base.tmpl
index 7e44d28..243c903 100644
--- a/www/_theme/base.tmpl
+++ b/www/_theme/base.tmpl
@@ -5,6 +5,7 @@
   <meta charset="utf-8" />
   <title>{{.Title}}</title>
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+  <link rel="alternate" type="application/atom+xml" title="Atom feed" href="{{.Feed}}">
   <style>
     html {
       font-family: serif;
@@ -12,9 +13,6 @@
       margin: auto;
     }
   </style>
-{{if .Feed}}
-  <link rel="alternate" type="application/atom+xml" title="Atom feed" href="{{.Feed}}">
-{{end}}
 </head>
 
 <body>
diff --git a/www/_theme/feed.svg b/www/_theme/feed.svg
new file mode 100644
index 0000000..1a44b51
--- /dev/null
+++ b/www/_theme/feed.svg
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" id="RSSicon" viewBox="0 0 8 8" width="256" height="256">
+
+  <title>RSS feed icon</title>
+
+  <style type="text/css">
+    .button {stroke: none; fill: orange;}
+    .symbol {stroke: none; fill: white;}
+  </style>
+
+  <rect class="button" width="8" height="8" rx="1.5"/>
+  <circle class="symbol" cx="2" cy="6" r="1"/>
+  <path class="symbol" d="m 1,4 a 3,3 0 0 1 3,3 h 1 a 4,4 0 0 0 -4,-4 z"/>
+  <path class="symbol" d="m 1,2 a 5,5 0 0 1 5,5 h 1 a 6,6 0 0 0 -6,-6 z"/>
+
+</svg>
diff --git a/www/_theme/home.tmpl b/www/_theme/home.tmpl
index 287e62a..09a71d4 100644
--- a/www/_theme/home.tmpl
+++ b/www/_theme/home.tmpl
@@ -6,16 +6,17 @@
 
 <hr>
 
-{{if .Pages}}
-  <div class="pages">
-    <a href="{{$.Site.HomePath}}">Home</a>
-    {{range .Pages}}
-    <a href="{{.WebPath}}">{{.Meta.Title}}</a>
-    {{end}}
-  </div>
-
-  <hr>
+<div class="pages">
+  <a href="{{.Site.HomePath}}">Home</a>
+{{range .Pages}}
+  <a href="{{.WebPath}}">{{.Meta.Title}}</a>
 {{end}}
+  <a class="feed-link" href="{{.Feed}}">
+    <img src="{{.Site.HomePath}}_theme/feed.svg" alt="Atom Feed" title="Atom Feed">
+  </a>
+</div>
+
+<hr>
 
 <p>All posts, newest first:</p>
 
@@ -38,6 +39,16 @@
   margin-top: 0;
 }
 
+.feed-link img {
+  height: 1rem;
+}
+.feed-link {
+  float: right;
+}
+hr {
+  clear: both;
+}
+
 .pages a {
   margin-right: 0.5rem;
 }
diff --git a/www/about/index.html b/www/about/index.html
index cb89f40..1bd0517 100644
--- a/www/about/index.html
+++ b/www/about/index.html
@@ -5,6 +5,7 @@
   <meta charset="utf-8" />
   <title>About | CoolZone</title>
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+  <link rel="alternate" type="application/atom+xml" title="Atom feed" href="/feed.xml">
   <style>
     html {
       font-family: serif;
@@ -12,9 +13,6 @@
       margin: auto;
     }
   </style>
-
-  <link rel="alternate" type="application/atom+xml" title="Atom feed" href="/feed.xml">
-
 </head>
 
 <body>
diff --git a/www/hello/index.html b/www/hello/index.html
index 514635d..121a1e2 100644
--- a/www/hello/index.html
+++ b/www/hello/index.html
@@ -5,6 +5,7 @@
   <meta charset="utf-8" />
   <title>Hello | CoolZone</title>
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+  <link rel="alternate" type="application/atom+xml" title="Atom feed" href="/feed.xml">
   <style>
     html {
       font-family: serif;
@@ -12,9 +13,6 @@
       margin: auto;
     }
   </style>
-
-  <link rel="alternate" type="application/atom+xml" title="Atom feed" href="/feed.xml">
-
 </head>
 
 <body>
diff --git a/www/index.html b/www/index.html
index d9bf2af..e85d410 100644
--- a/www/index.html
+++ b/www/index.html
@@ -5,6 +5,7 @@
   <meta charset="utf-8" />
   <title>CoolZone - Cool people only.</title>
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+  <link rel="alternate" type="application/atom+xml" title="Atom feed" href="/feed.xml">
   <style>
     html {
       font-family: serif;
@@ -12,9 +13,6 @@
       margin: auto;
     }
   </style>
-
-  <link rel="alternate" type="application/atom+xml" title="Atom feed" href="/feed.xml">
-
 </head>
 
 <body>
@@ -26,16 +24,17 @@ <h1 class="site-title">CoolZone</h1>
 
 <hr>
 
+<div class="pages">
+  <a href="/">Home</a>
 
-  <div class="pages">
-    <a href="/">Home</a>
-    
-    <a href="about/index.html">About</a>
-    
-  </div>
+  <a href="about/index.html">About</a>
 
-  <hr>
+  <a class="feed-link" href="/feed.xml">
+    <img src="/_theme/feed.svg" alt="Atom Feed" title="Atom Feed">
+  </a>
+</div>
 
+<hr>
 
 <p>All posts, newest first:</p>
 
@@ -65,6 +64,16 @@ <h1 class="site-title">CoolZone</h1>
   margin-top: 0;
 }
 
+.feed-link img {
+  height: 1rem;
+}
+.feed-link {
+  float: right;
+}
+hr {
+  clear: both;
+}
+
 .pages a {
   margin-right: 0.5rem;
 }
diff --git a/www/mfws.html b/www/mfws.html
index 5840971..fa54235 100644
--- a/www/mfws.html
+++ b/www/mfws.html
@@ -5,6 +5,7 @@
   <meta charset="utf-8" />
   <title>This is a motherfucking website. | CoolZone</title>
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+  <link rel="alternate" type="application/atom+xml" title="Atom feed" href="/feed.xml">
   <style>
     html {
       font-family: serif;
@@ -12,9 +13,6 @@
       margin: auto;
     }
   </style>
-
-  <link rel="alternate" type="application/atom+xml" title="Atom feed" href="/feed.xml">
-
 </head>
 
 <body>