* $Id: intrafm.css,v 1.10 2002/12/04 17:57:21 gerry Exp $
*
* Author: Gerardo Poggiali <g.poggiali@develer.com>
+ * Author: Bernardo Innocenti <bernie@codewiz.org>
*/
body {
border: 2px dashed #FF0000;
}
-div.navigator {
+div.nav {
border-color: #cc9933;
background-color: #ffcc66;
border-style: solid;
margin-right: 0px;
}
-div.footer {
- font-size: smaller;
- color: #888888;
- border-color: black;
+.nav hr {
+ display: none;
+}
- margin-top: 10px;
- margin-left: 0px;
- margin-right: 0px;
+.nav .login {
+ font-size: small;
+ text-color: red;
+}
- border-style: solid;
- border-top-width: 1px;
- border-right-width: 0px;
- border-bottom-width: 0px;
- border-left-width: 0px;
+#footer div {
+ margin-top: 1em;
+ margin-left: 0;
+ margin-right: 0;
+}
+
+#footer hr {
+ border: none;
+ border-top: 1px solid #bbbbbb;
+ margin: 0 0;
+}
+
+#footer :link, #footer :visited {
+ color: #666666;
+}
+
+#footer p {
+ color: #888888;
+ font-size: x-small;
+ margin-top: 0;
+}
+
+#footer p.copyright {
+ float: left;
+ margin-left: 1em;
+ padding: 0 1em;
+}
+#footer p.modified {
+ float: right;
text-align: right;
+ margin-right: 1em;
}
p.dialog {
background-color: white;
border: 1px solid #8cacbb;
}
+
+/* Styles for search word highlighting */
+@media screen {
+ .searchword0 { background: #ff9 }
+ .searchword1 { background: #cfc }
+ .searchword2 { background: #cff }
+ .searchword3 { background: #ccf }
+ .searchword4 { background: #fcf }
+}
+
+@media print {
+ #footer { display: none }
+ .nav { display: none }
+}
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-__version__ = '$Revision: 1.63+gerry+bernie $'[11:-2];
+__version__ = '$Revision: 1.63+gerry+bernie $'[11:-2]
import cgi, sys, string, os, re, errno, time, stat
from os import path, environ
return privileged_url or script_name()
def remote_user():
- return environ.get('REMOTE_USER', 'AnonymousCoward')
+ user = environ.get('REMOTE_USER', '')
+ if user is None or user == '' or user == 'anonymous':
+ user = 'AnonymousCoward'
+ return user
def remote_host():
return environ.get('REMOTE_ADDR', '')
from socket import gethostbyaddr
return gethostbyaddr(addr)[0] + ' (' + addr + ')'
except:
- return addr;
+ return addr
# Formatting stuff --------------------------------------------------
print
def send_guru(msg, msg_type):
- if msg is None or len(msg) == 0: return
+ if msg is None or msg == '': return
print '<pre id="guru" onclick="this.style.display = \'none\'" class="' + msg_type + '">'
if msg_type == 'error':
print ' Software Failure. Press left mouse button to continue.\n'
else:
print '<body>'
+ title_done = True
send_guru(msg, msg_type)
# Navbar
- print '<div class="navigator">'
+ print '<div class="nav">'
print ' <b>' + site_name + ': ',
if name:
print link_tag('?fullsearch=' + name, text) + '</b> '
print text + '</b> '
print ' | ' + link_tag('FrontPage', 'Front Page', 'navlink')
print ' | ' + link_tag('FindPage', 'Find Page', 'navlink')
- print ' | <a href="/wikigit/wiki.git" class="navlink">Recent Changes</a>'
+ print ' | <a href="' + history_url + '" class="navlink">Recent Changes</a>'
if name:
- print ' | <a href="/wikigit/wiki.git?a=history;f=' + name + '" class="navlink">Page History</a>'
+ print ' | <a href="' + history_url + '?a=history;f=' + name + '" class="navlink">Page History</a>'
print ' | ' + link_tag('?raw=' + name, 'Raw Text', 'navlink')
if privileged_url is not None:
print ' | ' + link_tag('?edit=' + name, 'Edit Page', 'navlink', authentication=True)
user = remote_user()
if user != 'AnonymousCoward':
- print ' | <i>logged in as <b>' + cgi.escape(user) + '</b></i>'
-
- print '</div>'
+ print ' | <span class="login"><i>logged in as <b>' + cgi.escape(user) + '</b></i></span>'
- title_done = True
+ print '<hr /></div>'
def link_tag(params, text=None, ss_class=None, authentication=False):
if text is None:
cgi.print_arguments()
cgi.print_form(cgi.FieldStorage())
cgi.print_environ()
- print '<div class="footer">'
+ print '<div id="footer"><hr />'
+ print '<p class="copyright">Powered by <a href="http://www.codewiz.org/wiki/GeekiGeeki">GeekiGeeki</a></p>'
if mod_string:
- print "last modified %s" % mod_string
+ print '<p class="modified">last modified %s</p>' % mod_string
print '</div></body></html>'
else:
self.h_level = len(word) - 1
result = "<h%d>" % self.h_level
- return result;
+ return result
def _rule_repl(self, word):
s = self._undent()
data_dir = '/home/bernie/public_html/wiki'
text_dir = path.join(data_dir, 'text')
css_url = '../wikidata/geekigeeki.css' # optional stylesheet link
+ history_url = '../wikigit/wiki.git'
post_edit_hook = './post_edit_hook.sh'
datetime_fmt = '%a %d %b %Y %I:%M %p'
allow_edit = True # Is it possible to edit pages?