diff --git a/aircox_cms/models.py b/aircox_cms/models.py index 42ad6e6..fc449b3 100755 --- a/aircox_cms/models.py +++ b/aircox_cms/models.py @@ -484,6 +484,7 @@ class ProgramPage(Publication): def save(self, *args, **kwargs): # set publish_as if self.program and not self.pk: + super().save() self.publish_as = self super().save(*args, **kwargs) diff --git a/aircox_cms/static/aircox_cms/css/layout.css b/aircox_cms/static/aircox_cms/css/layout.css index f320e6b..e5e2e5f 100755 --- a/aircox_cms/static/aircox_cms/css/layout.css +++ b/aircox_cms/static/aircox_cms/css/layout.css @@ -67,6 +67,10 @@ ul { padding: 0.4em; } +.menu:empty { + display: none; +} + body > .top *, body > .header * { vertical-align: middle; @@ -123,6 +127,9 @@ body > .header { } +.page_left { margin-right: 2em; } +.page_right { margin-right: 2em; } + .page_left, .page_right { max-width: 16em; } diff --git a/aircox_cms/static/aircox_cms/css/theme.css b/aircox_cms/static/aircox_cms/css/theme.css index 4966483..1aa56ed 100755 --- a/aircox_cms/static/aircox_cms/css/theme.css +++ b/aircox_cms/static/aircox_cms/css/theme.css @@ -82,7 +82,7 @@ a:hover > .small_icon { main { background-color: rgba(255,255,255,0.9); - margin: 0em 2em; + margin: 0em 0em; box-shadow: 0em 0em 0.2em black; width: 60%; } @@ -110,6 +110,7 @@ main .post_content section { /** detail view **/ main.detail { padding: 0em; + margin: 0em; } main > .content { diff --git a/aircox_cms/template.py b/aircox_cms/template.py index 241dc9c..5282085 100644 --- a/aircox_cms/template.py +++ b/aircox_cms/template.py @@ -12,13 +12,17 @@ class TemplateMixin(models.Model): Template to use for the mixin. If not given, use "app_label/sections/section_class.html" """ + snake_name = None + """ + Used in template as class + """ @classmethod def get_template_name(cl): if not cl.template_name: - snake_name = camelcase_to_underscore(cl.__name__) + cl.snake_name = camelcase_to_underscore(cl.__name__) cl.template_name = '{}/sections/{}.html'.format( - cl._meta.app_label, snake_name + cl._meta.app_label, cl.snake_name ) if snake_name != 'section_item':