Less visible anchors to headings.
authorBernardo Innocenti <bernie@codewiz.org>
Thu, 4 Oct 2007 16:54:34 +0000 (18:54 +0200)
committerBernardo Innocenti <bernie@codewiz.org>
Thu, 4 Oct 2007 16:54:34 +0000 (18:54 +0200)
geekigeeki.css
geekigeeki.py

index c0e640df1339c59bd4a9ca31762f9709743d8434..ca698564386b6849271d87ef03ad0447a787200f 100755 (executable)
@@ -108,6 +108,22 @@ h5 {
        padding-left: 5px;
 }
 
+/* Heading anchors */
+.heading:link, .heading:visited {
+       border: none;
+       color: #d7d7d7;
+       font-size: .8em;
+       vertical-align: text-top;
+}
+* > .heading:link, * > .heading:visited {
+       visibility: hidden;
+}
+
+h1:hover .heading, h2:hover .heading, h3:hover .heading,
+h4:hover .heading, h5:hover .heading, h6:hover .heading {
+       visibility: visible;
+}
+
 strong.success {
     padding-left: 0.1em;
        background-color: #22ee22;
index 12b6b7cdaec57d05e14baadd381c17a6431029bb..adc7d2a88f3bab4e8d2bb28a5fdc263841d7d2db 100755 (executable)
@@ -1,4 +1,5 @@
 #! /usr/bin/env python
+# -*- coding: utf-8 -*-
 #
 # Copyright 1999, 2000 Martin Pool <mbp@humbug.org.au>
 # Copyright 2002 Gerardo Poggiali
@@ -355,7 +356,8 @@ class PageFormatter:
         else:
             self.h_level = len(word) - 1
             self.h_cnt += 1
-            result = '<h%d id="%d"><a class="heading" href="#%d">*</a> ' % (self.h_level, self.h_cnt, self.h_cnt)
+            #abridged = re.sub('[^a-z_]', '', word.lower().replace(' ', '_'))
+            result = '<h%d id="%d"><a class="heading" href="#%d">ΒΆ</a> ' % (self.h_level, self.h_cnt, self.h_cnt)
         return result
 
     def _br_repl(self, word):
@@ -672,7 +674,7 @@ class Page:
             + '</b></p>')
         print '<div class="editor"><form method="post" action="%s/%s">' % (script_name(), self.page_name)
         print '<input type="hidden" name="savepage" value="%s">' % (self.page_name)
-        print """<textarea wrap="virtual" id="editor" name="savetext" rows="17" cols="80">%s</textarea>""" % (preview or self.get_raw_body())
+        print """<textarea wrap="off" spellcheck="true" id="editor" name="savetext" rows="17" cols="100">%s</textarea>""" % (preview or self.get_raw_body())
         print """
             <br />
             <input type="submit" name="save" value="Save" />