From 92eb0ee3b024dc0eef745f60a4cc9a6e0e62d312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Tue, 27 Sep 2022 13:44:06 +0000 Subject: [PATCH] refactor: news module styling --- .../chips/filter/chip-filter.component.html | 30 ++++--- .../chips/filter/chip-filter.component.scss | 23 +++++ src/app/modules/news/item/news-item.html | 24 ++--- src/app/modules/news/item/news-item.scss | 39 ++++---- src/app/modules/news/page/news-item.html | 56 ------------ src/app/modules/news/page/news-page.html | 88 ++++++++++--------- src/app/modules/news/page/news-page.scss | 2 +- 7 files changed, 112 insertions(+), 150 deletions(-) delete mode 100644 src/app/modules/news/page/news-item.html diff --git a/src/app/modules/data/chips/filter/chip-filter.component.html b/src/app/modules/data/chips/filter/chip-filter.component.html index d8b15c6f..b029a815 100644 --- a/src/app/modules/data/chips/filter/chip-filter.component.html +++ b/src/app/modules/data/chips/filter/chip-filter.component.html @@ -1,22 +1,24 @@ - - + + {{ displayValue }} diff --git a/src/app/modules/data/chips/filter/chip-filter.component.scss b/src/app/modules/data/chips/filter/chip-filter.component.scss index e69de29b..9fed43eb 100644 --- a/src/app/modules/data/chips/filter/chip-filter.component.scss +++ b/src/app/modules/data/chips/filter/chip-filter.component.scss @@ -0,0 +1,23 @@ +/*! + * Copyright (C) 2022 StApps + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation, version 3. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +ion-chip { + --background: var(--ion-color-primary-tint); + --color: var(--ion-color-primary-contrast); + + &.active { + --background: var(--ion-color-primary-shade); + } +} diff --git a/src/app/modules/news/item/news-item.html b/src/app/modules/news/item/news-item.html index ed80b55c..3ec8c828 100644 --- a/src/app/modules/news/item/news-item.html +++ b/src/app/modules/news/item/news-item.html @@ -13,29 +13,17 @@ ~ this program. If not, see . --> - - - - + {{ item.datePublished | amCalendar | sentencecase }} - - {{ item.name }} + {{ item.name }} - - - {{ item.messageBody | slice: 0:120 }}... - diff --git a/src/app/modules/news/item/news-item.scss b/src/app/modules/news/item/news-item.scss index 281bae5a..ff18fcb0 100644 --- a/src/app/modules/news/item/news-item.scss +++ b/src/app/modules/news/item/news-item.scss @@ -13,27 +13,30 @@ * this program. If not, see . */ -ion-card-header a { - color: var(--ion-color-dark-tint); - text-decoration: none; -} - ion-card { height: 100%; margin: 0; + background-size: cover; } -ion-card ion-thumbnail { - background: var(--placeholder-gray); - width: 100%; - height: auto; - img { - display: block; - } - ion-icon { - width: 100%; - height: 250px; - color: white; - display: none; - } +ion-card::part(native) { + display: flex; + flex-direction: column-reverse; + height: 100%; + background: linear-gradient(to top, var(--ion-color-dark), transparent); +} + +.card { + aspect-ratio: 1; + padding: 0; + box-shadow: none; +} + +ion-card-title { + font-size: var(--font-size-xl); + --color: var(--ion-color-dark-contrast); +} + +ion-card-subtitle { + --color: var(--ion-color-dark-contrast); } diff --git a/src/app/modules/news/page/news-item.html b/src/app/modules/news/page/news-item.html deleted file mode 100644 index 8f67cbca..00000000 --- a/src/app/modules/news/page/news-item.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - {{ - item.datePublished | amCalendar | sentencecase - }} - - {{ item.name }} - {{ item.name }} - - - - {{ item.messageBody }} - - diff --git a/src/app/modules/news/page/news-page.html b/src/app/modules/news/page/news-page.html index 25057ede..2a57b992 100644 --- a/src/app/modules/news/page/news-page.html +++ b/src/app/modules/news/page/news-page.html @@ -22,49 +22,51 @@ - - - +
+ + + + + + + + + + + +
+ + + + + + +
+ + {{ 'search.nothing_found' | translate | titlecase }} + + - - - - - - - - - -
- - - - - - + + +
- - {{ 'search.nothing_found' | translate | titlecase }} - - - - - diff --git a/src/app/modules/news/page/news-page.scss b/src/app/modules/news/page/news-page.scss index 743c17ae..f66c66a6 100644 --- a/src/app/modules/news/page/news-page.scss +++ b/src/app/modules/news/page/news-page.scss @@ -29,7 +29,7 @@ } } -ion-content.ios > .news-grid { +ion-content.ios > div > .news-grid { gap: var(--spacing-lg); margin: var(--spacing-lg); @include auto-grid(350px);