#!/bin/sh

[ -z "$1" ] && echo "blog name needed" && exit

tmp=$(mktemp)

vi $tmp

echo """
<!DOCTYPE html>
<html lang=en>
        <head>
		<meta charset='UTF-8'>
                <title>The amazing blogs of Lucas Standen!</title>
                <link rel="stylesheet" href="../style.css">
        </head>

        <body>
                <header>
                        <h1 class="title">The amazing blogs of Lucas Standen!</h1>
                        <h2 class="title">You've stumbled right into my rants!</h2>

                        <hr>

                        <nav>
                                <table>
                                        <thead>
                                                <tr>
                                                        <th><a href="../index.html">Home</a></th>
                                                        <th><a href="../blog.html">Blog</a></th>
                                                        <th><a href="../cv.html">CV</a></th>
                                                </tr>
                                        </thead>
                                </table>
                        </nav>

                        <hr>
                </header>

                <div id="mainbody">
""" > $1.html
cat $tmp >> $1.html
echo """
                </div>

                <hr>

                <footer>
                        <a href="../disclaimer.html">Disclaimer</a>
                        <a href="https://analognowhere.com/_/cohelg/">Background source</a>
                        <small id="pageLastChanged"></small>
                        <script src="../scripts/lastmodified.js"></script>
                </footer>
        </body>
</html>


""" >> $1.html
