Skip to content

Story 2127: Learn Page Implementation#2243

Open
jlchilders11 wants to merge 14 commits intodevelopfrom
jc/learn-page
Open

Story 2127: Learn Page Implementation#2243
jlchilders11 wants to merge 14 commits intodevelopfrom
jc/learn-page

Conversation

@jlchilders11
Copy link
Copy Markdown
Collaborator

@jlchilders11 jlchilders11 commented Mar 26, 2026

Issue: #2127

Summary & Context

Adds the Learn Page layout and styling. Uses dummy data to pass to the template.

Changes

  • Adds template v3/learn_page.html and stylesheet v3/learn-page.css
  • Adds view LearnPageView to core/views.py and urlpattern v3/demo/learn-page/ to core
  • Makes adjustments to existing components:
  • Learn Card: Adjusts restyling breakpoint to be at tablet size, not mobile size

‼️ Risks & Considerations ‼️

NOTE: While implemented as fully as possible using existing components, note should be taken for the "Posts from the boost community" and "The boost community" cards, as these do not seem to exist in a 1 to 1 form in the current project.

These have been implemented as _post_cards_v3.html, which will be updated in styling as a different item.

Additionally, while a header component exists, it contains significant additional styling that is not used in this page.

Screenshots

image image image image

Self-review Checklist

  • Tag at least one team member from each team to review this PR
  • Link this PR to the related GitHub Project ticket

Frontend

  • UI implementation matches Figma design
  • Tested in light and dark mode
  • Responsive / mobile verified
  • Accessibility checked (keyboard navigation, etc.)
  • Ensure design tokens are used for colors, spacing, typography, etc. – No hardcoded values
  • Test without JavaScript (if applicable)
  • No console errors or warnings

@jlchilders11 jlchilders11 linked an issue Mar 26, 2026 that may be closed by this pull request
@sdarwin
Copy link
Copy Markdown
Collaborator

sdarwin commented Mar 30, 2026

Image hosting:

I am working on a script to facilitate very easy uploads to S3. Should be ready today.

The folder in S3 will be S3://bucketname/static/img/v3 and matches the same path as in the website-v2 repo. (/static/img/)

In fact, that S3 directory already exists with some files in it. Anything in /static/ could be hosted there, but the main purpose is large images.

hopefully this pull request can be revised to use the new method.

Copy link
Copy Markdown
Collaborator

@julioest julioest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff, Jeremy!

I tested across breakpoints and noticed a couple of things in the masonry section:

  • Post cards and basic card have max-width: 458px, but Figma shows 488px (pre-existing in post-cards.css and card.css).
  • The .card-masonry grid has justify-items: start and width: fit-content, which prevents cards from filling their columns. On tablet/mobile they end up narrow and off-center. Swapping to width: 100% and dropping justify-items: start (so it defaults to stretch) fixes it. Also need max-width: 100% on .post-cards and .basic-card inside .card-masonry so they can stretch past their default cap.

Not sure, if we'd rather address them here or in a follow-up PR

Here's the diff of what worked on my end:

diff --git a/static/css/v3/card.css b/static/css/v3/card.css
--- a/static/css/v3/card.css
+++ b/static/css/v3/card.css
@@ -22,7 +22,7 @@
 }
 
 .basic-card {
-  max-width: 458px;
+  max-width: 488px;
 }
 
diff --git a/static/css/v3/learn-page.css b/static/css/v3/learn-page.css
--- a/static/css/v3/learn-page.css
+++ b/static/css/v3/learn-page.css
@@ -57,8 +57,12 @@
     ;
     row-gap: var(--space-card);
     column-gap: var(--space-card);
-    justify-items: start;
-    width: fit-content;
+    width: 100%;
+}
+
+.card-masonry .post-cards,
+.card-masonry .basic-card {
+    max-width: 100%;
 }
 
diff --git a/static/css/v3/post-cards.css b/static/css/v3/post-cards.css
--- a/static/css/v3/post-cards.css
+++ b/static/css/v3/post-cards.css
@@ -32,7 +32,7 @@
-  max-width: 458px;
+  max-width: 488px;
 
@@ -104,7 +104,7 @@
-  max-width: 458px;
+  max-width: 488px;

@jlchilders11
Copy link
Copy Markdown
Collaborator Author

Good stuff, Jeremy!

I tested across breakpoints and noticed a couple of things in the masonry section:

* Post cards and basic card have `max-width: 458px`, but Figma shows `488px` (pre-existing in `post-cards.css` and `card.css`).

