From da9670046fdff8eb86c190a865cfc8de58e5840b Mon Sep 17 00:00:00 2001 From: bkfox Date: Wed, 11 Jan 2017 18:21:55 +0100 Subject: [PATCH] update style --- aircox_cms/models.py | 2 +- aircox_cms/static/aircox_cms/css/theme.css | 47 +++++++++++++------ .../templates/aircox_cms/publication.html | 2 + 3 files changed, 35 insertions(+), 16 deletions(-) diff --git a/aircox_cms/models.py b/aircox_cms/models.py index ec21990..19dd065 100755 --- a/aircox_cms/models.py +++ b/aircox_cms/models.py @@ -405,7 +405,7 @@ class ProgramPage(Publication): verbose_name_plural = _('Programs') content_panels = [ - FieldPanel('program'), + # FieldPanel('program'), ] + Publication.content_panels settings_panels = Publication.settings_panels + [ diff --git a/aircox_cms/static/aircox_cms/css/theme.css b/aircox_cms/static/aircox_cms/css/theme.css index f3075af..b948d68 100755 --- a/aircox_cms/static/aircox_cms/css/theme.css +++ b/aircox_cms/static/aircox_cms/css/theme.css @@ -94,6 +94,7 @@ main { margin: 0em 0em 0.4em 0em; } +/** detail view **/ main.detail { padding: 0em; } @@ -107,34 +108,53 @@ main.detail { margin: 0em; } + main.detail > header h1.title, + main.detail > header summary { + display: block; + padding: 0.4em; + vertical-align: middle; + } + main.detail > header h1.title { position: relative; z-index: 1000; - padding: 0.4em; + height: 1.2em; margin: 0em; - margin-bottom: -2em; background-color: rgba(255,255,255,0.8); + /*! padding-top: 0em; */ } main.detail > header h1.title + section { margin-top: 2em; - } - - main.detail > header img.cover { - /*width: 70%;*/ width: 100%; - margin: auto; - vertical-align: middle; - display: inline-block; } main.detail header .summary { display: inline-block; - padding: 1em; - vertical-align: middle; + width: calc(100% - 0.8em); + min-height: 1.2em; font-size: 1.2em; font-weight: bold; - background-color: white; + background-color: rgba(255,255,255,0.8); + } + + main.detail > header .cover_container, + main.detail > header img.cover { + display: block; + width: 100%; + } + + main.detail > header .cover_container { + max-height: 500px; + overflow: hidden; + margin-top: -2.8em; + margin-bottom: -2.4em; + } + + main.detail > header img.cover { + height: auto; + margin: auto; + vertical-align: middle; } @@ -179,6 +199,3 @@ main.detail { } - - - diff --git a/aircox_cms/templates/aircox_cms/publication.html b/aircox_cms/templates/aircox_cms/publication.html index 14e7d94..c88c6e3 100755 --- a/aircox_cms/templates/aircox_cms/publication.html +++ b/aircox_cms/templates/aircox_cms/publication.html @@ -11,7 +11,9 @@

{{ page.title }}

{% if page.cover %} + {% image page.cover max-600x480 class="cover" height="" width="" %} + {% endif %}