From 4b17d714fb0cb7d1fd199a2ca123b6d18fe377e7 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sun, 30 Jan 2022 14:02:19 +0100 Subject: Fix resource redirects for deploy previews. This could probably be improved by making it less hardcoded, but since there's a bunch of special cases, and since it only affects deploy previews, I'm choosing to solve this with a simple solution. I don't think realistically that we're gonna be adding a ton of resource types down the line anyway. --- pydis_site/apps/content/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/apps/content') diff --git a/pydis_site/apps/content/urls.py b/pydis_site/apps/content/urls.py index fe7c2852..f8496095 100644 --- a/pydis_site/apps/content/urls.py +++ b/pydis_site/apps/content/urls.py @@ -30,7 +30,7 @@ def __get_all_files(root: Path, folder: typing.Optional[Path] = None) -> list[st def get_all_pages() -> typing.Iterator[dict[str, str]]: - """Yield a dict of all pag categories.""" + """Yield a dict of all page categories.""" for location in __get_all_files(Path("pydis_site", "apps", "content", "resources")): yield {"location": location} -- cgit v1.2.3 From e144d4d1b4d1ef2ec2f9f8b771b3606b581ace34 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Tue, 1 Feb 2022 22:43:15 +0100 Subject: Complete refactor of collapsibles. This is now a completely self-contained feature, which can be used in the same way on every page. I've moved all the collapsible-related logics out of the resources.js file and into collapsibles.js, and added documentation and other quality-of-life features that will apply to other pages, as well. Changes: - The icon will now always change when the collapsible opens or closes. - By adding the "collapsed" class, you can tell the collapsible to be collapsed by default. --- .../guides/pydis-guides/contributing/bot.md | 20 ++++---- pydis_site/static/css/collapsibles.css | 4 -- pydis_site/static/js/collapsibles.js | 60 ++++++++++++++++++++-- pydis_site/static/js/resources/resources.js | 15 +----- 4 files changed, 67 insertions(+), 32 deletions(-) (limited to 'pydis_site/apps/content') diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md index ed9e3db3..2aa10aa3 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md @@ -14,10 +14,10 @@ First things first, to run the bot's code and make changes to it, you need a loc -
+