Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/django/djangoproject.com in…
Browse files Browse the repository at this point in the history
…to fix/fixes-#1844
  • Loading branch information
SrisailamKakurala committed Dec 28, 2024
2 parents 4ff8933 + d068670 commit c742c36
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
7 changes: 7 additions & 0 deletions djangoproject/static/js/djangoproject.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
});
4 changes: 0 additions & 4 deletions djangoproject/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
25 changes: 0 additions & 25 deletions djangoproject/static/js/mod/version-switcher.js

This file was deleted.

1 change: 0 additions & 1 deletion djangoproject/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -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' %}"),
Expand Down
2 changes: 1 addition & 1 deletion requirements/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c742c36

Please sign in to comment.