From e76acb4ea49713c4390342ccbdf8f3a5a71f8aee Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 20 Feb 2013 10:39:08 +0100 Subject: [PATCH 1/1] random fixes --- curriculum/models.py | 4 ++-- edumed/static/css/base.css | 8 +++++++- edumed/static/css/base.scss | 12 +++++++++++- edumed/static/img/favicon.png | Bin 0 -> 1734 bytes edumed/templates/base.html | 2 +- edumed/templates/flatpages/default.html | 2 +- 6 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 edumed/static/img/favicon.png diff --git a/curriculum/models.py b/curriculum/models.py index 004e78e..ad98877 100644 --- a/curriculum/models.py +++ b/curriculum/models.py @@ -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) diff --git a/edumed/static/css/base.css b/edumed/static/css/base.css index 5cfe862..c59a82d 100644 --- a/edumed/static/css/base.css +++ b/edumed/static/css/base.css @@ -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; } diff --git a/edumed/static/css/base.scss b/edumed/static/css/base.scss index 5c38509..c29938d 100644 --- a/edumed/static/css/base.scss +++ b/edumed/static/css/base.scss @@ -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 index 0000000000000000000000000000000000000000..61e13aba1d10bb0529b1752a1b757bee41ff935a GIT binary patch literal 1734 zcmV;%208hOP)e zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{00u5eL_t(&-tC!hh+JnC#(&S< zU=X#%-jO1h`awuPl$yDrAW9`5h{_gJ0{)>N)Pk+HprB3WYBVisnmZ7Ys8~`#iWDl9 zeke8y77Qpt3&uO8Vo^|w;0M#Wsbp!uG`o)<-uM35&2F;U*%?xt!@}&$ymQWb-gDmP zJm*}P%UtF%m%02Oh`MjadH++GPa|#t8I0;B2FHISE!ch;>9>MIX;EI-tifu~zscx+ z$sYvm0AmZZfi1#!8?6z(i1dPC*elA@s~j8W{Wk(5&~DivVVj^+jr+}K2uIBdYd_E% zj!s?4sd1j=n4AOVo|5@bL*XIIgQ?uj8S z+eYx4D(~;PY^3t+F7Q!-C6>dH2V1^^t&P_-@ma>U@h7Uh|2TlEc#2j$5d3?g`;A}3 zT2M!Wi3uw21n$9lAZ(Ha;A~oy>17;q=akO__ZgoQT5$}=T3d}lM12rz)=2Ok!^1K+ zg)b5Io&@-8JQx8__lnW&X;D6lbzZQ9v;-_+!mGR_^m4BlJqW%nI%VL7YLMNwzEk~! z@zMm__H}7dJ}UHz?Q@u=^=wHj2`ynSZLsECT9m)+73Dh-XACRBi0)IBXRcG!=FJip z(xQBA(_oPIPh<8XfjOBD%RANqjDLc5#e+YQ4$CiWHwupP{+&XP#W0sief0>rf4+XR zS+VtC3$9*V$EllvT`^6tI5-u2xBljs>cI6$orAV@X#u#h^oHdxP)GrXyL4!ELD6@k zQUTBPit^l)N>?J<>zCB`^r}5tEyn{o%fLMmERu1a$*|Z&%RWBMqTGpCfP17inYN

z{5dVkGgFUNbJ3bR#&$#u@XOHXpV4ZT+ zprX882j{!i*!XB~Sb8P_>(Y=*s@DWts0NuN?RU2awjY`eXw)g9u48Unp2_sz85_^| zXCu9-%KQ6fQkWIXmLc&fKGN+OKta8X@KH32G)2mO7R9jbpVj#Ptehs`(Y=^Ey`ah||1;?BlF^WOyX@7lR4&%S;& zbNHz6%WahP#0JYAYZJoxl(O+yn6wGQ^9kaoabqinBUPSlx`nR>{kLIuxAQyl^?5O0 zrDkMP`u9EbNw|f>#0XBe@ctdt#M$=jq%5-pK>(! zu^pg(MA9?yl-`su1(RC!YSFvsEe7)LPw;PoVe@%(a4aF?!A7={Ov* z#D`i?@e!^;*)+=#ejwHeQA2j9xZi(WJC+usKO*f1{uAbE{ul7xUNJhuT;?*Dxy)rQ cbJ;M1&07*qoM6N<$g5+LA?EnA( literal 0 HcmV?d00001 diff --git a/edumed/templates/base.html b/edumed/templates/base.html index 2121b81..ee7cde7 100644 --- a/edumed/templates/base.html +++ b/edumed/templates/base.html @@ -92,7 +92,7 @@ {% sponsor_page "footer" %}

- {% block footer_extra %}{% endblock %} + diff --git a/edumed/templates/flatpages/default.html b/edumed/templates/flatpages/default.html index f19f3c3..1ab012c 100755 --- a/edumed/templates/flatpages/default.html +++ b/edumed/templates/flatpages/default.html @@ -4,7 +4,7 @@ {% block title %}{{ flatpage.title }}{% endblock %} {% block body %} -
+
{{ flatpage.content|textile_pl }}
{% endblock %} -- 2.20.1