Commits

Anonymous committed 86e4981

1. Tweaked the CSS a bit.
2. Implemented the gen_helpers.sh to speed up the site generation.

  • Participants
  • Parent commits 99e12a5

Comments (0)

Files changed (4)

 
 # t2 macros
 
-T2_DOCS = $(shell bash find-wmls-t2.sh)
+include make_helpers/include.mak
 
 T2_DEST_BASE = /var/www/html/shlomi/
 T2_DEST_DIR = t2-homepage
 
 T2_DOCS_DEST = $(patsubst t2/%.wml,$(T2_DEST)/%,$(T2_DOCS))
 
-T2_DIRS = $(shell find t2 -type d | grep -v '/\.svn' | grep -v '^\.svn' | tail +2)
-
 T2_DIRS_DEST = $(patsubst t2/%,$(T2_DEST)/%,$(T2_DIRS))
 
-T2_IMAGES = $(shell find t2 -type f -not -name '*.wml' -not -name '.*' | grep -v '/\.svn' | grep -v '~$$')
-
 T2_IMAGES_DEST = $(patsubst t2/%,$(T2_DEST)/%,$(T2_IMAGES))
 
 # vipe macros
 
-VIPE_DOCS = $(shell bash find-wmls-vipe.sh)
-
 VIPE_DEST_BASE = /var/www/html/shlomi/
 VIPE_DEST_DIR = vipe-homepage
 VIPE_DEST = $(VIPE_DEST_BASE)$(VIPE_DEST_DIR)
 
 VIPE_DOCS_DEST = $(patsubst vipe/%.wml,$(VIPE_DEST)/%,$(VIPE_DOCS))
 
-VIPE_DIRS = $(shell find vipe -type d | grep -v '/\.svn' | grep -v '^\.svn' | tail +2)
-
 VIPE_DIRS_DEST = $(patsubst vipe/%,$(VIPE_DEST)/%,$(VIPE_DIRS))
 
-VIPE_IMAGES = $(shell find vipe -type f -not -name '*.wml' -not -name '.*' | grep -v '/\.svn' | grep -v '~$$')
-
 VIPE_IMAGES_DEST = $(patsubst vipe/%,$(VIPE_DEST)/%,$(VIPE_IMAGES))
 
 T2_TARGETS = $(T2_DIRS_DEST) $(T2_DOCS_DEST) $(T2_DEST)/style.css $(T2_IMAGES_DEST)

File gen_helpers.sh

+#!/bin/bash
+file="make_helpers/include.mak"
+rm -f "$file"
+
+newline()
+{
+    echo;
+}
+
+(
+for host in t2 vipe ; do
+    upper_host=`echo -n $host | tr a-z A-Z`
+    
+    echo -n "${upper_host}_DOCS = " ; ./find-wmls-$host.sh ; echo
+    newline
+    echo "${upper_host}_DIRS = " $(find $host -type d | grep -v '/\.svn' | grep -v '^\.svn' | tail +2)
+    newline
+    echo "${upper_host}_IMAGES = " $(find $host -type f -not -name '*.wml' -not -name '.*' | grep -v '/\.svn' | grep -v '~$')
+    newline
+done;
+) >> "$file"
 a:hover, img.highlight:hover { background-color : LightGreen }
-td.navbar { background-color: #ddf747;  width : 20% }
+td.navbar 
+{ 
+    background-color: moccasin;  
+    width : 20% 
+}
 p.desc { margin-left : 3em }
 ul.navbarmain { padding-left : 1em ; margin-left : 1em }
 ul.navbarnested { padding-left : 0em ; margin-left : 2em }
     with a different colour. That's CSS 2.
     http://www.zvon.org/xxl/CSS2Tutorial/Examples/example3.html
 */
-td.navbar a:hover { background-color : orange }
 
+table.shlomif { border-width : 1 ; border-color : black }
+table.shlomif td { vertical-align : top ; align : left }
+td.main 
+{
+    padding-left : 1em;
+}

File vipe/prog-evolution/index.html.wml

 
 <h2>Chapters</h2>
 
-<define-tag doc:versions>
-<set-var url="%0" />
-<td>
-<a href="<url />.html">HTML</a>
-</td>
-<td>
-<a href="<url />.pod">Perl POD Source</a>
-</td>
-<td>
-<a href="<url />.txt">Text</a>
+<define-tag mytd endtag="required">
+<td style="vertical-align : top">
+%body
 </td>
 </define-tag>
 
-<table style="border-width: 1">
+<set-var global:url="" />
+<define-tag url:td endtag="required">
+<preserve ext />
+<preserve desc />
+<set-var ext="%0" />
+<set-var desc="%1" />
+<mytd>
+<a href="<get-var url />.<get-var ext />"><get-var desc /></a>
+</mytd>
+<restore desc />
+<restore ext />
+</define-tag>
+
+<define-tag doc:versions endtag="required">
+<preserve url />
+<preserve title />
+<set-var url="%0" />
+<set-var title="%1" />
+<set-var global:url="<get-var url/>" />
+
 <tr>
-<td>
-The Pre-Elpas Years
-</td>
-<td>
-describes Shlomi Fish
-as a child and teenager programmer before his first serious work as one.
-</td>
-<doc:versions "pre-elpas" />
+<mytd>
+<get-var title />
+</mytd>
+<mytd>
+%body
+</mytd>
+<url:td "html" "HTML" />
+<url:td "pod" "Perl POD" />
+<url:td "txt" "Text" />
 </tr>
+<restore title />
+<restore url />
+</define-tag>
+
+<table border="1">
+<doc:versions "pre-elpas" "The Pre-Elpas Years">
+Describes Shlomi Fish as a child and teenager programmer before his first 
+serious job as one.
+</doc:versions>
 </table>