From 4dca62e4c1551ddeeb3c992b087ba8eda100980d Mon Sep 17 00:00:00 2001 From: borntojesus Date: Mon, 5 Feb 2024 23:02:59 +0200 Subject: [PATCH] add UI news --- sass/common/bred-crum.scss | 11 +++ sass/component/post-min.scss | 11 ++- sass/global/index.scss | 5 ++ sass/pages/faq-page.scss | 2 + templates/base.html | 96 +++++++++++------------ templates/news.html | 146 +++++++++++++++++++++++------------ templates/page.html | 55 ++++++++++++- 7 files changed, 226 insertions(+), 100 deletions(-) diff --git a/sass/common/bred-crum.scss b/sass/common/bred-crum.scss index 19818a43..2a705b5d 100644 --- a/sass/common/bred-crum.scss +++ b/sass/common/bred-crum.scss @@ -7,4 +7,15 @@ display: flex; gap: 10rem; } + &__item { + display: flex; + align-items: center; + } + &__link { + + max-width: 230rem; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } } \ No newline at end of file diff --git a/sass/component/post-min.scss b/sass/component/post-min.scss index e84c7f67..09c80949 100644 --- a/sass/component/post-min.scss +++ b/sass/component/post-min.scss @@ -14,7 +14,16 @@ &__img { margin-bottom: 20rem; width: 100%; - + &--one { + max-height: 278rem; + object-fit: cover; + object-position: center; + border-radius: 10rem; + height: 100%; + &:not(:first-of-type) { + display: none; + } + } &--single { max-width: 500rem; float: right; diff --git a/sass/global/index.scss b/sass/global/index.scss index 12c46806..ca41681a 100644 --- a/sass/global/index.scss +++ b/sass/global/index.scss @@ -50,4 +50,9 @@ overflow: hidden; } } +} + +a { + + color: var(--black-white); } \ No newline at end of file diff --git a/sass/pages/faq-page.scss b/sass/pages/faq-page.scss index 48c49548..422e3e1d 100644 --- a/sass/pages/faq-page.scss +++ b/sass/pages/faq-page.scss @@ -2,11 +2,13 @@ .faq-page { padding-top: 0; + } .faq-page-list { a { text-decoration: none; + color: var(--black-white); } &__title { color: var(--black-white); diff --git a/templates/base.html b/templates/base.html index 377c375d..5aedc69d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -116,59 +116,59 @@
- {% if page.taxonomies and page.taxonomies.faq %}{# Show FAQ breadcrumbs #} -
-
- -
-

- Faq -

+ + + + + + + + + + + + + + + + + + + + + + + -
-
-
- -
-
- {% set categories = get_taxonomy(kind='faq') | get(key="items") %} -

App

-
-

How to edit or move bookmarks?

-
+ + + + + + + + + + + + + + + + + + - {% for item in categories %} - {{ item.name }} - {% endfor %} -
+ + + + -
-
- {% endif %} + + + {% block content %}{% endblock %}
diff --git a/templates/news.html b/templates/news.html index a6f037f8..fd02dda2 100644 --- a/templates/news.html +++ b/templates/news.html @@ -10,70 +10,118 @@ {% endblock meta %} {% block content %} +
+
+ +
+

+ {{ resource.title }} +

-

{{ resource.title }}

+
+
+
+
+
+ + + +
+
+
+ {# Iterate and use en sections by default and use localized versions only if they are present #} + {% set enNewsSectionTranslation = section.translations | filter(attribute='lang', value='en') | first %} + {% set enNewsSection = get_section(path=enNewsSectionTranslation.path) %} - {# Iterate and use en sections by default and use localized versions only if they are present #} - {% set enNewsSectionTranslation = section.translations | filter(attribute='lang', value='en') | first %} - {% set enNewsSection = get_section(path=enNewsSectionTranslation.path) %} - - {% for sectionStr in enNewsSection.subsections | sort | reverse %} + {% for sectionStr in enNewsSection.subsections | sort | reverse %} {% set section = get_section(path=sectionStr) %} - {% for page in section.pages %} + {% for page in section.pages %} {% set translatedPage = page.translations | filter(attribute='lang', value=lang) | first %} - {% if translatedPage %} + {% if translatedPage %} {# set page = get_page(path=translatedPage.path) #} - {% endif %} + {% endif %} -
+
- - {# Display wide images below the text instead of to the right. #} - {% set_global noflex = '' %} - {% for photo in page.assets %} + + {# Display wide images below the text instead of to the right. #} + {% set_global noflex = '' %} + {% for photo in page.assets %} {% set meta = get_image_metadata(path=photo) %} {% if meta.width > meta.height %} - {% set_global noflex = '_noflex' %} - {% break %} + {% set_global noflex = '_noflex' %} + {% break %} + {% endif %} + {% endfor %} + {% if page.assets %} + {% for photo in page.assets | sort %} + + + {% endfor %} + + {% else %} + {% endif %} - {% endfor %} - -
{% if page.title %} -
- title: +

+ {{ page.title | safe }} -

+ {% endif %} +
+
+
+ + + + + + + + + + + + {{ page.date | date(format='%B %e, %Y') }} +
+
+ + + + + News +
+
{% if page.description %} -
- description: - {{ page.description | safe }}
+

+ + {{ page.description | safe }} +

{% endif %} + More - - {% for photo in page.assets | sort %} - - - {% endfor %} - - -
-{% endfor %} -{% endfor %} +
+ {% endfor %} + {% endfor %} +
{% endblock content %} diff --git a/templates/page.html b/templates/page.html index c56fb589..85ab7e35 100644 --- a/templates/page.html +++ b/templates/page.html @@ -2,8 +2,59 @@ {% block content %} -

{{ resource.title }}

+{% if page.taxonomies and page.taxonomies.faq %}{# Show FAQ breadcrumbs #} +
+
+ +
+

+ Faq +

+ +
+
+
+ +
+
+ {% set categories = get_taxonomy(kind='faq') | get(key="items") %} + + +

{{ resource.title }}

+
+ + {% for item in categories %} + {{ item.name }} + {% endfor %} +
+ + + +{% endif %} {{ resource.content | safe }} - +
+
{% endblock content %}