export TITLE="Simplicity is the ultimate sophistication"
export SUBTITLE=$TITLE
export COPYRIGHT="© 2015 Michael D. Lowis"
+export MENUTEXT="`genmenu.sh`"
--- /dev/null
+#!/bin/bash
+
+pages=(`ls pages/*.md | sed -e 's/\.md$//'`)
+
+echo ${pages[@]}
--- /dev/null
+MENUID 1
+
TYPE page
+MENUID 0
---
# Header 1
--- /dev/null
+MENUID 2
+
--- /dev/null
+MENUID 3
+
<div class="header">
<a href="index.html"><img src="logo.png"></a>
<a class="headerLink" href="index.html">mdlowis</a>
- <span class="headerSubtitle">Simplicity is the ultimate sophistication</span>
+ <span class="headerSubtitle">Simplicity</span>
</div>
<div class="menu">
+ <span class="left">
+ <a class="" href="site/home.html">home</a>
+ <a class="" href="site/articles.html">articles</a>
+ <a class="" href="site/projects.html">projects</a>
+ <a class="" href="site/prototypes.html">prototypes</a>
+ </span>
+ <!--
<span class="left">
<a class="current" href="index.html">home</a>
<a href="">articles</a>
<a href="">projects</a>
<a href="">prototypes</a>
</span>
+ -->
<!--
<span class="right">
<a href="">download</a>
+++ /dev/null
-/**
-* * Content Styling
-* **/
-body {
-background-color: #eee;
-color: #333;
-font-family: sans-serif;
-padding: 0;
-margin: 0;
-}
-
-h1, h2, h3, h4 { margin: 1em 1ex 0.5ex 0; }
-
-h1 { font-size: 1.4em; }
-
-h2 { font-size: 1.3em; }
-
-h3 { font-size: 1.2em; }
-
-h4 { font-size: 1.1em; }
-
-a {
-color: #005386;
-text-decoration: none;
-}
-
-a:hover {
-background-color: #eeeeee;
-}
-
-.left {
-float: left;
-margin: 0;
-padding: 0;
-}
-
-.right {
-float: right;
-margin: 0;
-padding: 0;
-}
-
-/**
-* * Header Styling
-* **/
-.header {
-clear: both;
-color: #333;
-font-size: 1.78em;
-padding: 0.7ex 0.7ex 0.7ex 0.7em;
-}
-
-.headerLink {
-color: #aa1111;
-margin-left: 5px;
-}
-
-.headerSubtitle {
-font-size: 0.75em;
-font-style: italic;
-margin-left: 1em;
-}
-
-/**
-* * Menu Styling
-* **/
-.menu {
-clear: both;
-overflow: hidden;
-background-color: #a11;
-padding: 0.7ex;
-font-size: 94%;
-/*
-* border-top: 2px solid #0f6793;
-* border-bottom: 2px solid #0f6793;
-* */
-border-top: 2px solid black;
-border-bottom: 2px solid black;
-}
-
-.menu a {
-padding: 0.5ex 1ex 0.5ex 1ex;
-color: #fff;
-vertical-align: middle;
-}
-
-.menu a:hover {
-background-color: #f00;
-vertical-align: middle;
-}
-
-.menu a.current {
-font-weight: bold;
-vertical-align: middle;
-}
-
-/**
-* * Main Page Content
-* **/
-.content {
-clear: both;
-margin: 0;
-padding: 0;
-overflow: hidden;
-}
-
-/**
-* * Navigation Bar
-* **/
-.nav {
-float: left;
-margin: 0 1px 0 0;
-padding: 1em 0;
-width: 200px;
-}
-
-.nav ul {
-margin: 0;
-padding: 0;
-}
-
-.nav li {
-list-style: none;
-padding: 0;
-margin: 0;
-}
-
-.nav li ul {
-padding-left: 0.6em !important;
-}
-
-.nav li a {
-display: block;
-margin: 0;
-padding: 0.8ex 2em 0.8ex 1em;
-color: #a11;
-}
-.nav li a:hover {
-color: #f00;
-text-decoration: underline;
-}
-
-.nav li a.thisPage {
-color: #333;
-font-weight: bold;
-}
-
-/**
-* * Article/Page Text
-* **/
-.main {
-margin: 0 0 0 200px;
-padding: 1.5em;
-max-width: 50em;
-border-left: 1px solid #000;
-}
-
-/**
-* * Page Footer
-* **/
-.footer {
-clear: both;
-color: #fff;
-background: #a11;
-border-top: 1px solid #000;
-font-size: 84%;
-padding: 1em 1em 1.5em 1em;
-}
-
</div>
<div class="menu">
- <span class="left">
- <a class="current" href="index.html">home</a>
- <a href="">articles</a>
- <a href="">projects</a>
- <a href="">prototypes</a>
- </span>
- <!--
- <span class="right">
- <a href="">download</a>
- <a href="">source</a>
- </span>
- -->
+ {{MENUTEXT}}
</div>
<div class="content">
--- /dev/null
+#!/bin/bash
+
+pushd pages/ > /dev/null
+pagelist=(`grep MENUID *.md | sed -e's/\.md:MENUID//' | awk '{print $2, $1}' | sort | cut -d' ' -f2`)
+
+echo '<span class="left">'
+for page in "${pagelist[@]}"; do
+ echo " <a class=\"\" href=\"site/$page.html\">$page</a>"
+done
+echo ' </span>'
+popd > /dev/null
+
ofile="contents.${0##*/}-$$"
touch $ofile
eval `awk -v OFILE="$ofile" "$awk_script" $ifile`
-export CONTENT=`md2html.awk $ofile`
-source config.sh
+export CONTENT="`md2html.awk $ofile`"
+. ./config.sh
if [ -f "templates/$TYPE.html" ]; then
mo "templates/$TYPE.html"
fi