Skip to content

AI Launch 2023 - Skinny banners - #51415

Merged
kelbyhawn merged 18 commits into
stagingfrom
ai-banners
Apr 25, 2023
Merged

AI Launch 2023 - Skinny banners#51415
kelbyhawn merged 18 commits into
stagingfrom
ai-banners

Conversation

@kelbyhawn

@kelbyhawn kelbyhawn commented Apr 19, 2023

Copy link
Copy Markdown
Contributor

Add skinny banners on the following pages to support the launch of TeachAI and the updated https://code.org/ai page:

Shown using the teach-ai-launch-2023 DCDO flag.

Related PRs:

Jira ticket: ACQ-528


Desktop:
Desktop

Tablet:
Tablet

Mobile:
Mobile

@kelbyhawn
kelbyhawn requested a review from a team as a code owner April 19, 2023 18:28
@kelbyhawn kelbyhawn changed the title AI Launch - Banners AI Launch - Skinny banners Apr 20, 2023
@kelbyhawn
kelbyhawn requested review from a team and dmcavoy April 20, 2023 20:02
@kelbyhawn kelbyhawn changed the title AI Launch - Skinny banners AI Launch 2023 - Skinny banners Apr 20, 2023
@media screen and (max-width: $width-sm) {
padding: 1em 1em 0.5em;
height: unset;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Loving this pattern!


@media screen and (max-width: $width-sm) {
width: 50px;
margin-right: 1.5em;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this supposed to work in right-to-left languages? If so, avoiding margin-right in favor of something more directionally agnostic (like gap) is preferred

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ooo TIL 🙀 — just updated!

@megcrenshaw megcrenshaw Apr 25, 2023

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice! You can "force" the page to render right-to-left by changing the dir tag in the HTML to rtl. When I first did that for the catalog page, I had to change like 7 things 😬

image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Haha! Thanks for sharing the knowledge, adding to my notes doc 🙌


@media screen and (max-width: $width-xs) {
width: 100%;
text-align: center;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit –– can you leave off text-align since it's defined on 57?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is overriding the text-align: left for tablet and mobile since it needs to switch to center again on extra small mobiles screens — this screenshot is 320px:

Screenshot 2023-04-24 at 2 39 41 PM

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ah I see –– that makes sense!

@megcrenshaw megcrenshaw left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Excited about the png file getting smaller! This looks great –– just left some small style nits but nothing blocking. Well done!

@mgc1194 mgc1194 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Awesome changes. I really appreciate that the new strings are already i18n, and avoiding the use of right/left margins in favor of direction-agnostic properties.

@kelbyhawn
kelbyhawn merged commit 137bb9c into staging Apr 25, 2023
@kelbyhawn
kelbyhawn deleted the ai-banners branch April 25, 2023 16:42
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.

3 participants