]> git.plutz.net Git - lobster/commitdiff
clean up obsolete code
authorPaul Hänsch <paul@plutz.net>
Sun, 14 Feb 2021 10:19:27 +0000 (11:19 +0100)
committerPaul Hänsch <paul@plutz.net>
Sun, 14 Feb 2021 10:19:27 +0000 (11:19 +0100)
index.cgi

index 40db42b99eb53288fb2494aa7faac2947ee47acd..138ae74b5be4570f03286305cdda6c4f39e508af 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -12,28 +12,6 @@ esac; done
 
 mkdir -p "${_DATA}/cache" "${_DATA}/mappings" "${_DATA}/export" "${_DATA}/lock" "${_DATA}/ical" "${_DATA}/vcard"
 
-debug() {
-  local dbg=/dev/stderr
-  if [ ! "$DEBUG" ]; then
-    [ "$#" -gt 0 ] && : || cat;
-  elif [ "$#" -gt 0 ]; then
-    printf '%s\n' "$@" >>"$dbg"
-  else
-    tee -a "$dbg"
-  fi
-}
-
-debug() {
-  local dbg=/dev/stderr
-  if [ ! "$DEBUG" ]; then
-    [ "$#" -gt 0 ] && : || cat;
-  elif [ "$#" -gt 0 ]; then
-    printf '%s\n' "$@" >>"$dbg"
-  else
-    tee -a "$dbg"
-  fi
-}
-
 . "$_EXEC/cgilite/cgilite.sh"
 . "$_EXEC/cgilite/session.sh"
 
@@ -63,6 +41,7 @@ yield_page() {
        [html [head
           [title Lobster]
          [meta name="viewport" content="width=device-width"]
+         [link rel="stylesheet" type="text/css" href="/cgilite/common.css"]
          [link rel="stylesheet" type="text/css" href="/style.css"]
     '
     [ -n "$style" ] && printf '
@@ -71,7 +50,6 @@ yield_page() {
     printf '
        ] [body #top class="%s"
     ' "$class"
-    printf '[ul .menu [li [a "/cards/" . %s]][li [a "/courses/" . %s]]]' "$(l10n cards)" "$(l10n courses)"
     [ "$message" ] && printf '[p #message\n%s\n]' "$(l10n "$message")"
     cat
     printf '] ]'
@@ -85,12 +63,6 @@ topdir="/${topdir%%/*}"
 case ${_PATH} in
   /) REDIRECT /cards/
     ;;
-#  /export/*.pdf) . "$_EXEC/cgilite/file.sh"
-#    FILE "${_DATA}/${_PATH}" "application/pdf"
-#    ;;
-#  /export/*) . "$_EXEC/cgilite/file.sh"
-#    FILE "${_DATA}/${_PATH}"
-#    ;;
   *)
     if   [ -d "${_EXEC}/${_PATH}" -a -x "${_EXEC}/${_PATH}/index.cgi" ]; then
       . "${_EXEC}/${_PATH}/index.cgi"