port from an SSI-based setup to one using GNU M4
[~bandali/bndl.org] / header.html
diff --git a/header.html b/header.html
new file mode 100644 (file)
index 0000000..e371576
--- /dev/null
@@ -0,0 +1,46 @@
+ifdef(`__feed',
+`<entry xml:base="https://bandali.eu.org">
+<author><name>Amin Bandali</name></author>
+<id>tag:bandali.eu.org,2016:__slug</id>
+<published>__pub</published>
+<updated>__upd</updated>
+<link href="https://bandali.eu.org/__slug" rel="alternate" type="text/html"/>
+<title>__title</title>
+<content type="html">',
+`<!doctype html>
+<html lang="en">
+<head>
+<meta charset="utf-8"/>
+<meta name="author" content="Amin Bandali"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>__title`'ifdef(`__nts',,` &mdash; Amin Bandali')</title>
+<link rel="alternate" href="/atom.xml" type="application/atom+xml"/>
+<link rel="icon" href="/gnu.ico"/>
+<link rel="stylesheet" href="/style.css"/>
+<link rel="index" href="/"/>
+ifdef(`__pub',
+`ifdef(`__first',,`<link rel="prev" href="/decr(__id)">')'
+`ifdef(`__last',,`<link rel="next" href="/incr(__id)">')')
+</head>
+<body>
+<header>
+ifelse(__slug,`home',`<h1>__title</h1>',
+`<strong><a href="/">Amin Bandali</a>&apos;s Personal Site</strong>')
+</header>
+<nav>
+<ul>
+<li><a href="/#papers">Publications</a></li>
+<li><a href="/#projects">Projects</a></li>
+<li><a href="/#notes">Notes</a></li>
+<li><a href="/cv" title="curriculum vitae">CV</a></li>
+<li><a href="/contact">Contact</a></li>
+</ul>
+</nav>
+<main>
+ifdef(`__pub',
+`<article>
+<header>
+<h1>__title</h1>
+<p>Published on syscmd(date "-d __pub" "+%B %e`,' %Y")`'ifdef(`__upd',`<br/>
+Last updated on syscmd(date "-d __upd" "+%B %e`,' %Y")')</p>
+</header>')')