From 919319c7dbd54aa1c566ddf7dbef6f8f6f51f163 Mon Sep 17 00:00:00 2001 From: Greg Newman Date: Thu, 22 Jun 2023 10:56:54 -0400 Subject: [PATCH 01/19] :art: styles the news forms * Adds styles for the interim news submission view * Refactors the form input include * Styles the news creation forms * More work on the news list. Linking to the filtered list from the icons next to each news item. --- static/css/styles.css | 78 ++++++++++++++++++++++++++++- templates/includes/_form_input.html | 20 ++++---- templates/news/_entry_form.html | 16 ++++-- templates/news/create.html | 36 +++++++++---- templates/news/form.html | 8 ++- templates/news/list.html | 66 +++++++++--------------- 6 files changed, 154 insertions(+), 70 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index a92aa416..23a57589 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -748,7 +748,7 @@ input[type=file] { color: rgb(49 74 87 / var(--tw-text-opacity)); } -.dark #signup_form input[type=email],.dark +.dark #signup_form input[type=email],.dark #signup_form input[type=password] { --tw-bg-opacity: 1; background-color: rgb(23 42 52 / var(--tw-bg-opacity)); @@ -1447,6 +1447,10 @@ input[type=file] { width: 1rem; } +.w-\[70\%\] { + width: 70%; +} + .w-\[200px\] { width: 200px; } @@ -1824,6 +1828,10 @@ input[type=file] { border-width: 1px; } +.\!border-0 { + border-width: 0px !important; +} + .border-0 { border-width: 0px; } @@ -1949,6 +1957,11 @@ input[type=file] { background-color: rgb(75 85 99 / var(--tw-bg-opacity)); } +.bg-slate { + --tw-bg-opacity: 1; + background-color: rgb(49 74 87 / var(--tw-bg-opacity)); +} + .bg-red-500 { --tw-bg-opacity: 1; background-color: rgb(239 68 68 / var(--tw-bg-opacity)); @@ -2540,6 +2553,47 @@ input[type=file] { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); } +.file\:mr-5::file-selector-button { + margin-right: 1.25rem; +} + +.file\:rounded-lg::file-selector-button { + border-radius: 0.5rem; +} + +.file\:border-0::file-selector-button { + border-width: 0px; +} + +.file\:bg-white::file-selector-button { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} + +.file\:py-2::file-selector-button { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} + +.file\:px-6::file-selector-button { + padding-left: 1.5rem; + padding-right: 1.5rem; +} + +.file\:text-sm::file-selector-button { + font-size: 0.875rem; + line-height: 1.25rem; +} + +.file\:font-medium::file-selector-button { + font-weight: 500; +} + +.file\:text-slate::file-selector-button { + --tw-text-opacity: 1; + color: rgb(49 74 87 / var(--tw-text-opacity)); +} + .last\:border-0:last-child { border-width: 0px; } @@ -2568,6 +2622,10 @@ input[type=file] { background-color: rgb(255 159 0 / var(--tw-bg-opacity)); } +.hover\:bg-white\/60:hover { + background-color: rgb(255 255 255 / 0.6); +} + .hover\:bg-gray-50:hover { --tw-bg-opacity: 1; background-color: rgb(249 250 251 / var(--tw-bg-opacity)); @@ -2606,6 +2664,20 @@ input[type=file] { filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); } +.hover\:file\:cursor-pointer::file-selector-button:hover { + cursor: pointer; +} + +.hover\:file\:bg-orange::file-selector-button:hover { + --tw-bg-opacity: 1; + background-color: rgb(255 159 0 / var(--tw-bg-opacity)); +} + +.hover\:file\:text-white::file-selector-button:hover { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + .focus\:text-charcoal:focus { --tw-text-opacity: 1; color: rgb(23 42 52 / var(--tw-text-opacity)); @@ -2994,6 +3066,10 @@ input[type=file] { width: 33.333333%; } + .md\:w-\[70\%\] { + width: 70%; + } + .md\:min-w-\[150px\] { min-width: 150px; } diff --git a/templates/includes/_form_input.html b/templates/includes/_form_input.html index 1791ec5d..915eeef5 100644 --- a/templates/includes/_form_input.html +++ b/templates/includes/_form_input.html @@ -1,19 +1,17 @@ {% load static %} {% load widget_tweaks %} -{% if form.is_bound %} - {% if field.errors %} - {% render_field field class="w-full bg-white rounded border-gray-300 dark:text-white text-slate dark:border-slate dark:bg-charcoal" placeholder="{{ field.label }}" %} - {% for error in field.errors %} -
- {{ error }} -
- {% endfor %} +{% if field.errors %} + {% for error in field.errors %} +
+ {{ error }} +
+ {% endfor %} +{% endif %} - {% else %} - {% render_field field class="w-full bg-white rounded border-gray-300 dark:text-white text-slate dark:border-slate dark:bg-charcoal" placeholder="{{ field.label }}" %} - {% endif %} +{% if field.field.widget.input_type == "file" %} + {% render_field field class="text-sm text-grey-500 !border-0 file:mr-5 file:py-2 file:px-6 file:rounded-lg file:border-0 file:text-sm file:font-medium file:bg-white file:text-slate hover:file:cursor-pointer hover:file:bg-orange hover:file:text-white" placeholder=field.label %} {% else %} {% render_field field class="w-full bg-white rounded border-gray-300 dark:text-white text-slate dark:border-slate dark:bg-charcoal" placeholder=field.label %} {% endif %} diff --git a/templates/news/_entry_form.html b/templates/news/_entry_form.html index 1d2a60ca..6a45599b 100644 --- a/templates/news/_entry_form.html +++ b/templates/news/_entry_form.html @@ -2,8 +2,16 @@
{% csrf_token %} - {{ form.as_div }} - + +
+ {% for field in form.visible_fields %} + {% include "includes/_form_input.html" with form=form field=field %} + {% endfor %} +
+ +
+ +
diff --git a/templates/news/create.html b/templates/news/create.html index 39514ee1..019ee6f0 100644 --- a/templates/news/create.html +++ b/templates/news/create.html @@ -4,18 +4,34 @@ {% block title %}{% trans "Create News" %}{% endblock %} {% block content %} +
+
+

{% translate "Create news" %}

+

+ Select the kind of news you would like to submit. +

-

{% translate "Create news" %}

