From 1ae649f2f7a5eff5b62cb9ba28e83bf0a7cb89fd Mon Sep 17 00:00:00 2001 From: Daniel Barber Date: Tue, 19 Nov 2019 20:26:35 -0500 Subject: [PATCH] Fonts, grid and other stuff --- source/index.html.erb | 18 ++++---- source/layouts/layout.erb | 1 + source/stylesheets/site.css.scss | 74 +++++++++++++++++++++++++++----- 3 files changed, 74 insertions(+), 19 deletions(-) diff --git a/source/index.html.erb b/source/index.html.erb index 4bdd3db..c3d3acf 100644 --- a/source/index.html.erb +++ b/source/index.html.erb @@ -4,15 +4,15 @@ title: Persephone

Persephone

+ +

A modern, open source MPD client for macOS.

-

Persephone is a modern, open source MPD client for macOS. - -

MP… what?

+

MP… what?

From the website:

@@ -28,14 +28,14 @@ title: Persephone Wikipedia has a more comprehensive description.

- -

- ↓ Download -

- + + + - +
diff --git a/source/layouts/layout.erb b/source/layouts/layout.erb index 18f6a22..eca51ca 100644 --- a/source/layouts/layout.erb +++ b/source/layouts/layout.erb @@ -7,6 +7,7 @@ content="width=device-width, initial-scale=1, shrink-to-fit=no"> <%= current_page.data.title || "Middleman" %> + <%= stylesheet_link_tag "site" %> <%= javascript_include_tag "site" %> diff --git a/source/stylesheets/site.css.scss b/source/stylesheets/site.css.scss index 1ab0bd1..3fd5507 100644 --- a/source/stylesheets/site.css.scss +++ b/source/stylesheets/site.css.scss @@ -1,13 +1,15 @@ -$dark-color: #181818; $light-color: white; +$dark-color: #181818; + +$light-link-color: #253FA1; +$dark-link-color: #75B3ED; body { background-color: $light-color; color: $dark-color; - font-family: -apple-system, BlinkMacSystemFont, "Avenir Next", "Avenir", - "Segoe UI", "Lucida Grande", "Helvetica Neue", "Helvetica", "Fira Sans", - "Roboto", "Noto", "Droid Sans", "Cantarell", "Oxygen", "Ubuntu", - "Franklin Gothic Medium", "Century Gothic", "Liberation Sans", sans-serif; + font-family: "Gotham A", "Gotham B", sans-serif; + font-style: normal; + font-weight: 400; padding: 4vw 1rem; text-align: center; @@ -17,13 +19,40 @@ body { } } +h1 { + font-size: 2.5rem; + font-weight: 800; + margin-bottom: 0.5em; + + @media (min-width: 25rem) { + font-size: 3rem; + } + + @media (min-width: 35rem) { + font-size: 4rem; + } + + @media (min-width: 50rem) { + font-size: 5rem; + } +} + main { - max-width: 50rem; margin: 0 auto; + max-width: 50rem; + + @media (min-width: 40rem) { + display: grid; + grid-column-gap: 2rem; + grid-template-areas: + "icon text" + "download download" + "screenshot screenshot"; + } } a { - color: rgba($dark-color, 0.7); + color: $light-link-color; &:focus, &:hover { @@ -31,7 +60,7 @@ a { } @media (prefers-color-scheme: dark) { - color: rgba($light-color, 0.7); + color: $dark-link-color; &:focus, &:hover { @@ -51,18 +80,31 @@ blockquote { } .text { + grid-area: text; text-align: left; } .icon { + grid-area: icon; width: 16rem; + + @media (min-width: 40rem) { + float: left; + } } .screenshot { - width: 100%; + display: block; + grid-area: screenshot; + margin: 0 -4.25%; + + img { + width: 100%; + } } .download-section { + grid-area: download; margin: 2rem 0; text-align: center; } @@ -71,12 +113,24 @@ blockquote { background: $dark-color; border-radius: 0.5rem; color: $light-color; + font-weight: 700; padding: 0.5rem 2rem 0.5rem 1.5rem; text-decoration: none; - font-weight: bold; + + &:focus, + &:hover { + background: lighten($dark-color, 10%); + color: $light-color; + } @media (prefers-color-scheme: dark) { background: $light-color; color: $dark-color; + + &:focus, + &:hover { + background: darken($light-color, 10%); + color: $dark-color; + } } }