From d0b2828ec7eec4ee6f6b920ea77f21faafc93deb Mon Sep 17 00:00:00 2001 From: Albina Starykova Date: Mon, 10 Jul 2023 02:36:29 +0300 Subject: [PATCH] Update Wagtail logo to the latest version - Partial progress on #10404 --- CHANGELOG.txt | 1 + client/scss/components/_icons.scss | 9 ++++++ client/scss/layouts/_login.scss | 8 +---- docs/releases/5.1.md | 1 + .../wagtailadmin/images/wagtail-logo.svg | 32 ------------------- wagtail/admin/templates/wagtailadmin/404.html | 2 +- .../admin/templates/wagtailadmin/login.html | 2 +- .../admin/templates/wagtailadmin/logo.html | 22 +++++++++++++ .../templates/wagtailadmin/userbar/base.html | 7 +--- .../templates/wagtailstyleguide/base.html | 8 +++-- 10 files changed, 42 insertions(+), 50 deletions(-) delete mode 100644 wagtail/admin/static_src/wagtailadmin/images/wagtail-logo.svg create mode 100644 wagtail/admin/templates/wagtailadmin/logo.html diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 80eb2796d6c0..f2ae12b09c14 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -27,6 +27,7 @@ Changelog * Purge revisions of non-page models in `purge_revisions` command (Sage Abdullah) * Add support for AVIF images (Aman Pandey) * Change the default WebP quality to 80 to match AVIF (Aman Pandey) + * Adopt optimised Wagtail logo in the admin interface (Albina Starykova) * Fix: Prevent choosers from failing when initial value is an unrecognised ID, e.g. when moving a page from a location where `parent_page_types` would disallow it (Dan Braghis) * Fix: Move comment notifications toggle to the comments side panel (Sage Abdullah) * Fix: Remove comment button on InlinePanel fields (Sage Abdullah) diff --git a/client/scss/components/_icons.scss b/client/scss/components/_icons.scss index f6fd860454c5..ffa6be9deba4 100644 --- a/client/scss/components/_icons.scss +++ b/client/scss/components/_icons.scss @@ -160,3 +160,12 @@ use[href='#icon-spinner'] { height: 1.5em; color: theme('colors.critical.200'); } + +.icon-wagtail { + width: 100%; + height: auto; +} + +.icon-wagtail__wordmark { + fill: theme('colors.text-context'); +} diff --git a/client/scss/layouts/_login.scss b/client/scss/layouts/_login.scss index ce0088814ab0..8bd9ebd13aea 100644 --- a/client/scss/layouts/_login.scss +++ b/client/scss/layouts/_login.scss @@ -120,12 +120,6 @@ .login-logo { margin: theme('spacing.8') auto 0; - width: theme('spacing.8'); - } - - @media (forced-colors: active) and (prefers-color-scheme: dark) { - .login-logo-img { - filter: invert(100%); - } + width: theme('spacing.32'); } } diff --git a/docs/releases/5.1.md b/docs/releases/5.1.md index 6dc4ea3f48a1..834fe309c697 100644 --- a/docs/releases/5.1.md +++ b/docs/releases/5.1.md @@ -74,6 +74,7 @@ This feature was developed by Aman Pandey as part of the Google Summer of Code p * Increase the contrast between the rich text / StreamField block picker and the page in dark mode (Albina Starykova) * Purge revisions of non-page models in `purge_revisions` command (Sage Abdullah) * Change the default WebP quality to 80 to match AVIF (Aman Pandey) + * Adopt optimised Wagtail logo in the admin interface (Albina Starykova) ### Bug fixes diff --git a/wagtail/admin/static_src/wagtailadmin/images/wagtail-logo.svg b/wagtail/admin/static_src/wagtailadmin/images/wagtail-logo.svg deleted file mode 100644 index 7fda0655c3ac..000000000000 --- a/wagtail/admin/static_src/wagtailadmin/images/wagtail-logo.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - diff --git a/wagtail/admin/templates/wagtailadmin/404.html b/wagtail/admin/templates/wagtailadmin/404.html index ed326fab8910..248682266561 100644 --- a/wagtail/admin/templates/wagtailadmin/404.html +++ b/wagtail/admin/templates/wagtailadmin/404.html @@ -7,7 +7,7 @@
{% block branding_logo %} {% endblock %} diff --git a/wagtail/admin/templates/wagtailadmin/login.html b/wagtail/admin/templates/wagtailadmin/login.html index 13c7e32ff525..16e5a4433ff1 100644 --- a/wagtail/admin/templates/wagtailadmin/login.html +++ b/wagtail/admin/templates/wagtailadmin/login.html @@ -68,7 +68,7 @@

{% block branding_login %}{% trans "Sign in to Wagtail" %}{% endblock %}

- + {% include "wagtailadmin/logo.html" with wordmark="True" %}
{% endblock %} diff --git a/wagtail/admin/templates/wagtailadmin/logo.html b/wagtail/admin/templates/wagtailadmin/logo.html new file mode 100644 index 000000000000..f8ddb69038d1 --- /dev/null +++ b/wagtail/admin/templates/wagtailadmin/logo.html @@ -0,0 +1,22 @@ +{% load wagtailadmin_tags %} +{% spaceless %} + {% if wordmark %} + + + + + + + + + + {% else %} + + {% endif %} +{% endspaceless %} diff --git a/wagtail/admin/templates/wagtailadmin/userbar/base.html b/wagtail/admin/templates/wagtailadmin/userbar/base.html index d33fcaf9962c..55b1a6b54e6e 100644 --- a/wagtail/admin/templates/wagtailadmin/userbar/base.html +++ b/wagtail/admin/templates/wagtailadmin/userbar/base.html @@ -22,12 +22,7 @@