From 6456d18fc493bf5c109fdf4f6efd47db5daa5d43 Mon Sep 17 00:00:00 2001 From: Skia Date: Sun, 3 Sep 2017 19:05:45 +0200 Subject: [PATCH] core, com: tool bar and agenda design updates Signed-off-by: Skia --- com/templates/com/news_list.jinja | 74 ++++++-------------- core/static/core/style.scss | 112 +++++++++++++++++++++++++----- core/templates/core/base.jinja | 8 +-- core/templates/core/file.jinja | 2 +- core/templates/core/page.jinja | 2 +- 5 files changed, 120 insertions(+), 78 deletions(-) diff --git a/com/templates/com/news_list.jinja b/com/templates/com/news_list.jinja index 9554a4bf..4240ac1c 100644 --- a/com/templates/com/news_list.jinja +++ b/com/templates/com/news_list.jinja @@ -4,66 +4,33 @@ {% trans %}News{% endtrans %} {% endblock %} -{% block head %} -{{ super() }} - -{% endblock %} - {% block content %} +

{% trans %}News{% endtrans %}

{% if user.is_in_group(settings.SITH_GROUP_COM_ADMIN_ID) %} {% trans %}Administrate news{% endtrans %} {% endif %}
-

{% trans %}Agenda{% endtrans %}

-
+
{% trans %}Agenda{% endtrans %}
{% for d in NewsDate.objects.filter(end_date__gte=timezone.now(), news__is_moderated=True, news__type__in=["WEEKLY", "EVENT"]).order_by('start_date', 'end_date') %} -
-

{{ d.start_date|localtime|date('D d M Y') }}

-

- {{ d.start_date|localtime|time(DATETIME_FORMAT) }} - - {{ d.end_date|localtime|time(DATETIME_FORMAT) }} -

-

{{ d.news.title }} - {{ d.news.club }}

-

{{ d.news.summary|markdown }}

-
+
+
+ {{ d.start_date|localtime|date('D d M Y') }} +
+
+ {{ d.start_date|localtime|time(DATETIME_FORMAT) }} - + {{ d.end_date|localtime|time(DATETIME_FORMAT) }} +
+ +
{{ d.news.summary|markdown }}
+
{% endfor %}
@@ -77,7 +44,7 @@ div#agenda_content { {% for news in object_list.filter(dates__start_date__lte=timezone.now(), dates__end_date__gte=timezone.now(), type="CALL") %}

{{ news.title }}

-

+

{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} - {{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} @@ -90,12 +57,12 @@ div#agenda_content {

{% trans %}Events today and the next few days{% endtrans %}

{% for d in NewsDate.objects.filter(end_date__gte=timezone.now(), start_date__lte=timezone.now()+timedelta(days=5), news__type="EVENT", news__is_moderated=True).datetimes('start_date', 'day') %} -
{{ d|localtime|date(DATETIME_FORMAT) }}
+
{{ d|localtime|date(DATETIME_FORMAT) }}
{% for news in object_list.filter(dates__start_date__gte=d, dates__start_date__lte=d+timedelta(days=1), type="EVENT").exclude(dates__end_date__lt=timezone.now()) %}

{{ news.title }}

-

+

{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} - {{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} @@ -111,13 +78,14 @@ div#agenda_content { {% for news in object_list.filter(dates__start_date__gte=timezone.now()+timedelta(days=5), type="EVENT", is_moderated=True) %}

{{ news.title }} - {{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} - {{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}

{% endfor %} +
{% endblock %} diff --git a/core/static/core/style.scss b/core/static/core/style.scss index d9a64672..513005b9 100644 --- a/core/static/core/style.scss +++ b/core/static/core/style.scss @@ -293,7 +293,7 @@ header { /*--------------------------------CONTENT------------------------------*/ #quick_notif { - width: 90%; + width: 100%; margin: 0px auto; list-style-type: none; background: $second-color; @@ -309,6 +309,94 @@ header { overflow: auto; } + .tool_bar { + overflow: auto; + padding: 4px; + .tools { + display: flex; + flex-wrap: wrap; + float: right; + background: $white-color; + border: 1px solid $black-color; + text-align: center; + a { + padding: 10px; + display: inline-block; + color: $black-color; + flex: 1; + flex-wrap: nowrap; + white-space: nowrap; + &.selected_tab { + background: $second-color; + color: $black-color; + } + &:hover { + background: $primary-color; + color: $white-color; + } + } + } + } +/*---------------------------------NEWS--------------------------------*/ + #news { + section { + padding: 5px; + } + section.news_call, section.news_notice { + background: lightgrey; + margin: 2px; + } + section.news_event:nth-of-type(even) { + background: lightblue; + } + #agenda { + box-shadow: $black-color 2px 2px 2px; + display: block; + width: 20%; + float: right; + background: white; + font-size: 70%; + border: solid 1px $black-color; + #agenda_title { + margin: 0em; + padding: 0.5em; + font-weight: bold; + font-size: 150%; + text-align: center; + text-transform: uppercase; + border-bottom: solid 1px $black-color; + background: $second-color; + + } + #agenda_content { + overflow: auto; + height: 20em; + .agenda_item { + padding: 0.5em; + margin-bottom: 0.5em; + &:nth-of-type(even) { + background: $secondary-neutral-light-color; + } + .agenda_time { + font-size: 90%; + color: grey; + } + .agenda_item_content { + p { + margin-top: 0.2em; + } + } + } + } + } + .news_weekly p { + margin: 0.2em; + } + .news_date { + font-size: small; + color: grey; + } + } } .helptext { @@ -455,24 +543,6 @@ u, .underline { text-decoration: underline; } -.tool-bar { - overflow: auto; - padding: 4px; -} - -.tools { - float: right; - border: 1px solid $primary-neutral-light-color; - a { - padding: 10px; - display: inline-block; - } -} - -.selected_tab { - background: $primary-neutral-light-color; -} - #basket { width: 40%; background: $primary-neutral-light-color; @@ -918,3 +988,7 @@ label { background: $primary-color; border-color: $primary-color; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-top, +.ui-corner-left { + border-radius: 0px; +} diff --git a/core/templates/core/base.jinja b/core/templates/core/base.jinja index d8cba47b..87b8f35e 100644 --- a/core/templates/core/base.jinja +++ b/core/templates/core/base.jinja @@ -142,7 +142,7 @@ {% block nav %} {% if not popup %}