1
0
mirror of https://github.com/danbee/danbarber.me.hugo.git synced 2025-03-04 08:59:18 +00:00

CSS and dates, yay!

This commit is contained in:
Daniel Barber 2019-10-15 17:28:12 -04:00
parent 5f6044ce3b
commit d9e6de986e
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
9 changed files with 81 additions and 14 deletions

View File

@ -10,3 +10,14 @@
@include container @include container
} }
} }
.post__title {
margin-bottom: 0.25em;
}
.post__date {
color: $text-color-light;
font-size: 0.9rem;
margin-top: 0;
text-transform: uppercase;
}

View File

@ -1,3 +1,9 @@
a { a {
color: $link-color; color: $link-color;
text-decoration: none;
&:hover,
&:focus {
text-decoration: underline;
}
} }

View File

@ -0,0 +1,4 @@
blockquote {
padding-left: 2rem;
border-left: 3px solid $text-color-light;
}

View File

@ -4,3 +4,15 @@ h3 {
font-family: $heading-font-family; font-family: $heading-font-family;
font-weight: 700; font-weight: 700;
} }
h3 {
font-size: 1.35rem;
}
h2 {
font-size: 1.6rem;
}
h1 {
font-size: 2rem;
}

View File

@ -1,7 +1,8 @@
html { html {
color: $text-color;
font-family: $body-font-family; font-family: $body-font-family;
font-size: calc(0.85vmin + 13px);
font-style: normal; font-style: normal;
font-weight: 300; font-weight: 300;
font-size: calc(0.85vmin + 13px);
line-height: 1.4; line-height: 1.4;
} }

View File

@ -18,11 +18,12 @@
// 4. Elements styling for bare HTML elements (like H1, A, etc.). // 4. Elements styling for bare HTML elements (like H1, A, etc.).
// These come with default styling from the browser so we can redefine // These come with default styling from the browser so we can redefine
// them here. // them here.
@import "elements/html"; @import "elements/a";
@import "elements/blockquote";
@import "elements/figure"; @import "elements/figure";
@import "elements/headings"; @import "elements/headings";
@import "elements/html";
@import "elements/pre"; @import "elements/pre";
@import "elements/a";
// 5. Objects class-based selectors which define undecorated design patterns, // 5. Objects class-based selectors which define undecorated design patterns,
// for example media object known from OOCSS // for example media object known from OOCSS

View File

@ -1,7 +1,9 @@
{{ define "main" }} {{ define "main" }}
<article class="post"> <article class="post">
<header> <header>
<h2>{{.Title}}</h2> <h2 class="post__title">{{.Title}}</h2>
<p class="post__date">{{.Date.Format "Jan 2, 2006"}}</p>
</header> </header>
{{.Content}} {{.Content}}

View File

@ -2,7 +2,11 @@
<section class="blog-posts"> <section class="blog-posts">
{{ range .Pages }} {{ range .Pages }}
<article class="post"> <article class="post">
<h3><a href="{{.Permalink}}">{{.Title}}</a></h3> <header>
<h3 class="post__title"><a href="{{.Permalink}}">{{.Title}}</a></h3>
<p class="post__date">{{.Date.Format "Jan 2, 2006"}}</p>
</header>
{{ if .Truncated }} {{ if .Truncated }}
{{.Summary}} {{.Summary}}

View File

@ -310,12 +310,15 @@ html {
*, *:before, *:after { *, *:before, *:after {
box-sizing: inherit; } box-sizing: inherit; }
html { a {
font-family: "Mercury SSm A", "Mercury SSm B", serif; color: #1863a1;
font-style: normal; text-decoration: none; }
font-weight: 300; a:hover, a:focus {
font-size: calc(0.85vmin + 13px); text-decoration: underline; }
line-height: 1.4; }
blockquote {
padding-left: 2rem;
border-left: 3px solid #a6a6a6; }
figure { figure {
margin: 1em 0; } margin: 1em 0; }
@ -326,6 +329,23 @@ h3 {
font-family: "Gotham A", "Gotham B", sans-serif; font-family: "Gotham A", "Gotham B", sans-serif;
font-weight: 700; } font-weight: 700; }
h3 {
font-size: 1.35rem; }
h2 {
font-size: 1.6rem; }
h1 {
font-size: 2rem; }
html {
color: #333;
font-family: "Mercury SSm A", "Mercury SSm B", serif;
font-size: calc(0.85vmin + 13px);
font-style: normal;
font-weight: 300;
line-height: 1.4; }
pre { pre {
overflow: auto; overflow: auto;
background: black; background: black;
@ -333,9 +353,6 @@ pre {
border-radius: 0.5rem; border-radius: 0.5rem;
padding: 1em; } padding: 1em; }
a {
color: #1863a1; }
.container { .container {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@ -354,3 +371,12 @@ a {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
max-width: 40rem; } max-width: 40rem; }
.post__title {
margin-bottom: 0.25em; }
.post__date {
color: #a6a6a6;
font-size: 0.9rem;
margin-top: 0;
text-transform: uppercase; }