From 7c6f8b7cdc2420d33aea8a60d0c1e144621fbf26 Mon Sep 17 00:00:00 2001 From: srisailamkakurala Date: Mon, 23 Dec 2024 10:47:19 +0530 Subject: [PATCH 1/5] fixes-#1844 --- djangoproject/scss/_style.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/djangoproject/scss/_style.scss b/djangoproject/scss/_style.scss index 03dc8017c..d07d6008e 100644 --- a/djangoproject/scss/_style.scss +++ b/djangoproject/scss/_style.scss @@ -483,6 +483,10 @@ blockquote { } + .meta::selection { + color: var(--white-color); + } + .logo { @include font-size(40); @include sans-serif; From 48b2f81e9f523ad7286c9811f038fe5addde204d Mon Sep 17 00:00:00 2001 From: Adam Zapletal Date: Sat, 28 Dec 2024 07:13:14 -0600 Subject: [PATCH 2/5] Refactored `version-switcher.js` - Simplified code - Stopped using jQuery - Moved refactored code to `djangoproject.js` This patch should bring no user-facing changes. Refs #1827 --- djangoproject/static/js/djangoproject.js | 7 ++++++ djangoproject/static/js/main.js | 4 --- .../static/js/mod/version-switcher.js | 25 ------------------- djangoproject/templates/base.html | 1 - 4 files changed, 7 insertions(+), 30 deletions(-) delete mode 100644 djangoproject/static/js/mod/version-switcher.js diff --git a/djangoproject/static/js/djangoproject.js b/djangoproject/static/js/djangoproject.js index 474231d6d..f6e9229eb 100644 --- a/djangoproject/static/js/djangoproject.js +++ b/djangoproject/static/js/djangoproject.js @@ -4,3 +4,10 @@ document.querySelectorAll('.doc-switcher li.current').forEach(function (el) { this.parentElement.classList.toggle('open'); }); }); + +// Propagate the current fragment identifier when switching docs versions +document.querySelectorAll('#doc-versions a').forEach(function (el) { + el.addEventListener('click', function () { + this.href = this.href.split('#')[0] + window.location.hash; + }); +}); diff --git a/djangoproject/static/js/main.js b/djangoproject/static/js/main.js index 8d9dd2797..a51dcd812 100644 --- a/djangoproject/static/js/main.js +++ b/djangoproject/static/js/main.js @@ -19,10 +19,6 @@ define(function () { mods.push('mod/list-collapsing'); } - if (hasClass('version-switcher')) { - mods.push('mod/version-switcher'); - } - if (hasClass('doc-floating-warning')) { mods.push('mod/floating-warning'); } diff --git a/djangoproject/static/js/mod/version-switcher.js b/djangoproject/static/js/mod/version-switcher.js deleted file mode 100644 index b494c9597..000000000 --- a/djangoproject/static/js/mod/version-switcher.js +++ /dev/null @@ -1,25 +0,0 @@ -define([ - 'jquery', //requires jquery -], function ($) { - var VersionSwitcher = function (switcher) { - this.switcher = $(switcher); // the version switcher - this.init(); - }; - - VersionSwitcher.prototype = { - init: function () { - var self = this; - $(document).ready(function () { - // Propagate the fragment identifier to the links in the version switcher - self.switcher.find('a').on('click', function () { - var hrefWithoutFragment = this.href.split('#')[0]; - this.href = hrefWithoutFragment + window.location.hash; - // do nothing and let the event bubble up - }); - }); - }, - }; - - // Export a single instance of our module: - return new VersionSwitcher('#doc-versions'); -}); diff --git a/djangoproject/templates/base.html b/djangoproject/templates/base.html index 896483b61..57e76365f 100644 --- a/djangoproject/templates/base.html +++ b/djangoproject/templates/base.html @@ -154,7 +154,6 @@ "mod/list-collapsing": extless("{% static 'js/mod/list-collapsing.js' %}"), "mod/list-feature": extless("{% static 'js/mod/list-feature.js' %}"), "mod/mobile-menu": extless("{% static 'js/mod/mobile-menu.js' %}"), - "mod/version-switcher": extless("{% static 'js/mod/version-switcher.js' %}"), "mod/search-key": extless("{% static 'js/mod/search-key.js' %}"), "mod/stripe-change-card": extless("{% static 'js/mod/stripe-change-card.js' %}"), "mod/switch-dark-mode": extless("{% static 'js/mod/switch-dark-mode.js' %}"), From d546ebbfa18878e3da2784c06dd18bcc874d2d04 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 11:22:18 +0000 Subject: [PATCH 3/5] Bump jinja2 from 3.1.4 to 3.1.5 in /requirements Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.4 to 3.1.5. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/jinja/compare/3.1.4...3.1.5) --- updated-dependencies: - dependency-name: jinja2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements/common.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/common.txt b/requirements/common.txt index 93793d5b5..03e2fc5ca 100644 --- a/requirements/common.txt +++ b/requirements/common.txt @@ -10,7 +10,7 @@ django-registration-redux==2.13 Django==5.0.9 docutils==0.21.2 feedparser==6.0.11 -Jinja2==3.1.4 +Jinja2==3.1.5 libsass==0.23.0 Markdown==3.7 Pillow==11.0.0 From d0686703aeccfd04a1f4bd7dbf82ebe32401d109 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 20:33:39 +0000 Subject: [PATCH 4/5] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.19.0 → v3.19.1](https://github.com/asottile/pyupgrade/compare/v3.19.0...v3.19.1) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ab794f30d..483be96a4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,7 +28,7 @@ repos: - id: mixed-line-ending - id: trailing-whitespace - repo: https://github.com/asottile/pyupgrade - rev: "v3.19.0" + rev: "v3.19.1" hooks: - id: pyupgrade args: [--py312] From 4ff89337fb779598a4715580d539cafdffbc8630 Mon Sep 17 00:00:00 2001 From: srisailamkakurala Date: Sat, 28 Dec 2024 19:37:02 +0530 Subject: [PATCH 5/5] pruned #1842 --- djangoproject/scss/_style.scss | 10 ++-------- djangoproject/templates/base.html | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/djangoproject/scss/_style.scss b/djangoproject/scss/_style.scss index d07d6008e..014b09bb0 100644 --- a/djangoproject/scss/_style.scss +++ b/djangoproject/scss/_style.scss @@ -3522,13 +3522,12 @@ ul.corporate-members li { gap: 6rem; flex-wrap: wrap; align-content: center; - justify-content: center; } .community-cta-a { display: inline-block; - width: 400px; - height: 400px; + width: 300px; + height: 300px; } .community-cta { @@ -3542,11 +3541,6 @@ ul.corporate-members li { align-items: center; background: var(--community-img-bg); border-radius: 20px; - transition: background-color 0.1s ease; - } - - .community-cta:hover { - background-color: var(--secondary); } .community-cta svg, h3 { diff --git a/djangoproject/templates/base.html b/djangoproject/templates/base.html index 7fb26720f..896483b61 100644 --- a/djangoproject/templates/base.html +++ b/djangoproject/templates/base.html @@ -123,7 +123,7 @@ {% endblock %} - +