all repos — site @ 86ead6861fb364962d5448590675805e8674ede8

source for my site, found at icyphox.sh

templates: use partials pattern
Anirudh Oppiliappan x@icyphox.sh
Tue, 05 Apr 2022 13:04:27 +0530
commit

86ead6861fb364962d5448590675805e8674ede8

parent

46052e02e5f0e28ab8b07810d7c5185ebd3e33a1

M templates/blog.htmltemplates/blog.html

@@ -1,7 +1,7 @@

<!DOCTYPE html> <html lang=en> <head> - {{ template "head.html" }} + {{ template "partials/head.html" }} <link rel="alternate" type="application/rss+xml" title="RSS" href="https://icyphox.sh/blog/feed.xml"> <meta name="description" content="{{ index .Meta "subtitle" }}"> </head>

@@ -12,7 +12,7 @@ </title>

<body> <main> <div class="sidenav"> - {{ template "nav.html" }} + {{ template "partials/nav.html" }} </div> {{ .Body }} <table>

@@ -29,7 +29,7 @@ {{ end }}

</table> </main> <footer> - {{ template "footer.html" }} + {{ template "partials/footer.html" }} </footer> </body>
M templates/head.htmltemplates/partials/head.html

@@ -1,4 +1,5 @@

<link rel="stylesheet" href="/static/style.css" type="text/css"> +<link rel="stylesheet" href="/static/syntax.css" type="text/css"> <meta name="viewport" content="initial-scale=1,width"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta charset="UTF-8">
M templates/index.htmltemplates/index.html

@@ -1,6 +1,6 @@

<html lang=en> <head> - {{ template "head.html" }} + {{ template "partials/head.html" }} <meta name="description" content="{{ index .Meta "subtitle" }}"> </head> <title>

@@ -9,14 +9,14 @@ </title>

<body> <main> <div class="sidenav"> - {{ template "nav.html" }} + {{ template "partials/nav.html" }} </div> <article class="tagline"> {{ .Body }} </article> </main> <footer> - {{ template "footer.html" }} + {{ template "partials/footer.html" }} </footer> </body> </html>
M templates/page.htmltemplates/page.html

@@ -1,7 +1,7 @@

<!DOCTYPE html> <html lang=en> <head> - {{ template "head.html" }} + {{ template "partials/head.html" }} <meta name="description" content="{{ index .Meta "subtitle" }}"> </head> <title>

@@ -10,7 +10,7 @@ </title>

<body> <main> <div class="sidenav"> - {{ template "nav.html" }} + {{ template "partials/nav.html" }} </div> <article align="left"> <h1>{{ index .Meta "title" }}</h1>

@@ -18,7 +18,7 @@ {{ .Body }}

</article> </main> <footer> - {{ template "footer.html" }} + {{ template "partials/footer.html" }} </footer> </body>
M templates/text.htmltemplates/text.html

@@ -1,6 +1,6 @@

<html lang=en> <head> - {{ template "head.html" }} + {{ template "partials/head.html" }} <meta name="description" content="{{ index .Meta "subtitle" }}"> </head> <title>

@@ -9,7 +9,7 @@ </title>

<body> <main> <div class="sidenav"> - {{ template "nav.html" }} + {{ template "partials/nav.html" }} </div> <article align="left"> <section class="post-date">

@@ -28,7 +28,7 @@ <a href="mailto:x@icyphox.sh?Subject=Re: {{ index .Meta "title" }}">email</a>.

</article> </main> <footer> - {{ template "footer.html" }} + {{ template "partials/footer.html" }} </footer> </body>