Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ak/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down
31 changes: 13 additions & 18 deletions core/mock_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from django.conf import settings

from core.constants import BadgeToken
from core.templatetags.custom_static import large_static
from libraries.utils import commit_data_to_stats_bars


Expand Down Expand Up @@ -201,7 +202,7 @@ class SharedResources:
"author": {
"name": "Ada Lovelace",
"profile_url": "#",
"avatar_url": "/static/img/v3/demo_page/Avatar.png",
"avatar_url": large_static("img/v3/demo-page/avatar.png"),
"role": "Contributor",
"badge": BadgeToken.TIER_3,
},
Expand All @@ -211,7 +212,7 @@ class SharedResources:
"author": {
"name": "Grace Hopper",
"profile_url": "#",
"avatar_url": "/static/img/v3/demo_page/Avatar.png",
"avatar_url": large_static("img/v3/demo-page/avatar.png"),
"role": "Maintainer",
"badge": BadgeToken.TIER_3,
},
Expand All @@ -221,7 +222,7 @@ class SharedResources:
"author": {
"name": "Linus Torvalds",
"profile_url": "#",
"avatar_url": "/static/img/v3/demo_page/Avatar.png",
"avatar_url": large_static("img/v3/demo-page/avatar.png"),
"role": "Reviewer",
"badge": BadgeToken.TIER_3,
},
Expand All @@ -231,7 +232,7 @@ class SharedResources:
"author": {
"name": "Margaret Hamilton",
"profile_url": "#",
"avatar_url": "/static/img/v3/demo_page/Avatar.png",
"avatar_url": large_static("img/v3/demo-page/avatar.png"),
"role": "Contributor",
"badge": BadgeToken.TIER_3,
},
Expand All @@ -245,20 +246,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.",
},
Expand All @@ -275,19 +276,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"
Expand Down
68 changes: 39 additions & 29 deletions core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,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
Expand Down Expand Up @@ -139,7 +140,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"
),
},
},
{
Expand All @@ -150,7 +153,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"
),
},
},
{
Expand All @@ -161,7 +166,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"
),
Comment thread
julhoang marked this conversation as resolved.
},
},
{
Expand All @@ -172,7 +179,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"
),
},
},
]
Expand Down Expand Up @@ -231,8 +240,7 @@ def get_v3_context_data(self, **kwargs):
"</ul>"
)
ctx["create_account_card_preview_url"] = (
f"{settings.STATIC_URL}img/v3/community-page/"
"community-create-account-preview.png"
large_static("img/v3/community-page/community-create-account-preview.png"),
)
return ctx

Expand Down Expand Up @@ -408,8 +416,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:",
Expand All @@ -424,8 +434,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"
),
},
]

Expand Down Expand Up @@ -501,7 +513,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",
Expand All @@ -527,7 +539,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"),
},
}
],
Expand All @@ -549,7 +561,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"),
},
}
],
Expand Down Expand Up @@ -1667,8 +1679,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
Expand All @@ -1686,7 +1698,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
Expand Down Expand Up @@ -1774,8 +1786,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"] = {
Expand Down Expand Up @@ -1878,7 +1890,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": "",
},
Expand Down Expand Up @@ -1910,15 +1922,15 @@ 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": "",
},
{
"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.",
},
Expand All @@ -1929,7 +1941,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": "",
}
Expand Down Expand Up @@ -1958,18 +1970,16 @@ 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": "",
},
{
"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.",
Expand All @@ -1978,8 +1988,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": "",
Expand Down
3 changes: 2 additions & 1 deletion libraries/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down
Binary file removed static/img/v3/auth-page/auth-page-background.png
Binary file not shown.
Binary file removed static/img/v3/auth-page/auth-page-foreground.png
Binary file not shown.
Binary file removed static/img/v3/badges/boost_day.png
Binary file not shown.
Binary file removed static/img/v3/badges/star-tier-1.png
Binary file not shown.
Binary file removed static/img/v3/badges/star-tier-2.png
Binary file not shown.
Binary file removed static/img/v3/badges/star-tier-3.png
Binary file not shown.
Binary file removed static/img/v3/badges/star-tier-4.png
Binary file not shown.
Binary file removed static/img/v3/badges/star-tier-5.png
Binary file not shown.
Binary file removed static/img/v3/badges/tier-1.png
Binary file not shown.
Binary file removed static/img/v3/badges/tier-2.png
Binary file not shown.
Binary file removed static/img/v3/badges/tier-3.png
Binary file not shown.
Binary file removed static/img/v3/badges/tier-4.png
Binary file not shown.
Binary file removed static/img/v3/badges/tier-5.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed static/img/v3/demo_page/Avatar.png
Binary file not shown.
14 changes: 0 additions & 14 deletions static/img/v3/demo_page/Badge.svg

This file was deleted.

Binary file removed static/img/v3/demo_page/Calendar.png
Binary file not shown.
Binary file removed static/img/v3/examples/Cheetah_Mobile.png
Diff not rendered.
Binary file removed static/img/v3/examples/Learn_Card_Image.png
Diff not rendered.
Binary file removed static/img/v3/examples/Learn_Octopus.png
Diff not rendered.
Binary file removed static/img/v3/examples/Octopus_Mobile.png
Diff not rendered.
Binary file removed static/img/v3/home-page/heros.png
Diff not rendered.
Binary file removed static/img/v3/home-page/heros_light.png
Diff not rendered.
Binary file removed static/img/v3/home-page/home-page-background.png
Diff not rendered.
Binary file removed static/img/v3/home-page/home-page-foreground.png
Diff not rendered.
Binary file removed static/img/v3/home-page/home-page-placeholder.png
Diff not rendered.
Binary file removed static/img/v3/learn/learn-contribute-to.png
Diff not rendered.
Binary file removed static/img/v3/learn/learn-learn-how-to.png
Diff not rendered.
Binary file removed static/img/v3/login-page/group-shot-background.png
Diff not rendered.
Binary file removed static/img/v3/login-page/group-shot-foreground.png
Diff not rendered.
Binary file removed static/img/v3/login-page/group-shot-placehoder.png
Diff not rendered.
Diff not rendered.
Binary file removed static/img/v3/solo-images/beaver-black-and-white.png
Diff not rendered.
Diff not rendered.
Binary file removed static/img/v3/solo-images/capy-hot-tub.png
Diff not rendered.
Binary file removed static/img/v3/solo-images/cow-solo.png
Diff not rendered.
Binary file removed static/img/v3/solo-images/gator-robot.png
Diff not rendered.
Binary file removed static/img/v3/solo-images/moose-server.png
Diff not rendered.
5 changes: 3 additions & 2 deletions templates/v3/community.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load static %}
{% load static custom_static %}
{% block title %}Boost Community{% endblock %}

{% block css %}
Expand All @@ -9,7 +9,8 @@

{% block main_content_wrapper %}<div class="community-v3">{% 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 %}
<div class="community-container">
<div class="community-masonry">
{% include "v3/includes/_help_card.html" with heading="What do you need help with?" items=help_options extra_classes="community-masonry__help" %}
Expand Down
Loading
Loading