From 113d4e53416ddf42212da6f217670bdc6f0c9dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Sat, 1 Jan 2022 21:03:20 +0100 Subject: Import new minimalist design --- LICENSE | 2 +- archetypes/default.md | 2 + assets/scss/style.scss | 183 ++ layouts/404.html | 37 +- layouts/_default/archive.terms.html | 21 - layouts/_default/baseof.html | 9 +- layouts/_default/list.html | 14 +- layouts/_default/search.html | 30 - layouts/_default/single.html | 93 +- layouts/_default/summary.html | 25 - layouts/_default/terms.html | 19 - layouts/index.html | 22 +- layouts/index.json | 7 - layouts/partials/author_card.html | 12 + layouts/partials/footer.html | 10 +- layouts/partials/head.html | 57 +- layouts/partials/header.html | 63 +- layouts/partials/hero.html | 7 + layouts/partials/meta.html | 15 - layouts/partials/metadata.html | 24 + layouts/partials/open_section.html | 9 + layouts/partials/pagination.html | 18 +- layouts/partials/post.html | 20 + layouts/partials/post_pager.html | 10 + layouts/section_page/single.html | 8 + layouts/taxonomy/terms.html | 35 + makefile | 10 + package-lock.json | 40 + package.json | 5 + readme.md | 8 - readme.org | 4 + static/css/fonts/BerkshireSwash-Regular.ttf.eot | Bin 0 -> 44186 bytes static/css/fonts/BerkshireSwash-Regular.ttf.svg | 2166 ++++++++++++++++++++++ static/css/fonts/BerkshireSwash-Regular.ttf.woff | Bin 0 -> 25528 bytes static/js/search.js | 101 - theme.toml | 18 +- 36 files changed, 2682 insertions(+), 422 deletions(-) create mode 100644 archetypes/default.md create mode 100644 assets/scss/style.scss delete mode 100644 layouts/_default/archive.terms.html delete mode 100644 layouts/_default/search.html delete mode 100644 layouts/_default/summary.html delete mode 100644 layouts/_default/terms.html delete mode 100644 layouts/index.json create mode 100644 layouts/partials/author_card.html create mode 100644 layouts/partials/hero.html delete mode 100644 layouts/partials/meta.html create mode 100644 layouts/partials/metadata.html create mode 100644 layouts/partials/open_section.html create mode 100644 layouts/partials/post.html create mode 100644 layouts/partials/post_pager.html create mode 100644 layouts/section_page/single.html create mode 100644 layouts/taxonomy/terms.html create mode 100644 makefile create mode 100644 package-lock.json create mode 100644 package.json delete mode 100644 readme.md create mode 100644 readme.org create mode 100644 static/css/fonts/BerkshireSwash-Regular.ttf.eot create mode 100644 static/css/fonts/BerkshireSwash-Regular.ttf.svg create mode 100644 static/css/fonts/BerkshireSwash-Regular.ttf.woff delete mode 100644 static/js/search.js diff --git a/LICENSE b/LICENSE index 96f2cd9..e4483e2 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Óscar Nájera +Copyright (c) 2021 YOUR_NAME_HERE Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..ac36e06 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,2 @@ ++++ ++++ diff --git a/assets/scss/style.scss b/assets/scss/style.scss new file mode 100644 index 0000000..98afe53 --- /dev/null +++ b/assets/scss/style.scss @@ -0,0 +1,183 @@ +@import "node_modules/tachyons-sass/tachyons.scss"; + +div.highlight pre { + overflow-x: scroll; +} + +.header ul { + clear: both; + max-height: 0; + transition: max-height 0.2s ease-out; +} + +/* menu icon */ + +.header .menu-icon .navicon { + display: block; + height: 2px; + position: relative; + transition: background 0.2s ease-out; + width: 18px; +} + +.header .menu-icon .navicon:before, +.header .menu-icon .navicon:after { + background: #ebdbb2; + content: ""; + display: block; + height: 100%; + position: absolute; + transition: all 0.2s ease-out; + width: 100%; +} + +.header .menu-icon .navicon:before { + top: 6px; +} + +.header .menu-icon .navicon:after { + top: -6px; +} + +/* menu btn */ +.header .menu-btn:checked ~ .menu-icon { + .navicon { + background: transparent; + } + .navicon:before { + transform: rotate(-45deg); + } + .navicon:after { + transform: rotate(45deg); + } +} + +.header .menu-btn:checked ~ .menu-icon:not(.steps) { + .navicon:before, + .navicon:after { + top: 0; + } +} + +.header .menu-btn:checked ~ ul { + max-height: 240px; +} + +@media screen and (min-width: 30em) { + .header ul { + clear: none; + float: right; + max-height: none; + } +} + +.w3-theme-l5 { + color: #000 !important; + background-color: #f7fcf5 !important; +} +.w3-theme-l4 { + color: #000 !important; + background-color: #e4f4dc !important; +} +.w3-theme-l3 { + color: #000 !important; + background-color: #c9e9ba !important; +} +.w3-theme-l2 { + color: #000 !important; + background-color: #aedd97 !important; +} +.w3-theme-l1 { + color: #000 !important; + background-color: #94d274 !important; +} +.w3-theme-d1 { + color: #fff !important; + background-color: #69bf3e !important; +} +.w3-theme-d2 { + color: #fff !important; + background-color: #5da937 !important; +} +.w3-theme-d3 { + color: #fff !important; + background-color: #519430 !important; +} +.w3-theme-d4 { + color: #fff !important; + background-color: #467f29 !important; +} +.w3-theme-d5 { + color: #fff !important; + background-color: #3a6a22 !important; +} + +.w3-theme-light { + color: #000 !important; + background-color: #f7fcf5 !important; +} +.w3-theme-dark { + color: #fff !important; + background-color: #3a6a22 !important; +} +.w3-theme-action { + color: #fff !important; + background-color: #3a6a22 !important; +} + +.w3-theme { + color: #fff !important; + background-color: #79c753 !important; +} +.w3-text-theme { + color: #79c753 !important; +} +.w3-theme-border { + border-color: #79c753 !important; +} +.w3-hover-theme:hover { + color: #fff !important; + background-color: #79c753 !important; +} + +blockquote { + @extend .bl, .bw2, .w3-theme-border, .pl2; +} + +// POSTS +.main-content, +footer { + a { + @extend .link, .light-gray, .underline; + } + + p code { + @extend .bg-black-30, .pa1; + } +} +// Projects status feed +.status-feed { + dt { + @extend .b; + } + dd a { + @extend .link, .w3-theme-d2, .pa1, .br3; + } +} + +// Title font +@font-face { + font-family: "BerkshireSwash-Regular"; + src: url("/css/fonts/BerkshireSwash-Regular.ttf.woff") format("woff"), + url("/css/fonts/BerkshireSwash-Regular.ttf.svg#BerkshireSwash-Regular") + format("svg"), + url("/css/fonts/BerkshireSwash-Regular.ttf.eot"), + url("/css/fonts/BerkshireSwash-Regular.ttf.eot?#iefix") + format("embedded-opentype"); + font-weight: normal; + font-style: normal; +} + +.berkshire-swash { + font-family: "BerkshireSwash-Regular"; +} diff --git a/layouts/404.html b/layouts/404.html index c2f0c31..eada35e 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,17 +1,28 @@ -{{ define "main" }} -
-
-

404

-

Sorry, we can't find the page you are looking for.

-
+{{ define "main"}} +
-

Are you looking for one of these?

+

Page not found

+ + {{/* Suggest recently published pages to the user. */}} + +

Perhaps you were looking for one of these?

+ + {{ $query := where (where (where (where site.RegularPages.ByDate.Reverse "Title" "!=" "") "Kind" "in" (slice "page" "section")) "Params.private" "!=" true) "Permalink" "!=" "" }} + {{ $count := len $query }} + {{ if gt $count 0 }} +

{{ i18n "user_profile_latest" }}

+ + {{ end }} -
- {{ range .Site.Menus.main }} - - {{ .Pre }} {{ .Name }} - {{ end }} -
+ {{ end }} diff --git a/layouts/_default/archive.terms.html b/layouts/_default/archive.terms.html deleted file mode 100644 index 7b5a540..0000000 --- a/layouts/_default/archive.terms.html +++ /dev/null @@ -1,21 +0,0 @@ -{{ define "main" }} -
- {{ range (where .Site.RegularPages "Section" "post").GroupByDate "2006" }} -
-

{{ .Key }}

- - {{ range .Pages.GroupByDate "January" }} -
    -
  • {{ .Key }}
  • - -
      - {{ range .Pages }} -
    • {{.Title}} - {{ .Date.Format "Jan 2" }}
    • - {{ end}} -
    -
- {{ end}} -
- {{ end }} -
-{{ end }} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index f5fb3d8..20e0c0c 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,16 +1,11 @@ {{- partial "head.html" . -}} - + {{- partial "header.html" . -}} - -
+
{{- block "main" . }}{{- end }}
- {{- partial "footer.html" . -}} - - {{- block "footerfiles" . }}{{- end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index c9839f8..a1f0f08 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,8 +1,10 @@ {{ define "main" }} -
- {{ range .Paginator.Pages }} - {{ .Render "summary" }} - {{ end }} - {{ partial "pagination.html" . }} -
+{{ partial "open_section.html" . }} + +{{ range .Paginator.Pages.ByPublishDate.Reverse }} +
+ {{ partial "post.html" . }} +
+{{ end }} +{{ partial "pagination.html" . }} {{ end }} diff --git a/layouts/_default/search.html b/layouts/_default/search.html deleted file mode 100644 index 4bf77f2..0000000 --- a/layouts/_default/search.html +++ /dev/null @@ -1,30 +0,0 @@ -{{ define "footerfiles" }} - - - - -{{ end }} - -{{ define "main" }} -
-
-
- -
-
-

Matching pages

-
-
-
- - -{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 6007308..3d75915 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,71 +1,42 @@ {{ define "main" }} -
-
-
-

- {{ .Title }}

- - {{ if not (eq .Params.showMeta false) }} -
{{ .Date.Format "Mon, Jan 2, 2006" }}
- {{ partial "meta.html" . }} +
+
+

+ {{ .Title }} +

+ + {{ with .Params.subtitle }} +

{{ . }}

+ {{end}} + + {{ if isset .Params "image" }} + {{ $image := resources.Get .Params.image }} + {{ $image := $image.Fill (default "400x400" .Params.image_size) }} +
+ {{ .Title }} + {{ with .Params.caption }} + + {{ .text }} + {{ end }} -
-
- -
-
- {{ .Content }}
+ {{end}} -
- {{ with .Params.tags }} -
- -
Tagged in
- {{ range . }} - {{ . }} - {{ end }} -
- {{ end }} - -
-
Share in Social Networks
- {{ range .Site.Params.sharingOptions }} - - - - {{ end }} -
-
+ {{ if isset .Params "metadata" }} + {{ partial "metadata.html" . }} + {{ end }} - - {{ if not (eq .Params.showActions false) }} -
- {{ with .NextInSection }} - - Newer
- {{ .Title }} -
- {{ end}} - {{ with .PrevInSection }} - - Older
- {{ .Title }} -
- {{ end}} -
- {{ end}} + - {{ if not (eq .Params.comments false) }} -
- {{ template "_internal/disqus.html" . }} -
- {{ end }} +
+{{ .Content }}
+
+{{ if isset .Params "metadata" }} +{{ partial "author_card" . }} +{{ end }} +{{ partial "post_pager" . }} +
{{ end }} diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html deleted file mode 100644 index 20c8d9c..0000000 --- a/layouts/_default/summary.html +++ /dev/null @@ -1,25 +0,0 @@ - diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html deleted file mode 100644 index 42d5541..0000000 --- a/layouts/_default/terms.html +++ /dev/null @@ -1,19 +0,0 @@ -{{ define "main" }} -
-
- {{ range .Data.Terms.ByCount }} -

- - {{ .Name }} ({{ .Pages | len }}) - -

- -
    - {{ range .Pages.ByDate.Reverse }} -
  • {{.Title}} - {{ .Date.Format "Jan 2, 2006" }}
  • - {{ end}} -
- {{ end }} -
-
-{{ end }} diff --git a/layouts/index.html b/layouts/index.html index 9b143c0..b256f80 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,8 +1,20 @@ {{ define "main" }} - - {{ $paginator := .Paginate (where .Data.Pages "Section" "post") }} - {{ range $paginator.Pages }} - {{ .Render "summary" }} +{{ partial "hero.html" . }} + + +{{ range $index, $element := where .Pages "Type" "in" .Site.Params.mainSections }} +{{ partial "open_section.html" . }} + + {{ range first .Params.index_show .Pages.ByPublishDate.Reverse }} +
+ {{ partial "post.html" . }} +
{{ end }} - {{ partial "pagination.html" . }} + +
+ + See all +
+
+{{ end }} {{ end }} diff --git a/layouts/index.json b/layouts/index.json deleted file mode 100644 index b8559e7..0000000 --- a/layouts/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{{- $.Scratch.Add "index" slice -}} -{{- range .Site.RegularPages -}} -{{- if ne .Params.noindex true -}} - {{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink) -}} -{{- end -}} -{{- end -}} -{{- $.Scratch.Get "index" | jsonify -}} diff --git a/layouts/partials/author_card.html b/layouts/partials/author_card.html new file mode 100644 index 0000000..33c86b8 --- /dev/null +++ b/layouts/partials/author_card.html @@ -0,0 +1,12 @@ +
+
+ +
+
+
{{ .Site.Params.Owner }}
+
{{ .Site.Params.Role }}
+

+ {{ .Site.Params.bio }} +

+
+
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index d437bde..a9e1474 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,5 +1,7 @@ -