diff options
author | 2024-01-16 20:21:16 +0800 | |
---|---|---|
committer | 2024-01-16 20:21:16 +0800 | |
commit | a89848b80696e9e8d654b78e26954b2bb2ae6b84 (patch) | |
tree | 102e16a54ed23f3c71e7ca6605e2c881c2a19f9b | |
parent | Merge branch 'gdwr-dark-theme' of github.com:hedyhli/pydis-site into gdwr-dar... (diff) |
Dark: Fix the filter box on resources page
24 files changed, 52 insertions, 47 deletions
diff --git a/pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml b/pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml index 63f63193..f3b862d2 100644 --- a/pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml +++ b/pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml @@ -8,7 +8,7 @@ title_url: https://automatetheboringstuff.com/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/22514127-automate-the-boring-stuff-with-python - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/awesome_programming_discord.yaml b/pydis_site/apps/resources/resources/awesome_programming_discord.yaml index 0ef7aefc..7079062b 100644 --- a/pydis_site/apps/resources/resources/awesome_programming_discord.yaml +++ b/pydis_site/apps/resources/resources/awesome_programming_discord.yaml @@ -3,7 +3,7 @@ description: We have listed our favourite communities, An awesome list collating the best programming related Discord servers is available on GitHub and has all sorts of topics from blockchain to virtual reality! title_icon: branding/github -title_icon_color: black +title_icon_color: dark title_url: https://github.com/mhxion/awesome-programming-discord name: awesome-programming-discord tags: diff --git a/pydis_site/apps/resources/resources/byte_of_python.yaml b/pydis_site/apps/resources/resources/byte_of_python.yaml index c2f6ab84..e4d44369 100644 --- a/pydis_site/apps/resources/resources/byte_of_python.yaml +++ b/pydis_site/apps/resources/resources/byte_of_python.yaml @@ -6,10 +6,10 @@ title_url: https://python.swaroopch.com/ urls: - icon: regular/book url: https://www.lulu.com/shop/swaroop-c-h/a-byte-of-python/paperback/product-21142968.html - color: black + color: dark - icon: branding/goodreads url: https://www.goodreads.com/book/show/6762544-a-byte-of-python - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/code_combat.yaml b/pydis_site/apps/resources/resources/code_combat.yaml index 84597c4d..0e308ddc 100644 --- a/pydis_site/apps/resources/resources/code_combat.yaml +++ b/pydis_site/apps/resources/resources/code_combat.yaml @@ -5,7 +5,7 @@ title_url: https://codecombat.com/ urls: - icon: branding/github url: https://github.com/codecombat/codecombat - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/data_science_from_scratch.yaml b/pydis_site/apps/resources/resources/data_science_from_scratch.yaml index 86955fdb..755e5867 100644 --- a/pydis_site/apps/resources/resources/data_science_from_scratch.yaml +++ b/pydis_site/apps/resources/resources/data_science_from_scratch.yaml @@ -7,10 +7,10 @@ title_url: https://www.oreilly.com/library/view/data-science-from/9781492041122/ urls: - icon: branding/goodreads url: https://www.goodreads.com/en/book/show/52059715-data-science-from-scratch - color: black + color: dark - icon: branding/github url: https://github.com/joelgrus/data-science-from-scratch - color: black + color: dark tags: topics: - data science diff --git a/pydis_site/apps/resources/resources/effective_python.yaml b/pydis_site/apps/resources/resources/effective_python.yaml index b82fa0c3..2293ee84 100644 --- a/pydis_site/apps/resources/resources/effective_python.yaml +++ b/pydis_site/apps/resources/resources/effective_python.yaml @@ -5,10 +5,10 @@ title_url: https://effectivepython.com/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/48566725-effective-python - color: black + color: dark - icon: branding/github url: https://github.com/bslatkin/effectivepython - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/exercism.yaml b/pydis_site/apps/resources/resources/exercism.yaml index c623db2d..fba5bce4 100644 --- a/pydis_site/apps/resources/resources/exercism.yaml +++ b/pydis_site/apps/resources/resources/exercism.yaml @@ -7,7 +7,7 @@ title_url: https://exercism.org/ urls: - icon: branding/github url: https://github.com/exercism/python - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/flask_web_development.yaml b/pydis_site/apps/resources/resources/flask_web_development.yaml index 6905b2b4..9263efdd 100644 --- a/pydis_site/apps/resources/resources/flask_web_development.yaml +++ b/pydis_site/apps/resources/resources/flask_web_development.yaml @@ -5,10 +5,10 @@ title_url: http://shop.oreilly.com/product/0636920031116.do urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/18774655-flask-web-development - color: black + color: dark - icon: branding/github url: https://github.com/miguelgrinberg/flasky - color: black + color: dark tags: topics: - web development diff --git a/pydis_site/apps/resources/resources/fluent_python.yaml b/pydis_site/apps/resources/resources/fluent_python.yaml index c22fd388..0d9466e1 100644 --- a/pydis_site/apps/resources/resources/fluent_python.yaml +++ b/pydis_site/apps/resources/resources/fluent_python.yaml @@ -5,10 +5,10 @@ title_url: https://www.oreilly.com/library/view/fluent-python/9781491946237/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/22800567-fluent-python - color: black + color: dark - icon: branding/github url: https://github.com/fluentpython - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml b/pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml index e48e5717..a96386d2 100644 --- a/pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml +++ b/pydis_site/apps/resources/resources/hitchhikers_guide_to_python.yaml @@ -5,7 +5,7 @@ title_url: https://python-guide.org/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/28321007-the-hitchhiker-s-guide-to-python - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/kivy.yaml b/pydis_site/apps/resources/resources/kivy.yaml index f49c33fb..d0529c48 100644 --- a/pydis_site/apps/resources/resources/kivy.yaml +++ b/pydis_site/apps/resources/resources/kivy.yaml @@ -12,7 +12,7 @@ urls: color: blurple - icon: branding/github url: https://github.com/kivy - color: black + color: dark tags: topics: - user interface diff --git a/pydis_site/apps/resources/resources/mission_python.yaml b/pydis_site/apps/resources/resources/mission_python.yaml index 391a2983..ca686952 100644 --- a/pydis_site/apps/resources/resources/mission_python.yaml +++ b/pydis_site/apps/resources/resources/mission_python.yaml @@ -7,7 +7,7 @@ title_url: https://www.sean.co.uk/books/mission-python/index.shtm urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/35545850-mission-python - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/neural_networks_from_scratch_in_python.yaml b/pydis_site/apps/resources/resources/neural_networks_from_scratch_in_python.yaml index 26e88cb9..5e7ee63f 100644 --- a/pydis_site/apps/resources/resources/neural_networks_from_scratch_in_python.yaml +++ b/pydis_site/apps/resources/resources/neural_networks_from_scratch_in_python.yaml @@ -7,7 +7,7 @@ title_url: https://nnfs.io/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/55927899-neural-networks-from-scratch-in-python - color: black + color: dark tags: topics: - data science diff --git a/pydis_site/apps/resources/resources/python_cookbook.yaml b/pydis_site/apps/resources/resources/python_cookbook.yaml index bc05d743..751edf09 100644 --- a/pydis_site/apps/resources/resources/python_cookbook.yaml +++ b/pydis_site/apps/resources/resources/python_cookbook.yaml @@ -5,10 +5,10 @@ title_url: http://shop.oreilly.com/product/0636920027072.do urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/17152735-python-cookbook - color: black + color: dark - icon: branding/github url: https://github.com/dabeaz/python-cookbook - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/python_crash_course.yaml b/pydis_site/apps/resources/resources/python_crash_course.yaml index d916075e..e8356491 100644 --- a/pydis_site/apps/resources/resources/python_crash_course.yaml +++ b/pydis_site/apps/resources/resources/python_crash_course.yaml @@ -11,10 +11,10 @@ title_url: https://nostarch.com/pythoncrashcourse2e urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/23241059-python-crash-course - color: black + color: dark - icon: branding/github url: https://ehmatthes.github.io/pcc/ - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/python_graph_gallery.yaml b/pydis_site/apps/resources/resources/python_graph_gallery.yaml index b8aaeb4d..59aebc12 100644 --- a/pydis_site/apps/resources/resources/python_graph_gallery.yaml +++ b/pydis_site/apps/resources/resources/python_graph_gallery.yaml @@ -4,7 +4,7 @@ title_url: https://www.python-graph-gallery.com/ urls: - icon: branding/github url: https://github.com/holtzy/The-Python-Graph-Gallery - color: black + color: dark tags: topics: - data science diff --git a/pydis_site/apps/resources/resources/python_tricks.yaml b/pydis_site/apps/resources/resources/python_tricks.yaml index aa1b2fcd..17c71107 100644 --- a/pydis_site/apps/resources/resources/python_tricks.yaml +++ b/pydis_site/apps/resources/resources/python_tricks.yaml @@ -6,7 +6,7 @@ title_url: https://realpython.com/products/python-tricks-book/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/36990732-python-tricks - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/simple_guide_to_git.yaml b/pydis_site/apps/resources/resources/simple_guide_to_git.yaml index 3bb46e6d..bf461b0a 100644 --- a/pydis_site/apps/resources/resources/simple_guide_to_git.yaml +++ b/pydis_site/apps/resources/resources/simple_guide_to_git.yaml @@ -2,7 +2,7 @@ description: A simple, no-nonsense guide to the basics of using Git. name: A Simple Guide to Git title_url: https://rogerdudler.github.io/git-guide/ title_icon: branding/github -title_icon_color: black +title_icon_color: dark tags: topics: - tooling diff --git a/pydis_site/apps/resources/resources/software_design_by_example.yaml b/pydis_site/apps/resources/resources/software_design_by_example.yaml index 8cdfd625..82d1c646 100644 --- a/pydis_site/apps/resources/resources/software_design_by_example.yaml +++ b/pydis_site/apps/resources/resources/software_design_by_example.yaml @@ -9,10 +9,10 @@ title_url: https://third-bit.com/sdxpy/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/199430059-software-design-by-example - color: black + color: dark - icon: branding/github url: https://github.com/gvwilson/sdxpy - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/think_python.yaml b/pydis_site/apps/resources/resources/think_python.yaml index 7099afd8..f8b17761 100644 --- a/pydis_site/apps/resources/resources/think_python.yaml +++ b/pydis_site/apps/resources/resources/think_python.yaml @@ -8,10 +8,10 @@ title_url: https://greenteapress.com/wp/think-python-2e/ urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/14514306-think-python - color: black + color: dark - icon: branding/github url: https://github.com/AllenDowney/ThinkPython2 - color: black + color: dark tags: topics: - general diff --git a/pydis_site/apps/resources/resources/two_scoops_of_django.yaml b/pydis_site/apps/resources/resources/two_scoops_of_django.yaml index f372d35d..1ddb70e5 100644 --- a/pydis_site/apps/resources/resources/two_scoops_of_django.yaml +++ b/pydis_site/apps/resources/resources/two_scoops_of_django.yaml @@ -5,10 +5,10 @@ title_url: https://www.feldroy.com/books/two-scoops-of-django-3-x urls: - icon: branding/goodreads url: https://www.goodreads.com/book/show/55822151-two-scoops-of-django-3-x - color: black + color: dark - icon: branding/github url: https://github.com/twoscoops/two-scoops-of-django-2.0-code-examples - color: black + color: dark tags: topics: - web development diff --git a/pydis_site/settings.py b/pydis_site/settings.py index 28161e64..3c4bbdb8 100644 --- a/pydis_site/settings.py +++ b/pydis_site/settings.py @@ -320,13 +320,13 @@ BULMA_SETTINGS = { "warning": "#4B4636", "warning-invert": "#FFFFFF", "primary-dark": "#EFF1FB", # Bulma's primary-light - "primary-light": "#3C497A", + "primary-light": "#2B3660", "success-dark": "#EFFAF5", # Bulma's success-light - "success-light": "#205D42", + "success-light": "#214133", "danger-dark": "#FEECF0", # Bulma's danger-light - "danger-light": "#642431", + "danger-light": "#4C1822", "info-dark": "#EFF5FB", # Bulma's info-light - "info-light": "#295477", + "info-light": "#254056", "white": "#2C2F33", "white-bis": "#23272A ", @@ -353,6 +353,7 @@ BULMA_SETTINGS = { # Same as bulma, adjusted for dark mode "shadow": "0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1), 0 0px 0 1px rgba(10, 10, 10, 0.02)", "border": "#4E4F51", + "border-light": "#313233", # Use the same sizes "dimensions": "16 24 32 48 64 96 128 256 512", diff --git a/pydis_site/static/css/resources/resources.css b/pydis_site/static/css/resources/resources.css index ee5954da..582d96e4 100644 --- a/pydis_site/static/css/resources/resources.css +++ b/pydis_site/static/css/resources/resources.css @@ -199,22 +199,26 @@ button.delete { } /* Colors for delete button x's */ -button.delete.is-primary::before, -button.delete.is-primary::after { +[data-theme="light"] button.delete.is-primary::before, +[data-theme="light"] button.delete.is-primary::after { background-color: #2a45a2; } -button.delete.is-success::before, -button.delete.is-success::after { +[data-theme="light"] button.delete.is-success::before, +[data-theme="light"] button.delete.is-success::after { background-color: #2c9659; } -button.delete.is-danger::before, -button.delete.is-danger::after { +[data-theme="light"] button.delete.is-danger::before, +[data-theme="light"] button.delete.is-danger::after { background-color: #c32841; } -button.delete.is-info::before, -button.delete.is-info::after { +[data-theme="light"] button.delete.is-info::before, +[data-theme="light"] button.delete.is-info::after { background-color: #237fbd; } +[data-theme="dark"] button.delete::before, +[data-theme="dark"] button.delete::after { + background-color: #FFFFFF; +} /* Give outlines to active tags */ span.filter-box-tag, diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index 410bdb4c..8f3d6a33 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -59,7 +59,7 @@ {% for filter_item in filter_data.filters %} {% if filter_name == "Difficulty" %} <span - class="filter-box-tag tag has-background-info-light has-text-info-dark ml-2 mt-2 has-background-white-ter" + class="filter-box-tag tag has-background-info-light has-text-info-dark ml-2 mt-2" data-filter-name="{{ filter_name|to_kebabcase }}" data-filter-item="{{ filter_item|to_kebabcase }}" > @@ -70,7 +70,7 @@ {% endif %} {% if filter_name == "Type" %} <span - class="filter-box-tag tag has-background-success-light has-text-success-dark ml-2 mt-2 has-background-white-ter" + class="filter-box-tag tag has-background-success-light has-text-success-dark ml-2 mt-2" data-filter-name="{{ filter_name|to_kebabcase }}" data-filter-item="{{ filter_item|to_kebabcase }}" > @@ -81,7 +81,7 @@ {% endif %} {% if filter_name == "Payment tiers" %} <span - class="filter-box-tag tag has-background-danger-light has-text-danger-dark ml-2 mt-2 has-background-white-ter" + class="filter-box-tag tag has-background-danger-light has-text-danger-dark ml-2 mt-2" data-filter-name="{{ filter_name|to_kebabcase }}" data-filter-item="{{ filter_item|to_kebabcase }}" > @@ -92,7 +92,7 @@ {% endif %} {% if filter_name == "Topics" %} <span - class="filter-box-tag tag is-primary is-light ml-2 mt-2 has-background-white-ter" + class="filter-box-tag tag is-primary is-light ml-2 mt-2" data-filter-name="{{ filter_name|to_kebabcase }}" data-filter-item="{{ filter_item|to_kebabcase }}" > |