diff --git a/ak/views.py b/ak/views.py index 10d73664c..f22a36ffb 100644 --- a/ak/views.py +++ b/ak/views.py @@ -9,6 +9,7 @@ from core.calendar import extract_calendar_events, events_by_month, get_calendar from core.mixins import V3Mixin +from core.templatetags.custom_static import large_static from libraries.constants import LATEST_RELEASE_URL_PATH_STR from libraries.mixins import ContributorMixin from news.models import Entry @@ -128,7 +129,7 @@ def get_v3_context_data(self, **kwargs): "primary_button_label": "View the Release Calendar", "secondary_button_url": "www.example.com", "secondary_button_label": "Secondary Button", - "image": f"{settings.STATIC_URL}/img/v3/demo_page/Calendar.png", + "image": large_static("img/v3/demo-page/calendar.png"), } ctx["info_card"] = { "title": "How we got here", diff --git a/core/mock_data.py b/core/mock_data.py index 3e243ffc2..50e963862 100644 --- a/core/mock_data.py +++ b/core/mock_data.py @@ -4,6 +4,7 @@ from django.utils.text import slugify from core.constants import BadgeToken, SLACK_MEMBER_COUNT +from core.templatetags.custom_static import large_static from libraries.utils import commit_data_to_stats_bars @@ -233,7 +234,7 @@ class SharedResources: "author": { "name": "Prof. Sven G. Bilén, Ph.D.", "profile_url": "#", - "avatar_url": "/static/img/v3/demo_page/Avatar.png", + "avatar_url": large_static("img/v3/demo_page/avatar.png"), "role": "The Pennsylvania State University", "badge": BadgeToken.TIER_3, }, @@ -360,8 +361,8 @@ class SharedResources: "author": { "name": "Ipsum Loremson", "profile_url": "#", - "avatar_url": "/static/img/v3/demo_page/Avatar.png", - "role": "Lorem Ipsum Industries", + "avatar_url": large_static("img/v3/demo-page/avatar.png"), + "role": "Maintainer", "badge": BadgeToken.TIER_3, }, "content": """ @@ -385,20 +386,20 @@ class SharedResources: { "name": "Vinnie Falco", "role": "Author", - "avatar_url": f"{settings.STATIC_URL}img/v3/demo_page/Avatar.png", + "avatar_url": large_static("img/v3/demo-page/avatar.png"), "badge": BadgeToken.TIER_3, "bio": "Big C++ fan. Not quite kidney-donation level, but close.", }, { "name": "Alex Wells", "role": "Contributor", - "avatar_url": f"{settings.STATIC_URL}img/v3/demo_page/Avatar.png", + "avatar_url": large_static("img/v3/demo-page/avatar.png"), "bio": "C++ enthusiast who has worked at Intel and Microsoft.", }, { "name": "Dave Abrahams", "role": "Maintainer", - "avatar_url": f"{settings.STATIC_URL}img/v3/demo_page/Avatar.png", + "avatar_url": large_static("img/v3/demo-page/avatar.png"), "badge": BadgeToken.TIER_3, "bio": "Contributor to Boost since 2009.", }, @@ -415,19 +416,13 @@ class SharedResources: "button_label": "See license details", } - hero_legacy_image_url_light = f"{settings.STATIC_URL}img/v3/home-page/heros.png" + hero_legacy_image_url_light = large_static("img/v3/home-page/heros.png") - hero_legacy_image_url_dark = ( - f"{settings.STATIC_URL}img/v3/home-page/heros_light.png" - ) + hero_legacy_image_url_dark = large_static("img/v3/home-page/heros_light.png") - hero_image_url = f"{settings.STATIC_URL}img/v3/home-page/home-page-foreground.png" - hero_image_url_light = ( - f"{settings.STATIC_URL}img/v3/home-page/home-page-foreground.png" - ) - hero_image_url_dark = ( - f"{settings.STATIC_URL}img/v3/home-page/home-page-foreground.png" - ) + hero_image_url = large_static("img/v3/home-page/home-page-foreground.png") + hero_image_url_light = large_static("img/v3/home-page/home-page-foreground.png") + hero_image_url_dark = large_static("img/v3/home-page/home-page-foreground.png") library_about_code = ( "int main()\n" diff --git a/core/views.py b/core/views.py index fda19dc09..ef05864a3 100644 --- a/core/views.py +++ b/core/views.py @@ -30,6 +30,7 @@ from django.views.decorators.cache import never_cache from django.views.generic import TemplateView +from core.templatetags.custom_static import large_static from config.settings import ENABLE_DB_CACHE from libraries.constants import LATEST_RELEASE_URL_PATH_STR from libraries.mixins import VersionAlertMixin @@ -160,7 +161,9 @@ def get_v3_context_data(self, **kwargs): "author": { "name": "Character Name", "role": "Contributor", - "avatar_url": "/static/img/v3/community-page/avatar-beaver-character.png", + "avatar_url": large_static( + "img/v3/community-page/avatar-beaver-character.png" + ), }, }, { @@ -171,7 +174,9 @@ def get_v3_context_data(self, **kwargs): "author": { "name": "Character Name", "role": "Author", - "avatar_url": "/static/img/v3/community-page/avatar-mouse-character.png", + "avatar_url": large_static( + "img/v3/community-page/avatar-mouse-character.png" + ), }, }, { @@ -182,7 +187,9 @@ def get_v3_context_data(self, **kwargs): "author": { "name": "Character Name", "role": "Maintainer", - "avatar_url": "/static/img/v3/community-page/avatar-cheetah-character.png", + "avatar_url": large_static( + "img/v3/community-page/avatar-cheetah-character.png" + ), }, }, { @@ -193,7 +200,9 @@ def get_v3_context_data(self, **kwargs): "author": { "name": "Character Name", "role": "Contributor", - "avatar_url": "/static/img/v3/community-page/avatar-fish-character.png", + "avatar_url": large_static( + "img/v3/community-page/avatar-fish-character.png" + ), }, }, ] @@ -323,9 +332,8 @@ def get_v3_context_data(self, **kwargs): "
  • Recent activity feed
  • " "" ) - ctx["create_account_card_preview_url"] = ( - f"{settings.STATIC_URL}img/v3/community-page/" - "community-create-account-preview.png" + ctx["create_account_card_preview_url"] = large_static( + "img/v3/community-page/community-create-account-preview.png" ) now = timezone.now() ctx["recent_threads_url"] = ( @@ -509,8 +517,10 @@ def get_v3_context_data(self, **kwargs): ], "url": "https://www.example.com", "label": "Learn more about Boost", - "image_src": f"{ settings.STATIC_URL }/img/v3/examples/Learn_Card_Image.png", - "mobile_image_src": f"{ settings.STATIC_URL }/img/v3/examples/Cheetah_Mobile.png", + "image_src": large_static("/img/v3/learn-page/learn-cheetah.png"), + "mobile_image_src": large_static( + "/img/v3/learn-page/cheetah-mobile.png" + ), }, { "title": "I want to learn:", @@ -525,8 +535,10 @@ def get_v3_context_data(self, **kwargs): ], "url": "https://www.example.com", "label": "Learn more about Boost", - "image_src": f"{ settings.STATIC_URL}img/v3/examples/Learn_Octopus.png", - "mobile_image_src": f"{ settings.STATIC_URL }/img/v3/examples/Octopus_Mobile.png", + "image_src": large_static("img/v3/learn-page/learn-octopus.png"), + "mobile_image_src": large_static( + "/img/v3/learn-page/octopus-mobile.png" + ), }, ] @@ -602,7 +614,7 @@ def get_v3_context_data(self, **kwargs): "primary_button_label": "View the Release Calendar", "secondary_button_url": "www.example.com", "secondary_button_label": "Secondary Button", - "image": f"{ settings.STATIC_URL }/img/v3/demo_page/Calendar.png", + "image": large_static("/img/v3/demo-page/calendar.png"), } ctx["info_card"] = { "title": "How we got here", @@ -628,7 +640,7 @@ def get_v3_context_data(self, **kwargs): "name": "Richard Thomson", "role": "Contributor", "show_badge": True, - "avatar_url": "/static/img/v3/demo_page/Avatar.png", + "avatar_url": large_static("img/v3/demo-page/avatar.png"), }, } ], @@ -650,7 +662,7 @@ def get_v3_context_data(self, **kwargs): "name": "Richard Thomson", "role": "Contributor", "show_badge": True, - "avatar_url": "/static/img/v3/demo_page/Avatar.png", + "avatar_url": large_static("img/v3/demo-page/avatar.png"), }, } ], @@ -1768,8 +1780,8 @@ def get_context_data(self, **kwargs): context["create_account_card_preview_url"] = ( f"{settings.STATIC_URL}img/checker.png" ) - context["hero_background_image_url"] = ( - f"{settings.STATIC_URL}img/v3/home-page/home-page-background.png" + context["hero_background_image_url"] = large_static( + "img/v3/home-page/home-page-background.png" ) context["hero_legacy_image_url_light"] = ( SharedResources.hero_legacy_image_url_light @@ -1787,7 +1799,7 @@ def get_context_data(self, **kwargs): "primary_button_label": "Primary Button", "secondary_button_url": "www.example.com", "secondary_button_label": "Secondary Button", - "image": "/static/img/v3/demo_page/Calendar.png", + "image": large_static("img/v3/demo-page/calendar.png"), } context["horizontal_card_data"] = SharedResources.build_anything_with_boost @@ -1875,8 +1887,8 @@ def get_context_data(self, **kwargs): ], "url": "https://www.example.com", "label": "Get started with Boost", - "image_src": f"{settings.STATIC_URL}img/v3/examples/Learn_Card_Image.png", - "mobile_image_src": f"{settings.STATIC_URL}img/v3/examples/Cheetah_Mobile.png", + "image_src": large_static("img/v3/learn-page/learn-cheetah.png"), + "mobile_image_src": large_static("img/v3/learn-page/cheetah-mobile.png"), } context["testimonial_data"] = { @@ -1979,7 +1991,7 @@ def get_context_data(self, **kwargs): "name": "John Doe", "profile_url": "#", "role": "Author", - "avatar_url": f"{settings.STATIC_URL}img/v3/demo_page/Avatar.png", + "avatar_url": large_static("img/v3/demo-page/avatar.png"), "badge": BadgeToken.TIER_3, "bio": "", }, @@ -2011,7 +2023,7 @@ def get_context_data(self, **kwargs): "name": "Peter Dimov", "profile_url": "#", "role": "Maintainer", - "avatar_url": f"{settings.STATIC_URL}img/v3/demo_page/Avatar.png", + "avatar_url": large_static("img/v3/demo-page/avatar.png"), "badge": BadgeToken.STAR_TIER_5, "bio": "", }, @@ -2019,7 +2031,7 @@ def get_context_data(self, **kwargs): "name": "Vinnie Falco", "profile_url": "#", "role": "Author", - "avatar_url": f"{settings.STATIC_URL}img/v3/demo_page/Avatar.png", + "avatar_url": large_static("img/v3/demo-page/avatar.png"), "badge": BadgeToken.BOOST_DAY, "bio": "Boost Day contributor.", }, @@ -2030,7 +2042,7 @@ def get_context_data(self, **kwargs): "name": "John Doe", "profile_url": "#", "role": "Author", - "avatar_url": f"{settings.STATIC_URL}img/v3/demo_page/Avatar.png", + "avatar_url": large_static("img/v3/demo-page/avatar.png"), "badge": BadgeToken.TIER_3, "bio": "", } @@ -2059,10 +2071,8 @@ def get_context_data(self, **kwargs): { "name": "Vinnie Falco", "role": "Author", - "avatar_url": f"{settings.STATIC_URL}img/v3/demo_page/Avatar.png", - "badge_url": ( - f"{settings.STATIC_URL}img/v3/badges/badge-first-place.png" - ), + "avatar_url": large_static("img/v3/demo-page/avatar.png"), + "badge_url": large_static("img/v3/badges/badge-first-place.png"), "badge": "", "bio": "Big C++ fan. Not quite kidney-donation level, but close.", "profile_url": "", @@ -2070,7 +2080,7 @@ def get_context_data(self, **kwargs): { "name": "Alex Wells", "role": "Contributor", - "avatar_url": f"{settings.STATIC_URL}img/v3/demo_page/Avatar.png", + "avatar_url": large_static("img/v3/demo-page/avatar.png"), "badge_url": "", "badge": "", "bio": "C++ enthusiast who has worked at Intel and Microsoft.", @@ -2079,8 +2089,8 @@ def get_context_data(self, **kwargs): { "name": "Dave Abrahams", "role": "Contributor", - "avatar_url": f"{settings.STATIC_URL}img/v3/demo_page/Avatar.png", - "badge_url": f"{settings.STATIC_URL}img/v3/badges/badge-bronze.png", + "avatar_url": large_static("img/v3/demo-page/avatar.png"), + "badge_url": large_static("img/v3/badges/badge-bronze.png"), "badge": "", "bio": "Contributor to Boost since 2009.", "profile_url": "", diff --git a/libraries/models.py b/libraries/models.py index 40d35ddff..c1619f5ce 100644 --- a/libraries/models.py +++ b/libraries/models.py @@ -18,6 +18,7 @@ from config import settings from core.custom_model_fields import NullableFileField +from core.templatetags.custom_static import large_static from core.markdown import process_md from core.models import RenderedContent from core.asciidoc import convert_adoc_to_html @@ -549,7 +550,7 @@ def author_details(self): "name": author.display_name if author else "Unknown", "role": "Author", "avatar_url": author.get_avatar_url() if author else "", - "badge_url": f"{settings.STATIC_URL}img/v3/badges/badge-first-place.png", + "badge_url": large_static("img/v3/badges/badge-first-place.png"), } def get_cpp_standard_minimum_display(self): diff --git a/static/img/v3/auth-page/auth-page-background.png b/static/img/v3/auth-page/auth-page-background.png deleted file mode 100644 index 8867cc64b..000000000 Binary files a/static/img/v3/auth-page/auth-page-background.png and /dev/null differ diff --git a/static/img/v3/auth-page/auth-page-foreground.png b/static/img/v3/auth-page/auth-page-foreground.png deleted file mode 100644 index 4db206ce0..000000000 Binary files a/static/img/v3/auth-page/auth-page-foreground.png and /dev/null differ diff --git a/static/img/v3/badges/boost_day.png b/static/img/v3/badges/boost_day.png deleted file mode 100644 index ce68f27c1..000000000 Binary files a/static/img/v3/badges/boost_day.png and /dev/null differ diff --git a/static/img/v3/badges/star-tier-1.png b/static/img/v3/badges/star-tier-1.png deleted file mode 100644 index 573a50b52..000000000 Binary files a/static/img/v3/badges/star-tier-1.png and /dev/null differ diff --git a/static/img/v3/badges/star-tier-2.png b/static/img/v3/badges/star-tier-2.png deleted file mode 100644 index 27a5e1df1..000000000 Binary files a/static/img/v3/badges/star-tier-2.png and /dev/null differ diff --git a/static/img/v3/badges/star-tier-3.png b/static/img/v3/badges/star-tier-3.png deleted file mode 100644 index 50af7acd5..000000000 Binary files a/static/img/v3/badges/star-tier-3.png and /dev/null differ diff --git a/static/img/v3/badges/star-tier-4.png b/static/img/v3/badges/star-tier-4.png deleted file mode 100644 index a21c01337..000000000 Binary files a/static/img/v3/badges/star-tier-4.png and /dev/null differ diff --git a/static/img/v3/badges/star-tier-5.png b/static/img/v3/badges/star-tier-5.png deleted file mode 100644 index dbb58b223..000000000 Binary files a/static/img/v3/badges/star-tier-5.png and /dev/null differ diff --git a/static/img/v3/badges/tier-1.png b/static/img/v3/badges/tier-1.png deleted file mode 100644 index 758fb9b90..000000000 Binary files a/static/img/v3/badges/tier-1.png and /dev/null differ diff --git a/static/img/v3/badges/tier-2.png b/static/img/v3/badges/tier-2.png deleted file mode 100644 index dfe838ad9..000000000 Binary files a/static/img/v3/badges/tier-2.png and /dev/null differ diff --git a/static/img/v3/badges/tier-3.png b/static/img/v3/badges/tier-3.png deleted file mode 100644 index f6d7c0bc0..000000000 Binary files a/static/img/v3/badges/tier-3.png and /dev/null differ diff --git a/static/img/v3/badges/tier-4.png b/static/img/v3/badges/tier-4.png deleted file mode 100644 index 30902f58c..000000000 Binary files a/static/img/v3/badges/tier-4.png and /dev/null differ diff --git a/static/img/v3/badges/tier-5.png b/static/img/v3/badges/tier-5.png deleted file mode 100644 index 92eb4498a..000000000 Binary files a/static/img/v3/badges/tier-5.png and /dev/null differ diff --git a/static/img/v3/community-page/avatar-beaver-character.png b/static/img/v3/community-page/avatar-beaver-character.png deleted file mode 100644 index 4de14e641..000000000 Binary files a/static/img/v3/community-page/avatar-beaver-character.png and /dev/null differ diff --git a/static/img/v3/community-page/avatar-cheetah-character.png b/static/img/v3/community-page/avatar-cheetah-character.png deleted file mode 100644 index 4125dc5f5..000000000 Binary files a/static/img/v3/community-page/avatar-cheetah-character.png and /dev/null differ diff --git a/static/img/v3/community-page/avatar-fish-character.png b/static/img/v3/community-page/avatar-fish-character.png deleted file mode 100644 index 7b675fedb..000000000 Binary files a/static/img/v3/community-page/avatar-fish-character.png and /dev/null differ diff --git a/static/img/v3/community-page/avatar-mouse-character.png b/static/img/v3/community-page/avatar-mouse-character.png deleted file mode 100644 index fc2d09afd..000000000 Binary files a/static/img/v3/community-page/avatar-mouse-character.png and /dev/null differ diff --git a/static/img/v3/community-page/community-background.png b/static/img/v3/community-page/community-background.png deleted file mode 100644 index 55649837a..000000000 Binary files a/static/img/v3/community-page/community-background.png and /dev/null differ diff --git a/static/img/v3/community-page/community-create-account-preview.png b/static/img/v3/community-page/community-create-account-preview.png deleted file mode 100644 index af64972d5..000000000 Binary files a/static/img/v3/community-page/community-create-account-preview.png and /dev/null differ diff --git a/static/img/v3/community-page/community-foreground.png b/static/img/v3/community-page/community-foreground.png deleted file mode 100644 index 5ae77d688..000000000 Binary files a/static/img/v3/community-page/community-foreground.png and /dev/null differ diff --git a/static/img/v3/community-page/community-mailing-list-preview.png b/static/img/v3/community-page/community-mailing-list-preview.png deleted file mode 100644 index 847600722..000000000 Binary files a/static/img/v3/community-page/community-mailing-list-preview.png and /dev/null differ diff --git a/static/img/v3/community-page/community-slack-preview.png b/static/img/v3/community-page/community-slack-preview.png deleted file mode 100644 index 2fb8c41be..000000000 Binary files a/static/img/v3/community-page/community-slack-preview.png and /dev/null differ diff --git a/static/img/v3/demo_page/Avatar.png b/static/img/v3/demo_page/Avatar.png deleted file mode 100644 index c1335a70a..000000000 Binary files a/static/img/v3/demo_page/Avatar.png and /dev/null differ diff --git a/static/img/v3/demo_page/Badge.svg b/static/img/v3/demo_page/Badge.svg deleted file mode 100644 index d3a7db143..000000000 --- a/static/img/v3/demo_page/Badge.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/static/img/v3/demo_page/Calendar.png b/static/img/v3/demo_page/Calendar.png deleted file mode 100644 index bf818d484..000000000 Binary files a/static/img/v3/demo_page/Calendar.png and /dev/null differ diff --git a/static/img/v3/examples/Cheetah_Mobile.png b/static/img/v3/examples/Cheetah_Mobile.png deleted file mode 100644 index 0c19210ee..000000000 Binary files a/static/img/v3/examples/Cheetah_Mobile.png and /dev/null differ diff --git a/static/img/v3/examples/Learn_Card_Image.png b/static/img/v3/examples/Learn_Card_Image.png deleted file mode 100644 index ea61e82f8..000000000 Binary files a/static/img/v3/examples/Learn_Card_Image.png and /dev/null differ diff --git a/static/img/v3/examples/Learn_Octopus.png b/static/img/v3/examples/Learn_Octopus.png deleted file mode 100644 index 5d736ba64..000000000 Binary files a/static/img/v3/examples/Learn_Octopus.png and /dev/null differ diff --git a/static/img/v3/examples/Octopus_Mobile.png b/static/img/v3/examples/Octopus_Mobile.png deleted file mode 100644 index be0f29af4..000000000 Binary files a/static/img/v3/examples/Octopus_Mobile.png and /dev/null differ diff --git a/static/img/v3/home-page/heros.png b/static/img/v3/home-page/heros.png deleted file mode 100644 index 6aa0949fe..000000000 Binary files a/static/img/v3/home-page/heros.png and /dev/null differ diff --git a/static/img/v3/home-page/heros_light.png b/static/img/v3/home-page/heros_light.png deleted file mode 100644 index 458ac31a5..000000000 Binary files a/static/img/v3/home-page/heros_light.png and /dev/null differ diff --git a/static/img/v3/home-page/home-page-background.png b/static/img/v3/home-page/home-page-background.png deleted file mode 100644 index c121c7f08..000000000 Binary files a/static/img/v3/home-page/home-page-background.png and /dev/null differ diff --git a/static/img/v3/home-page/home-page-foreground.png b/static/img/v3/home-page/home-page-foreground.png deleted file mode 100644 index ea8f89692..000000000 Binary files a/static/img/v3/home-page/home-page-foreground.png and /dev/null differ diff --git a/static/img/v3/home-page/home-page-placeholder.png b/static/img/v3/home-page/home-page-placeholder.png deleted file mode 100644 index b96202c8f..000000000 Binary files a/static/img/v3/home-page/home-page-placeholder.png and /dev/null differ diff --git a/static/img/v3/learn/learn-contribute-to.png b/static/img/v3/learn/learn-contribute-to.png deleted file mode 100644 index 1c2373bb9..000000000 Binary files a/static/img/v3/learn/learn-contribute-to.png and /dev/null differ diff --git a/static/img/v3/learn/learn-learn-how-to.png b/static/img/v3/learn/learn-learn-how-to.png deleted file mode 100644 index 4e9edb40c..000000000 Binary files a/static/img/v3/learn/learn-learn-how-to.png and /dev/null differ diff --git a/static/img/v3/login-page/group-shot-background.png b/static/img/v3/login-page/group-shot-background.png deleted file mode 100644 index 7c3448826..000000000 Binary files a/static/img/v3/login-page/group-shot-background.png and /dev/null differ diff --git a/static/img/v3/login-page/group-shot-foreground.png b/static/img/v3/login-page/group-shot-foreground.png deleted file mode 100644 index 6571e0f1b..000000000 Binary files a/static/img/v3/login-page/group-shot-foreground.png and /dev/null differ diff --git a/static/img/v3/login-page/group-shot-placehoder.png b/static/img/v3/login-page/group-shot-placehoder.png deleted file mode 100644 index 2db107018..000000000 Binary files a/static/img/v3/login-page/group-shot-placehoder.png and /dev/null differ diff --git a/static/img/v3/solo-images/beaver-black-and-white-dark.png b/static/img/v3/solo-images/beaver-black-and-white-dark.png deleted file mode 100644 index 123d0d919..000000000 Binary files a/static/img/v3/solo-images/beaver-black-and-white-dark.png and /dev/null differ diff --git a/static/img/v3/solo-images/beaver-black-and-white.png b/static/img/v3/solo-images/beaver-black-and-white.png deleted file mode 100644 index fb2e9ee7e..000000000 Binary files a/static/img/v3/solo-images/beaver-black-and-white.png and /dev/null differ diff --git a/static/img/v3/solo-images/beaver-computer-blow-up.png b/static/img/v3/solo-images/beaver-computer-blow-up.png deleted file mode 100644 index 787e9724d..000000000 Binary files a/static/img/v3/solo-images/beaver-computer-blow-up.png and /dev/null differ diff --git a/static/img/v3/solo-images/capy-hot-tub.png b/static/img/v3/solo-images/capy-hot-tub.png deleted file mode 100644 index 4a2ad030b..000000000 Binary files a/static/img/v3/solo-images/capy-hot-tub.png and /dev/null differ diff --git a/static/img/v3/solo-images/cow-solo.png b/static/img/v3/solo-images/cow-solo.png deleted file mode 100644 index 48a8e9a82..000000000 Binary files a/static/img/v3/solo-images/cow-solo.png and /dev/null differ diff --git a/static/img/v3/solo-images/gator-robot.png b/static/img/v3/solo-images/gator-robot.png deleted file mode 100644 index ced2254df..000000000 Binary files a/static/img/v3/solo-images/gator-robot.png and /dev/null differ diff --git a/static/img/v3/solo-images/moose-server.png b/static/img/v3/solo-images/moose-server.png deleted file mode 100644 index 3e4c04470..000000000 Binary files a/static/img/v3/solo-images/moose-server.png and /dev/null differ diff --git a/templates/v3/community.html b/templates/v3/community.html index 4d7b6db9d..bcf970495 100644 --- a/templates/v3/community.html +++ b/templates/v3/community.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load static %} +{% load static custom_static %} {% block title %}Boost Community{% endblock %} {% block css %} @@ -9,7 +9,8 @@ {% block main_content_wrapper %}
    {% endblock %} {% block content %} - {% include "v3/includes/_hero_library.html" with title="A community built to help you go further" description="For newcomers and experienced engineers alike, Boost is a place to build real libraries, learn from experts and make contributions that matter." hero_image_url="/static/img/v3/community-page/community-foreground.png" %} + {% large_static "img/v3/community-page/community-foreground.png" as hero_image_url %} + {% include "v3/includes/_hero_library.html" with title="A community built to help you go further" description="For newcomers and experienced engineers alike, Boost is a place to build real libraries, learn from experts and make contributions that matter." hero_image_url=hero_image_url %}
    {% include "v3/includes/_help_card.html" with heading="What do you need help with?" items=help_options extra_classes="community-masonry__help" %} diff --git a/templates/v3/includes/_badge_v3_render.html b/templates/v3/includes/_badge_v3_render.html index e78a1cc2f..995b4934f 100644 --- a/templates/v3/includes/_badge_v3_render.html +++ b/templates/v3/includes/_badge_v3_render.html @@ -1,4 +1,4 @@ -{% load static %} +{% load static custom_static %} {% load number_filters %} {% comment %} Internal partial for _badge_v3.html. Receives `token`, `label`, `count`, @@ -8,7 +8,7 @@ {% if token == "boost-day" %} {% with tip=label|default:"Boost Day" %} - + {{ tip }} {% endwith %} @@ -25,7 +25,7 @@ {% elif token == "badge-tier-1" %} {% with tip=label|default:"Tier 1 badge" %} - + {{ tip }} {% endwith %} @@ -33,7 +33,7 @@ {% elif token == "badge-tier-2" %} {% with tip=label|default:"Tier 2 badge" %} - + {{ tip }} {% endwith %} @@ -41,7 +41,7 @@ {% elif token == "badge-tier-3" %} {% with tip=label|default:"Tier 3 badge" %} - + {{ tip }} {% endwith %} @@ -49,7 +49,7 @@ {% elif token == "badge-tier-4" %} {% with tip=label|default:"Tier 4 badge" %} - + {{ tip }} {% endwith %} @@ -57,7 +57,7 @@ {% elif token == "badge-tier-5" %} {% with tip=label|default:"Tier 5 badge" %} - + {{ tip }} {% endwith %} @@ -65,7 +65,7 @@ {% elif token == "star-tier-1" %} {% with tip=label|default:"Tier 1 star" %} - + {{ tip }} {% endwith %} @@ -73,7 +73,7 @@ {% elif token == "star-tier-2" %} {% with tip=label|default:"Tier 2 star" %} - + {{ tip }} {% endwith %} @@ -81,7 +81,7 @@ {% elif token == "star-tier-3" %} {% with tip=label|default:"Tier 3 star" %} - + {{ tip }} {% endwith %} @@ -89,7 +89,7 @@ {% elif token == "star-tier-4" %} {% with tip=label|default:"Tier 4 star" %} - + {{ tip }} {% endwith %} @@ -97,7 +97,7 @@ {% elif token == "star-tier-5" %} {% with tip=label|default:"Tier 5 star" %} - + {{ tip }} {% endwith %} diff --git a/templates/v3/includes/_join_slack_card.html b/templates/v3/includes/_join_slack_card.html index 063313259..07947ee49 100644 --- a/templates/v3/includes/_join_slack_card.html +++ b/templates/v3/includes/_join_slack_card.html @@ -4,6 +4,8 @@ Variables (read from context): slack_member_count (string, optional) — member count shown in the CTA. Defaults to "24,000+". {% endcomment %} +{% load custom_static %} {% with member_count=slack_member_count|default:"24,000+" %} - {% include "v3/includes/_vertical_card.html" with title="Join the discussion on Slack" image_url="/static/img/v3/community-page/community-slack-preview.png" image_alt="Preview of the Boost Slack workspace" primary_button_url="https://cppalliance.org/slack/" primary_button_label="Chat with "|add:member_count|add:" members" only %} + {% large_static 'img/v3/community-page/community-slack-preview.png' as image_url %} + {% include "v3/includes/_vertical_card.html" with title="Join the discussion on Slack" image_url=image_url image_alt="Preview of the Boost Slack workspace" primary_button_url="https://cppalliance.org/slack/" primary_button_label="Chat with "|add:member_count|add:" members" only %} {% endwith %} diff --git a/templates/v3/includes/_thread_archive_card.html b/templates/v3/includes/_thread_archive_card.html index 84d28951a..14e952445 100644 --- a/templates/v3/includes/_thread_archive_card.html +++ b/templates/v3/includes/_thread_archive_card.html @@ -5,7 +5,8 @@ recent_threads_url — URL for current month's threads (built dynamically from the view). archive_url — URL for the full archive. {% endcomment %} -{% load static %} +{% load custom_static %} +{% large_static 'img/v3/community-page/community-mailing-list-preview.png' as image_url %} {% with r_url=recent_threads_url|default:"https://lists.boost.org/archives/list/boost@lists.boost.org/latest" a_url=archive_url|default:"https://lists.boost.org/archives/list/boost@lists.boost.org/latest" %} - {% include "v3/includes/_vertical_card.html" with title="Explore The Boost Developers Mailing List" image_url="/static/img/v3/community-page/community-mailing-list-preview.png" image_alt="Preview of recent threads on the Boost developers mailing list" primary_button_url=r_url primary_button_label="Recent Threads" secondary_button_url=a_url secondary_button_label="View Archive" only %} + {% include "v3/includes/_vertical_card.html" with title="Explore The Boost Developers Mailing List" image_url=image_url image_alt="Preview of recent threads on the Boost developers mailing list" primary_button_url=r_url primary_button_label="Recent Threads" secondary_button_url=a_url secondary_button_label="View Archive" only %} {% endwith %} diff --git a/templates/v3/library_page.html b/templates/v3/library_page.html index 42c66c2bf..859d5aa5b 100644 --- a/templates/v3/library_page.html +++ b/templates/v3/library_page.html @@ -5,7 +5,7 @@ - object_list: list, required - List of LibraryVersion Ojbects to be displayed. Determined using the selected version as determined by the URL. Defaults to Latest - library_view_str: str, required - Determines which View of libraries to display. Determined by the URL, defaults to List, or the last selected view if the user has changed it. {% endcomment %} -{% load static %} +{% load custom_static static %} {% block title %} Library @@ -24,8 +24,8 @@

    Find a battle-tested library for the problem you're solvi {% include 'v3/includes/_field_text.html' with label='Search' name='ex_search' placeholder='Keyword, name, etc.' icon_left='search' submit_icon='arrow-right' %}

    - Excited Cartoon Mascot - Excited Cartoon Mascot + Excited Cartoon Mascot + Excited Cartoon Mascot
    diff --git a/templates/v3/release_detail.html b/templates/v3/release_detail.html index d4ae26496..4614a5d3c 100644 --- a/templates/v3/release_detail.html +++ b/templates/v3/release_detail.html @@ -1,5 +1,5 @@ {% extends 'base.html' %} -{% load static %} +{% load static custom_static %} {% block title %}Boost {{ version.display_name }}{% endblock %} {% block description %}Discover what's new in Boost {{ version.display_name }}{% endblock %} @@ -37,8 +37,8 @@ {% include "v3/includes/_mailing_list_card.html" %} {% include "v3/includes/_basic_card.html" with title="Want to fix bugs, review code, maintain libraries, and propose new features?" text="Read our contributors guide and join the Boost community." primary_button_url="/contribute" primary_button_label="Start here" primary_button_style="green" theme="green" only %} - - {% include "v3/includes/_media_text_card.html" with text="Boost is publicly released three times a year in April, August, and December. Each release has updates to existing libraries, and any new libraries that have passed the rigorous acceptance process." image_url="/static/img/v3/home-page/heros.png" button_url="/releases" button_label="Read release process" %} + {% large_static 'img/v3/home-page/heros.png' as image_url %} + {% include "v3/includes/_media_text_card.html" with text="Boost is publicly released three times a year in April, August, and December. Each release has updates to existing libraries, and any new libraries that have passed the rigorous acceptance process." image_url=image_url button_url="/releases" button_label="Read release process" %}
    diff --git a/users/models.py b/users/models.py index 4cec55d44..09c8b0b0d 100644 --- a/users/models.py +++ b/users/models.py @@ -25,6 +25,7 @@ max_file_size_validator, large_file_max_size_validator, ) +from core.templatetags.custom_static import large_static logger = logging.getLogger(__name__) @@ -361,7 +362,7 @@ def badge_url(self): TODO: Replace this value """ - return f"{settings.STATIC_URL}img/v3/badges/badge-gold-medal.png" + return large_static("img/v3/badges/badge-gold-medal.png") @cached_property def role(self): diff --git a/users/views.py b/users/views.py index 09fc67c0e..64c0d9811 100644 --- a/users/views.py +++ b/users/views.py @@ -24,6 +24,7 @@ from waffle import flag_is_active from core.mixins import V3Mixin +from core.templatetags.custom_static import large_static from libraries.models import CommitAuthorEmail from .forms import ( PreferencesForm, @@ -310,11 +311,11 @@ def dispatch(self, request, *args, **kwargs): def get_v3_context_data(self, **kwargs): context = super().get_v3_context_data(**kwargs) context["page_title"] = getattr(self, "page_title", "Account") - context["foreground_image_url"] = ( - f"{settings.STATIC_URL}img/v3/auth-page/auth-page-foreground.png" + context["foreground_image_url"] = large_static( + "img/v3/auth-page/auth-page-foreground.png" ) - context["background_image_url"] = ( - f"{settings.STATIC_URL}img/v3/auth-page/auth-page-background.png" + context["background_image_url"] = large_static( + "img/v3/auth-page/auth-page-background.png" ) context["login_url"] = reverse_lazy("v3-login") context["signup_url"] = reverse_lazy("v3-signup")