Re: [dev] [sw] Suckless web-framework

From: Andrew Antle <andrew.antle_AT_gmail.com>
Date: Wed, 5 May 2010 14:14:41 -0400

Hello nibble -

$ hg log | sed 5q
changeset: 35:6903be285e65
tag: tip
user: Andrew Antle <andrew dot antle at gmail dot com>
date: Wed May 05 14:09:17 2010 -0400
summary: Created new stylesheet based on suckless.org and garbe.us,

$ cat sw.diff
diff -r eb1e40b20c42 -r 6903be285e65 style.new.css
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/style.new.css Wed May 05 14:09:17 2010 -0400
@@ -0,0 +1,87 @@
+/* Based on werc.cat-v.org, suckless.org and garbe.us */
+
+/* General */
+body {
+ color: #aaa;
+ font-family: sans-serif;
+ font-size: 80%;
+ margin: 0;
+ padding: 0
+}
+
+/* Header */
+.header { background-color: #ccc; border: 0; }
+.header a { border: 0; color: #111; text-decoration: none; }
+.midHeader img { border: 0; }
+
+.headerTitle { font-size: 1.6em; font-weight: bold; margin: 0 0 0
0.5em; padding: 0.5em; }
+.headerTitle a { border: 0; text-decoration: none; }
+
+.headerSubTitle { font-size: 0.6em; font-weight: normal; margin-left: 1em; }
+
+/* Side */
+#side-bar {
+ width: 100%;
+ clear: both;
+ border: 0;
+ margin: 0;
+ padding: 0;
+ background-color: #ddd;
+}
+
+#side-bar ul {
+ margin: 0;
+ padding: 0.3em;
+ list-style-type: none;
+ list-style-image: none;
+ border: 0;
+}
+
+#side-bar li { display: inline; line-height: 1.6em; white-space: nowrap; }
+
+#side-bar ul li a {
+ margin: 0;
+ padding: 0.1em 1ex 0.1em 1ex;
+ color: #336699;
+ background-color: transparent;
+ text-decoration: none;
+ font-size: 1em;
+ border: 0;
+}
+
+#side-bar ul li a:hover { color: #111; text-decoration: none; }
+
+/* Main Copy */
+#main {
+ max-width: 70em;
+ color: #111;
+ margin: 0 auto 0 2em;
+ padding: 1em 3em 2em 1em;
+ border: 0;
+}
+
+#main a { color: #336699; text-decoration: none; }
+#main a:hover { text-decoration: underline; }
+#main h1, #main-copy h2 { color: #666; }
+#main ul { list-style-type: square; }
+
+/* Footer */
+#footer {
+ background-color: #ddd;
+ color: #111;
+ font-size: 91%;
+ padding: 2em;
+ clear: both;
+}
+
+#footer .left { text-align: left; float: left; clear: left; }
+#footer .right { text-align: right; }
+#footer a { color: #111; text-decoration: none; }
+#footer a:hover { text-decoration: underline; }
+
+abbr, acronym { border-bottom: 1px dotted #333; cursor: help; }
+blockquote { border-left: 1px solid #333; font-style: italic; padding: 1em; }
+hr { border-width: 0 0 0.1em 0; border-color: #666; }
+
+code, pre { font-size: 1.1em }
+pre { margin-left: 2em; }
diff -r eb1e40b20c42 -r 6903be285e65 sw.cgi
--- a/sw.cgi Thu Apr 15 09:32:17 2010 +0200
+++ b/sw.cgi Wed May 05 14:09:17 2010 -0400
@@ -6,7 +6,7 @@

 echo "Content-type: text/html"
 echo
-echo "<!DOCTYPE HTML>"
+echo "<!doctype html>"

 if [ -z "`echo "${REQUEST_URI}" | grep -F "${BIN}"`" ] || \
    [ -n "`echo "${REQUEST_URI}" | grep -e "[^a-zA-Z0-9_\./ -]\+"`" ]; then
@@ -52,6 +52,7 @@
 <head>
 <title>${TITLE}</title>
 <link rel="stylesheet" href="${PREFIX}${STYLE}" type="text/css">
+<link rel="icon" href="/favicon.png" type="image/png">
 <meta charset="UTF-8">
 </head>
 <body>
@@ -72,7 +73,7 @@
 # Footer
 cat << _footer_
 <div id="footer">
-<div class="right">Powered by sw</div>
+<div class="right"><a
href="http://nibble.develsec.org/sw.cgi/projects/sw.md">Powered by
sw</a></div>
 </div>
 </body>
 </html>

-- 
Andrew Antle
<andrew dot antle at gmail dot com>
<http://sw.antlechrist.org/>

Received on Wed May 05 2010 - 18:14:41 UTC

This archive was generated by hypermail 2.2.0 : Wed May 05 2010 - 18:24:02 UTC