From a2157081b0dc561e0040c57b4b2b239b69b8d342 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Wed, 17 Aug 2016 13:59:29 +0200 Subject: [PATCH] translation update --- src/social/admin.py | 2 +- src/social/models.py | 1 + src/social/templates/social/cite_promo.html | 24 +++++++++++-------- .../static/scss/main/main_page.scss | 4 ++++ 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/social/admin.py b/src/social/admin.py index a0f3ec92b..c53ff893f 100755 --- a/src/social/admin.py +++ b/src/social/admin.py @@ -11,7 +11,7 @@ from social.models import Cite class CiteAdmin(admin.ModelAdmin): list_display = ['nonempty_text', 'sticky', 'vip', 'small', 'has_image'] fieldsets = ( - (None, {'fields': ('book', 'text', 'small', 'vip', 'link', 'sticky')}), + (None, {'fields': ('book', 'text', 'small', 'vip', 'link', 'sticky', 'banner')}), ( _('Background'), {'fields': ( diff --git a/src/social/models.py b/src/social/models.py index 12ad61352..806530501 100644 --- a/src/social/models.py +++ b/src/social/models.py @@ -18,6 +18,7 @@ class Cite(models.Model): link = models.URLField(_('link')) sticky = models.BooleanField(_('sticky'), default=False, db_index=True, help_text=_('Sticky cites will take precedense.')) + banner = models.BooleanField(_('banner'), default=False, help_text=_('Adjust size to image, ignore the text')) image = models.ImageField( _('image'), upload_to='social/cite', null=True, blank=True, diff --git a/src/social/templates/social/cite_promo.html b/src/social/templates/social/cite_promo.html index 546e07087..8c0bddedc 100755 --- a/src/social/templates/social/cite_promo.html +++ b/src/social/templates/social/cite_promo.html @@ -2,19 +2,23 @@ {% load i18n %} {% if main %} -
+
{% endif %} {% if cite %} - - {% if cite.vip %} -

{{ cite.vip }} {% trans "recommends" %}:

- {% endif %} -
- {{ cite.text|linebreaksbr|safe }} -
- {% if cite.book %} -

{{ cite.book.pretty_title }}

+
+ {% if cite.banner %} + + {% else %} + {% if cite.vip %} +

{{ cite.vip }} {% trans "recommends" %}:

+ {% endif %} +
+ {{ cite.text|linebreaksbr|safe }} +
+ {% if cite.book %} +

{{ cite.book.pretty_title }}

+ {% endif %} {% endif %}
{% endif %} diff --git a/src/wolnelektury/static/scss/main/main_page.scss b/src/wolnelektury/static/scss/main/main_page.scss index 8323f0522..a2e0c568f 100755 --- a/src/wolnelektury/static/scss/main/main_page.scss +++ b/src/wolnelektury/static/scss/main/main_page.scss @@ -13,6 +13,10 @@ background-image: url(/static/img/backdrop/book-drawer2.jpg); } + &.banner { + background-image: none; + } + .cite { @include size(padding, 46px 10px 48px 0); background: none; -- 2.20.1