[M ((Fixes and CSS styling
authorMarcin Koziej <marcin@koziej.info>
Fri, 16 Nov 2012 09:03:16 +0000 (10:03 +0100)
committerLibrary Admin <librarian@szo.nowoczesnapolska.org.pl>
Fri, 16 Nov 2012 09:03:39 +0000 (10:03 +0100)
apps/catalogue/management/edumed.py
redakcja/static/css/html.css

index b1e67c3..9e90ba7 100644 (file)
@@ -96,7 +96,7 @@ class Informacje(Tagger):
 
 class List(Tagger):
     point = re.compile(r"^[\s]*[-*ยท]{1,2}(.*)")
-    num = re.compile(r"^[\s]*[a-z]{1,2}[.]\s+(.*)")
+    num = re.compile(r"^[\s]*[a-z][.]\s+(.*)")
 
     def __init__(self, *args):
 
@@ -260,9 +260,6 @@ dc_fixed = {
 
 def find_block(content, title_re, begin=-1, end=-1):
     title_re = re.compile(title_re, re.I | re.UNICODE)
-    ##   print "looking for %s" % title_re.pattern
-    if title_re.pattern[0:6] == 'pomoce':
-        import pdb; pdb.set_trace()
 
     rb = -1
     if begin < 0: begin = 0
@@ -303,7 +300,7 @@ def mark_activities(content):
     is_przebieg = re.compile(r"[\s]*przebieg zaj..[\s]*", re.I)
 
     is_next_section = re.compile(r"^[IVX]+[.]? ")
-    is_activity = re.compile(r"^[0-9]+[.]? (.+)")
+    is_activity = re.compile(r"^[0-9]+[.] (.+)")
 
     is_activity_tools = re.compile(r"^pomoce:[\s]*(.+)")
     is_activity_work = re.compile(r"^forma pracy:[\s]*(.+)")
@@ -320,14 +317,16 @@ def mark_activities(content):
     ae = -1
     while True:
         e = content[i]
+        if isinstance(e, Section):
+            if in_activities and \
+                is_next_section.match(e.title):
+                in_activities = False
+            
         if isinstance(e, Paragraph):
             if not in_activities and \
                 is_przebieg.match(e.line):
                 in_activities = True
 
-            if in_activities and \
-                is_next_section.match(e.line):
-                in_activities = False
             if in_activities:
                 m = is_activity.match(e.line)
                 if m:
index d587103..e8fab4d 100644 (file)
@@ -677,8 +677,62 @@ div[x-node] > .uwaga {
 } 
 
 /* XXX */
+body {
+    counter-reset: listanum;
+}
+
+.htmlview span.lista[data-wlf-typ="num"] 
+{
+    list-style-type: none;
+    list-style-position: inside;
+}
+.htmlview span.lista[data-wlf-typ="num"] .punkt:before {
+    counter-increment:listanum;
+    content: counter(listanum) ". ";
+}
+
+.htmlview span.lista[data-wlf-typ="punk"] 
+{
+    list-style-type: disc;
+}
+
+.htmlview span.lista[data-wlf-typ="slowniczek"] 
+{
+    list-style-type: none;
+}
 
 .htmlview span.punkt {
     display: list-item;
-    list-style: bullet;
-}
\ No newline at end of file
+    list-style-position: inside;
+}
+
+.htmlview span.aktywnosc span.opis {
+    font-style: italic;
+}
+.htmlview span.aktywnosc span.wskazowki {
+    font-style: italic;
+    color: #202020;
+}
+
+.htmlview .pomoce, .htmlview .czas, .htmlview .forma {
+    display: block;
+}
+.htmlview .pomoce:before { content: "Pomoce: "; }
+.htmlview .czas:before { content: "Czas: "; }
+.htmlview .czas:after { content: " min"; }
+.htmlview .forma:before { content: "Forma:"; }
+
+.htmlview .aktywnosc {
+    display: block;
+    border: 1px dotted #996600;
+}
+
+.htmlview .definiendum {
+    font-weight: bold;
+    display: block;
+}
+
+.htmlview .definiens {
+    padding-left: 50px;
+}
+