-
Notifications
You must be signed in to change notification settings - Fork 50
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
Redesign the homepage #153
Conversation
I forgot the most important part: a preview! Most of the links will not work (because I haven't set up a full nginx server to handle our extension-less files), but you can see the result at https://whatwgorg-wjjgptrgid.now.sh |
I guess this isn't quite mergeable as-is because /images currently is an alias for images.whatwg.org. I'm not sure what our plan is there; thoughts appreciated. |
I don't think we should make images/ an alias for images.whatwg.org if we need whatwg.org-specific images. We should just dedupe the resources and that's that. |
Couple design points:
|
Sorry for going AWOL. I was moving house and changing jobs at the same time and feeling very stressed!
|
The issue is that it's already at 301 redirect, so I'm not sure how to proceed.
In general with this and other design points, I'd rather land then iterate, or at least get very specific suggestions; I don't feel equipped to respond to feedback like this myself.
My understanding is that these days pixels vs. ems make no difference in this regard. |
How about make it a 302 and wait for at least a week, or as long as it takes for this PR to be done? |
Actually, per https://stackoverflow.com/a/21396547 that might not work. Maybe we should just stop using permanent redirects entirely, except for HTTP->HTTPS? |
It's also unclear to me how often people might hit those URLs. E.g. I imagine a lot of the old specs include /images URLs. Maybe we should create a new directory, e.g. |
Yes, /images is linked a lot from specs/, but also demos/, news/ and https://whatwg.org/style/tabbed-pages. If we did ram through the redirect caching we'd still end up with a bunch of old cruft in the directory, so I don't have a strong opinion, whatever works. |
Yeah I'm not sure why we made it a redirect. We should revert that. Too many old links. |
So that we can change it later with fewer clients having cached the permanent redirect. See discussion in whatwg/whatwg.org#153.
That was me in commit 9595990, now it's clear the other way around would have been better. I've sent whatwg/misc-server#66 to make this less painful if we change it. |
Updated based on feedback; new preview at https://whatwgorg-ymcoicnlew.now.sh |
Oops, typoed the extra spacing, see https://whatwgorg-llsduqszfy.now.sh. (It now matches @o-t-w's original.) |
I think this looks pretty good! The amount of padding above/below the logo/title looks a bit uneven to me, can we try a bit more on top? In the dark grey boxes starting with "Participate", a bit more horizontal padding would be nice, maybe not as much as the vertical, but a tad. At least the width of the lower case "y" or "s" that the strings end with. The green gradients aren't bad, certainly better than solid WHATWG green, but a solid |
I'd prefer concrete CSS suggestions to "how about maybe changing this a bit?" :). I don't feel qualified to translate such things. |
Here is some CSS that makes it look a little better and gives the links hover/focus effects. Not entirely sure we also need visited styling here. Probably okay without... * {
box-sizing: border-box;
}
:link {
color: #00F;
}
:visited {
color: #0E388C;
}
html {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background-color: rgb(235, 235, 235);
--whatwg-green: #3A7908;
}
body {
max-width: 900px;
margin: 0 auto;
padding: 0;
display: flex;
flex-direction: column;
min-height: 100vh;
}
body > *:not(footer):not(script) {
margin-bottom: 40px;
}
header {
margin:2em 0;
display: flex;
align-items: center;
}
header > hgroup {
margin-left: 20px;
}
header > hgroup > h1 {
margin: 0;
font-weight: normal;
}
@media (max-width: 600px) {
header > hgroup > h1 {
font-size: 19px;
}
}
header > hgroup > h2 {
font-size: 17px;
margin: 0;
color: rgb(40, 40, 40);
font-weight: normal;
margin: 5px 0;
}
#the-standards > ul {
list-style-type: none;
margin: 0;
padding: 0;
}
#the-standards li {
border: solid var(--whatwg-green) 2px;
border-radius: 7px;
letter-spacing: 0.25px;
font-weight: bold;
background-color: white;
}
#the-standards li:not(:last-of-type) {
margin-bottom: 15px;
}
#the-standards a {
color: var(--whatwg-green);
text-decoration: none;
padding: 4px 30px;
height: 64px;
display: flex;
align-items: center;
}
#the-standards a:hover, #the-standards a:focus {
transition:.2s;
padding-left:50px;
}
#the-standards a::before {
display: inline-block;
width: 27px;
height: 15.4px;
background: url(/img/arrow.svg);
content: "";
margin-right: 21px;
vertical-align: middle;
background-repeat: no-repeat;
}
@media (min-width: 600px) {
#self-explanatory-links {
display: grid;
grid-template-columns: repeat(12, 1fr);
grid-column-gap: 20px;
grid-row-gap: 20px;
}
}
#self-explanatory-links > a {
padding: 10px;
text-align: center;
border: 8px solid rgba(58, 121, 8, 0.2);
background: linear-gradient(var(--whatwg-green), #00981B);
background-clip: padding-box;
grid-column: span 3;
text-decoration: none;
color: white;
font-size: 17px;
letter-spacing: 0.3px;
}
#self-explanatory-links > a:hover, #self-explanatory-links > a:focus {
transition:.2s;
transform:scale(1.1);
}
@media (max-width: 600px) {
#self-explanatory-links > a {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-top: 15px;
}
}
#links-with-explanations {
/* Grow into the extra space before the footer to make the footer stick to the bottom. */
flex: 1;
}
#links-with-explanations a {
padding:0 10px;
display: flex;
flex-wrap: wrap;
margin-bottom: 15px;
background-color: #333;
align-items: center;
justify-content: space-between;
border-radius: 4px;
color: white;
min-height: 54px;
text-decoration: none;
}
#links-with-explanations a:hover, #links-with-explanations a:focus {
transition:.2s;
background-color: #000;
}
#links-with-explanations a::before {
display: inline-block;
width: 30px;
height: 30px;
content: "";
margin: 12px 20px 12px 8px;
vertical-align: middle;
background-repeat: no-repeat;
}
#participate::before {
background: url(/img/participate.svg);
}
#irc::before {
background: url(/img/irc.svg);
}
#twitter::before {
background: url(/img/twitter.svg);
}
#checker::before {
background: url(/img/checker.svg);
}
#links-with-explanations a > strong {
margin-right: auto;
}
#links-with-explanations a > p {
margin-left: auto;
padding-right: 8px;
}
@media (max-width: 600px) {
#links-with-explanations a > p {
width: 100%;
padding-left: 12px;
}
}
footer {
border-top: 1px solid black;
text-align: center;
font-size: 12px;
}
footer small {
/* Semantically it's small, but the footer is already small, so don't change the font size. */
font-size: inherit;
}
footer > * {
font-style: normal;
margin: 12px 0;
} |
Closes #90 by subsuming the work there. Helps with #59 as at least the homepage is now mobile-friendly. Helps with some of the items noted in #149. Substantive changes: * "Join" renamed to "GitHub" (see #149) * "News" renamed to "Blog" * "Working Mode" replaced with "Policies" (see #149) * "Twitter" added
- /images/ -> /img/ - Use system default fonts - Added extra spacing below header
Alrighty, applied those plus some further small tweaks for mobile. Thanks especially for the hover states; those were conspicuously missing. Thoughts? I'll take a break from trying to work on this and #154 in tandem; let's land this first then I can work on that on top of it. |
@domenic, is there a preview URL? |
I made one but forgot to paste it: https://whatwgorg-ypuhyslfsp.now.sh |
Couldn't resist fixing this.
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.
Note that I made a minor change to the color name to make it consistent with other color names.
I think of it more as a variable name than a color name, but shrug. I'll give people some more time to check it out before merging. Woohoo! |
Closes #90 by subsuming the work there. Helps with #59 as at least the homepage is now mobile-friendly. Helps with some of the items noted in #149.
Substantive changes:
Thank you @o-t-w for your original design in #90! This is all-new code, but based on your visual ideas.