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

Simplify all the things!

─────────────────────────────▄██▄
─────────────────────────────▀███
────────────────────────────────█
───────────────▄▄▄▄▄────────────█
──────────────▀▄────▀▄──────────█
──────────▄▀▀▀▄─█▄▄▄▄█▄▄─▄▀▀▀▄──█
─────────█──▄──█────────█───▄─█─█
─────────▀▄───▄▀────────▀▄───▄▀─█
──────────█▀▀▀────────────▀▀▀─█─█
──────────█───────────────────█─█
▄▀▄▄▀▄────█──▄█▀█▀█▀█▀█▀█▄────█─█
█▒▒▒▒█────█──█████████████▄───█─█
█▒▒▒▒█────█──██████████████▄──█─█
█▒▒▒▒█────█───██████████████▄─█─█
█▒▒▒▒█────█────██████████████─█─█
█▒▒▒▒█────█───██████████████▀─█─█
█▒▒▒▒█───██───██████████████──█─█
▀████▀──██▀█──█████████████▀──█▄█
──██───██──▀█──█▄█▄█▄█▄█▄█▀──▄█▀
──██──██────▀█─────────────▄▀▓█
──██─██──────▀█▀▄▄▄▄▄▄▄▄▄▀▀▓▓▓█
──████────────█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█
──███─────────█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█
──██──────────█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█
──██──────────█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█
──██─────────▐█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█
──██────────▐█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█
──██───────▐█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▌
──██──────▐█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▌
──██─────▐█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▌
──██────▐█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▌
This commit is contained in:
Daniel Barber 2019-10-17 19:36:48 -04:00
parent 74c18dd052
commit c91fbadd4d
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
13 changed files with 53 additions and 77 deletions

View File

