~ecs/ecs.d2evs.net

22069975bac066b0588352441d100ba0e762cee9 — Eyal Sawady 6 months ago 3dfa82d
Initial pass on standard page layout

Initial groundwork on this patch was done by Evan Johnston
<evan@d2evs.net>
M _config.sh => _config.sh +6 -1
@@ 1,1 1,6 @@
preprocessor="markdown -f fencedcode"
case $input in
	*.md.w)
		preprocessor="markdown -f fencedcode"
		wsource _templates/page.html.w
		;;
esac

A _templates/page.html.w => _templates/page.html.w +26 -0
@@ 0,0 1,26 @@
% render() {
<!doctype html>
<html lang="en">
<head>
	<meta name="viewport" content="width=device-width, initial-scale=1">
% echo "<title>${title:-ecs\'s blog}</title>"
	<link type="text/css" rel="stylesheet" href="/static/style.css">
</head>
<body>
	<div class="topnav">
		<a href="/">Home</a>
		<div class="recent">Recent:</div>
% for i in $(ls "$root/posts" | sort -rn | head -n3); do
%     file="$(mktemp)"
%     # TODO: is this good enough?
%     wersh.awk <"$root/posts/$i" | grep -v '^ *emit' >"$file"
%     . "$file"
%     echo "<a href=\"/posts/${i%\.w}\">$title</a>"
%     rm "$file"
% done
	</div>
	<div class="post">
% cat
	</div>
</body>
% }

A favicon.ico => favicon.ico +0 -0

M posts/2019-10-18-Installing-OpenWRT.md.w => posts/2019-10-18-Installing-OpenWRT.md.w +1 -1
@@ 1,5 1,5 @@
% # vim: set ft=markdown :
# Adventures installing OpenWRT
% title="Adventures installing OpenWRT"

I recently got my
[MikroTik RB2011U](https://openwrt.org/toh/mikrotik/rb2011uias), and I

M posts/2020-01-13-PowerBook-G4-OpenBSD.md.w => posts/2020-01-13-PowerBook-G4-OpenBSD.md.w +1 -1
@@ 1,5 1,5 @@
% # vim: set ft=markdown :
# Adventures installing OpenBSD on a PowerBook G4
% title="Adventures installing OpenBSD on a PowerBook G4"

TL;DR:


A static/style.css => static/style.css +56 -0
@@ 0,0 1,56 @@
body {
	background-color: black;
	color: white;
}

.post pre {
  background-color: #111111;
  color: #ffffff;
}

.topnav {
  background-color: #111111;
  color: #ffffff;
  overflow: hidden;
}

a:link {
  color: #777777;
}

a:visited {
  color: #777777;
}

a:active {
  color: #ffffff;
}

.topnav a {
  float: left;
  color: #ffffff;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
}

.topnav a:hover {
  background-color: black;
  color: #aaaaaa;
}

.topnav a.active {
  background-color: white;
  color: #777777;
}

.topnav div {
  float: left;
  background-color: black;
  color: #aaaaaa;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
}