Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement site redesign with dark mode #11172

Draft
wants to merge 48 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
8239021
Implement site redesign with dark mode
parlough Sep 24, 2024
0a7a7d5
Fix sidenav interaction styles
parlough Sep 24, 2024
7397265
Don't use box shadow for header in dark mode
parlough Sep 24, 2024
d234a08
Increase max width of cookie notice
parlough Sep 24, 2024
bf07e08
Prevent content styles from overriding more specific ones
parlough Sep 24, 2024
4373e84
Fix content bottom margin and next button positioning
parlough Sep 24, 2024
268afdc
Add a few interactivity styles and fix side menu background
parlough Sep 24, 2024
d5ff1d5
Improve consistency and accessibility of more variable colors
parlough Sep 25, 2024
b14ef9e
Fix Material 3 catalog cards
parlough Sep 25, 2024
9fe3e86
Address various style TODOs and renames
parlough Sep 25, 2024
eaad7d6
Fix card interaction styles
parlough Sep 25, 2024
cd96dec
Merge branch 'main' into feat/site-redesign
parlough Sep 25, 2024
d328812
Merge branch 'main' into feat/site-redesign
parlough Sep 25, 2024
1f808c7
Properly align centered figure containers
parlough Sep 25, 2024
8b745a0
Slightly increase max width of primary content
parlough Sep 25, 2024
1aa8849
Increase contrast of background and various elements
parlough Sep 25, 2024
59cd08b
Improve and increase spacing
parlough Sep 25, 2024
839e903
Improve code block colors and sizing
parlough Sep 25, 2024
6b9ddc2
Fix rows on platform adaptations page
parlough Sep 25, 2024
90a75a6
Fix format of various tables
parlough Sep 25, 2024
bf7fea1
Merge branch 'main' into feat/site-redesign
parlough Sep 26, 2024
4863637
Adjust color and sizing of Flutter workmark
parlough Sep 26, 2024
f1a80a4
Add missing brand guidelines button and improve icon spacing
parlough Sep 26, 2024
f9f92e9
Merge branch 'main' into feat/site-redesign
parlough Sep 26, 2024
f6bcfba
Merge branch 'main' into feat/site-redesign
parlough Sep 26, 2024
a6563c8
Merge branch 'main' into feat/site-redesign
parlough Sep 27, 2024
a455ee0
Separate docs and homepage links visually
parlough Sep 27, 2024
1e4b1bb
Add a dropdown for theme and extra links
parlough Sep 27, 2024
99262cb
Use variable for most border radii
parlough Sep 28, 2024
868ce5c
Standardize interaction styles for icon buttons
parlough Sep 28, 2024
651683f
Add back focus search with slash
parlough Sep 28, 2024
d44cb28
Fix HTML error in new dropdown menus
parlough Sep 28, 2024
fa55891
Fix content escaping main body
parlough Sep 30, 2024
61dfcba
Reposition search bar
parlough Sep 30, 2024
afa6cd7
Use util for interaction styles
parlough Sep 30, 2024
58cdd6c
Merge branch 'main' into feat/site-redesign
parlough Oct 1, 2024
3cdd9af
Add scroll margins for footnote anchors
parlough Oct 1, 2024
751fded
Better match spacing of Flutter wordmark
parlough Oct 1, 2024
3e2fcb2
Improve spacing of 404 page
parlough Oct 1, 2024
dec386f
Merge branch 'main' into feat/site-redesign
parlough Oct 9, 2024
5f686e9
Merge branch 'main' into feat/site-redesign
parlough Oct 18, 2024
9f1dad9
Merge branch 'main' into feat/site-redesign
parlough Oct 22, 2024
c0bd272
Merge branch 'main' into feat/site-redesign
parlough Oct 22, 2024
a57ca09
Adjust some spacing and breakpoints
parlough Oct 22, 2024
66eb68b
Merge branch 'main' into feat/site-redesign
parlough Oct 23, 2024
aaef2c2
Fix sizing on 404 page
parlough Oct 23, 2024
63e1216
Implement similar sidenav style fixes from main
parlough Oct 23, 2024
916cd8a
Misc style changes and fixes
parlough Oct 23, 2024
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
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
"build-site-for-staging": "PRODUCTION=false eleventy",
"build-site-for-production": "PRODUCTION=true OPTIMIZE=true eleventy"
},
"dependencies": {
"bootstrap-scss": "^4.6.2"
},
"devDependencies": {
"@11ty/eleventy": "3.0.0-alpha.20",
"firebase-tools": "^13.20.0",
Expand All @@ -36,6 +33,6 @@
"markdown-it-deflist": "^3.0.0",
"markdown-it-footnote": "^4.0.0",
"sass": "^1.79.3",
"shiki": "^1.19.0"
"shiki": "^1.20.0"
}
}
87 changes: 39 additions & 48 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions src/_11ty/plugins/highlight.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {getSingletonHighlighter} from 'shiki';
import dashDarkTheme from '../syntax/dash-dark.js';
import dashLightTheme from '../syntax/dash-light.js';

const _terminalLanguages = {
Expand Down Expand Up @@ -49,7 +50,7 @@ export async function configureHighlighting(markdown) {
'csharp',
'cmake',
],
themes: [dashLightTheme],
themes: [dashLightTheme, dashDarkTheme],
});

markdown.renderer.rules.fence = function (tokens, index) {
Expand Down Expand Up @@ -167,7 +168,10 @@ function _highlight(

return highlighter.codeToHtml(content, {
lang: language,
theme: 'dash-light',
themes: {
light: 'dash-light',
dark: 'dash-dark',
},
transformers: [
{
pre(preElement) {
Expand Down
22 changes: 13 additions & 9 deletions src/_11ty/plugins/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const markdown = (() => {
assistiveText: title => `Link to '${title}' section`,
symbol: '#',
class: 'heading-link',
wrapper: ['<div class="header-wrapper">', '</div>']
wrapper: ['<div class="heading-wrapper">', '</div>']
}),
});

Expand Down Expand Up @@ -67,15 +67,19 @@ function _registerAside(markdown, id, defaultTitle, icon, style) {
render: function (tokens, index) {
if (tokens[index].nesting === 1) {
const parsedArgs = /\s+(.*)/.exec(tokens[index].info);

const title = parsedArgs?.[1] ?? defaultTitle;
return `<aside class="alert ${style}">
<div class="alert-header">
${icon !== null ? `<i class="material-symbols" aria-hidden="true">${icon}</i>` : ''}
<span>${title ?? ''}</span>
</div>
<div class="alert-content">
`;

let aside = `<aside class="alert ${style}">`;
if (title !== null) {
aside += `<div class="alert-header">
${icon !== null ? `<i class="material-symbols" aria-hidden="true">${icon}</i>` : ''}
<span>${title}</span>
</div>`;
}

aside += `<div class="alert-content">`;

return aside;
} else {
return '</div></aside>\n';
}
Expand Down
2 changes: 1 addition & 1 deletion src/_11ty/shortcodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function _setupMedia(eleventyConfig) {
let embedMarkup = `<iframe ${fullWidth ? 'class="full-width"' : 'width="560" height="315"'}
src="https://www.youtube.com/embed/${id}" title="${title}" frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen loading="lazy"></iframe><br>`;
allowfullscreen loading="lazy"></iframe>`;

if (!skipAlternativeLink) {
embedMarkup += `<p><a href="https://www.youtube.com/watch/${id}" target="_blank" rel="noopener" title="Open '${title}' video in new tab">${title}</a></p>`;
Expand Down
Loading
Loading