summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorglenda <glenda@9front.local>2020-11-15 15:13:27 +0000
committerglenda <glenda@9front.local>2020-11-15 15:13:27 +0000
commit39318169e0b50551db511851829f9337c5fa6313 (patch)
tree65a0ef5c1da9677532fa8105293d017919473057 /lib
Import site to git
Diffstat (limited to 'lib')
-rw-r--r--lib/404.tpl3
-rw-r--r--lib/default_master.tpl26
-rw-r--r--lib/footer.inc7
-rw-r--r--lib/headers.tpl29
-rw-r--r--lib/top_bar.inc15
5 files changed, 80 insertions, 0 deletions
diff --git a/lib/404.tpl b/lib/404.tpl
new file mode 100644
index 0000000..f839439
--- /dev/null
+++ b/lib/404.tpl
@@ -0,0 +1,3 @@
+<h1>The requested document at '<i>%($base_url$"req_path%)</i>' doesn't exist</h1>
+<h4>Or take a look at the <a href="/sitemap">sitemap</a>.</h4>
+<hr>
diff --git a/lib/default_master.tpl b/lib/default_master.tpl
new file mode 100644
index 0000000..6742c49
--- /dev/null
+++ b/lib/default_master.tpl
@@ -0,0 +1,26 @@
+<header>
+ <nav>
+% cat `{ get_lib_file top_bar.inc }
+ </nav>
+ <h1><a href="/">%($"siteTitle%) <span id="headerSubTitle">%($"siteSubTitle%)</span></a></h1>
+</header>
+
+% if(! ~ $#handlers_bar_left 0) {
+ <nav id="side-bar">
+% for(h in $handlers_bar_left) {
+ <div>
+% run_handler $$h
+ </div>
+% }
+ </nav>
+% }
+
+<article>
+% run_handlers $handlers_body_head
+% run_handler $handler_body_main
+% run_handlers $handlers_body_foot
+</article>
+
+<footer>
+% cat `{ get_lib_file footer.inc }
+</footer>
diff --git a/lib/footer.inc b/lib/footer.inc
new file mode 100644
index 0000000..1eac7d8
--- /dev/null
+++ b/lib/footer.inc
@@ -0,0 +1,7 @@
+<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>
diff --git a/lib/headers.tpl b/lib/headers.tpl
new file mode 100644
index 0000000..635f85e
--- /dev/null
+++ b/lib/headers.tpl
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML>
+<html>
+<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">'
+
+ <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)
+% echo ' <meta name="description" content="'$"meta_description'">'
+% if(! ~ $#meta_keywords 0)
+% echo ' <meta name="keywords" content="'$"meta_keywords'">'
+
+% h = `{get_lib_file headers.inc}
+% if(! ~ $#h 0)
+% cat $h
+
+ %($"extraHeaders%)
+
+</head>
+<body>
+
diff --git a/lib/top_bar.inc b/lib/top_bar.inc
new file mode 100644
index 0000000..cbb89b8
--- /dev/null
+++ b/lib/top_bar.inc
@@ -0,0 +1,15 @@
+ <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>
+
+ <div>
+ <a href="http://cat-v.org/update_log">site updates</a> |
+ <a href="/sitemap">site map</a>
+ </div>
+