Recently Written · git

cl-yag

Mirror and rewrite of Solène Rapenne's cl-yag SSG of renown

git clone https://github.com/equwal/cl-yag

Log | Files | Refs


commit 13d46e0deeb1d5fbd7ef5911a23d48529fbfd074
lambda <lambda@fnord.one>
2017-11-22 15:10:17 +0100

~templates/article.tpl ~templates/layout.tpl ~templates/one-tag.tpl

Make HTML templates HTML5 compliant.
  +Add generator metatag for 'cl-yag'.
  +Add link-alternate metatags for proper linking of rss and atom feeds.
  +Add viewport metatag for responsive stylesheets.

Status of this commit: Recommendation.

 templates/article.tpl | 13 ++++++++-----
 templates/layout.tpl  | 42 ++++++++++++++++++++++++++----------------
 templates/one-tag.tpl |  4 +++-
 3 files changed, 37 insertions(+), 22 deletions(-)
diff --git a/templates/article.tpl b/templates/article.tpl
index 41cdca9..5c0079d 100644
--- a/templates/article.tpl
+++ b/templates/article.tpl
@@ -1,7 +1,10 @@
-<div class="article">
-  <div class="informations">
-    <b><a href="article-%%Id%%.html"><em>%%Author%%</em> wrote "%%Title%%" on %%Date%%</a></b>Tags : %%Tags%%
-  </div>
+
+<article>
+  <header>
+    <h1><a href="article-%%Id%%.html">%%Title%%</a></h1>
+    <p>Written by <em>%%Author%%</em>, on %%Date%%.<br/>Tags: %%Tags%%</p>
+  </header>
   %%Text%%
-</div>
+
+</article>
 
diff --git a/templates/layout.tpl b/templates/layout.tpl
index 0080d9b..a8efc9c 100644
--- a/templates/layout.tpl
+++ b/templates/layout.tpl
@@ -1,24 +1,34 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
+<!DOCTYPE html>
+<html lang="en">
   <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <link rel="stylesheet" type="text/css" href="static/style.css" />
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
+    <meta name="generator" content="cl-yag" />
     <title>%%Title%%</title>
+    <link rel="stylesheet" type="text/css" href="static/style.css" />
+    <link rel="alternate" type="application/rss+xml" title="%%Title%% RSS Feed" href="rss.xml" />
+<!--    <link rel="alternate" type="application/atom+xml" title="%%Title%% Atom Feed" href="atom.xml" /> -->
+    <link rel="icon" type="image/x-icon" href="static/img/yourFavIcon.ico" />
   </head>
-  <body>
 
-    <div id="top">
-      <a href="index.html">Home</a> - <a href="index-titles.html">List of articles</a> - <a href="rss.xml">Rss</a> 
-      <p>Tags : %%Tags%%</p>
-    </div>
+    <body>
+    <div id="wrapper">
+      <header>
+	<nav>
+	 <!-- <a href="#">BRAND</a> -->
+	    <ul>
+	      <li><a href="index.html">Home</a></li>
+	      <li><a href="index-titles.html">List of Articles</a></li>
+	      <li><a href="rss.xml">RSS</a></li>
+	     </ul>
+	</nav>
+	<div>All Tags: %%Tags%%</div>
+      </header>
+
+      <main>%%Body%%</main>
 
-    <div id="content">
-      %%Body%%
-    </div>
+      <footer><p>This blog is powered by cl-yag!<p></footer>
 
-    <div id="foot" >
-      This blog is powered by cl-yag ! 
-    </div>
-    
+    </div><!-- #wrapper -->
   </body>
 </html>
diff --git a/templates/one-tag.tpl b/templates/one-tag.tpl
index cce5955..42a4905 100644
--- a/templates/one-tag.tpl
+++ b/templates/one-tag.tpl
@@ -1 +1,3 @@
- <a href="tag-%%Name%%.html">%%Name%%</a>
+
+<span><a href="tag-%%Name%%.html">#%%Name%%</a></span>
+