summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/footer.inc8
-rw-r--r--lib/headers.tpl11
-rw-r--r--lib/style.css122
-rw-r--r--lib/top_bar.inc21
4 files changed, 137 insertions, 25 deletions
diff --git a/lib/footer.inc b/lib/footer.inc
index 1eac7d8..90fc345 100644
--- a/lib/footer.inc
+++ b/lib/footer.inc
@@ -1,7 +1 @@
-<div><a href="http://werc.cat-v.org/">Powered by werc</a></div>
-
-<div><a href="/_users/login">User Login</a>
-<!-- TODO: add duckduckgo site search
-<form action="/_search" method=get><input type=text name=q />
--->
-</div>
+<a href="http://werc.cat-v.org">Powered by werc</a> © Peter Mikkelsen 2019-2024
diff --git a/lib/headers.tpl b/lib/headers.tpl
index 635f85e..8d5ade5 100644
--- a/lib/headers.tpl
+++ b/lib/headers.tpl
@@ -3,14 +3,11 @@
<head>
<title>%($pageTitle%)</title>
-
- <link rel="stylesheet" href="/pub/style/style.css" type="text/css" media="screen, handheld" title="default">
- <link rel="shortcut icon" href="/favicon.ico" type="image/vnd.microsoft.icon">
-% if(test -f $sitedir/_werc/pub/style.css)
-% echo ' <link rel="stylesheet" href="/_werc/pub/style.css" type="text/css" media="screen" title="default">'
-
+ <style media="screen, handheld">
+% cat `{get_lib_file style.css}
+ </style>
+ <link rel="shortcut icon" href="https://images.pmikkelsen.com/favicon.ico" type="image/vnd.microsoft.icon">
<meta charset="UTF-8">
-% # Legacy charset declaration for backards compatibility with non-html5 browsers.
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
% if(! ~ $#meta_description 0)
diff --git a/lib/style.css b/lib/style.css
new file mode 100644
index 0000000..1002606
--- /dev/null
+++ b/lib/style.css
@@ -0,0 +1,122 @@
+body { display: flex; flex-wrap: wrap; font-family: sans;}
+header { flex-basis: 100%; flex-shrink: 0; }
+article { flex-basis: 60%; padding-left: 1em; }
+footer { flex-basis: 100%; flex-shrink: 0; }
+header nav { display: flex; justify-content: space-between; }
+nav a, header a { text-decoration: none ; color: inherit; }
+header h1 span { margin-left: 1em; font-size: 50%; font-style: italic; }
+.mainContent > nav { flex-basis: content; padding-right: 1vw; min-width: 16em; }
+nav ul { display: flex; flex-direction: column; list-style-type: none; list-style-position: outside; padding-left: 0; }
+nav li ul { padding-left: 0.6em }
+footer { display: flex; justify-content: space-between; }
+
+/* cut here to leave vanity behind */
+
+body { margin:0; padding: 0; font-size: 84%; font-family: Helvetica, Verdana, Arial, 'Liberation Sans', FreeSans, sans-serif; }
+a { text-decoration: none; color: }
+a:hover { text-decoration: underline; }
+.thisPage { color: black; }
+
+/* header and top bar */
+header nav { background-color: rgb(100,135,220); color: white; padding: 0.3em; border-bottom: 2px solid black; font-size: 91%; }
+header h1 { background-color: #ff6d06; color: black; margin: 0; border-bottom: 2px solid black; font-weight: normal; padding: 0.25ex; font-size: 233%; }
+header a:hover { text-decoration: none; }
+
+/* sidebar */
+.mainContent > nav { border-right: 1px solid #ddd; padding: 0; }
+.mainContent > nav > div { border-bottom: 1px solid #ddd; }
+.mainContent > nav > div a { color: rgb(0, 102, 204); display: block; text-transform: capitalize; font-weight: bold; padding: 0.25em 1ex 0.25em 2mm; font-size: 102%}
+.mainContent > nav > div a:hover { color: white; background-color: rgb(100,135,220); border-left: black solid 0.2em; text-decoration: none; }
+.mainContent > nav > div p { font-weight: bold; margin: 0 0 0.5em 2mm; padding: 1em 0 0 0; }
+
+/* main copy */
+article { padding: 0.5ex 0 5vh 1vw; }
+article h1, article h2 { color: rgb(0,102,204); font-weight: bold; margin: 2em 0 0 0; border-bottom: 2px solid rgb(0,102,204); }
+article h3, article h4, article h5 { color: rgb(0,102,204); font-weight: bold; margin: 2em 0 0 0; }
+article h6, article h7, article h8 { color: rgb(0,102,204); font-weight: bold; margin: 2em 0 0 0; }
+article a { color: rgb(0,102,204); }
+article a:hover { color: rgb(100,135,220); }
+article pre { font-size: 1.2em; }
+
+/* footer */
+footer { color: white; background-color: rgb(100,135,220); }
+footer a { color: inherit; }
+footer div { padding: 1em; }
+
+/* tables */
+table { border: 1px solid rgba(128,128,128,0.5); padding: 0; }
+th { color: white; background-color: rgb(100,135,220); }
+tr:nth-child(odd) { background-color: rgba(128,128,128,0.1) }
+
+/* modifications */
+img {
+ max-width: 100%;
+ border: 1px solid black;
+}
+
+body {
+
+}
+
+header h1 {
+ background-color: #c2d2c6;
+}
+
+html {
+ font-size: 1.2em;
+}
+
+header nav, footer {
+ background-color: #442a13;
+}
+
+code > pre {
+ border: 2px solid #442a13;
+ background-color: #c2d2c6;
+ width: max-content;
+ padding: 0 0.5em;
+}
+
+.mainContent > nav > div a, article a:hover {
+ color: #442a13;
+}
+
+.mainContent > nav > div a:hover {
+ color: #442a13;
+ background-color: #c2d2c6;
+}
+
+article h1, article h2 {
+ color: #c48f3b;
+ border-bottom: 2px solid #442a13;
+}
+
+article a, .thisPage, footer, header nav {
+ color: #c48f3b;
+}
+
+footer {
+ padding: 0.5em;
+ flex-shrink: 1;
+ flex-basis: unset;
+}
+
+header {
+ flex-basis: unset;
+}
+
+html {
+ display: flex;
+ min-height: 100%;
+}
+
+body {
+ flex-direction: column;
+ flex: 1;
+ background-color: #e3dfd7;
+}
+
+.mainContent {
+ display: flex;
+ flex-grow: 1;
+} \ No newline at end of file
diff --git a/lib/top_bar.inc b/lib/top_bar.inc
index cbb89b8..76fba09 100644
--- a/lib/top_bar.inc
+++ b/lib/top_bar.inc
@@ -1,15 +1,14 @@
- <div>
- <a href="http://gsoc.cat-v.org">gsoc</a> |
- <a href="http://doc.cat-v.org">doc archive</a> |
- <a href="http://repo.cat-v.org">software repo</a> |
- <a href="http://ninetimes.cat-v.org">ninetimes</a> |
- <a href="http://harmful.cat-v.org">harmful</a> |
- <a href="http://9p.cat-v.org/">9P</a> |
- <a href="http://cat-v.org">cat-v.org</a>
+ <div class="left">
+ <a href="https://git.sr.ht/~pmikkelsen">source</a> |
+ <a href="https://pmikkelsen.com">notes</a> |
+ <a href="https://images.pmikkelsen.com">images</a> |
+ <a href="https://prolog.pmikkelsen.com">PProlog</a> |
+ <a href="https://apl.pmikkelsen.com">APL9</a> |
+ <a href="https://lpa.pmikkelsen.com">LPA</a>
</div>
- <div>
- <a href="http://cat-v.org/update_log">site updates</a> |
- <a href="/sitemap">site map</a>
+ <div class="right">
+ <a href="https://9front.org">9front</a> |
+ <a href="https://openbsd.org">OpenBSD</a>
</div>