Commits

Anonymous committed 6fec133

initial commit

Comments (0)

Files changed (4)

+<html>
+<head>
+	<title>deepcube.net rubik's cubes and code</title>
+	<link rel="stylesheet" href="http://deepcube.net/style.css" type="text/css">
+</head>
+<body>
+
+<div="container"> 
+	<div id="header"> 
+		<div class="midHeader"> 
+			<h1 class="headerTitle"><a href="/">deepcube.net<span id="headerSubTitle">rubik's cubes and code</span></a></h1> 
+		</div> 
+	</div>
+<! end of html.head >
+
+
+<! start of html.tail >
+
+<div id="footer">
+	<div class="left">
+		Powered by <a href="http://deepcube.net/code/htmlize">htmlize</a> and <a href="http://s01.de/~tox/index.cgi/proj_smu">smu</a>
+	</div>
+	<div class="right">
+		&copy; 2010 <a href="mailto:evan.gates@deepcube.net">Evan Gates</a>
+	</div>
+</div>
+</div>
+
+</body></html>
+#!/bin/dash
+
+#
+# don't use spaces in directory/file names...
+#
+
+HEAD="html.head"
+TAIL="html.tail"
+URI="http://deepcube.net"
+
+make_menu() {
+	dir="$1"
+	old_dir="$(pwd)"
+	cd "$dir"
+
+	echo "<div id=\"menu\">"
+	echo "<ul>"
+	for f in *; do
+		if ! echo "$f" | grep -q "\.mu$" && ! [ -d "$f" ] || echo "$f" | grep -q "^index.mu$"; then
+			continue
+		fi
+		name="$(echo "$f" | sed "s/\.mu$//")"
+		link="$URI/$dir/$name"
+		link="$(echo "$link" | sed "s_/\./_/_")"
+		name="$(echo "$name" | sed "s/_/ /g")"
+		echo "<li><a href="$link">$name</a></li>"
+	done
+	echo "</ul>"
+	echo "</div>"
+
+	cd "$old_dir"
+}
+
+for file in $(find . | grep "menu$"); do
+	rm "$file"
+done
+
+for file in $(find . | grep "\.mu$"); do
+	if ! [ -e "$(dirname "$file")/menu" ]; then
+		make_menu "$(dirname "$file")" > "$(dirname "$file")/menu"
+	fi
+done
+
+for file in $(find . | grep "\.mu$"); do
+	dir="$(dirname "$file")"
+	odd="1"
+	while true; do
+		if [ "$(wc -l "$dir/menu" | cut -d' ' -f1)" != "4" ]; then
+			if [ -n "$odd" ]; then
+				unset odd
+			else
+				odd="1"
+			fi
+			if [ "$dir" = "." ]; then
+				break
+			fi
+		fi
+		dir="$(dirname "$dir")"
+	done
+	old="$(basename "$file" | sed "s/\.mu$//")"
+	dir="$(dirname "$file")"
+	while true; do
+		if [ "$(wc -l "$dir/menu" | cut -d' ' -f1)" != "4" ]; then
+			if [ -n "$odd" ]; then
+				menu="$(cat "$dir/menu" | sed -e "s/<div id=\"menu\"/& style=\"background-color: #CD8162;\"/" -e "s,><a href=$URI.*$old[^ ]*>, class=\"thisPage\"&,")$menu"
+				unset odd
+			else
+				menu="$(cat "$dir/menu" | sed "s,><a href=$URI.*$old[^ ]*>, class=\"thisPage\"&,")$menu"
+				odd="1"
+			fi
+		fi
+		if [ "$dir" = "." ]; then
+			break
+		fi
+		old="$(basename "$dir")"
+		dir="$(dirname "$dir")"
+	done
+	html="$(echo "$file" | sed "s/\.mu$/.html/")"
+	cat "$HEAD" > "$html"
+	echo "$menu" >> "$html"
+	unset menu
+	echo "<div id=\"main-copy\">" >> "$html"
+	smu "$file" >> "$html"
+	echo "</div>" >> "$html"
+	cat "$TAIL" >> "$html"
+done
+/* suckless.org werc style */
+
+body {
+  color: #000000;
+  font-family: verdana, helvetica, arial, sans-serif;
+  font-size: 84%;  /* Enables font size scaling in MSIE */
+  margin: 0;
+  padding: 0;
+}
+
+/* # Header # */
+.midHeader {
+  background-color: #EE4000;
+/*  background-color: #ffffff;*/
+  border: 0;
+}
+
+.midHeader a {
+  color: black;
+  border: 0;
+  text-decoration: none;
+}
+
+.headerTitle {
+  font-size: 200%;
+  font-weight: normal;
+  margin: 0 0 0 0.5ex;
+  padding: 0.5ex;
+}
+#headerSubTitle {
+  font-size: 50%;
+  font-style: italic;
+  margin-left: 1em;
+}
+
+.headerTitle a {
+  text-decoration: none;
+  border: 0;
+}
+
+.midHeader img {
+  border: 0;
+}
+
+/* new container class */
+
+#container {
+  background-color: #ffffff;
+  border: 0;
+  margin: 0;
+  padding: 0px;
+  width: 100%;
+}
+
+/* new horiz menu stuff # */
+
+#menu {
+  width: 100%;
+  clear: both;
+  border: 0;
+  margin: 0;
+  padding: 0;
+  background-color: #FFA07A;
+}
+#menu ul {
+  margin: 0;
+  padding: 0.3em;
+  list-style-type: none;
+  list-style-image: none;
+  border: 0;
+}
+#menu li {
+  display: inline;
+  white-space: nowrap;
+  line-height: 1.6em;
+}
+#menu li.thisPage a {
+  color: black!important;
+  font-weight: bold;
+/*  background-color: #dddddd; */
+}
+#menu ul li a {
+  margin: 0;
+  padding: 0.1em 1ex 0.1em 1ex;
+  color: #5E2612;
+  background-color: transparent;
+  text-decoration: none;
+  font-size: 1em;
+  border: 0;
+}
+#menu ul li a:hover {
+  color: black;
+  text-decoration: none;
+  text-transform: none;
+}
+
+/* # Main Copy # */
+#main-copy {
+  max-width: 70em;
+  color: black;
+  background-color: transparent;
+  text-align: justify;
+  line-height: 1.5em;
+  margin: 0 auto 0 2em;
+  padding: 1em 3em 2em 1em;
+  border: 0;
+}
+
+#bodyText {
+  margin: 0 0 0 15.5em;
+  padding: 2mm 5mm 2mm 5mm;
+}
+
+#main-copy p {
+  margin: 1em 1ex 1em 1ex !important; /* Need !important so troff-generated pages don't look totally squezed */
+  padding: 0;
+}
+
+#main-copy a {
+  color: #8A360F;
+  background-color: transparent;
+  text-decoration: none;
+}
+
+#main-copy a:hover {
+  text-decoration: underline;
+}
+
+#main-copy h1, #main-copy h2 {
+  color: #8A360F;
+  background-color: transparent;
+  font-size: 135%;
+  margin: 1em 0 0 0;
+  padding: 0.5ex 0 0.5ex 0.6ex;
+}
+
+#main-copy h2 {
+  font-size: 115.5%;
+}
+
+#main-copy h3 {
+  color: #8A360F;
+  background-color: transparent;
+  font-size: 105%;
+  margin: 2em 0 0 0;
+  padding: 0.5ex 0 0 0.6ex;
+}
+
+#main-copy h4 {
+  font-size: 100%;
+  margin: 2em 0 0 0;
+  padding: 0.5ex 0 0 0.6ex;
+}
+
+dl {
+  margin: 1em 1ex 2em 1ex;
+  padding: 0;
+}
+
+dt {
+  font-weight: bold;
+  margin: 0 0 0 0;
+  padding: 0;
+}
+
+dd {
+  margin: 0 0 2em 2em;
+  padding: 0;
+}
+
+
+/* # Footer # */
+#footer {
+  color: black;
+  background-color: #FFA07A;
+  font-size: 91%;
+  margin: 0;
+  padding: 1em 2.5mm 2.5ex 2.5mm;
+  clear: both;
+}
+
+#footer .left {
+  text-align: left;
+  line-height: 1.45em;
+  float: left;
+  clear: left;
+}
+
+#footer .right {
+  text-align: right;
+  line-height: 1.45em;
+}
+
+#footer a {
+  color: black;
+  background-color: transparent;
+  text-decoration: none;
+}
+
+#footer a:hover {
+  text-decoration: underline;
+}
+
+
+/* GENERAL */
+
+table {
+  border: solid 1px black;
+}
+th {
+  background-color: #abc;
+  border: solid 1px black;
+   text-align: center;
+}
+td {
+  background-color: #def;
+  border: solid 1px black;
+}
+
+hr {
+  border-width: 0px 0px 0.1em 0px;
+  border-color: black;
+}
+
+acronym, .titleTip {
+  border-bottom: 1px dotted rgb(153,153,153);
+  cursor: help;
+  margin: 0;
+  padding: 0 0 0.4px 0;
+}
+
+pre {
+  margin-left: 2em; 
+  font-size: 1.2em;
+}
+
+blockquote {
+  border-left: 1px solid blue;
+  font-style: italic;
+}
+
+/* # Page/Handler specific # */
+h1.dir-list-head, ul.dir-list {
+  text-transform: none;
+  font-weight: bold;
+}
+ul.sitemap-list a {
+  text-transform: none;
+}