index.sh
changeset 902 034aeeb2a16d
child 903 9ead7d97be34
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/index.sh	Wed Jul 20 12:37:29 2011 +0300
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+echo '<html>'
+echo '<head>'
+echo '  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">'
+echo '  <title>Tips</title>'
+echo '  <style type="text/css">'
+echo '    body { background-color: linen; }'
+echo '    a { text-decoration:none; }'
+echo '    a:link { color: brown; }'
+echo '    a:visited { color: IndianRed; }'
+echo '    a:hover { background: beige; border-radius: 10px; padding: 1px; }'
+echo '  </style>'
+echo '</head>'
+echo '<body>'
+echo '<h1>Tips</h1>'
+echo '<ul>'
+
+for file in *.rst *.txt; do
+  ext=${file##*.}
+  name=${file%.${ext}}
+  case $ext in
+    txt)
+      printf '  <li><a href="%s.txt" target="article">%s</a>\n' $name $name
+      ;;
+    rst)
+      printf '  <li><a href="%s.html" target="article">%s</a>\n' $name $name
+      ;;
+  esac
+done
+
+echo '<p>'
+echo '<address>'
+echo '    <a href="mailto:gavenkoa@gmail.com">Oleksandr Gavenko</a>'
+echo '</address>'
+echo '</body>'
+echo '</html>'