div#INTRO {
float: top;
- margin: 2em 25% 1em 20%;
- padding: 1em .5em .5em .5em;
+ margin: .5em;
+ padding: 0em .5em .5em .5em;
background-color: #F7F7F7;
border-style: solid dashed dashed dashed;
border-width: 1px;
border-color: #AAF;
}
+
+#introtext h1 {
+ text-align: center;
+ font: normal bold 2em sans-serif;
+ margin: 0em 0em 0em 0em;
+ border-style: none none solid none;
+ border-width: 1px;
+}
+#introtext h1 + h2{
+ margin: .5em 0em .3em 0em;
+}
+#introtext h2 {
+ text-align: left;
+ font: normal bold 1.5em sans-serif;
+ margin: .3em 0em .3em 0em;
+ border-style: none none solid none;
+ border-width: 1px; border-color: #AAF;
+}
+#introtext h2 + p { margin: 0em; }
+#introtext h3 {
+ text-align: left;
+ font-size: 1.2em;
+ margin: .6em 0em .3em 0em;
+}
+#introtext h3 + p { margin: 0em; }
+#introtext h4 {
+ text-align: left;
+ font-size: 1em;
+ margin: .6em 0em .3em 0em;
+}
+#introtext h4 + p { margin: 0em; }
+#introtext p {
+ margin: .6em 0em;
+}
+#introtext ul {
+ text-indent: 0em;
+ margin: .3em 0em;
+ padding: 0em 4ex;
+}
+#introtext ul ol {font-size: .9em; margin: 0em;}
+#introtext ol {
+ text-indent: 0em;
+ margin: .3em 0em;
+ padding: 0em 4ex;
+}
+#introtext ol ul {font-size: .9em; margin: 0em;}
+#introtext pre {
+ background-color: #EEE;
+ padding: .5em;
+ border-style: solid; border-width: 1px;
+ border-color: #AAF;
+}
cat <<HomeEND
<div id="LEFT">
</div>
- <div id="RIGHT">
- </div>
- <div id="INTRO">
+ <div id="MAIN">
+ <div id="INTRO">
+ <div id="introtext">
+ $([ -r "Home/intro" ] && _wiki "Home/intro")
+ $($ADM && echo "<hr><a class='function' href='#' onclick='javascript:hide_screen(\"introtext\");show_screen(\"introedit\");'>Edit</a>" )
+ </div>
+HomeEND
+$ADM && cat <<HomeEND
+ <div id="introedit" style="display: none;">
+ <form action="/write/introedit.cgi" method="post" accept-charset="UTF-8">
+ <textarea name="intro" rows="10">$([ -r "Home/intro" ] && cat Home/intro)</textarea><br>
+ <input type="submit">
+ <a class="function" href="#" onclick="javascript:hide_screen('introedit');show_screen('introtext');">Cancel</a>
+ </form>
+ </div>
+HomeEND
+cat <<HomeEND
+ </div>
+
+ $(stat -c '' Home/<0000000000-9999999999>-<000-999>.news && for each in $(ls -c News/<0000000000-9999999999>-<000-999>); do
+ echo '<div id="NEWS">'
+ _wiki "$each"
+ echo '</div>'
+ done)
+ </div>
+ <div id="RIGHT">
</div>
-
- <div class="News">
- <div>
HomeEND
padding: 0em 4ex;
}
.wiki ol ul {font-size: .9em; margin: 0em;}
+.wiki pre {
+ background-color: #EEE;
+ padding: .5em;
+ border-style: solid; border-width: 1px;
+ border-color: #AAF;
+}
.article {
float: left;
form { width: 100%; }
form textarea { width: 99%; }
+form input { max-width: 99%; }
div.screen {
position: fixed;
<a href='/?p=Home'>Home</a>
<a href='/?p=Wiki'>Wiki</a>
<a href='/?p=Code'>Code</a>
- <a href='/?p=Issues'>Issues</a>
+ <a href='/?p=Tasks'>Tasks</a>
</div>
$(if [ -r "./${page}.page" ]; then
. "./${page}.page"
--- /dev/null
+#!/bin/zsh
+# Copyright 2011 Paul Haensch
+# This file is part of Busy
+#
+# Busy is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Busy is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with Busy. If not, see <http://www.gnu.org/licenses/>.
+
+if [ -n "${CONTENT_LENGTH}" -a "${CONTENT_LENGTH}" -gt 0 ]; then
+(head -c "${CONTENT_LENGTH}"; echo)|sed 's/&/\n/g' |while read line; do
+ if (echo "${line}" | egrep -xq 'intro=.+'); then
+ intro="$(cut -d= -f2- <<<"${line}" |sed 's/+/ /g;s/%/\\x/g')"
+ intro=$(echo -e "${intro}" |sed 's/\t/ /g;s/\r//g;s/\\/\\\\/g')
+ elif (echo "${line}" | egrep -xq 'cancel=.+'); then
+ cancel=true
+ fi
+done
+fi
+
+[ -z "$cancel" ] && grep -qx "${REMOTE_USER}" ../auth/admin.user && echo -e "${intro}" >"../Home/intro"
+
+echo -n "Location: http://${HTTP_HOST}/?p=Home\n\n"