index.sh
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sat, 03 Oct 2015 18:29:10 +0300
changeset 1765 2132765de2f4
parent 1336 80c5eff010a1
child 1784 a9e8554a24d3
permissions -rwxr-xr-x
Cellular automaton.

#!/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: LightYellow; }'
echo '    a { text-decoration:none; }'
echo '    a:link { color: brown; }'
echo '    a:visited { color: IndianRed; }'
echo '    a:hover { background: bisque; border-radius: 10px; padding: 1px; }'
echo '  </style>'
echo '</head>'
echo '<body>'
echo '<h1>Tips</h1>'
echo '<ul>'

for file in *.rst *.txt; do
  case $file in
    HEADER.rst) continue;
  esac
  ext=${file##*.}
  [ "$ext" = "rst" ] && ext=html
  name=${file%.*}
  case "$1" in
    html) echo "  <li><a href=\"$name.$ext\">$name</a>" ;;
    frame) echo "  <li><a href=\"$name.$ext\" target=\"article\">$name</a>" ;;
    *) exit 1 ;;
  esac
done

echo '<p>'
echo '<address>'
echo '    <a href="mailto:gavenkoa@gmail.com">Oleksandr Gavenko</a>'
echo '</address>'
echo '</body>'
echo '</html>'