-
Notifications
You must be signed in to change notification settings - Fork 2
Added 404 page #23
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
base: main
Are you sure you want to change the base?
Added 404 page #23
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| --- | ||
| import Base from '../layouts/Base.astro'; | ||
| --- | ||
|
|
||
| <Base title="Page not found · CCSS Showcase"> | ||
| <style> | ||
| section { | ||
| text-align: center; | ||
| font: var(--font-sans); | ||
| font-size: var(--text-2xl); | ||
| color: var(--color-muted); | ||
| } | ||
| #error { | ||
| font-size: calc(var(--text-3xl) * 3.5); | ||
| margin-bottom: 0; | ||
| } | ||
| h1 { | ||
| margin-bottom: calc(var(--spacing) * 2); | ||
| } | ||
| p { | ||
| margin-bottom: calc(var(--spacing) * 9); | ||
| } | ||
| a { | ||
| background-color: var(--color-accent); | ||
| color: var(--color-surface); | ||
| padding: calc(var(--spacing) * 2) calc(var(--spacing) * 3); | ||
| border-radius: var(--radius-card); | ||
| font-size: var(--text-3xl); | ||
| } | ||
| a:hover { | ||
| background-color: var(--color-ink); | ||
| } | ||
| </style> | ||
| <section> | ||
| <p id="error">404</p> | ||
|
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. I think some appearance changes can be made here, mainly for stronger hierarchy. Kind of adding to what I mentioned when you checked in about the design on Discord, just since it's easier to play around with potential changes in the PR before requesting updates. (Some code snippets below might need adjustments if something looks off)
After making changes, make sure to run |
||
| <h1>Page not found</h1> | ||
| <p>That page doesn't exist (or moved). Try the project gallery.</p> | ||
| <a href="/projects">Back to projects</a> | ||
| </section> | ||
| </Base> | ||
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.
Content is present and structured as intended, thanks! But please use in line tailwind styling instead of this separate
<style>block for consistency with the rest of the site. I'd recommend looking at some other pages to see how styling is done there.Note: Also merge recent changes from main into your current branch so you get dark mode and other changes. Some feedback relies on having dark mode present.
Most of it should translate one-to-one, for example:
So
<p id="error">becomes something like<p class="text-8xl font-bold">, and theidisn't needed anymore once the styles live on the element.A few other things to fix while making the changes:
font: var(--font-sans)can be deleted. The site already sets the font globally, so this line isn't doing anything.inline-block. Links are inline elements by default, which means top and bottom padding doesn't actually push the button's edges outward, it just overlaps whatever is around it. Addinginline-blockmakes the padding behave like you'd expect.text-accent-contrastfor the button's text colour, notcolor-surface.accent-contrastis the token (fromglobal.css) meant specifically for text sitting on a red background. It stays white in dark mode, whereas surface becomes dark grey and the label gets hard to read on the red button.hover:bg-accent/85(a slightly transparent red) works in both. Addtransition-colorstoo, so it fades like the other links on the site.