* The `.card-masonry` grid has `justify-items: start` and `width: fit-content`, which prevents cards from filling their columns. On tablet/mobile they end up narrow and off-center. Swapping to `width: 100%` and dropping `justify-items: start` (so it defaults to stretch) fixes it. Also need `max-width: 100%` on `.post-cards` and `.basic-card` inside `.card-masonry` so they can stretch past their default cap.

Not sure, if we'd rather address them here or in a follow-up PR

Here's the diff of what worked on my end:

diff --git a/static/css/v3/card.css b/static/css/v3/card.css
--- a/static/css/v3/card.css
+++ b/static/css/v3/card.css
@@ -22,7 +22,7 @@
 }
 
 .basic-card {
-  max-width: 458px;
+  max-width: 488px;
 }
 
diff --git a/static/css/v3/learn-page.css b/static/css/v3/learn-page.css
--- a/static/css/v3/learn-page.css
+++ b/static/css/v3/learn-page.css
@@ -57,8 +57,12 @@
     ;
     row-gap: var(--space-card);
     column-gap: var(--space-card);
-    justify-items: start;
-    width: fit-content;
+    width: 100%;
+}
+
+.card-masonry .post-cards,
+.card-masonry .basic-card {
+    max-width: 100%;
 }
 
diff --git a/static/css/v3/post-cards.css b/static/css/v3/post-cards.css
--- a/static/css/v3/post-cards.css
+++ b/static/css/v3/post-cards.css
@@ -32,7 +32,7 @@
-  max-width: 458px;
+  max-width: 488px;
 
@@ -104,7 +104,7 @@
-  max-width: 458px;
+  max-width: 488px;

I am happy to make them stretch to match the columns, the design doesn't exactly specify. However, I am curious as to the decision to change to 488px? The basic card in the figma is 459px: https://www.figma.com/design/VhZHw3RudFNMzfPEEYchE9/UI-Kit---Foundations-Delivery?node-id=286-3590&focus-id=286-3590&m=dev

@julioest
Copy link
Copy Markdown
Collaborator

In Figma the post card is 488px. Maybe I'm looking at something else?

Copy link
Copy Markdown
Collaborator

@julioest julioest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Collaborator

@herzog0 herzog0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking very good, thanks @jlchilders11 !!
Also thanks for removing some default CSS values and fixing some typos there.

I'm only requesting changes because of the broken img url. The non-matching designs are not a high priority I'd say, so I leave it up to you.

@jlchilders11 jlchilders11 requested a review from herzog0 April 1, 2026 14:47
Copy link
Copy Markdown
Collaborator

@julhoang julhoang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great @jlchilders11 ! I left a few requests below 🙏

{% block content %}
<div class="px-large">
<div class="learn-page-header py-large">
<h1>Start Anywhere. Learn Everything. Build Anything</h1>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding text-primary color to this h1? I noticed the HEX code is slightly off.

Another nit: this text should be Start anywhere. Learn everything. Build anything.


.learn-card__link {
font-size: var(--font-sizes-small, 14px);
font-size: var(--font-size-small);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be out-of-scope but I think this link should be its own component, see Figma here. Feel free to leave this to a separate ticket if you don't feel like adding it here!

This current link is just missing font-weight 500 and a hover color.

Image

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It did need some updating on styling, but I'm not sure it is used elsewhere? If it is, happy to spin it off as a separate item!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the Figma assets, it seems to me like the mobile and desktop versions are just different "crops" of the same image. So instead of loading two separate assets, we can use one image and let CSS do the cropping for us:

Source image:
Image

Code:

.square-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; 👈🏻 add this for focal-point
    display: block;
}

Results:

Desktop Mobile
Image Image

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I considered this, and it works for the octopus. However, the cheetah actually wants to be cropped to the bottom, not the center. If I understand how picture elements work properly, it should only load the actual asset that matches the media query.

{% endfor %}
</div>
<div class="py-large three-column">
{% include 'v3/includes/_why_boost_cards.html' with why_boost_cards=why_boost_cards %}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the h2 component from this Why Boost card has the wrong font-size, it also has a default margin that doesn't really match our spacing token, would you mind adjusting those? 🙏

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to address the font-size, but could you clarify what you mean by the spacing? Looking at the css it seems to have margin: 0 0 var(--space-large);, which matches the design.

}

.learn-page-header {
max-width: 488px;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be 50% instead to match with the Figma intention.

}

.mobile-d-none {
display: none;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand this matches Figma but at the same time I'm wondering if this is an unintentional mistake from the design 🤔. Perhaps we should double-check with Henry just to be sure.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henryajisegiri Any opinion on this component being hidden on mobile? (The Library Categories carousel)

@jlchilders11 jlchilders11 requested a review from julhoang April 2, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Webpage UI: Learn Page

5 participants