From: Radek Czajka Date: Fri, 24 Aug 2012 15:17:29 +0000 (+0200) Subject: lots of graphics X-Git-Url: https://git.mdrn.pl/prawokultury.git/commitdiff_plain/8e82784fa2fe21d9c3828adbf43178a39c7cdea6?ds=sidebyside;hp=--cc lots of graphics --- 8e82784fa2fe21d9c3828adbf43178a39c7cdea6 diff --git a/events/templates/events/snippets/events_box.html b/events/templates/events/snippets/events_box.html index 09e0c85..fc15f6c 100755 --- a/events/templates/events/snippets/events_box.html +++ b/events/templates/events/snippets/events_box.html @@ -9,9 +9,11 @@
{{ event.date|date:"j" }}
{{ event.date|date:"b" }}
- {{ event.place }} - {{ event.title }} - {{ event.organizer }} +
+ {{ event.place }} + {{ event.title }} + {{ event.organizer }} +
diff --git a/migdal/admin.py b/migdal/admin.py index d7a7224..6d4baef 100644 --- a/migdal/admin.py +++ b/migdal/admin.py @@ -22,7 +22,7 @@ class AttachmentInline(admin.TabularInline): class EntryAdmin(admin.ModelAdmin): fieldsets = ( - (None, {'fields': ('type', 'author', 'author_email', 'image')}), + (None, {'fields': (('type', 'promo'), 'author', 'author_email', 'image')}), ) + tuple( (ln, {'fields': ( ('published_%s' % lc), diff --git a/migdal/api.py b/migdal/api.py index 7ed17ec..7fd6fe3 100755 --- a/migdal/api.py +++ b/migdal/api.py @@ -2,12 +2,13 @@ # This file is part of PrawoKultury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # +from itertools import chain from migdal.models import Entry from migdal.settings import TYPES from django.utils.translation import get_language -def entry_list(entry_type=None, category=None): +def entry_list(entry_type=None, category=None, promobox=False): lang = get_language() object_list = Entry.objects.filter(**{"published_%s" % lang: True}) if entry_type: @@ -16,4 +17,10 @@ def entry_list(entry_type=None, category=None): object_list = object_list.filter(type__in=[t.db for t in TYPES if t.on_main]) if category: object_list = object_list.filter(categories=category) + + if promobox: + promo = list(object_list.filter(promo=True)[:promobox]) + #object_list = object_list.exclude(pk__in=[p.pk for p in promo]) + object_list.promobox = promo + return object_list diff --git a/migdal/templates/migdal/entry/entry_begin.html b/migdal/templates/migdal/entry/entry_begin.html index 351148e..1c47e89 100755 --- a/migdal/templates/migdal/entry/entry_begin.html +++ b/migdal/templates/migdal/entry/entry_begin.html @@ -1,12 +1,12 @@ {% load i18n %} -{% load gravatar %} +{% load gravatar thumbnail %}

{{ object.title }}

-{{ object.date }} -{{ object.author }} +
{{ object.date }}
+
{{ object.author }}
{% if request.LANGUAGE_CODE == 'pl' %} {% if object.published_en %} @@ -20,13 +20,23 @@ {% endlanguage %} {% endif %} - +
{% for category in object.categories.all %} {{ category }} {% endfor %}
+
+ {% if object.image %} - + {% endif %} +
{{ object.lead }} +
+
+ diff --git a/migdal/templates/migdal/entry/entry_detail.html b/migdal/templates/migdal/entry/entry_detail.html index c101e51..f37777e 100755 --- a/migdal/templates/migdal/entry/entry_detail.html +++ b/migdal/templates/migdal/entry/entry_detail.html @@ -15,14 +15,18 @@ {% block "body" %}
+
{% entry_begin entry %} +
{{ entry.body }} +
{% if entry.get_type.commentable %} {% render_comment_list for entry %} {% entry_comment_form entry %} {% endif %}
+
{% endblock %} \ No newline at end of file diff --git a/migdal/templates/migdal/entry/entry_list.html b/migdal/templates/migdal/entry/entry_list.html index 0675363..a68bd2a 100755 --- a/migdal/templates/migdal/entry/entry_list.html +++ b/migdal/templates/migdal/entry/entry_list.html @@ -1,6 +1,7 @@ {% extends "base.html" %} {% load url from future %} {% load i18n %} +{% load pagination_tags %} {% load migdal_tags %} @@ -17,24 +18,46 @@ {% block "body" %} -

{% if category %} {% trans "Category" %}: {{ category }} - RSS +

RSS

{% elif entry_type %} {{ entry_type|capfirst }} - RSS -{% else %} - {% trans "Latest news" %} +

RSS

+{% endif %} + +{% if object_list.promobox and request.page == 1 %} +
+ + + + +
{% endif %} - {% if submit %} + {% endif %} + +{% autopaginate object_list 10 %} {% for object in object_list %} {% entry_short object %} {% endfor %} +{% paginate %} {% endblock %} \ No newline at end of file diff --git a/migdal/templates/migdal/entry/entry_promobox.html b/migdal/templates/migdal/entry/entry_promobox.html new file mode 100755 index 0000000..110c1cf --- /dev/null +++ b/migdal/templates/migdal/entry/entry_promobox.html @@ -0,0 +1,28 @@ +{% load i18n %} + + +
  • + + + + +
    +
    +

    {{ object.title }}

    + +
    +{{ object.lead }} +
    +
    +
    + +
    +
  • diff --git a/migdal/templates/migdal/entry/entry_short.html b/migdal/templates/migdal/entry/entry_short.html index 432f4c4..5dbef6f 100755 --- a/migdal/templates/migdal/entry/entry_short.html +++ b/migdal/templates/migdal/entry/entry_short.html @@ -4,16 +4,30 @@
    +
    + {% entry_begin object %} -{% if object.has_body %} - {% trans "read more" %} -{% endif %} +
    {% if object.get_type.commentable %} {% get_comment_count for object as comment_count %} - + {% blocktrans count comment_count as c %}{{c}} comment{% plural %}{{c}} comments{% endblocktrans %} {% endif %} -
    \ No newline at end of file + +{% if object.body.raw %} + {% trans "read more" %} +{% endif %} + +
    + + + + + +
    +
    + diff --git a/migdal/templatetags/migdal_tags.py b/migdal/templatetags/migdal_tags.py index f56322e..9c7b15b 100644 --- a/migdal/templatetags/migdal_tags.py +++ b/migdal/templatetags/migdal_tags.py @@ -39,6 +39,19 @@ def entry_short(context, entry): return t.render(template.Context(context)) +@register.simple_tag(takes_context=True) +def entry_promobox(context, entry): + t = template.loader.select_template(( + 'migdal/entry/%s/entry_promobox.html' % entry.type, + 'migdal/entry/entry_promobox.html', + )) + context = { + 'request': context['request'], + 'object': entry, + } + return t.render(template.Context(context)) + + @register.inclusion_tag('migdal/categories.html', takes_context=True) def categories(context, taxonomy): context = { diff --git a/migdal/views.py b/migdal/views.py index 42a2a39..07eeb50 100644 --- a/migdal/views.py +++ b/migdal/views.py @@ -28,7 +28,10 @@ def entry_list(request, type_db=None, category_slug=None): else: category = None - object_list = api.entry_list(entry_type=entry_type, category=category) + promobox = 5 if entry_type is None and category is None else None + + object_list = api.entry_list(entry_type=entry_type, category=category, + promobox=promobox) return render(request, templates, { 'object_list': object_list, diff --git a/prawokultury/settings.d/30-apps.conf b/prawokultury/settings.d/30-apps.conf index 931cb41..fdd916d 100755 --- a/prawokultury/settings.d/30-apps.conf +++ b/prawokultury/settings.d/30-apps.conf @@ -8,6 +8,8 @@ INSTALLED_APPS = ( 'django.contrib.comments', 'django_comments_xtd', 'pipeline', + 'pagination', + 'sorl.thumbnail', 'django.contrib.auth', 'django.contrib.contenttypes', diff --git a/prawokultury/settings.d/40-middleware.conf b/prawokultury/settings.d/40-middleware.conf index 72f7e14..3d9f0ea 100755 --- a/prawokultury/settings.d/40-middleware.conf +++ b/prawokultury/settings.d/40-middleware.conf @@ -9,4 +9,5 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.messages.middleware.MessageMiddleware', # Uncomment the next line for simple clickjacking protection: # 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'pagination.middleware.PaginationMiddleware', ) diff --git a/prawokultury/settings.d/50-contrib.conf b/prawokultury/settings.d/50-contrib.conf index b1874d4..ba1ebd1 100755 --- a/prawokultury/settings.d/50-contrib.conf +++ b/prawokultury/settings.d/50-contrib.conf @@ -8,3 +8,5 @@ MARKUP_FIELD_TYPES = ( ) COMMENTS_XTD_LIST_URL_ACTIVE = True #COMMENTS_XTD_LIST_PAGINATE_BY = 10 + +THUMBNAIL_QUALITY = 95 diff --git a/prawokultury/settings.d/50-static.conf b/prawokultury/settings.d/50-static.conf index 9eac192..da9a583 100755 --- a/prawokultury/settings.d/50-static.conf +++ b/prawokultury/settings.d/50-static.conf @@ -15,8 +15,22 @@ PIPELINE_JS_COMPRESSOR = None PIPELINE_CSS = { 'base': { 'source_filenames': ( - 'css/base.css', + 'css/base.scss', + 'css/layout.scss', + 'css/header.scss', + 'css/menu.scss', + 'css/search.scss', + 'css/sidebar.scss', + 'css/promobox.scss', + 'css/entry.scss', + 'css/footer.scss', ), 'output_filename': 'compressed/base.css', }, } + +PIPELINE_COMPILERS = ( + 'pipeline.compilers.sass.SASSCompiler', +) + +PIPELINE_STORAGE = 'pipeline.storage.PipelineFinderStorage' diff --git a/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/base.scssc b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/base.scssc new file mode 100644 index 0000000..99915bc Binary files /dev/null and b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/base.scssc differ diff --git a/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/entry.scssc b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/entry.scssc new file mode 100644 index 0000000..3ae2702 Binary files /dev/null and b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/entry.scssc differ diff --git a/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/footer.scssc b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/footer.scssc new file mode 100644 index 0000000..3e59988 Binary files /dev/null and b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/footer.scssc differ diff --git a/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/header.scssc b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/header.scssc new file mode 100644 index 0000000..2b899cc Binary files /dev/null and b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/header.scssc differ diff --git a/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/layout.scssc b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/layout.scssc new file mode 100644 index 0000000..11f8a4e Binary files /dev/null and b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/layout.scssc differ diff --git a/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/menu.scssc b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/menu.scssc new file mode 100644 index 0000000..3262a1f Binary files /dev/null and b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/menu.scssc differ diff --git a/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/promobox.scssc b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/promobox.scssc new file mode 100644 index 0000000..3a112b5 Binary files /dev/null and b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/promobox.scssc differ diff --git a/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/search.scssc b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/search.scssc new file mode 100644 index 0000000..4312664 Binary files /dev/null and b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/search.scssc differ diff --git a/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/sidebar.scssc b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/sidebar.scssc new file mode 100644 index 0000000..c49b9ff Binary files /dev/null and b/prawokultury/static/css/.sass-cache/b2066c63e4faa8152ec807a224a5f44c4f66fc15/sidebar.scssc differ diff --git a/prawokultury/static/css/base.css b/prawokultury/static/css/base.css old mode 100755 new mode 100644 index 82be08d..f2d3236 --- a/prawokultury/static/css/base.css +++ b/prawokultury/static/css/base.css @@ -1,171 +1,15 @@ +@import url(http://fonts.googleapis.com/css?family=Lato:400,700,400italic); body { - font-family: sans-serif; - font-size: .625em; - background: #edece7; -} + font-family: 'Lato', sans-serif; + font-size: .625em; + background: #edece7; + background-image: url("/static/img/bg.png"); + background-repeat: no-repeat; + margin-top: 0; + background-position: 50% 0; } a { - text-decoration: none; -} -a:hover { - text-decoration: underline; -} - -#menu { - list-style: none; - padding-left: 0; - margin-left: 0; - text-transform: uppercase; - margin: 0; -} -#menu #item-lang a { - color: #0050a2; -} -#menu li { - display: inline-block; - position: relative; - list-style: none; - padding-left: 0; - margin-right: 5em; -} -#menu li a { - color: black; -} -#menu li.active { - font-weight: bold; -} -#menu li.active:before { - color: #004e98; - content: "("; - position: absolute; - left: -.7em; - font-size: 2em; - top: -.25em; -} -#menu li.active:after { - color: #004e98; - content: ")"; - position: absolute; - right: -.7em; - font-size: 2em; - top: -.25em; -} - -.avatar { - float: left; - margin-left: -60px; -} -.entry { - margin-left: 60px; -} -.entry h2 { - margin: 0; -} -.entry-data { - font-size: .8em; -} - - - -.bar-right { - width: 25em; - float: right; -} -.bar-left { - width: 70em; - float: left; -} -#body { - width: 96em; - margin: auto; - padding: 1em; -} -#footer-bar { - color: #4b4c47; - border-top: 1px solid #acacaa; - padding-top: 1.5em; - margin-top: 4em; -} -.footer-item { - width: 24em; - float: left; -} -#search-form input { - font-size: 1.1em; - width: 18em; - border: none; - border-radius: 1.5em 0 0 1.5em; - background: white; - color: black; - height: 2em; -} -#search-form button { - font-size: 1.1em; - width: 3em; - height: 2em; - border: none; - background: #3bb0a8; - color: white; - border-radius: 0 1em 1em 0; -} - -.sidebar-box { - border-top: 1px solid #8a8b85; - padding-top: 1.5em; - padding-bottom: 1.5em; - clear: both; -} + text-decoration: none; } -.sidebar-box .event-list { - list-style: none; - padding-left: 0; -} -.sidebar-box .more { - text-align: right; -} -.sidebar-box .event-list li { - margin-top: .8em; -} - -.sidebar-box .event-list .date { - clear: both; - float: left; - background: #494949; - color: #69efe6; - width: 4em; - height: 3.8em; - border-radius: .5em; - padding: .5em; - text-align: center; - margin-right: 1em; -} -.sidebar-box .event-list a { - display: block; -} -.sidebar-box .event-list .date .day { - font-size: 1.8em; - font-style: italic; -} -.sidebar-box .event-list .date .mon { - text-transform: uppercase; -} - -#sidebar-box-categories ul { - width: 50%; - display: table-cell; - list-style: none; - padding-left: 0; - padding-right: 4em; -} -#sidebar-box-categories .category-taxonomy-topics a { - color: #31ada3; -} - -#sidebar-box-categories .category-taxonomy-types a { - color: #ff6100; -} - - -sdiv { - border: #ddd 1px solid; -} \ No newline at end of file +a:hover { + text-decoration: underline; } diff --git a/prawokultury/static/css/base.scss b/prawokultury/static/css/base.scss new file mode 100755 index 0000000..cbe589b --- /dev/null +++ b/prawokultury/static/css/base.scss @@ -0,0 +1,18 @@ +@import url(http://fonts.googleapis.com/css?family=Lato:400,700,400italic); + +body { + font-family: 'Lato', sans-serif; + font-size: .625em; + background: #edece7; + background-image: url('/static/img/bg.png'); + background-repeat: no-repeat; + margin-top: 0; + background-position: 50% 0; +} + +a { + text-decoration: none; +} +a:hover { + text-decoration: underline; +} diff --git a/prawokultury/static/css/entry.css b/prawokultury/static/css/entry.css new file mode 100644 index 0000000..cf23152 --- /dev/null +++ b/prawokultury/static/css/entry.css @@ -0,0 +1,63 @@ +.avatar { + float: left; + margin-left: -7.5em; + margin-top: .8em; } + +.entry-short { + border-top: 1px solid #8b8b87; } + +.entry-wrapped { + margin-left: 8em; + padding-top: .7em; } + .entry-wrapped h2 { + margin: 0; + font-size: 1.2em; + color: #01519a; } + .entry-wrapped .entry-data { + font-size: 1.1em; + margin-top: 1.4em; + margin-bottom: 1.4em; } + .entry-wrapped .entry-data .date { + color: #acacac; } + .entry-wrapped .entry-data .author { + font-weight: bold; } + .entry-wrapped .entry-data .categories { + font-style: italic; } + .entry-wrapped .entry-data .categories a { + color: black; } + .entry-wrapped .lead { + font-size: 1.1em; } + .entry-wrapped .body { + font-size: 1.1em; } + .entry-wrapped .more { + float: right; + font-size: 1.1em; + font-style: italic; + margin-top: .6em; + margin-bottom: 1.8em; } + .entry-wrapped .more a { + color: #acacac; } + .entry-wrapped .more .read-more { + margin-left: 1.5em; } + .entry-wrapped .more .comments:after { + content: url("/static/img/comments.png"); + margin-left: .7em; } + .entry-wrapped .more .read-more:after { + content: url("/static/img/read-more.png"); + margin-left: .7em; } + +.entry-picture { + float: left; + margin-right: 1.5em; } + +.submit-link { + margin-top: 1em; + margin-bottom: 1em; + height: 1.7em; } + .submit-link a { + color: black; + font-size: 1.1em; } + .submit-link a:before { + content: url("/static/img/plus.png"); + vertical-align: top; + margin-right: 1em; } diff --git a/prawokultury/static/css/entry.scss b/prawokultury/static/css/entry.scss new file mode 100755 index 0000000..4c54530 --- /dev/null +++ b/prawokultury/static/css/entry.scss @@ -0,0 +1,91 @@ +.avatar { + float: left; + margin-left: -7.5em; + margin-top: .8em; +} + +.entry-short { + border-top: 1px solid #8b8b87; +} + +.entry-wrapped { + margin-left: 8em; + padding-top: .7em; + + h2 { + margin: 0; + font-size: 1.2em; + color: #01519a; + } + + .entry-data { + font-size: 1.1em; + margin-top: 1.4em; + margin-bottom: 1.4em; + .date { + color: #acacac; + } + .author { + font-weight: bold; + } + .categories { + font-style: italic; + a { + color: black; + } + } + } + + .lead { + font-size: 1.1em; + } + + .body { + font-size: 1.1em; + } + + .more { + float: right; + font-size: 1.1em; + font-style: italic; + margin-top: .6em; + margin-bottom: 1.8em; + + a { + color: #acacac; + } + .read-more { + margin-left: 1.5em; + } + .comments:after { + content: url('/static/img/comments.png'); + margin-left: .7em; + } + .read-more:after { + content: url('/static/img/read-more.png'); + margin-left: .7em; + } + } +} + + +.entry-picture { + float: left; + margin-right: 1.5em; +} + +.submit-link { + margin-top: 1em; + margin-bottom: 1em; + height: 1.7em; + + a { + color: black; + font-size: 1.1em; + } + a:before { + content: url("/static/img/plus.png"); + vertical-align: top; + margin-right: 1em; + } +} \ No newline at end of file diff --git a/prawokultury/static/css/footer.css b/prawokultury/static/css/footer.css new file mode 100644 index 0000000..cafef05 --- /dev/null +++ b/prawokultury/static/css/footer.css @@ -0,0 +1,11 @@ +#footer-bar { + color: #4b4c47; + border-top: 1px solid #acacaa; + padding-top: 1.5em; + margin-top: 4em; + margin-left: 1em; + margin-right: 1em; } + +.footer-item { + width: 24em; + float: left; } diff --git a/prawokultury/static/css/footer.scss b/prawokultury/static/css/footer.scss new file mode 100755 index 0000000..0e9f54b --- /dev/null +++ b/prawokultury/static/css/footer.scss @@ -0,0 +1,13 @@ +#footer-bar { + color: #4b4c47; + border-top: 1px solid #acacaa; + padding-top: 1.5em; + margin-top: 4em; + margin-left: 1em; + margin-right: 1em; +} + +.footer-item { + width: 24em; + float: left; +} diff --git a/prawokultury/static/css/header.css b/prawokultury/static/css/header.css new file mode 100644 index 0000000..0020c13 --- /dev/null +++ b/prawokultury/static/css/header.css @@ -0,0 +1,17 @@ +#header-bar { + height: 9em; + padding-top: 3em; } + #header-bar .bar-left { + margin-left: -1.1em; } + +.org-fnp, .org-trust { + display: inline-block; + width: 8em; } + .org-fnp span, .org-trust span { + color: #888; } + .org-fnp img, .org-trust img { + margin-left: -0.3em; + margin-top: 1em; } + +.org-fnp { + margin-right: 4em; } diff --git a/prawokultury/static/css/header.scss b/prawokultury/static/css/header.scss new file mode 100755 index 0000000..aae0e73 --- /dev/null +++ b/prawokultury/static/css/header.scss @@ -0,0 +1,27 @@ +#header-bar { + height: 9em; + padding-top: 3em; + + .bar-left { + margin-left: -1.1em; + } + +} + + +.org-fnp, .org-trust { + display: inline-block; + width: 8em; + + span { + color: #888; + } + + img { + margin-left: -.3em; + margin-top: 1em; + } +} +.org-fnp { + margin-right: 4em; +} diff --git a/prawokultury/static/css/layout.css b/prawokultury/static/css/layout.css new file mode 100644 index 0000000..7a14806 --- /dev/null +++ b/prawokultury/static/css/layout.css @@ -0,0 +1,13 @@ +.bar-right { + width: 22em; + padding: 0 1em; + float: right; } + +.bar-left { + width: 70em; + padding: 0 1em; + float: left; } + +#body { + width: 96em; + margin: auto; } diff --git a/prawokultury/static/css/layout.scss b/prawokultury/static/css/layout.scss new file mode 100755 index 0000000..56a1aab --- /dev/null +++ b/prawokultury/static/css/layout.scss @@ -0,0 +1,17 @@ +.bar-right { + width: 22em; + padding: 0 1em; + float: right; +} + +.bar-left { + width: 70em; + padding: 0 1em; + float: left; +} + +#body { + width: 96em; + margin: auto; +} + diff --git a/prawokultury/static/css/menu.css b/prawokultury/static/css/menu.css new file mode 100644 index 0000000..d9b2f4a --- /dev/null +++ b/prawokultury/static/css/menu.css @@ -0,0 +1,37 @@ +#menu-bar { + height: 4em; } + +#menu { + list-style: none; + margin-left: 0; + text-transform: uppercase; + margin: .7em 0 0 0; } + #menu li { + display: inline-block; + position: relative; + list-style: none; + padding-left: 0; + margin-right: 3em; } + #menu li a { + color: black; + font-size: 1.1em; } + #menu li:last { + margin-right: 0; } + #menu li.active { + font-weight: bold; } + #menu li.active:before { + color: #004e98; + content: "("; + position: absolute; + left: -0.7em; + font-size: 2em; + top: -0.25em; } + #menu li.active:after { + color: #004e98; + content: ")"; + position: absolute; + right: -0.7em; + font-size: 2em; + top: -0.25em; } + #menu #item-lang a { + color: #0050a2; } diff --git a/prawokultury/static/css/menu.scss b/prawokultury/static/css/menu.scss new file mode 100755 index 0000000..2509d6f --- /dev/null +++ b/prawokultury/static/css/menu.scss @@ -0,0 +1,49 @@ +#menu-bar { + height: 4em; +} + +#menu { + list-style: none; + margin-left: 0; + text-transform: uppercase; + margin: .7em 0 0 0; + + li { + display: inline-block; + position: relative; + list-style: none; + padding-left: 0; + margin-right: 3em; + + a { + color: black; + font-size: 1.1em; + } + } + li:last { + margin-right: 0; + } + li.active { + font-weight: bold; + } + li.active:before { + color: #004e98; + content: "("; + position: absolute; + left: -.7em; + font-size: 2em; + top: -.25em; + } + li.active:after { + color: #004e98; + content: ")"; + position: absolute; + right: -.7em; + font-size: 2em; + top: -.25em; + } + + #item-lang a { + color: #0050a2; + } +} \ No newline at end of file diff --git a/prawokultury/static/css/promobox.css b/prawokultury/static/css/promobox.css new file mode 100644 index 0000000..5192095 --- /dev/null +++ b/prawokultury/static/css/promobox.css @@ -0,0 +1,61 @@ +#promobox { + position: relative; } + #promobox a:hover { + text-decoration: none; } + +ul.promobox { + list-style: none; + padding: 0; + margin: 0; + height: 32.3em; + overflow: hidden; } + +.promobox-item { + border-radius: 0 0 2em 0; + list-style: none; + padding: 0; + margin: 0; } + +.promobox-link { + background-image: url("/static/img/rog.png"); + display: block; + position: relative; + height: 32.3em; + background-position: 100% 100%; + background-repeat: no-repeat; } + +#promobox-switcher { + position: absolute; + top: 1.6em; + list-style: none; + margin: 0; + padding: 0; + z-index: 100; } + #promobox-switcher a { + display: block; + background: black; + font-size: 1.1em; + width: 1.1em; + padding: .45em .5em; + border-radius: 0 1em 1em 0; + color: white; } + #promobox-switcher a.active { + background: #02529b; } + +.promobox-info { + position: absolute; + top: 15.4em; + background-color: #64c0bd; + color: white; + width: 20em; + padding: 1.5em 4.8em 1.2em 2em; + border-radius: 0 6em 6em 0; } + .promobox-info .clip { + height: 9.7em; + overflow: hidden; } + .promobox-info h2 { + margin-top: 0; + font-size: 1.5em; } + .promobox-info .lead { + font-size: 1.2em; + line-height: 1.1em; } diff --git a/prawokultury/static/css/promobox.scss b/prawokultury/static/css/promobox.scss new file mode 100755 index 0000000..803a250 --- /dev/null +++ b/prawokultury/static/css/promobox.scss @@ -0,0 +1,75 @@ +#promobox { + position: relative; + a:hover { + text-decoration: none; + } +} +ul.promobox { + list-style: none; + padding: 0; + margin: 0; + height: 32.3em; + overflow: hidden; + +} +.promobox-item { + border-radius: 0 0 2em 0; + list-style:none; + padding:0; + margin: 0; +} +.promobox-link { + background-image: url('/static/img/rog.png'); + display:block; + position: relative; + height: 32.3em; + background-position: 100% 100%; + background-repeat: no-repeat; +} + +#promobox-switcher { + position: absolute; + top: 1.6em; + list-style: none; + margin: 0; + padding: 0; + z-index: 100; + + a { + display: block; + background:black; + font-size: 1.1em; + width: 1.1em; + padding: .45em .5em; + border-radius: 0 1em 1em 0; + color: white; + } + a.active { + background: #02529b; + } +} + +.promobox-info { + position: absolute; + top: 15.4em; + background-color: #64c0bd; + color: white; + width: 20em; + padding: 1.5em 4.8em 1.2em 2em; + border-radius: 0 6em 6em 0; + + .clip { + height: 9.7em; + overflow:hidden; + } + + h2 { + margin-top: 0; + font-size: 1.5em; + } + .lead { + font-size: 1.2em; + line-height: 1.1em; + } + +} diff --git a/prawokultury/static/css/search.css b/prawokultury/static/css/search.css new file mode 100644 index 0000000..61e75d5 --- /dev/null +++ b/prawokultury/static/css/search.css @@ -0,0 +1,24 @@ +#search-form { + margin-top: .4em; } + #search-form input { + font-size: 1.1em; + width: 17.1em; + padding-left: 1em; + border: none; + border-radius: 1.5em 0 0 1.5em; + background: white; + color: black; + height: 2em; } + #search-form button { + font-size: 1.1em; + width: 2.7em; + height: 2em; + border: none; + background: #3bb0a8; + background-image: url("/static/img/search-bg.png"); + background-repeat: no-repeat; + color: white; + border-radius: 0 1em 1em 0; + padding-right: 1em; } + #search-form button img { + vertical-align: middle; } diff --git a/prawokultury/static/css/search.scss b/prawokultury/static/css/search.scss new file mode 100755 index 0000000..7b73859 --- /dev/null +++ b/prawokultury/static/css/search.scss @@ -0,0 +1,31 @@ +#search-form { + margin-top: .4em; + + input { + font-size: 1.1em; + width: 17.1em; + padding-left: 1em; + border: none; + border-radius: 1.5em 0 0 1.5em; + background: white; + color: black; + height: 2em; + } + + button { + font-size: 1.1em; + width: 2.7em; + height: 2em; + border: none; + background: #3bb0a8; + background-image: url('/static/img/search-bg.png'); + background-repeat: no-repeat; + color: white; + border-radius: 0 1em 1em 0; + padding-right: 1em; + + img { + vertical-align: middle; + } + } +} diff --git a/prawokultury/static/css/sidebar.css b/prawokultury/static/css/sidebar.css new file mode 100644 index 0000000..9c245f5 --- /dev/null +++ b/prawokultury/static/css/sidebar.css @@ -0,0 +1,56 @@ +.sidebar-box { + border-top: 1px solid #8a8b85; + padding-top: 1.5em; + padding-bottom: .9em; + clear: both; } + .sidebar-box h3 { + font-size: 1.3em; + font-weight: normal; + margin-top: 0; + margin-bottom: 1.2em; } + .sidebar-box .more { + text-align: right; } + .sidebar-box .event-list { + list-style: none; + padding-left: 0; } + .sidebar-box .event-list li { + margin-top: 1em; } + .sidebar-box .event-list a { + display: block; } + .sidebar-box .event-list .date { + clear: both; + float: left; + background: #e63612; + background-image: url("/static/img/calendar.png"); + background-repeat: no-repeat; + color: #71ece6; + width: 5em; + height: 4.8em; + border-radius: .5em; + text-align: center; + margin-right: 1em; } + .sidebar-box .event-list .date .day { + font-size: 2.4em; + font-style: italic; } + .sidebar-box .event-list .date .mon { + font-size: 1.1em; + text-transform: uppercase; + margin-top: -0.3em; } + .sidebar-box .event-list .date:hover { + text-decoration: none; } + .sidebar-box .event-list .description { + color: black; + font-size: 1.1em; } + +#sidebar-box-categories ul { + width: 50%; + display: table-cell; + list-style: none; + padding-left: 0; + padding-right: 4em; + font-size: 1.4em; + padding-right: 3.4em; } +#sidebar-box-categories .category-taxonomy-topics a { + color: #31ada3; } +#sidebar-box-categories .category-taxonomy-types a { + color: #ff6100; } diff --git a/prawokultury/static/css/sidebar.scss b/prawokultury/static/css/sidebar.scss new file mode 100755 index 0000000..bac9f31 --- /dev/null +++ b/prawokultury/static/css/sidebar.scss @@ -0,0 +1,82 @@ +.sidebar-box { + border-top: 1px solid #8a8b85; + padding-top: 1.5em; + padding-bottom: .9em; + clear: both; + + h3 { + font-size: 1.3em; + font-weight: normal; + margin-top: 0; + margin-bottom: 1.2em; + } + + .more { + text-align: right; + } + + .event-list { + list-style: none; + padding-left: 0; + + li { + margin-top: 1em; + } + + a { + display: block; + } + + .date { + clear: both; + float: left; + background: #e63612; + background-image: url('/static/img/calendar.png'); + background-repeat: no-repeat; + color: #71ece6; + width: 5em; + height: 4.8em; + border-radius: .5em; + text-align: center; + margin-right: 1em; + + .day { + font-size: 2.4em; + font-style: italic; + } + .mon { + font-size: 1.1em; + text-transform: uppercase; + margin-top: -.3em; + } + } + + .date:hover { + text-decoration: none; + } + + .description { + color: black; + font-size: 1.1em; + } + } +} + +#sidebar-box-categories { + ul { + width: 50%; + display: table-cell; + list-style: none; + padding-left: 0; + padding-right: 4em; + font-size: 1.4em; + padding-right: 3.4em; + } + .category-taxonomy-topics a { + color: #31ada3; + } + + .category-taxonomy-types a { + color: #ff6100; + } +} diff --git a/prawokultury/static/img/bg.png b/prawokultury/static/img/bg.png new file mode 100644 index 0000000..e1f2aa9 Binary files /dev/null and b/prawokultury/static/img/bg.png differ diff --git a/prawokultury/static/img/calendar.png b/prawokultury/static/img/calendar.png new file mode 100644 index 0000000..891a585 Binary files /dev/null and b/prawokultury/static/img/calendar.png differ diff --git a/prawokultury/static/img/comments.png b/prawokultury/static/img/comments.png new file mode 100644 index 0000000..cfea4d9 Binary files /dev/null and b/prawokultury/static/img/comments.png differ diff --git a/prawokultury/static/img/logo-fnp.png b/prawokultury/static/img/logo-fnp.png new file mode 100644 index 0000000..46881e4 Binary files /dev/null and b/prawokultury/static/img/logo-fnp.png differ diff --git a/prawokultury/static/img/logo-trust.png b/prawokultury/static/img/logo-trust.png new file mode 100644 index 0000000..b3d4eed Binary files /dev/null and b/prawokultury/static/img/logo-trust.png differ diff --git a/prawokultury/static/img/logo.png b/prawokultury/static/img/logo.png new file mode 100644 index 0000000..cc650f1 Binary files /dev/null and b/prawokultury/static/img/logo.png differ diff --git a/prawokultury/static/img/plus.png b/prawokultury/static/img/plus.png new file mode 100644 index 0000000..3a47b3c Binary files /dev/null and b/prawokultury/static/img/plus.png differ diff --git a/prawokultury/static/img/read-more.png b/prawokultury/static/img/read-more.png new file mode 100644 index 0000000..1793af4 Binary files /dev/null and b/prawokultury/static/img/read-more.png differ diff --git a/prawokultury/static/img/rog.png b/prawokultury/static/img/rog.png new file mode 100644 index 0000000..5c9a55b Binary files /dev/null and b/prawokultury/static/img/rog.png differ diff --git a/prawokultury/static/img/search-bg.png b/prawokultury/static/img/search-bg.png new file mode 100644 index 0000000..46a5a06 Binary files /dev/null and b/prawokultury/static/img/search-bg.png differ diff --git a/prawokultury/static/img/search.png b/prawokultury/static/img/search.png new file mode 100644 index 0000000..d6679ce Binary files /dev/null and b/prawokultury/static/img/search.png differ diff --git a/prawokultury/templates/base.html b/prawokultury/templates/base.html index a5d0325..b21a928 100755 --- a/prawokultury/templates/base.html +++ b/prawokultury/templates/base.html @@ -1,8 +1,7 @@ {% load url from future %} -{% load i18n %} +{% load i18n static %} {% load migdal_tags events_tags %} {% load compressed %} - {% trans "Culture's right" %} @@ -10,21 +9,35 @@
    +
    - [Logo FNP] - [Logo OSI] +
    + {% trans "Organizer" %}
    + + {% trans +
    + {% trans "Sponsor" %}
    + + {% trans +