]> git.plutz.net Git - lobster/commitdiff
changed page structure
authorpaul <paul@plutz.net>
Mon, 19 Aug 2013 13:04:19 +0000 (13:04 +0000)
committerpaul <paul@plutz.net>
Mon, 19 Aug 2013 13:04:19 +0000 (13:04 +0000)
svn path=/trunk/; revision=6

page.sh
pages/attendees.sh [moved from ifcomponent/page_attendees.sh with 100% similarity]
pages/courses.sh [moved from ifcomponent/page_courses.sh with 100% similarity]
pages/email.sh [moved from ifcomponent/page_email.sh with 100% similarity]
pages/error.sh [moved from ifcomponent/page_error.sh with 100% similarity]
templates/frame.html.sh [moved from ifcomponent/frame.sh with 84% similarity]
templates/view_attendee.sh [moved from ifcomponent/view_attendee.sh with 100% similarity]
templates/view_course.sh [moved from ifcomponent/view_course.sh with 100% similarity]

diff --git a/page.sh b/page.sh
index a26e8828ee5c1ea257e91efdb13d2c242e1d542b..f49968b3770e538c614a4e107f7c954a3a034d97 100755 (executable)
--- a/page.sh
+++ b/page.sh
@@ -3,17 +3,15 @@
 echo -n "Content-Type: text/html;charset=utf-8\n\n"
 
 PAGE="$(echo "$_GET[\"page\"]" |egrep '^[a-zA-Z0-9_-]+$')"
-PAGE="${_EXEC}/ifcomponent/page_${PAGE}.sh"
-[ -x "$PAGE" ] || PAGE="${_EXEC}/ifcomponent/page_error.sh"
-
-TITLE=$($PAGE title)
+PAGE="${_EXEC}/pages/${PAGE}.sh"
+[ -x "$PAGE" ] || PAGE="${_EXEC}/pages/error.sh"
 
 NAVIGATION() {
-  for each in "${_EXEC}/ifcomponent"/page_*.sh; do
-    link="$(echo "$each" |sed -r "s:^.*page_(.*)\.sh$:\1:")"
+  for each in "${_EXEC}"/pages/*.sh; do
+    link="$(echo "$each" |sed -r "s:^.*/([^/]*)\.sh$:\1:")"
     title="$($each title)"
     [ -n "$title" ] && echo "/?page=$link $title"
   done
 }
 
-. ${_EXEC}/ifcomponent/frame.sh
+. ${_EXEC}/templates/frame.html.sh
similarity index 100%
rename from ifcomponent/page_courses.sh
rename to pages/courses.sh
similarity index 100%
rename from ifcomponent/page_email.sh
rename to pages/email.sh
similarity index 100%
rename from ifcomponent/page_error.sh
rename to pages/error.sh
similarity index 84%
rename from ifcomponent/frame.sh
rename to templates/frame.html.sh
index fa04fd6eda19e45547d2a9d27233de97f40132b4..bac287180270d0f05c00f5dc531c3794fd908676 100755 (executable)
@@ -1,11 +1,9 @@
-#!/bin/zsh
-
 cat <<EOF
 <!Doctype HTML>
 
 <html>
   <head>
-    <title>$TITLE</title>
+    <title>$($PAGE title)</title>
     <style type="text/css">
     <!--
 
@@ -24,3 +22,5 @@ cat <<EOF
   </body>
 </html>
 EOF
+
+# vi:set filetype=html: