-
Notifications
You must be signed in to change notification settings - Fork 101
Remove "Shared marketing footer" and build docs specific one as per design #3320
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,10 +12,9 @@ | |
| "dev": "npm-run-all --parallel dev:img dev:dictionary dev:astro dev:watch", | ||
| "dev:dictionary": "node ./dictionary-sorter.mjs", | ||
| "dev:img": "node ./src/themes/octopus/utilities/img.mjs", | ||
| "dev:astro": "astro dev --mode staging", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this change?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why astro It was there purely to serve the microsite footer, and my PR already removes it. Astro loads .env.[mode] files, so --mode staging made pnpm dev pick up .env.staging — which held only the three shared-footer variables. Its own header comment spells out the purpose:
So: the footer HTML was fetched at build time from With the fetch gone, both .env files are deleted and the mode has nothing left to load, so |
||
| "dev:astro": "astro dev", | ||
| "dev:watch": "onchange 'src/**/*.{js,mjs,ts,astro,css}' -- prettier --write --plugin=prettier-plugin-astro {{changed}}", | ||
| "astro": "astro", | ||
| "snapshot": "node --env-file=.env.production ./scripts/snapshot-shared.mjs", | ||
| "build": "astro build", | ||
| "crawl": "linkinator ./dist --skip \"^(?!http://localhost)\" --recurse --verbosity error", | ||
| "format": "prettier --write --plugin=prettier-plugin-astro 'src/**/*.{js,mjs,ts,astro,css}'", | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| --- | ||
| import { accelerator } from '@lib/accelerator'; | ||
| import { SITE } from '@config'; | ||
| import { Lang, Translations } from '@util/Languages'; | ||
| import { links } from '@data/footer'; | ||
|
|
||
| const stats = new accelerator.statistics('components/Footer.astro'); | ||
| stats.start(); | ||
|
|
||
| // Properties | ||
| type Props = { | ||
| lang: string; | ||
| lastUpdated?: Date | string | null; | ||
| }; | ||
| const { lang, lastUpdated = null } = Astro.props satisfies Props; | ||
|
|
||
| // Language | ||
| const _ = Lang(lang); | ||
|
|
||
| // Logic | ||
| const updatedDate = lastUpdated ? new Date(lastUpdated) : null; | ||
| const updatedLabel = updatedDate | ||
| ? `${_(Translations.octopus_footer.last_updated)} ${accelerator.dateFormatter.formatShortDate(updatedDate, lang)}` | ||
| : null; | ||
| const copyright = `${_(Translations.octopus_footer.copyright)} © ${new Date().getFullYear()} ${SITE.owner}`; | ||
|
|
||
| stats.stop(); | ||
| --- | ||
|
|
||
| <footer class="site-footer" id="site-footer"> | ||
| <div class="site-footer__content"> | ||
| { | ||
| updatedDate && ( | ||
| <p class="site-footer__updated"> | ||
| <time datetime={updatedDate.toISOString()}>{updatedLabel}</time> | ||
| </p> | ||
| ) | ||
| } | ||
| <div class="site-footer__meta"> | ||
| <p class="site-footer__copyright">{copyright}</p> | ||
| <nav aria-label={_(Translations.octopus_footer.links_label)}> | ||
| <ul class="site-footer__links"> | ||
| { | ||
| links.map((link) => ( | ||
| <li> | ||
| <a href={link.url}>{link.title}</a> | ||
| </li> | ||
| )) | ||
| } | ||
| </ul> | ||
| </nav> | ||
| </div> | ||
| </div> | ||
| </footer> |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My right-nav PR changed the way the central column and right-nav are positioned. I've merged it, so recommend you rebase and check that this positioning rule/comment is still accurate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the heads up, checked and looks good to me