- -
- diff --git a/templates/news/form.html b/templates/news/form.html index 2ea05469..e9d82475 100644 --- a/templates/news/form.html +++ b/templates/news/form.html @@ -2,6 +2,10 @@ {% load i18n %} {% block content %} -

{% if entry.pk %}{% translate "Update Entry" %}{% else %}{{ add_label }}{% endif %}

-{% include "news/_entry_form.html" %} +
+
+

{% if entry.pk %}{% translate "Update Entry" %}{% else %}{{ add_label }}{% endif %}

+ {% include "news/_entry_form.html" %} +
+
{% endblock %} diff --git a/templates/news/list.html b/templates/news/list.html index 6289aa3c..394dbf6e 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -7,9 +7,9 @@ {% block content %}
-

Latest Stories

-

- Keep up with current information from Boost and our community. (Under construction) +

Latest Stories

+

+ Keep up with current information from Boost and our community.

@@ -53,45 +53,12 @@

Latest Stories

{% if user.is_authenticated %} {% endif %}
- -{#
#} -{# {% for entry in entry_list %}#} -{#
#} -{#
#} -{#
{{ entry.publish_at|date:"M jS, Y" }}
#} -{#
#} -{#
#} -{#

{{ entry.title }}

#} -{# {% if entry.tag %}#} -{# {% with url_name="news-"|add:entry.tag|add:"-list" %}#} -{# #} -{# {{ entry.tag }}#} -{# #} -{# {% endwith %}#} -{# {% endif %}#} -{#
#} -{#
#} -{#
#} -{#
#} -{# {% empty %}#} -{#
#} -{#
#} -{#

#} -{# {% translate "No entries available." %}#} -{#

#} -{#
#} -{#
#} -{#
#} -{#
#} -{# {% endfor %}#} -{#
#} -
    {% for entry in entry_list %} @@ -102,15 +69,30 @@

    Latest Stories

{% if entry.tag == "link" %} - + {% url 'news-link-list' as target_url %} + + + {% elif entry.tag == "news" %} - + {% url 'news-news-list' as target_url %} + + + {% elif entry.tag == "blogpost" %} - + {% url 'news-blogpost-list' as target_url %} + + + {% elif entry.tag == "poll" %} - + {% url 'news-poll-list' as target_url %} + + + {% elif entry.tag == "video" %} - + {% url 'news-video-list' as target_url %} + + + {% else %} {% endif %} From 20e05f8856ef587f6be59802bd22cb5eb7e3f472 Mon Sep 17 00:00:00 2001 From: Greg Newman Date: Thu, 22 Jun 2023 10:56:54 -0400 Subject: [PATCH 02/19] :art: styles the news forms * Adds styles for the interim news submission view * Refactors the form input include * Styles the news creation forms * More work on the news list. Linking to the filtered list from the icons next to each news item. --- static/css/styles.css | 78 ++++++++++++++++++++++++++++- templates/includes/_form_input.html | 20 ++++---- templates/news/_entry_form.html | 16 ++++-- templates/news/create.html | 36 +++++++++---- templates/news/form.html | 8 ++- templates/news/list.html | 66 +++++++++--------------- 6 files changed, 154 insertions(+), 70 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index a92aa416..23a57589 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -748,7 +748,7 @@ input[type=file] { color: rgb(49 74 87 / var(--tw-text-opacity)); } -.dark #signup_form input[type=email],.dark +.dark #signup_form input[type=email],.dark #signup_form input[type=password] { --tw-bg-opacity: 1; background-color: rgb(23 42 52 / var(--tw-bg-opacity)); @@ -1447,6 +1447,10 @@ input[type=file] { width: 1rem; } +.w-\[70\%\] { + width: 70%; +} + .w-\[200px\] { width: 200px; } @@ -1824,6 +1828,10 @@ input[type=file] { border-width: 1px; } +.\!border-0 { + border-width: 0px !important; +} + .border-0 { border-width: 0px; } @@ -1949,6 +1957,11 @@ input[type=file] { background-color: rgb(75 85 99 / var(--tw-bg-opacity)); } +.bg-slate { + --tw-bg-opacity: 1; + background-color: rgb(49 74 87 / var(--tw-bg-opacity)); +} + .bg-red-500 { --tw-bg-opacity: 1; background-color: rgb(239 68 68 / var(--tw-bg-opacity)); @@ -2540,6 +2553,47 @@ input[type=file] { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); } +.file\:mr-5::file-selector-button { + margin-right: 1.25rem; +} + +.file\:rounded-lg::file-selector-button { + border-radius: 0.5rem; +} + +.file\:border-0::file-selector-button { + border-width: 0px; +} + +.file\:bg-white::file-selector-button { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} + +.file\:py-2::file-selector-button { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} + +.file\:px-6::file-selector-button { + padding-left: 1.5rem; + padding-right: 1.5rem; +} + +.file\:text-sm::file-selector-button { + font-size: 0.875rem; + line-height: 1.25rem; +} + +.file\:font-medium::file-selector-button { + font-weight: 500; +} + +.file\:text-slate::file-selector-button { + --tw-text-opacity: 1; + color: rgb(49 74 87 / var(--tw-text-opacity)); +} + .last\:border-0:last-child { border-width: 0px; } @@ -2568,6 +2622,10 @@ input[type=file] { background-color: rgb(255 159 0 / var(--tw-bg-opacity)); } +.hover\:bg-white\/60:hover { + background-color: rgb(255 255 255 / 0.6); +} + .hover\:bg-gray-50:hover { --tw-bg-opacity: 1; background-color: rgb(249 250 251 / var(--tw-bg-opacity)); @@ -2606,6 +2664,20 @@ input[type=file] { filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); } +.hover\:file\:cursor-pointer::file-selector-button:hover { + cursor: pointer; +} + +.hover\:file\:bg-orange::file-selector-button:hover { + --tw-bg-opacity: 1; + background-color: rgb(255 159 0 / var(--tw-bg-opacity)); +} + +.hover\:file\:text-white::file-selector-button:hover { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + .focus\:text-charcoal:focus { --tw-text-opacity: 1; color: rgb(23 42 52 / var(--tw-text-opacity)); @@ -2994,6 +3066,10 @@ input[type=file] { width: 33.333333%; } + .md\:w-\[70\%\] { + width: 70%; + } + .md\:min-w-\[150px\] { min-width: 150px; } diff --git a/templates/includes/_form_input.html b/templates/includes/_form_input.html index 1791ec5d..915eeef5 100644 --- a/templates/includes/_form_input.html +++ b/templates/includes/_form_input.html @@ -1,19 +1,17 @@ {% load static %} {% load widget_tweaks %} -{% if form.is_bound %} - {% if field.errors %} - {% render_field field class="w-full bg-white rounded border-gray-300 dark:text-white text-slate dark:border-slate dark:bg-charcoal" placeholder="{{ field.label }}" %} - {% for error in field.errors %} -
- {{ error }} -
- {% endfor %} +{% if field.errors %} + {% for error in field.errors %} +
+ {{ error }} +
+ {% endfor %} +{% endif %} - {% else %} - {% render_field field class="w-full bg-white rounded border-gray-300 dark:text-white text-slate dark:border-slate dark:bg-charcoal" placeholder="{{ field.label }}" %} - {% endif %} +{% if field.field.widget.input_type == "file" %} + {% render_field field class="text-sm text-grey-500 !border-0 file:mr-5 file:py-2 file:px-6 file:rounded-lg file:border-0 file:text-sm file:font-medium file:bg-white file:text-slate hover:file:cursor-pointer hover:file:bg-orange hover:file:text-white" placeholder=field.label %} {% else %} {% render_field field class="w-full bg-white rounded border-gray-300 dark:text-white text-slate dark:border-slate dark:bg-charcoal" placeholder=field.label %} {% endif %} diff --git a/templates/news/_entry_form.html b/templates/news/_entry_form.html index 1d2a60ca..6a45599b 100644 --- a/templates/news/_entry_form.html +++ b/templates/news/_entry_form.html @@ -2,8 +2,16 @@
{% csrf_token %} - {{ form.as_div }} - + +
+ {% for field in form.visible_fields %} + {% include "includes/_form_input.html" with form=form field=field %} + {% endfor %} +
+ +
+ +
diff --git a/templates/news/create.html b/templates/news/create.html index 39514ee1..019ee6f0 100644 --- a/templates/news/create.html +++ b/templates/news/create.html @@ -4,18 +4,34 @@ {% block title %}{% trans "Create News" %}{% endblock %} {% block content %} +
+
+

{% translate "Create news" %}

+

+ Select the kind of news you would like to submit. +

-

{% translate "Create news" %}

- -
- diff --git a/templates/news/form.html b/templates/news/form.html index 2ea05469..e9d82475 100644 --- a/templates/news/form.html +++ b/templates/news/form.html @@ -2,6 +2,10 @@ {% load i18n %} {% block content %} -

{% if entry.pk %}{% translate "Update Entry" %}{% else %}{{ add_label }}{% endif %}

-{% include "news/_entry_form.html" %} +
+
+

{% if entry.pk %}{% translate "Update Entry" %}{% else %}{{ add_label }}{% endif %}

+ {% include "news/_entry_form.html" %} +
+
{% endblock %} diff --git a/templates/news/list.html b/templates/news/list.html index 154b3fbf..c8311e81 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -7,9 +7,9 @@ {% block content %}
-

Latest Stories

-

- Keep up with current information from Boost and our community. (Under construction) +

Latest Stories

+

+ Keep up with current information from Boost and our community.

@@ -53,45 +53,12 @@

Latest Stories

{% if user.is_authenticated %} {% endif %}
- -{#
#} -{# {% for entry in entry_list %}#} -{#
#} -{#
#} -{#
{{ entry.publish_at|date:"M jS, Y" }}
#} -{#
#} -{#
#} -{#

{{ entry.title }}

#} -{# {% if entry.tag %}#} -{# {% with url_name="news-"|add:entry.tag|add:"-list" %}#} -{# #} -{# {{ entry.tag }}#} -{# #} -{# {% endwith %}#} -{# {% endif %}#} -{#
#} -{#
#} -{#
#} -{#
#} -{# {% empty %}#} -{#
#} -{#
#} -{#

#} -{# {% translate "No entries available." %}#} -{#

#} -{#
#} -{#
#} -{#
#} -{#
#} -{# {% endfor %}#} -{#
#} -
    {% for entry in entry_list %} @@ -102,15 +69,30 @@

    Latest Stories

{% if entry.tag == "link" %} - + {% url 'news-link-list' as target_url %} + + + {% elif entry.tag == "news" %} - + {% url 'news-news-list' as target_url %} + + + {% elif entry.tag == "blogpost" %} - + {% url 'news-blogpost-list' as target_url %} + + + {% elif entry.tag == "poll" %} - + {% url 'news-poll-list' as target_url %} + + + {% elif entry.tag == "video" %} - + {% url 'news-video-list' as target_url %} + + + {% else %} {% endif %} From 77b26d03d3ab14b70eadbecb04f7783379fd1ec9 Mon Sep 17 00:00:00 2001 From: Greg Newman Date: Thu, 29 Jun 2023 09:25:08 -0400 Subject: [PATCH 03/19] :art: styling secondary pages and confirmation --- static/css/styles.css | 24 +++++++--- templates/news/confirm_delete.html | 23 +++++---- templates/news/create.html | 4 +- templates/news/detail.html | 75 ++++++++++++++---------------- templates/news/list.html | 8 ++-- 5 files changed, 73 insertions(+), 61 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index 23a57589..6e64d5ce 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -748,7 +748,7 @@ input[type=file] { color: rgb(49 74 87 / var(--tw-text-opacity)); } -.dark #signup_form input[type=email],.dark +.dark #signup_form input[type=email],.dark #signup_form input[type=password] { --tw-bg-opacity: 1; background-color: rgb(23 42 52 / var(--tw-bg-opacity)); @@ -1900,6 +1900,15 @@ input[type=file] { border-color: rgb(255 255 255 / var(--tw-border-opacity)); } +.border-slate\/50 { + border-color: rgb(49 74 87 / 0.5); +} + +.border-gray-400 { + --tw-border-opacity: 1; + border-color: rgb(156 163 175 / var(--tw-border-opacity)); +} + .bg-red-600 { --tw-bg-opacity: 1; background-color: rgb(220 38 38 / var(--tw-bg-opacity)); @@ -1957,11 +1966,6 @@ input[type=file] { background-color: rgb(75 85 99 / var(--tw-bg-opacity)); } -.bg-slate { - --tw-bg-opacity: 1; - background-color: rgb(49 74 87 / var(--tw-bg-opacity)); -} - .bg-red-500 { --tw-bg-opacity: 1; background-color: rgb(239 68 68 / var(--tw-bg-opacity)); @@ -2246,6 +2250,14 @@ input[type=file] { padding-bottom: 1rem; } +.pr-5 { + padding-right: 1.25rem; +} + +.pb-5 { + padding-bottom: 1.25rem; +} + .text-left { text-align: left; } diff --git a/templates/news/confirm_delete.html b/templates/news/confirm_delete.html index 7e135abe..b58f7255 100644 --- a/templates/news/confirm_delete.html +++ b/templates/news/confirm_delete.html @@ -2,13 +2,18 @@ {% load i18n %} {% block content %} -

{% translate "Please confirm your choice below" %}

-

{% blocktrans with entry_title=entry.title %} -Are you sure you want to permanently delete {{ entry_title }}? -{% endblocktrans %}

-
- {% csrf_token %} - -
-

{% translate "No, take me back!" %}

+
+

{% translate "Please confirm your choice below" %}

+

+ {% blocktrans with entry_title=entry.title %} + Are you sure you want to permanently delete {{ entry_title }}? + {% endblocktrans %} +

+ +
+ {% csrf_token %} + +
+

{% translate "No, take me back!" %}

+
{% endblock %} diff --git a/templates/news/create.html b/templates/news/create.html index 019ee6f0..799368ee 100644 --- a/templates/news/create.html +++ b/templates/news/create.html @@ -12,9 +12,9 @@

{% translate "Create news" %}

-
+
{% for item in items %} - + {% if item.model_name == "BlogPost" %} Blog Post {% elif item.model_name == "Poll" %} diff --git a/templates/news/detail.html b/templates/news/detail.html index fca90f80..6ab04e91 100644 --- a/templates/news/detail.html +++ b/templates/news/detail.html @@ -14,57 +14,52 @@

{{ entry.title }}

+

{{ entry.publish_at|date:"M jS, Y" }}

-
-
- {% if not entry.is_approved %} - -

{{ entry.publish_at|date:"M jS, Y" }}

- {% if entry.external_url %}

{{ entry.external_url|escape }}

{% endif %} -

{% if entry.image %}{% endif %} - {{ entry.content|linebreaks }} -

+ + {% if entry.image %} + + {% endif %} + {{ entry.content|linebreaks }}
-
+
Share: Facebook Twitter @@ -73,15 +68,15 @@

{{ entry.title }}

{% if next or prev %} -
+
{% if next %} {% endif %} {% if prev %} {% endif %}
diff --git a/templates/news/list.html b/templates/news/list.html index c8311e81..0c8090ad 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -53,7 +53,7 @@

Latest Stories

{% if user.is_authenticated %} {% endif %}
@@ -64,10 +64,10 @@

Latest Stories

{% for entry in entry_list %}
  • -
    + -
    +
    {% if entry.tag == "link" %} {% url 'news-link-list' as target_url %} @@ -101,7 +101,7 @@

    Latest Stories

    {% if entry.author.image %} user {% else %} - + {% endif %} From 3d35b1aa778e3d1ef2ef266f7d3bdc6c72a491e8 Mon Sep 17 00:00:00 2001 From: Greg Newman Date: Thu, 29 Jun 2023 09:58:55 -0400 Subject: [PATCH 04/19] :art: mobile layout for list --- static/css/styles.css | 85 ++++++++++++++++++++++++++++------------ templates/news/list.html | 10 ++--- 2 files changed, 66 insertions(+), 29 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index 6e64d5ce..8d8ebaf3 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1287,6 +1287,22 @@ input[type=file] { margin-left: 1rem; } +.-mt-16 { + margin-top: -4rem; +} + +.-mt-8 { + margin-top: -2rem; +} + +.-mt-3 { + margin-top: -0.75rem; +} + +.-mb-3 { + margin-bottom: -0.75rem; +} + .block { display: block; } @@ -1455,10 +1471,6 @@ input[type=file] { width: 200px; } -.w-\[25px\] { - width: 25px; -} - .w-\[150px\] { width: 150px; } @@ -1848,10 +1860,6 @@ input[type=file] { border-bottom-width: 2px; } -.border-l-2 { - border-left-width: 2px; -} - .border-b-4 { border-bottom-width: 4px; } @@ -1895,18 +1903,14 @@ input[type=file] { border-color: rgb(90 213 153 / 0.6); } -.border-white { +.border-gray-400 { --tw-border-opacity: 1; - border-color: rgb(255 255 255 / var(--tw-border-opacity)); -} - -.border-slate\/50 { - border-color: rgb(49 74 87 / 0.5); + border-color: rgb(156 163 175 / var(--tw-border-opacity)); } -.border-gray-400 { +.border-white { --tw-border-opacity: 1; - border-color: rgb(156 163 175 / var(--tw-border-opacity)); + border-color: rgb(255 255 255 / var(--tw-border-opacity)); } .bg-red-600 { @@ -2250,14 +2254,6 @@ input[type=file] { padding-bottom: 1rem; } -.pr-5 { - padding-right: 1.25rem; -} - -.pb-5 { - padding-bottom: 1.25rem; -} - .text-left { text-align: left; } @@ -3010,6 +3006,18 @@ input[type=file] { margin-bottom: 1.5rem; } + .md\:-ml-\[213px\] { + margin-left: -213px; + } + + .md\:ml-6 { + margin-left: 1.5rem; + } + + .md\:ml-\[200px\] { + margin-left: 200px; + } + .md\:block { display: block; } @@ -3082,10 +3090,31 @@ input[type=file] { width: 70%; } + .md\:w-\[90\%\] { + width: 90%; + } + + .md\:w-\[200px\] { + width: 200px; + } + + .md\:w-\[150px\] { + width: 150px; + } + .md\:min-w-\[150px\] { min-width: 150px; } + .md\:min-w-fit { + min-width: -moz-fit-content; + min-width: fit-content; + } + + .md\:min-w-full { + min-width: 100%; + } + .md\:max-w-7xl { max-width: 80rem; } @@ -3198,6 +3227,10 @@ input[type=file] { border-bottom-width: 1px; } + .md\:border-l-2 { + border-left-width: 2px; + } + .md\:border-b-0 { border-bottom-width: 0px; } @@ -3307,6 +3340,10 @@ input[type=file] { padding-left: 2.75rem; } + .md\:text-center { + text-align: center; + } + .md\:text-right { text-align: right; } diff --git a/templates/news/list.html b/templates/news/list.html index 0c8090ad..5773914e 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -60,14 +60,14 @@

    Latest Stories

    -
      +
        {% for entry in entry_list %}
      1. -
        + -
        +
        {% if entry.tag == "link" %} {% url 'news-link-list' as target_url %} @@ -97,7 +97,7 @@

        Latest Stories

        {% endif %}
        -
        + -
        +
        {{ entry.title }} From 5f56a78bf4a5aafde2157fa9417e4d75a0d364a0 Mon Sep 17 00:00:00 2001 From: Greg Newman Date: Thu, 29 Jun 2023 14:26:49 -0400 Subject: [PATCH 05/19] :art: styles old version alert Closes #465 --- static/css/styles.css | 75 ++++++++----------- .../libraries/includes/version_alert.html | 12 +-- 2 files changed, 39 insertions(+), 48 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index 8d8ebaf3..500c2be5 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1267,12 +1267,8 @@ input[type=file] { margin-left: 0.5rem; } -.ml-\[200px\] { - margin-left: 200px; -} - -.-ml-\[213px\] { - margin-left: -213px; +.-mt-8 { + margin-top: -2rem; } .mb-10 { @@ -1287,22 +1283,6 @@ input[type=file] { margin-left: 1rem; } -.-mt-16 { - margin-top: -4rem; -} - -.-mt-8 { - margin-top: -2rem; -} - -.-mt-3 { - margin-top: -0.75rem; -} - -.-mb-3 { - margin-bottom: -0.75rem; -} - .block { display: block; } @@ -1467,14 +1447,6 @@ input[type=file] { width: 70%; } -.w-\[200px\] { - width: 200px; -} - -.w-\[150px\] { - width: 150px; -} - .w-5 { width: 1.25rem; } @@ -1491,6 +1463,10 @@ input[type=file] { width: 0.25rem; } +.w-\[200px\] { + width: 200px; +} + .min-w-0 { min-width: 0px; } @@ -1988,6 +1964,24 @@ input[type=file] { background-color: transparent; } +.bg-yellow-200 { + --tw-bg-opacity: 1; + background-color: rgb(254 240 138 / var(--tw-bg-opacity)); +} + +.bg-yellow-200\/50 { + background-color: rgb(254 240 138 / 0.5); +} + +.bg-yellow-200\/70 { + background-color: rgb(254 240 138 / 0.7); +} + +.bg-slate { + --tw-bg-opacity: 1; + background-color: rgb(49 74 87 / var(--tw-bg-opacity)); +} + .bg-opacity-10 { --tw-bg-opacity: 0.1; } @@ -2461,6 +2455,10 @@ input[type=file] { color: rgb(229 231 235 / var(--tw-text-opacity)); } +.underline { + text-decoration-line: underline; +} + .placeholder-gray-500::-moz-placeholder { --tw-placeholder-opacity: 1; color: rgb(107 114 128 / var(--tw-placeholder-opacity)); @@ -3006,6 +3004,10 @@ input[type=file] { margin-bottom: 1.5rem; } + .md\:ml-\[200px\] { + margin-left: 200px; + } + .md\:-ml-\[213px\] { margin-left: -213px; } @@ -3014,10 +3016,6 @@ input[type=file] { margin-left: 1.5rem; } - .md\:ml-\[200px\] { - margin-left: 200px; - } - .md\:block { display: block; } @@ -3106,15 +3104,6 @@ input[type=file] { min-width: 150px; } - .md\:min-w-fit { - min-width: -moz-fit-content; - min-width: fit-content; - } - - .md\:min-w-full { - min-width: 100%; - } - .md\:max-w-7xl { max-width: 80rem; } diff --git a/templates/libraries/includes/version_alert.html b/templates/libraries/includes/version_alert.html index 1c283c1b..7cddb2d5 100644 --- a/templates/libraries/includes/version_alert.html +++ b/templates/libraries/includes/version_alert.html @@ -1,13 +1,15 @@ {% if version_alert %} -
        -

        This is an older version and was released in {{ version.release_date|date:"Y"}}. +

        {% endif %} From fa1c3820f5fa99a51ea6c8b0d26770bb76db4e71 Mon Sep 17 00:00:00 2001 From: Greg Newman Date: Thu, 29 Jun 2023 15:40:29 -0400 Subject: [PATCH 06/19] :art: fresh css build --- static/css/styles.css | 9 --------- 1 file changed, 9 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index 500c2be5..36af79b7 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1964,15 +1964,6 @@ input[type=file] { background-color: transparent; } -.bg-yellow-200 { - --tw-bg-opacity: 1; - background-color: rgb(254 240 138 / var(--tw-bg-opacity)); -} - -.bg-yellow-200\/50 { - background-color: rgb(254 240 138 / 0.5); -} - .bg-yellow-200\/70 { background-color: rgb(254 240 138 / 0.7); } From 9678e4908f4700522b067e3b82bbb61afc20f87f Mon Sep 17 00:00:00 2001 From: Greg Newman Date: Fri, 30 Jun 2023 09:03:33 -0400 Subject: [PATCH 07/19] :bug: fixes dark mode issue with alert --- static/css/styles.css | 22 +++++++++++++++++++ .../libraries/includes/version_alert.html | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/static/css/styles.css b/static/css/styles.css index 36af79b7..802ee55f 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -2757,6 +2757,28 @@ input[type=file] { background-color: rgb(49 74 87 / var(--tw-bg-opacity)); } +.dark .dark\:bg-yellow-300 { + --tw-bg-opacity: 1; + background-color: rgb(253 224 71 / var(--tw-bg-opacity)); +} + +.dark .dark\:bg-yellow-300\/70 { + background-color: rgb(253 224 71 / 0.7); +} + +.dark .dark\:bg-yellow-300\/50 { + background-color: rgb(253 224 71 / 0.5); +} + +.dark .dark\:bg-yellow-200 { + --tw-bg-opacity: 1; + background-color: rgb(254 240 138 / var(--tw-bg-opacity)); +} + +.dark .dark\:bg-yellow-200\/80 { + background-color: rgb(254 240 138 / 0.8); +} + .dark .dark\:font-medium { font-weight: 500; } diff --git a/templates/libraries/includes/version_alert.html b/templates/libraries/includes/version_alert.html index 7cddb2d5..6fdc3e3a 100644 --- a/templates/libraries/includes/version_alert.html +++ b/templates/libraries/includes/version_alert.html @@ -7,7 +7,7 @@ {% if latest_library_version %} {% else %} - + {% endif %} {{ latest_version.display_name }}

        From f12684cee6ff6c7d7f3b13d7df0846c4e1d077ee Mon Sep 17 00:00:00 2001 From: Greg Newman Date: Fri, 30 Jun 2023 09:31:10 -0400 Subject: [PATCH 08/19] :sparkles: add an empty message if no news --- templates/news/list.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/news/list.html b/templates/news/list.html index 5773914e..57309bd1 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -60,6 +60,7 @@

        Latest Stories

        + {% if entry_list %}
          {% for entry in entry_list %}
        1. @@ -118,6 +119,9 @@

          Latest Stories

        2. {% endfor %}
        + {% else %} +

        No news items were found.

        + {% endif %}
        {% endblock %} From 83c7bb59d4f915fcfbca77b5be34aa5b4f80771c Mon Sep 17 00:00:00 2001 From: Greg Newman Date: Fri, 30 Jun 2023 10:29:54 -0400 Subject: [PATCH 09/19] :hammer: refactor the structure of the news list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The original ordered list does not scale well width wise so I’ve refactored this to adjust nicely when resizing the window. --- static/css/styles.css | 79 +++++++++++++++++++++++++++++----------- templates/news/list.html | 79 +++++++++++++++++++++++++++++++++++----- 2 files changed, 127 insertions(+), 31 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index 802ee55f..ab54b3bc 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1283,6 +1283,14 @@ input[type=file] { margin-left: 1rem; } +.-ml-5 { + margin-left: -1.25rem; +} + +.-ml-4 { + margin-left: -1rem; +} + .block { display: block; } @@ -1467,6 +1475,42 @@ input[type=file] { width: 200px; } +.w-2\/5 { + width: 40%; +} + +.w-2\/6 { + width: 33.333333%; +} + +.w-3\/6 { + width: 50%; +} + +.w-\[50px\] { + width: 50px; +} + +.w-\[150px\] { + width: 150px; +} + +.w-\[160px\] { + width: 160px; +} + +.w-\[180px\] { + width: 180px; +} + +.w-\[70px\] { + width: 70px; +} + +.w-\[170px\] { + width: 170px; +} + .min-w-0 { min-width: 0px; } @@ -1567,6 +1611,10 @@ input[type=file] { grid-template-columns: repeat(2, minmax(0, 1fr)); } +.grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); +} + .grid-rows-1 { grid-template-rows: repeat(1, minmax(0, 1fr)); } @@ -1840,6 +1888,10 @@ input[type=file] { border-bottom-width: 4px; } +.border-l-2 { + border-left-width: 2px; +} + .border-gray-700 { --tw-border-opacity: 1; border-color: rgb(55 65 81 / var(--tw-border-opacity)); @@ -2757,28 +2809,6 @@ input[type=file] { background-color: rgb(49 74 87 / var(--tw-bg-opacity)); } -.dark .dark\:bg-yellow-300 { - --tw-bg-opacity: 1; - background-color: rgb(253 224 71 / var(--tw-bg-opacity)); -} - -.dark .dark\:bg-yellow-300\/70 { - background-color: rgb(253 224 71 / 0.7); -} - -.dark .dark\:bg-yellow-300\/50 { - background-color: rgb(253 224 71 / 0.5); -} - -.dark .dark\:bg-yellow-200 { - --tw-bg-opacity: 1; - background-color: rgb(254 240 138 / var(--tw-bg-opacity)); -} - -.dark .dark\:bg-yellow-200\/80 { - background-color: rgb(254 240 138 / 0.8); -} - .dark .dark\:font-medium { font-weight: 500; } @@ -2834,6 +2864,11 @@ input[type=file] { --tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity)); } +.dark .dark\:hover\:bg-orange:hover { + --tw-bg-opacity: 1; + background-color: rgb(255 159 0 / var(--tw-bg-opacity)); +} + .dark .hover\:dark\:text-white:hover { --tw-text-opacity: 1; color: rgb(255 255 255 / var(--tw-text-opacity)); diff --git a/templates/news/list.html b/templates/news/list.html index 57309bd1..3c5d8c00 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -18,47 +18,107 @@

        Latest Stories

        {% url 'news' as target_url %} - +
        {% url 'news-news-list' as target_url %} - +
        {% url 'news-blogpost-list' as target_url %} - +
        {% url 'news-link-list' as target_url %} - +
        {% url 'news-poll-list' as target_url %} - +
        {% url 'news-video-list' as target_url %} - +
        {% if user.is_authenticated %} {% endif %}
        +
        +
        + {% for entry in entry_list %} +
        + +
        + {% if entry.tag == "link" %} + {% url 'news-link-list' as target_url %} + + + + {% elif entry.tag == "news" %} + {% url 'news-news-list' as target_url %} + + + + {% elif entry.tag == "blogpost" %} + {% url 'news-blogpost-list' as target_url %} + + + + {% elif entry.tag == "poll" %} + {% url 'news-poll-list' as target_url %} + + + + {% elif entry.tag == "video" %} + {% url 'news-video-list' as target_url %} + + + + {% else %} + + {% endif %} +
        +
        + {% if entry.author.image %} + {{ entry.author.get_full_name }} + {% else %} + + + + {% endif %} +
        +
        + +

        {{ entry.content|truncatechars:300 }}

        +
        +
        + {% endfor %} +
        +
        + + {% comment %}
        {% if entry_list %}
          @@ -100,10 +160,10 @@

          Latest Stories

        @@ -123,5 +183,6 @@

        Latest Stories

        No news items were found.

        {% endif %}
        + {% endcomment %}
        {% endblock %} From 63397b80e6ca57cc7cf41d07e3e3069b2dd76ef3 Mon Sep 17 00:00:00 2001 From: Greg Newman Date: Fri, 30 Jun 2023 10:54:54 -0400 Subject: [PATCH 10/19] :bug: dark mode --- static/css/styles.css | 89 ++++++++++++++-------------------------- templates/news/list.html | 18 ++++---- 2 files changed, 40 insertions(+), 67 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index ab54b3bc..5ef031dd 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1267,14 +1267,18 @@ input[type=file] { margin-left: 0.5rem; } -.-mt-8 { - margin-top: -2rem; +.-ml-4 { + margin-left: -1rem; } .mb-10 { margin-bottom: 2.5rem; } +.-mt-8 { + margin-top: -2rem; +} + .ml-5 { margin-left: 1.25rem; } @@ -1283,14 +1287,6 @@ input[type=file] { margin-left: 1rem; } -.-ml-5 { - margin-left: -1.25rem; -} - -.-ml-4 { - margin-left: -1rem; -} - .block { display: block; } @@ -1455,6 +1451,18 @@ input[type=file] { width: 70%; } +.w-\[160px\] { + width: 160px; +} + +.w-\[50px\] { + width: 50px; +} + +.w-\[70px\] { + width: 70px; +} + .w-5 { width: 1.25rem; } @@ -1475,42 +1483,6 @@ input[type=file] { width: 200px; } -.w-2\/5 { - width: 40%; -} - -.w-2\/6 { - width: 33.333333%; -} - -.w-3\/6 { - width: 50%; -} - -.w-\[50px\] { - width: 50px; -} - -.w-\[150px\] { - width: 150px; -} - -.w-\[160px\] { - width: 160px; -} - -.w-\[180px\] { - width: 180px; -} - -.w-\[70px\] { - width: 70px; -} - -.w-\[170px\] { - width: 170px; -} - .min-w-0 { min-width: 0px; } @@ -1611,10 +1583,6 @@ input[type=file] { grid-template-columns: repeat(2, minmax(0, 1fr)); } -.grid-cols-4 { - grid-template-columns: repeat(4, minmax(0, 1fr)); -} - .grid-rows-1 { grid-template-rows: repeat(1, minmax(0, 1fr)); } @@ -1884,14 +1852,14 @@ input[type=file] { border-bottom-width: 2px; } -.border-b-4 { - border-bottom-width: 4px; -} - .border-l-2 { border-left-width: 2px; } +.border-b-4 { + border-bottom-width: 4px; +} + .border-gray-700 { --tw-border-opacity: 1; border-color: rgb(55 65 81 / var(--tw-border-opacity)); @@ -2191,6 +2159,11 @@ input[type=file] { padding-bottom: 3.5rem; } +.py-\[1px\] { + padding-top: 1px; + padding-bottom: 1px; +} + .pl-11 { padding-left: 2.75rem; } @@ -3052,6 +3025,10 @@ input[type=file] { margin-bottom: 1.5rem; } + .md\:ml-6 { + margin-left: 1.5rem; + } + .md\:ml-\[200px\] { margin-left: 200px; } @@ -3060,10 +3037,6 @@ input[type=file] { margin-left: -213px; } - .md\:ml-6 { - margin-left: 1.5rem; - } - .md\:block { display: block; } diff --git a/templates/news/list.html b/templates/news/list.html index 3c5d8c00..3746886b 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -66,34 +66,34 @@

        Latest Stories

        -
        +
        {% if entry.tag == "link" %} {% url 'news-link-list' as target_url %} - + {% elif entry.tag == "news" %} {% url 'news-news-list' as target_url %} - + {% elif entry.tag == "blogpost" %} {% url 'news-blogpost-list' as target_url %} - + {% elif entry.tag == "poll" %} {% url 'news-poll-list' as target_url %} - + {% elif entry.tag == "video" %} {% url 'news-video-list' as target_url %} - + {% else %} - + {% endif %}
        @@ -107,11 +107,11 @@

        Latest Stories

        -

        {{ entry.content|truncatechars:300 }}

        +

        {{ entry.content|truncatechars:300 }}

        {% endfor %} From 9abd98cb839624e2a3301a821bd1766963a9933d Mon Sep 17 00:00:00 2001 From: Greg Newman Date: Fri, 30 Jun 2023 11:08:57 -0400 Subject: [PATCH 11/19] :hammer: cleanup --- static/css/styles.css | 10 +++--- templates/news/list.html | 71 +++------------------------------------- 2 files changed, 10 insertions(+), 71 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index 5ef031dd..268ee9d1 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -2149,6 +2149,11 @@ input[type=file] { padding-right: 40px; } +.py-\[1px\] { + padding-top: 1px; + padding-bottom: 1px; +} + .px-11 { padding-left: 2.75rem; padding-right: 2.75rem; @@ -2159,11 +2164,6 @@ input[type=file] { padding-bottom: 3.5rem; } -.py-\[1px\] { - padding-top: 1px; - padding-bottom: 1px; -} - .pl-11 { padding-left: 2.75rem; } diff --git a/templates/news/list.html b/templates/news/list.html index 3746886b..81bd59be 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -111,78 +111,17 @@

        Latest Stories

        {{ entry.title }}
        + {% if entry.content %}

        {{ entry.content|truncatechars:300 }}

        + {% endif %}
    + {% empty %} +

    No News matches were found.

    {% endfor %}
    - {% comment %} -
    - {% if entry_list %} -
      - {% for entry in entry_list %} -
    1. -
      - -
      - {% if entry.tag == "link" %} - {% url 'news-link-list' as target_url %} - - - - {% elif entry.tag == "news" %} - {% url 'news-news-list' as target_url %} - - - - {% elif entry.tag == "blogpost" %} - {% url 'news-blogpost-list' as target_url %} - - - - {% elif entry.tag == "poll" %} - {% url 'news-poll-list' as target_url %} - - - - {% elif entry.tag == "video" %} - {% url 'news-video-list' as target_url %} - - - - {% else %} - - {% endif %} -
      - -
      - -

      {{ entry.content|truncatechars:300 }}

      -
      -
      -
    2. - {% endfor %} -
    - {% else %} -

    No news items were found.

    - {% endif %} -
    - {% endcomment %} +
    {% endblock %} From a11ce5d023e94b8942ef9c63996c483e7a218256 Mon Sep 17 00:00:00 2001 From: Greg Newman Date: Fri, 30 Jun 2023 11:18:08 -0400 Subject: [PATCH 12/19] :pencil: fixing form labels --- news/views.py | 4 ++-- templates/news/form.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/news/views.py b/news/views.py index 7c3ba761..c272039f 100644 --- a/news/views.py +++ b/news/views.py @@ -166,14 +166,14 @@ def get_context_data(self, **kwargs): class BlogPostCreateView(EntryCreateView): model = BlogPost form_class = BlogPostForm - add_label = _("Create a BlogPost") + add_label = _("Create Blog Post") add_url_name = "news-blogpost-create" class LinkCreateView(EntryCreateView): model = Link form_class = LinkForm - add_label = _("Create a Link") + add_label = _("Create Link") add_url_name = "news-link-create" diff --git a/templates/news/form.html b/templates/news/form.html index e9d82475..f9091fe8 100644 --- a/templates/news/form.html +++ b/templates/news/form.html @@ -4,7 +4,7 @@ {% block content %}
    -

    {% if entry.pk %}{% translate "Update Entry" %}{% else %}{{ add_label }}{% endif %}

    +

    {% if entry.pk %}{% translate "Update Entry" %}{% else %}{{ add_label }}{% endif %}

    {% include "news/_entry_form.html" %}
    From 8323b98645073fed569b0811375f7d693cc1761f Mon Sep 17 00:00:00 2001 From: Greg Newman Date: Wed, 5 Jul 2023 09:52:42 -0400 Subject: [PATCH 13/19] :art: make news list better on mobile --- static/css/styles.css | 40 +++++----------------- templates/news/create.html | 2 +- templates/news/list.html | 70 ++++++++++++++++++++++++++++++++------ 3 files changed, 68 insertions(+), 44 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index 268ee9d1..e2e6ed1a 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1275,10 +1275,6 @@ input[type=file] { margin-bottom: 2.5rem; } -.-mt-8 { - margin-top: -2rem; -} - .ml-5 { margin-left: 1.25rem; } @@ -1367,6 +1363,10 @@ input[type=file] { height: 3rem; } +.h-auto { + height: auto; +} + .max-h-\[470px\] { max-height: 470px; } @@ -2952,6 +2952,10 @@ input[type=file] { float: right; } + .md\:float-left { + float: left; + } + .md\:my-16 { margin-top: 4rem; margin-bottom: 4rem; @@ -3029,14 +3033,6 @@ input[type=file] { margin-left: 1.5rem; } - .md\:ml-\[200px\] { - margin-left: 200px; - } - - .md\:-ml-\[213px\] { - margin-left: -213px; - } - .md\:block { display: block; } @@ -3109,18 +3105,6 @@ input[type=file] { width: 70%; } - .md\:w-\[90\%\] { - width: 90%; - } - - .md\:w-\[200px\] { - width: 200px; - } - - .md\:w-\[150px\] { - width: 150px; - } - .md\:min-w-\[150px\] { min-width: 150px; } @@ -3237,10 +3221,6 @@ input[type=file] { border-bottom-width: 1px; } - .md\:border-l-2 { - border-left-width: 2px; - } - .md\:border-b-0 { border-bottom-width: 0px; } @@ -3350,10 +3330,6 @@ input[type=file] { padding-left: 2.75rem; } - .md\:text-center { - text-align: center; - } - .md\:text-right { text-align: right; } diff --git a/templates/news/create.html b/templates/news/create.html index 799368ee..1205dcb0 100644 --- a/templates/news/create.html +++ b/templates/news/create.html @@ -24,7 +24,7 @@

    {% translate "Create news" %}

    {% elif item.model_name == "Link" %} Link {% elif item.model_name == "News" %} - Video + News {% else %} {{ item.model_name }} {% endif %} diff --git a/templates/news/list.html b/templates/news/list.html index 81bd59be..ebb64664 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -24,7 +24,7 @@

    Latest Stories

    {% url 'news-news-list' as target_url %} - +
    @@ -62,11 +62,11 @@

    Latest Stories

    {% for entry in entry_list %} -
    -
    +
    + -
    + -
    +
    - +

    + {{ entry.title }} +

    + {% if entry.image %} + + {% endif %} {% if entry.content %}

    {{ entry.content|truncatechars:300 }}

    {% endif %} + + +
    + +
    + {% if entry.tag == "link" %} + {% url 'news-link-list' as target_url %} + + + + {% elif entry.tag == "news" %} + {% url 'news-news-list' as target_url %} + + + + {% elif entry.tag == "blogpost" %} + {% url 'news-blogpost-list' as target_url %} + + + + {% elif entry.tag == "poll" %} + {% url 'news-poll-list' as target_url %} + + + + {% elif entry.tag == "video" %} + {% url 'news-video-list' as target_url %} + + + + {% else %} + + {% endif %} +
    +
    + {% if entry.author.image %} + {{ entry.author.get_full_name }} + {% else %} + + + + {% endif %} +
    +
    +
    {% empty %} From 6b1defedcb492be3be6297333ac6c897706bd8d8 Mon Sep 17 00:00:00 2001 From: Greg Newman Date: Wed, 5 Jul 2023 10:15:37 -0400 Subject: [PATCH 14/19] :bug: fix image rounded corners Issue: #478 --- static/css/styles.css | 20 ++++---------------- templates/includes/_header.html | 2 +- templates/news/list.html | 4 ++-- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index e2e6ed1a..d2a63b7e 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1347,6 +1347,10 @@ input[type=file] { height: 1rem; } +.h-auto { + height: auto; +} + .h-5 { height: 1.25rem; } @@ -1363,10 +1367,6 @@ input[type=file] { height: 3rem; } -.h-auto { - height: auto; -} - .max-h-\[470px\] { max-height: 470px; } @@ -2559,10 +2559,6 @@ input[type=file] { transition-duration: 75ms; } -.duration-150 { - transition-duration: 150ms; -} - .ease-in { transition-timing-function: cubic-bezier(0.4, 0, 1, 1); } @@ -2571,10 +2567,6 @@ input[type=file] { transition-timing-function: cubic-bezier(0, 0, 0.2, 1); } -.ease-in-out { - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); -} - .file\:mr-5::file-selector-button { margin-right: 1.25rem; } @@ -2952,10 +2944,6 @@ input[type=file] { float: right; } - .md\:float-left { - float: left; - } - .md\:my-16 { margin-top: 4rem; margin-bottom: 4rem; diff --git a/templates/includes/_header.html b/templates/includes/_header.html index 3047c89b..8af6fd0b 100644 --- a/templates/includes/_header.html +++ b/templates/includes/_header.html @@ -123,7 +123,7 @@ Join {% else %} {% if user.image %} - user + user {% else %} {% endif %} diff --git a/templates/news/list.html b/templates/news/list.html index ebb64664..14325cd9 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -98,9 +98,9 @@

    Latest Stories