@ -1,5 +1,6 @@
.photos { .photos {
padding: 8vmin $pad-min 4vmin; padding-bottom: 4vmin;
padding-top: 1em;
} }
.photos__container { .photos__container {

View File

@ -1,7 +1,6 @@
.post { .post {
border-bottom: 1px dashed $border-color;
margin-top: 2em; margin-top: 2em;
padding-bottom: 1.5em; margin-bottom: 4em;
img { img {
max-width: 100%; max-width: 100%;
@ -10,10 +9,6 @@
& > * { & > * {
@include container @include container
} }
@media (prefers-color-scheme: dark) {
border-bottom: 1px dashed $border-color-dark;
}
} }
.post__title { .post__title {

View File

@ -1,9 +1,8 @@
.posts__pagination { .posts__pagination {
padding: 1em $pad-min; @include container;
}
.posts__pagination-container {
display: flex; display: flex;
margin-top: 1em;
margin-bottom: 1em;
} }
.posts__next-link, .posts__next-link,

View File

@ -1,9 +1,7 @@
.site-header { .site-header {
padding: 0 $pad-min; padding: 0 $pad-min;
border-bottom: 1px dashed $text-color;
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
border-bottom: 1px dashed $text-color-dark;
} }
} }

View File

@ -1,3 +1,3 @@
.outer { main {
padding: 0 $pad-min; padding: 0 $pad-min;
} }

View File

@ -24,11 +24,11 @@
@import "elements/headings"; @import "elements/headings";
@import "elements/html"; @import "elements/html";
@import "elements/pre"; @import "elements/pre";
@import "elements/main";
// 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
@import "objects/container"; @import "objects/container";
@import "objects/outer";
// 6. Components specific UI components. // 6. Components specific UI components.
// This is where majority of our work takes place and our UI components // This is where majority of our work takes place and our UI components

View File

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

View File

@ -1,13 +1,13 @@
{{ define "main" }} {{ define "main" }}
<section class="home__about outer"> <section class="home__about">
<article class="container"> <article class="container">
{{ .Content }} {{ .Content }}
</article> </article>
</section> </section>
<section class="home__photos outer"> <section class="home__photos">
<article class="container"> <article class="container">
<header> <header class="home__header">
<h2>Latest Photos</h2> <h2>Latest Photos</h2>
</header> </header>
@ -26,21 +26,17 @@
</section> </section>
<section class="home__blog"> <section class="home__blog">
<article> <article class="container">
<header class="outer"> <header class="home__header">
<div class="container">
<h2>From the Blog</h2> <h2>From the Blog</h2>
</div>
</header> </header>
{{ range first 3 (where .Site.RegularPages "Section" "blog") }} {{ range first 3 (where .Site.RegularPages "Section" "blog") }}
{{ partial "blog_post_summary.html" . }} {{ partial "blog_post_summary.html" . }}
{{ end }} {{ end }}
<footer class="home__more outer"> <footer class="home__more">
<div class="container"> <p><a href="/blog">More posts →</a></p>
<p><a href="/blog">More →</a></p>
</div>
</footer> </footer>
</article> </article>
</section> </section>

View File

@ -1,7 +1,7 @@
<article class="post outer"> <article class="post outer">
<header> <header>
<div class="container"> <div class="container">
<h3 class="post__title"><a href="{{.Permalink}}">{{.Title}}</a></h3> <h3 class="post__title"><a href="{{.URL}}">{{.Title}}</a></h3>
<p class="post__date">{{.Date.Format "Jan 2, 2006"}}</p> <p class="post__date">{{.Date.Format "Jan 2, 2006"}}</p>
</div> </div>
@ -10,7 +10,7 @@
{{ if .Truncated }} {{ if .Truncated }}
{{.Summary}} {{.Summary}}
<p class="post__read-more"><a href="{{.Permalink}}">Read on →</a></p> <p class="post__read-more"><a href="{{.URL}}">Read on →</a></p>
{{ else }} {{ else }}
{{.Content}} {{.Content}}
{{ end }} {{ end }}

View File

@ -15,7 +15,7 @@
{{ $tiny := .Scratch.Get "tiny" }} {{ $tiny := .Scratch.Get "tiny" }}
{{ $small := .Scratch.Get "small" }} {{ $small := .Scratch.Get "small" }}
<a class="photos__link" href={{.Permalink}}> <a class="photos__link" href={{.URL}}>
<img class="photos__thumb" <img class="photos__thumb"
srcset=" srcset="
{{ if ge $src.Width "300" }} {{ if ge $src.Width "300" }}

View File

@ -6,7 +6,6 @@
</section> </section>
<section class="posts__pagination"> <section class="posts__pagination">
<div class="container posts__pagination-container">
{{ if .Paginator.HasNext }} {{ if .Paginator.HasNext }}
<a class="posts__next-link" href="{{.Paginator.Next.URL}}">← Older</a> <a class="posts__next-link" href="{{.Paginator.Next.URL}}">← Older</a>
{{ end }} {{ end }}
@ -14,6 +13,5 @@
{{ if .Paginator.HasPrev }} {{ if .Paginator.HasPrev }}
<a class="posts__prev-link" href="{{.Paginator.Prev.URL}}">Newer →</a> <a class="posts__prev-link" href="{{.Paginator.Prev.URL}}">Newer →</a>
{{ end }} {{ end }}
</div>
</section> </section>
{{ end }} {{ end }}

View File

@ -1,16 +1,13 @@
{{ define "main" }} {{ define "main" }}
<section class="photos"> <section class="photos photos__container">
<div class="photos__container">
{{ range (.Paginator 24).Pages }} {{ range (.Paginator 24).Pages }}
<article class="photos__thumb-container"> <article class="photos__thumb-container">
{{ partial "photo_thumb.html" . }} {{ partial "photo_thumb.html" . }}
</article> </article>
{{ end }} {{ end }}
</div>
</section> </section>
<section class="posts__pagination"> <section class="posts__pagination">
<div class="container posts__pagination-container">
{{ if .Paginator.HasNext }} {{ if .Paginator.HasNext }}
<a class="posts__next-link" href="{{.Paginator.Next.URL}}">← Older</a> <a class="posts__next-link" href="{{.Paginator.Next.URL}}">← Older</a>
{{ end }} {{ end }}
@ -18,6 +15,5 @@
{{ if .Paginator.HasPrev }} {{ if .Paginator.HasPrev }}
<a class="posts__prev-link" href="{{.Paginator.Prev.URL}}">Newer →</a> <a class="posts__prev-link" href="{{.Paginator.Prev.URL}}">Newer →</a>
{{ end }} {{ end }}
</div>
</section> </section>
{{ end }} {{ end }}

View File

@ -365,21 +365,17 @@ pre {
border-radius: 0.5rem; border-radius: 0.5rem;
padding: 1em; } padding: 1em; }
main {
padding: 0 6.5%; }
.container { .container {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
max-width: 40rem; } max-width: 40rem; }
.outer { .site-header {
padding: 0 6.5%; } padding: 0 6.5%; }
.site-header {
padding: 0 6.5%;
border-bottom: 1px dashed #333; }
@media (prefers-color-scheme: dark) {
.site-header {
border-bottom: 1px dashed #ddd; } }
.site-header__container { .site-header__container {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@ -397,10 +393,12 @@ pre {
text-align: right; } text-align: right; }
.posts__pagination { .posts__pagination {
padding: 1em 6.5%; } margin-left: auto;
margin-right: auto;
.posts__pagination-container { max-width: 40rem;
display: flex; } display: flex;
margin-top: 1em;
margin-bottom: 1em; }
.posts__next-link, .posts__next-link,
.posts__prev-link { .posts__prev-link {
@ -413,18 +411,14 @@ pre {
text-align: right; } text-align: right; }
.post { .post {
border-bottom: 1px dashed #ccc;
margin-top: 2em; margin-top: 2em;
padding-bottom: 1.5em; } margin-bottom: 4em; }
.post img { .post img {
max-width: 100%; } max-width: 100%; }
.post > * { .post > * {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
max-width: 40rem; } max-width: 40rem; }
@media (prefers-color-scheme: dark) {
.post {
border-bottom: 1px dashed #666; } }
.post__title { .post__title {
margin-bottom: 0.25em; } margin-bottom: 0.25em; }
@ -436,7 +430,8 @@ pre {
text-transform: uppercase; } text-transform: uppercase; }
.photos { .photos {
padding: 8vmin 6.5% 4vmin; } padding-bottom: 4vmin;
padding-top: 1em; }
.photos__container { .photos__container {
margin-left: auto; margin-left: auto;