random fixes
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 20 Feb 2013 09:39:08 +0000 (10:39 +0100)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 20 Feb 2013 09:39:08 +0000 (10:39 +0100)
curriculum/models.py
edumed/static/css/base.css
edumed/static/css/base.scss
edumed/static/img/favicon.png [new file with mode: 0644]
edumed/templates/base.html
edumed/templates/flatpages/default.html

index 004e78e..ad98877 100644 (file)
@@ -50,11 +50,11 @@ class Competence(models.Model):
     @classmethod
     def from_text(cls, text):
         """Tries to return a Competence or a Section."""
-        parts = text.rsplit(u'\u2013', 1)
+        parts = re.split(ur'[-\u2013]', text, 1)
         if len(parts) == 1:
             return Section.objects.get(name__iexact=text.strip())
         else:
-            return cls.objects.get(name__iexact=parts[1])
+            return cls.objects.get(name__iexact=parts[1].strip())
 
 class Level(models.Model):
     group = models.CharField(_('group'), max_length=255)
index 5cfe862..c59a82d 100644 (file)
@@ -132,7 +132,7 @@ footer.main {
   border-top: 1px solid #c9ccce;
   width: 58.75em;
   padding: 0.2em 0.625em;
-  margin: 2.5em auto 0 auto;
+  margin: 2.5em auto 1em auto;
   color: #9a9c9e; }
   footer.main p {
     font-size: .75em; }
@@ -146,6 +146,8 @@ footer.main {
     width: 6.25em; }
     footer.main .sponsors-column p {
       font-size: .75em; }
+  footer.main .footer-extra p {
+    margin-top: 0; }
 
 #search {
   font-size: .8em; }
@@ -199,3 +201,7 @@ footer.main {
   list-style: none; }
   .plain li {
     margin: 1em 0; }
+
+.flatpage img {
+  border: 0.313em solid #eeeeee;
+  margin: 1.3em; }
index 5c38509..c29938d 100644 (file)
@@ -140,7 +140,7 @@ footer.main {
     border-top: 1px solid #c9ccce;
     width: 940 * $px;
     padding: .2em 10 * $px;
-    margin: 40*$px auto 0 auto;
+    margin: 40*$px auto 1em auto;
     color: #9a9c9e;
 
     p {
@@ -159,6 +159,9 @@ footer.main {
             font-size: .75em;
         }
     }
+    .footer-extra p {
+        margin-top: 0;
+    }
 }
 
 
@@ -239,3 +242,10 @@ footer.main {
         margin: 1em 0;
     }
 }
+
+.flatpage {
+    img {
+        border: 5*$px solid #eee;
+        margin: 1.3em;
+    }
+}
diff --git a/edumed/static/img/favicon.png b/edumed/static/img/favicon.png
new file mode 100644 (file)
index 0000000..61e13ab
Binary files /dev/null and b/edumed/static/img/favicon.png differ
index 2121b81..ee7cde7 100644 (file)
@@ -92,7 +92,7 @@
             </div>
             {% sponsor_page "footer" %}
             <div class="clr"></div>
-            {% block footer_extra %}{% endblock %}
+            <div class="footer-extra">{% block footer_extra %}{% endblock %}</div>
         </footer>
 
     <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
index f19f3c3..1ab012c 100755 (executable)
@@ -4,7 +4,7 @@
 {% block title %}{{ flatpage.title }}{% endblock %}
 
 {% block body %}
-<div id="main-bar">
+<div id="main-bar" class="flatpage">
 {{ flatpage.content|textile_pl }}
 </div>
 {% endblock %}