diff --git a/Dockerfile b/Dockerfile index 2316020..e6be6ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,3 @@ WORKDIR /site COPY src/blog/ /site CMD ["build"] -FROM nginx:stable-alpine -RUN rm -r /usr/share/nginx/html/ -COPY --from=zola /site/_site/ /usr/share/nginx/html/ diff --git a/src/blog/terminimal/config.toml b/src/blog/terminimal/config.toml new file mode 100644 index 0000000..7af0f3d --- /dev/null +++ b/src/blog/terminimal/config.toml @@ -0,0 +1,91 @@ +# Be sure to change these! +base_url = "https://pawroman.github.io/zola-theme-terminimal" +title = "Zola Terminimal theme" + +# Sass compilation is required +compile_sass = true + +# Optional: enable tags +taxonomies = [ + {name = "tags"} +] + +# Code highlighting +[markdown] +highlight_code = true +highlight_theme = "boron" + +[extra] + +# One of: blue, green, orange, pink, red. +# Defaults to blue. +accent_color = "blue" + +# One of: blue, dark, green, orange, pink, red. +# Enabling dark background will also modify primary font color +# to be darker. +# Defaults to accent color (or, if not accent color specified, to blue). +background_color = "blue" + +# The logo text - defaults to "Terminimal theme" +logo_text = "Terminimal theme" + +# The logo link - defaults to base_url. +#logo_home_link = "/take/me/away!" + +# Author name: when specified, modifies the default +# copyright text. Apart from author, it will +# contain current year and a link to the theme. +#author = "My Name" + +# Copyright text in HTML format. If specified, +# entirely replaces default copyright and author. +#copyright_html = "My custom copyright" + +# menu is enabled by adding menu_items (optional) +menu_items = [ + # each of these is optional, name and url are required + # $BASE_URL is going to be substituted by base_url from configuration + {name = "blog", url = "$BASE_URL"}, + + # tags should only be enabled if you have "tags" taxonomy + # see documentation below for more details + {name = "tags", url = "$BASE_URL/tags"}, + {name = "archive", url = "$BASE_URL/archive"}, + {name = "about me", url = "$BASE_URL/about"}, + + # set newtab to true to make the link open in new tab + {name = "github", url = "https://github.com/pawroman/zola-theme-terminimal", newtab = true}, +] + +# Whether to show links to earlier and later (aka. higher/lower) posts +# on each post page (defaults to true). +enable_post_view_navigation = true + +# The text shown at the bottom of a post, +# before earlier/later post links. +# Defaults to "Thanks for reading! Read other posts?" +post_view_navigation_prompt = "Thanks for reading! Read other posts?" + +# Use full Hack character set, not just a subset. +# Switch this to true if you need full unicode support. +# Defaults to false. +use_full_hack_font = false + +# Optional: Global favicon URL and mimetype. +# Mimetype defaults to "image/x-icon". +# The URL should point at a file located +# in your site's "static" directory. +# favicon = "/favicon.png" +# favicon_mimetype = "image/png" + +# Optional: Set how elements are rendered. +# Values: +# - "main_only" -- only the main title (`config.title`) is rendered. +# - "page_only" -- only the page title (if defined) is rendered, +# falling back to `config.title` if not defined or empty. +# - "combined" -- combine like so: "page_title | main_title", +# or if page_title is not defined or empty, fall back to `main_title` +# +# Note that the main (index) page only has the main title. +page_titles = "main_only" diff --git a/src/blog/terminimal/sass/buttons.scss b/src/blog/terminimal/sass/buttons.scss new file mode 100644 index 0000000..7a864b0 --- /dev/null +++ b/src/blog/terminimal/sass/buttons.scss @@ -0,0 +1,92 @@ +.button-container { + display: table; + margin-left: auto; + margin-right: auto; +} + +button, +.button, +a.button { + position: relative; + display: flex; + align-items: center; + justify-content: center; + padding: 8px 18px; + margin-bottom: 5px; + text-align: center; + border-radius: 8px; + border: 1px solid transparent; + appearance: none; + cursor: pointer; + outline: none; + + /* variants */ + + &.outline { + background: transparent; + box-shadow: none; + padding: 8px 18px; + + :hover { + transform: none; + box-shadow: none; + } + } + + &.primary { + box-shadow: 0 4px 6px rgba(50, 50, 93, .11), 0 1px 3px rgba(0, 0, 0, .08); + + &:hover { + box-shadow: 0 2px 6px rgba(50, 50, 93, .21), 0 1px 3px rgba(0, 0, 0, .08); + } + } + + &.link { + background: none; + font-size: 1rem; + } + + + /* sizes */ + + &.small { + font-size: .8rem; + } + + &.wide { + min-width: 200px; + padding: 14px 24px; + } +} + +a.read-more, +a.read-more:hover, +a.read-more:active { + display: inline-flex; + background: none; + box-shadow: none; + padding: 0; + margin: 20px 0; + max-width: 100%; +} + +.code-toolbar { + margin-bottom: 20px; + + .toolbar-item a { + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + padding: 3px 8px; + margin-bottom: 5px; + text-align: center; + font-size: 13px; + font-weight: 500; + border-radius: 8px; + border: 1px solid transparent; + appearance: none; + cursor: pointer; + outline: none; + } +} diff --git a/src/blog/terminimal/sass/color/background_blue.scss b/src/blog/terminimal/sass/color/background_blue.scss new file mode 100644 index 0000000..d7ce46a --- /dev/null +++ b/src/blog/terminimal/sass/color/background_blue.scss @@ -0,0 +1,3 @@ +:root { + --background: #1D212C; +} diff --git a/src/blog/terminimal/sass/color/background_dark.scss b/src/blog/terminimal/sass/color/background_dark.scss new file mode 100644 index 0000000..999212f --- /dev/null +++ b/src/blog/terminimal/sass/color/background_dark.scss @@ -0,0 +1,5 @@ +:root { + --background: #101010; + + --color: #A9B7C6; +} diff --git a/src/blog/terminimal/sass/color/background_green.scss b/src/blog/terminimal/sass/color/background_green.scss new file mode 100644 index 0000000..3bcdf16 --- /dev/null +++ b/src/blog/terminimal/sass/color/background_green.scss @@ -0,0 +1,3 @@ +:root { + --background: #1F222A; +} diff --git a/src/blog/terminimal/sass/color/background_orange.scss b/src/blog/terminimal/sass/color/background_orange.scss new file mode 100644 index 0000000..ea0ef7d --- /dev/null +++ b/src/blog/terminimal/sass/color/background_orange.scss @@ -0,0 +1,3 @@ +:root { + --background: #222129; +} diff --git a/src/blog/terminimal/sass/color/background_pink.scss b/src/blog/terminimal/sass/color/background_pink.scss new file mode 100644 index 0000000..565d610 --- /dev/null +++ b/src/blog/terminimal/sass/color/background_pink.scss @@ -0,0 +1,3 @@ +:root { + --background: #21202C; +} diff --git a/src/blog/terminimal/sass/color/background_red.scss b/src/blog/terminimal/sass/color/background_red.scss new file mode 100644 index 0000000..fbce29e --- /dev/null +++ b/src/blog/terminimal/sass/color/background_red.scss @@ -0,0 +1,3 @@ +:root { + --background: #221F29; +} diff --git a/src/blog/terminimal/sass/color/blue.scss b/src/blog/terminimal/sass/color/blue.scss new file mode 100644 index 0000000..231f362 --- /dev/null +++ b/src/blog/terminimal/sass/color/blue.scss @@ -0,0 +1,9 @@ +:root { + --accent: rgb(35,176,255); + --accent-alpha-70: rgba(35,176,255,.7); + --accent-alpha-20: rgba(35,176,255,.2); + + --background: #1D212C; + --color: white; + --border-color: rgba(255, 255, 255, .1); +} diff --git a/src/blog/terminimal/sass/color/green.scss b/src/blog/terminimal/sass/color/green.scss new file mode 100644 index 0000000..ff52fe2 --- /dev/null +++ b/src/blog/terminimal/sass/color/green.scss @@ -0,0 +1,9 @@ +:root { + --accent: rgb(120,226,160); + --accent-alpha-70: rgba(120,226,160,.7); + --accent-alpha-20: rgba(120,226,160,.2); + + --background: #1F222A; + --color: white; + --border-color: rgba(255, 255, 255, .1); +} diff --git a/src/blog/terminimal/sass/color/orange.scss b/src/blog/terminimal/sass/color/orange.scss new file mode 100644 index 0000000..46bb5ce --- /dev/null +++ b/src/blog/terminimal/sass/color/orange.scss @@ -0,0 +1,9 @@ +:root { + --accent: rgb(255,168,106); + --accent-alpha-70: rgba(255,168,106,.7); + --accent-alpha-20: rgba(255,168,106,.2); + + --background: #222129; + --color: white; + --border-color: rgba(255, 255, 255, .1); +} \ No newline at end of file diff --git a/src/blog/terminimal/sass/color/pink.scss b/src/blog/terminimal/sass/color/pink.scss new file mode 100644 index 0000000..6cc6064 --- /dev/null +++ b/src/blog/terminimal/sass/color/pink.scss @@ -0,0 +1,9 @@ +:root { + --accent: rgb(238,114,241); + --accent-alpha-70: rgba(238,114,241,.7); + --accent-alpha-20: rgba(238,114,241,.2); + + --background: #21202C; + --color: white; + --border-color: rgba(255, 255, 255, .1); +} diff --git a/src/blog/terminimal/sass/color/red.scss b/src/blog/terminimal/sass/color/red.scss new file mode 100644 index 0000000..6e7b776 --- /dev/null +++ b/src/blog/terminimal/sass/color/red.scss @@ -0,0 +1,9 @@ +:root { + --accent: rgb(255,98,102); + --accent-alpha-70: rgba(255,98,102,.7); + --accent-alpha-20: rgba(255,98,102,.2); + + --background: #221F29; + --color: white; + --border-color: rgba(255, 255, 255, .1); +} diff --git a/src/blog/terminimal/sass/font-hack-subset.scss b/src/blog/terminimal/sass/font-hack-subset.scss new file mode 100644 index 0000000..31281aa --- /dev/null +++ b/src/blog/terminimal/sass/font-hack-subset.scss @@ -0,0 +1,34 @@ +/*! + * Hack typeface https://github.com/source-foundry/Hack + * License: https://github.com/source-foundry/Hack/blob/master/LICENSE.md + */ +/* FONT PATHS + * -------------------------- */ +@font-face { + font-family: 'Hack'; + /* Use full version (not a subset) for unicode icon support */ + src: url('fonts/hack-regular.woff2?sha=3114f1256') format('woff2'), url('fonts/hack-regular.woff?sha=3114f1256') format('woff'); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: 'Hack'; + src: url('fonts/hack-bold-subset.woff2?sha=3114f1256') format('woff2'), url('fonts/hack-bold-subset.woff?sha=3114f1256') format('woff'); + font-weight: 700; + font-style: normal; +} + +@font-face { + font-family: 'Hack'; + src: url('fonts/hack-italic-subset.woff2?sha=3114f1256') format('woff2'), url('fonts/hack-italic-webfont.woff?sha=3114f1256') format('woff'); + font-weight: 400; + font-style: italic; +} + +@font-face { + font-family: 'Hack'; + src: url('fonts/hack-bolditalic-subset.woff2?sha=3114f1256') format('woff2'), url('fonts/hack-bolditalic-subset.woff?sha=3114f1256') format('woff'); + font-weight: 700; + font-style: italic; +} diff --git a/src/blog/terminimal/sass/font-hack.scss b/src/blog/terminimal/sass/font-hack.scss new file mode 100644 index 0000000..fef7588 --- /dev/null +++ b/src/blog/terminimal/sass/font-hack.scss @@ -0,0 +1,33 @@ +/*! + * Hack typeface https://github.com/source-foundry/Hack + * License: https://github.com/source-foundry/Hack/blob/master/LICENSE.md + */ +/* FONT PATHS + * -------------------------- */ +@font-face { + font-family: 'Hack'; + src: url('fonts/hack-regular.woff2?sha=3114f1256') format('woff2'), url('fonts/hack-regular.woff?sha=3114f1256') format('woff'); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: 'Hack'; + src: url('fonts/hack-bold.woff2?sha=3114f1256') format('woff2'), url('fonts/hack-bold.woff?sha=3114f1256') format('woff'); + font-weight: 700; + font-style: normal; +} + +@font-face { + font-family: 'Hack'; + src: url('fonts/hack-italic.woff2?sha=3114f1256') format('woff2'), url('fonts/hack-italic.woff?sha=3114f1256') format('woff'); + font-weight: 400; + font-style: italic; +} + +@font-face { + font-family: 'Hack'; + src: url('fonts/hack-bolditalic.woff2?sha=3114f1256') format('woff2'), url('fonts/hack-bolditalic.woff?sha=3114f1256') format('woff'); + font-weight: 700; + font-style: italic; +} diff --git a/src/blog/terminimal/sass/footer.scss b/src/blog/terminimal/sass/footer.scss new file mode 100644 index 0000000..21be315 --- /dev/null +++ b/src/blog/terminimal/sass/footer.scss @@ -0,0 +1,64 @@ +@import "variables"; + +.footer { + padding: 40px 0; + flex-grow: 0; + opacity: .5; + + &__inner { + display: flex; + align-items: center; + justify-content: space-between; + margin: 0; + width: 760px; + max-width: 100%; + + @media (max-width: $tablet-max-width) { + flex-direction: column; + } + } + + a { + color: inherit; + } + + .copyright { + display: flex; + flex-direction: row; + align-items: center; + font-size: 1rem; + color: var(--light-color-secondary); + + &--user { + margin: auto; + text-align: center; + } + + & > *:first-child:not(:only-child) { + margin-right: 10px; + + @media (max-width: $tablet-max-width) { + border: none; + padding: 0; + margin: 0; + } + } + + @media (max-width: $tablet-max-width) { + flex-direction: column; + margin-top: 10px; + } + } + + .copyright-theme-sep { + @media (max-width: $tablet-max-width) { + display: none; + } + } + + .copyright-theme { + @media (max-width: $tablet-max-width) { + font-size: 0.75rem; + } + } +} diff --git a/src/blog/terminimal/sass/header.scss b/src/blog/terminimal/sass/header.scss new file mode 100644 index 0000000..703bbec --- /dev/null +++ b/src/blog/terminimal/sass/header.scss @@ -0,0 +1,96 @@ +@import "variables"; + +@mixin menu { + position: absolute; + background: var(--background); + box-shadow: var(--shadow); + color: white; + border: 2px solid; + margin: 0; + padding: 10px; + list-style: none; + z-index: 99; +} + +.header { + display: flex; + flex-direction: column; + position: relative; + + &__inner { + display: flex; + align-items: center; + justify-content: space-between; + } + + &__logo { + display: flex; + flex: 1; + + &:after { + content: ''; + background: repeating-linear-gradient(90deg, var(--accent), var(--accent) 2px, transparent 0, transparent 16px); + display: block; + width: 100%; + right: 10px; + } + + a { + flex: 0 0 auto; + max-width: 100%; + } + } + + .menu { + margin: 20px 0; + + &__inner { + display: flex; + flex-wrap: wrap; + list-style: none; + margin: 0; + padding: 0; + + li { + &.active { + color: var(--accent-alpha-70); + } + + &:not(:last-of-type) { + margin-right: 20px; + margin-bottom: 10px; + flex: 0 0 auto; + } + } + } + + &__sub-inner { + position: relative; + list-style: none; + padding: 0; + margin: 0; + + &:not(:only-child) { + margin-left: 20px; + } + + &-more { + @include menu; + top: 35px; + left: 0; + + &-trigger { + color: var(--accent); + user-select: none; + cursor: pointer; + } + + li { + margin: 0; + padding: 5px; + white-space: nowrap; + } + } + } + } +} diff --git a/src/blog/terminimal/sass/logo.scss b/src/blog/terminimal/sass/logo.scss new file mode 100644 index 0000000..d455cc7 --- /dev/null +++ b/src/blog/terminimal/sass/logo.scss @@ -0,0 +1,8 @@ +.logo { + display: flex; + align-items: center; + text-decoration: none; + background: var(--accent); + color: black; + padding: 5px 10px; +} diff --git a/src/blog/terminimal/sass/main.scss b/src/blog/terminimal/sass/main.scss new file mode 100644 index 0000000..20a3fd3 --- /dev/null +++ b/src/blog/terminimal/sass/main.scss @@ -0,0 +1,254 @@ +@import "variables"; + +html { + box-sizing: border-box; +} + +*, +*:before, +*:after { + box-sizing: inherit; +} + +body { + margin: 0; + padding: 0; + font-family: Hack, DejaVu Sans Mono, Monaco, Consolas, Ubuntu Mono, monospace; + font-size: 1rem; + line-height: 1.54; + background-color: var(--background); + color: var(--color); + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -webkit-overflow-scrolling: touch; + -webkit-text-size-adjust: 100%; + + @media (max-width: $phone-max-width) { + font-size: 1rem; + } +} + +h1, h2, h3, h4, h5, h6 { + display: flex; + align-items: center; + font-weight: bold; + line-height: 1.3; +} + +h1 { + font-size: 1.4rem; +} + +h2 { + font-size: 1.3rem; +} + +h3 { + font-size: 1.2rem; +} + +h4, h5, h6 { + font-size: 1.15rem; +} + + +a { + color: inherit; +} + +img { + display: block; + max-width: 100%; + + &.left { + margin-right: auto; + } + + &.center { + margin-left: auto; + margin-right: auto; + } + + &.right { + margin-left: auto; + } +} + +p { + margin-bottom: 20px; +} + +figure { + display: table; + max-width: 100%; + margin: 25px 0; + + &.left { + img { + margin-right: auto; + } + } + + &.center { + img { + margin-left: auto; + margin-right: auto; + } + } + + &.right { + img { + margin-left: auto; + } + } + + figcaption { + font-size: 14px; + padding: 5px 10px; + margin-top: 5px; + background: var(--accent); + color: var(--background); + + &.left { + text-align: left; + } + + &.center { + text-align: center; + } + + &.right { + text-align: right; + } + } +} + +code { + font-family: Hack, DejaVu Sans Mono, Monaco, Consolas, Ubuntu Mono, monospace; + font-feature-settings: normal; + background: var(--accent-alpha-20); + padding: 1px 6px; + margin: 0 2px; + font-size: .95rem; +} + +pre { + font-family: Hack, DejaVu Sans Mono, Monaco, Consolas, Ubuntu Mono, monospace; + padding: 20px; + font-size: .95rem; + overflow: auto; + border-top: 1px solid rgba(255, 255, 255, .1); + border-bottom: 1px solid rgba(255, 255, 255, .1); + + @media (max-width: $phone-max-width) { + white-space: pre-wrap; + word-wrap: break-word; + } + + code { + padding: 0; + margin: 0; + background: none; + } +} + +blockquote { + border-top: 1px solid var(--accent); + border-bottom: 1px solid var(--accent); + margin: 40px 0; + padding: 25px; + + @media (max-width: $phone-max-width) { + padding-right: 0; + } + + &:before { + content: '”'; + font-family: Georgia, serif; + font-size: 3.875rem; + position: absolute; + left: -40px; + top: -20px; + } + + p:first-of-type { + margin-top: 0; + } + + p:last-of-type { + margin-bottom: 0; + } + + p { + position: relative; + } + + p:before { + content: '>'; + display: block; + position: absolute; + left: -25px; + color: var(--accent); + } +} + +table { + table-layout: fixed; + border-collapse: collapse; + width: 100%; + margin: 40px 0; +} + +table, th, td { + border: 1px dashed var(--accent); + padding: 10px; +} + +th { + color: var(--accent); +} + +ul, ol { + margin-left: 30px; + padding: 0; + + li { + position: relative; + } + + @media (max-width: $phone-max-width) { + margin-left: 20px; + } +} + +ol ol { + list-style-type: lower-alpha; +} + +.container { + display: flex; + flex-direction: column; + padding: 40px; + max-width: 864px; + min-height: 100vh; + margin: 0 auto; + + @media (max-width: $phone-max-width) { + padding: 20px; + } +} + +.content { + display: flex; +} + +hr { + width: 100%; + border: none; + background: var(--border-color); + height: 1px; +} + +.hidden { + display: none; +} diff --git a/src/blog/terminimal/sass/pagination.scss b/src/blog/terminimal/sass/pagination.scss new file mode 100644 index 0000000..566005b --- /dev/null +++ b/src/blog/terminimal/sass/pagination.scss @@ -0,0 +1,77 @@ +@import 'variables'; + +.pagination { + margin-top: 50px; + + &__title { + display: flex; + text-align: center; + position: relative; + margin: 100px 0 20px; + + &-h { + text-align: center; + margin: 0 auto; + padding: 5px 10px; + background: var(--background); + font-size: .8rem; + text-transform: uppercase; + letter-spacing: .1em; + z-index: 1; + } + + hr { + position: absolute; + left: 0; + right: 0; + width: 100%; + margin-top: 15px; + z-index: 0; + } + } + + &__buttons { + display: flex; + align-items: center; + justify-content: center; + + @media (max-width: $phone-max-width) { + flex-direction: column; + } + } +} + +.button { + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + font-size: 1rem; + border-radius: 8px; + max-width: 40%; + padding: 0; + cursor: pointer; + appearance: none; + + @media (max-width: $phone-max-width) { + max-width: 80%; + } + + + .button { + margin-left: 10px; + } + + a { + display: flex; + padding: 8px 16px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } + + &__text { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } +} diff --git a/src/blog/terminimal/sass/post.scss b/src/blog/terminimal/sass/post.scss new file mode 100644 index 0000000..8b0e1a9 --- /dev/null +++ b/src/blog/terminimal/sass/post.scss @@ -0,0 +1,135 @@ +@import "variables"; + +.posts { + width: 100%; + margin: 0 auto; +} + +.post { + width: 100%; + text-align: left; + margin: 20px auto; + padding: 20px 0; + + @media (max-width: $tablet-max-width) { + max-width: 660px; + } + + &:not(:last-of-type) { + border-bottom: 1px solid var(--border-color); + } + + %meta { + font-size: 1rem; + margin-bottom: 10px; + color: var(--accent-alpha-70); + } + + &-meta { + @extend %meta; + } + + &-meta-inline { + @extend %meta; + + display: inline; + } + + &-title { + --border: 2px dashed var(--accent); + position: relative; + color: var(--accent); + margin: 0 0 15px; + padding-bottom: 15px; + border-bottom: var(--border); + font-weight: normal; + + a { + text-decoration: none; + } + } + + %tags { + margin-bottom: 20px; + font-size: 1rem; + opacity: .5; + } + + &-tags { + @extend %tags; + + display: block; + } + + &-tags-inline { + @extend %tags; + + display: inline; + + @media (max-width: $phone-max-width) { + display: block; + } + } + + &-content { + margin-top: 30px; + } + + &-cover { + border: 20px solid var(--accent); + background: transparent; + margin: 40px 0; + padding: 20px; + + @media (max-width: $phone-max-width) { + padding: 10px; + border-width: 10px; + } + } + + ul { + list-style: none; + + li:before { + content: '►'; + position: absolute; + left: -20px; + color: var(--accent); + } + } +} + +.post--regulation { + h1 { + justify-content: center; + } + + h2 { + justify-content: center; + margin-bottom: 10px; + + &+ h2 { + margin-top: -10px; + margin-bottom: 20px; + } + } +} + +.post-list { + .post-date { + color: var(--accent-alpha-70); + text-decoration: none; + } + + a { + text-decoration: none; + } + + .post-list-title { + text-decoration: underline; + } + + .post-tag { + text-decoration: underline; + } +} diff --git a/src/blog/terminimal/sass/style.scss b/src/blog/terminimal/sass/style.scss new file mode 100644 index 0000000..3a289d7 --- /dev/null +++ b/src/blog/terminimal/sass/style.scss @@ -0,0 +1,8 @@ +@import 'buttons'; + +@import 'header'; +@import 'logo'; +@import 'main'; +@import 'post'; +@import 'pagination'; +@import 'footer'; diff --git a/src/blog/terminimal/sass/variables.scss b/src/blog/terminimal/sass/variables.scss new file mode 100644 index 0000000..3b95a9c --- /dev/null +++ b/src/blog/terminimal/sass/variables.scss @@ -0,0 +1,2 @@ +$phone-max-width: 683px; +$tablet-max-width: 899px; diff --git a/src/blog/terminimal/static/fonts/hack-bold-subset.woff b/src/blog/terminimal/static/fonts/hack-bold-subset.woff new file mode 100644 index 0000000..a47c8aa Binary files /dev/null and b/src/blog/terminimal/static/fonts/hack-bold-subset.woff differ diff --git a/src/blog/terminimal/static/fonts/hack-bold-subset.woff2 b/src/blog/terminimal/static/fonts/hack-bold-subset.woff2 new file mode 100644 index 0000000..93d425e Binary files /dev/null and b/src/blog/terminimal/static/fonts/hack-bold-subset.woff2 differ diff --git a/src/blog/terminimal/static/fonts/hack-bold.woff b/src/blog/terminimal/static/fonts/hack-bold.woff new file mode 100644 index 0000000..368b913 Binary files /dev/null and b/src/blog/terminimal/static/fonts/hack-bold.woff differ diff --git a/src/blog/terminimal/static/fonts/hack-bold.woff2 b/src/blog/terminimal/static/fonts/hack-bold.woff2 new file mode 100644 index 0000000..1155477 Binary files /dev/null and b/src/blog/terminimal/static/fonts/hack-bold.woff2 differ diff --git a/src/blog/terminimal/static/fonts/hack-bolditalic-subset.woff b/src/blog/terminimal/static/fonts/hack-bolditalic-subset.woff new file mode 100644 index 0000000..0da4750 Binary files /dev/null and b/src/blog/terminimal/static/fonts/hack-bolditalic-subset.woff differ diff --git a/src/blog/terminimal/static/fonts/hack-bolditalic-subset.woff2 b/src/blog/terminimal/static/fonts/hack-bolditalic-subset.woff2 new file mode 100644 index 0000000..236b7de Binary files /dev/null and b/src/blog/terminimal/static/fonts/hack-bolditalic-subset.woff2 differ diff --git a/src/blog/terminimal/static/fonts/hack-bolditalic.woff b/src/blog/terminimal/static/fonts/hack-bolditalic.woff new file mode 100644 index 0000000..ce87fe2 Binary files /dev/null and b/src/blog/terminimal/static/fonts/hack-bolditalic.woff differ diff --git a/src/blog/terminimal/static/fonts/hack-bolditalic.woff2 b/src/blog/terminimal/static/fonts/hack-bolditalic.woff2 new file mode 100644 index 0000000..46ff1c4 Binary files /dev/null and b/src/blog/terminimal/static/fonts/hack-bolditalic.woff2 differ diff --git a/src/blog/terminimal/static/fonts/hack-italic-subset.woff b/src/blog/terminimal/static/fonts/hack-italic-subset.woff new file mode 100644 index 0000000..1d1f511 Binary files /dev/null and b/src/blog/terminimal/static/fonts/hack-italic-subset.woff differ diff --git a/src/blog/terminimal/static/fonts/hack-italic-subset.woff2 b/src/blog/terminimal/static/fonts/hack-italic-subset.woff2 new file mode 100644 index 0000000..b6f5fc9 Binary files /dev/null and b/src/blog/terminimal/static/fonts/hack-italic-subset.woff2 differ diff --git a/src/blog/terminimal/static/fonts/hack-italic.woff b/src/blog/terminimal/static/fonts/hack-italic.woff new file mode 100644 index 0000000..bd545e4 Binary files /dev/null and b/src/blog/terminimal/static/fonts/hack-italic.woff differ diff --git a/src/blog/terminimal/static/fonts/hack-italic.woff2 b/src/blog/terminimal/static/fonts/hack-italic.woff2 new file mode 100644 index 0000000..1e7630c Binary files /dev/null and b/src/blog/terminimal/static/fonts/hack-italic.woff2 differ diff --git a/src/blog/terminimal/static/fonts/hack-regular-subset.woff b/src/blog/terminimal/static/fonts/hack-regular-subset.woff new file mode 100644 index 0000000..85583a5 Binary files /dev/null and b/src/blog/terminimal/static/fonts/hack-regular-subset.woff differ diff --git a/src/blog/terminimal/static/fonts/hack-regular-subset.woff2 b/src/blog/terminimal/static/fonts/hack-regular-subset.woff2 new file mode 100644 index 0000000..1e3abb9 Binary files /dev/null and b/src/blog/terminimal/static/fonts/hack-regular-subset.woff2 differ diff --git a/src/blog/terminimal/static/fonts/hack-regular.woff b/src/blog/terminimal/static/fonts/hack-regular.woff new file mode 100644 index 0000000..e835381 Binary files /dev/null and b/src/blog/terminimal/static/fonts/hack-regular.woff differ diff --git a/src/blog/terminimal/static/fonts/hack-regular.woff2 b/src/blog/terminimal/static/fonts/hack-regular.woff2 new file mode 100644 index 0000000..524465c Binary files /dev/null and b/src/blog/terminimal/static/fonts/hack-regular.woff2 differ diff --git a/src/blog/terminimal/templates/404.html b/src/blog/terminimal/templates/404.html new file mode 100644 index 0000000..b081fbc --- /dev/null +++ b/src/blog/terminimal/templates/404.html @@ -0,0 +1,16 @@ +{% extends "index.html" %} + +{% block title %} +404 +{% endblock title %} + +{% block header_menu %} +{{ menu_macros::menu_for(config=config, current_item="") }} +{% endblock header_menu %} + +{% block content %} +<div class="post"> + <h1 class="post-title">{% block heading %}Lost?{% endblock heading %}</h1> + <p>{% block message %}This page does not exist.{% endblock message %}</p> +</div> +{% endblock content %} diff --git a/src/blog/terminimal/templates/archive.html b/src/blog/terminimal/templates/archive.html new file mode 100644 index 0000000..af9df6e --- /dev/null +++ b/src/blog/terminimal/templates/archive.html @@ -0,0 +1,15 @@ +{% extends "index.html" %} + +{%- block title -%} +{{ title_macros::title(page_title=page.title, main_title=config.title) }} +{%- endblock -%} + +{% block content %} + <div class="post"> + <h1 class="post-title">{{ page.title }}</h1> + + {% set section = get_section(path="_index.md") %} + + {{ post_macros::list_posts(pages=section.pages) }} + </div> +{% endblock content %} diff --git a/src/blog/terminimal/templates/index.html b/src/blog/terminimal/templates/index.html new file mode 100644 index 0000000..0965570 --- /dev/null +++ b/src/blog/terminimal/templates/index.html @@ -0,0 +1,124 @@ +{% import "macros/date.html" as date_macros -%} +{% import "macros/head.html" as head_macros -%} +{% import "macros/menu.html" as menu_macros -%} +{% import "macros/post.html" as post_macros -%} +{% import "macros/title.html" as title_macros -%} + +<!DOCTYPE html> +<html lang="{%- if config.default_language -%}{{ config.default_language }}{%- else -%}en{%- endif -%}"> + +<head> + <title>{%- block title %}{{ config.title }}{% endblock title -%} + {{ head_macros::head(config=config) }} + + {%- if config.generate_feed %} + + {% endif -%} + + {%- if config.extra.favicon %} + + {% endif -%} + + {%- block extra_head %} + {% endblock extra_head -%} + + + +
+ {% block header %} +
+
+ +
+ + {% block header_menu %} + {{ menu_macros::menu(config=config, current_path=current_path) }} + {% endblock header_menu %} +
+ {% endblock header %} + +
+ {% block content %} +
+ {%- if paginator %} + {%- set show_pages = paginator.pages -%} + {% else %} + {%- set show_pages = section.pages -%} + {% endif -%} + + {%- for page in show_pages %} +
+ {{ post_macros::header(page=page) }} + {{ post_macros::content(page=page, summary=true) }} +
+ {% endfor -%} + +
+ {% endblock content %} +
+ + {% block footer %} + + {% endblock footer %} + +
+{%- block extra_body %} +{% endblock extra_body -%} + + + diff --git a/src/blog/terminimal/templates/macros/date.html b/src/blog/terminimal/templates/macros/date.html new file mode 100644 index 0000000..e793735 --- /dev/null +++ b/src/blog/terminimal/templates/macros/date.html @@ -0,0 +1,3 @@ +{% macro now_year() %} + {{ now() | date(format="%Y") }} +{% endmacro %} diff --git a/src/blog/terminimal/templates/macros/head.html b/src/blog/terminimal/templates/macros/head.html new file mode 100644 index 0000000..187c57c --- /dev/null +++ b/src/blog/terminimal/templates/macros/head.html @@ -0,0 +1,26 @@ +{% macro head(config) %} + + + + + + +{%- if config.extra.accent_color %} + +{% else %} + +{% endif -%} + +{%- if config.extra.background_color %} + {%- if config.extra.accent_color and config.extra.background_color != config.extra.accent_color %} + + {% endif -%} +{% endif -%} + +{%- if config.extra.use_full_hack_font %} + +{% else %} + +{% endif -%} + +{% endmacro head %} diff --git a/src/blog/terminimal/templates/macros/menu.html b/src/blog/terminimal/templates/macros/menu.html new file mode 100644 index 0000000..090388f --- /dev/null +++ b/src/blog/terminimal/templates/macros/menu.html @@ -0,0 +1,52 @@ +{% macro menu(config, current_path) %} + {%- set current_item = false -%} + {%- if config.extra.menu_items %} + {%- set menu_items = config.extra.menu_items -%} + + {%- for item in menu_items %} + {%- set abs_item_url = item.url | replace(from="$BASE_URL", to=config.base_url) -%} + {%- set is_current = current_url == abs_item_url ~ "/" + or current_url is starting_with(abs_item_url) + -%} + {%- set is_base = abs_item_url == config.base_url + or abs_item_url == config.base_url ~ "/" + -%} + + {%- if is_base %} + {%- set_global base_item = item -%} + {% endif -%} + + {%- if is_current and not is_base %} + {%- set_global current_item = item -%} + {% endif -%} + {% endfor -%} + + {%- if not current_item and base_item %} + {# Did not match any menu URLs -- assume it's a blog post #} + {%- set current_item = base_item -%} + {% endif -%} + + {{ menu_macros::menu_for(config=config, current_item=current_item) }} + {% endif -%} +{% endmacro menu %} + +{% macro menu_for(config, current_item) %} + {%- if config.extra.menu_items %} + {%- set menu_items = config.extra.menu_items -%} + + + {% endif -%} +{% endmacro menu %} + diff --git a/src/blog/terminimal/templates/macros/post.html b/src/blog/terminimal/templates/macros/post.html new file mode 100644 index 0000000..f760d48 --- /dev/null +++ b/src/blog/terminimal/templates/macros/post.html @@ -0,0 +1,103 @@ +{% macro content(page, summary) %} + {%- if summary and page.summary %} +
+ {{ page.summary | safe }} +
+
+ + + Read more  + ↩︎ + +
+ {% else %} +
+ {{ page.content | safe }} +
+ {%- endif %} +{% endmacro content %} + + +{% macro date(page) %} + + {%- if page.date %} + {{ page.date | date(format="%Y-%m-%d") }} + {% endif -%} + +{% endmacro post_date %} + + +{% macro earlier_later(page) %} + {%- if config.extra.enable_post_view_navigation and page.lower or page.higher %} + + {% endif -%} +{% endmacro earlier_later %} + + +{% macro header(page) %} +

{{ page.title }}

+
+ {{ post_macros::date(page=page) }} +
+ + {{ post_macros::tags(page=page) }} +{% endmacro header %} + + +{% macro list_posts(pages) %} + +{% endmacro list_posts %} + + +{% macro tags(page, short=false) %} + {%- if page.taxonomies and page.taxonomies.tags %} + + {%- if short %} + :: + {%- set sep = "," -%} + {% else %} + :: tags:  + {%- set sep = " " -%} + {% endif -%} + {%- for tag in page.taxonomies.tags %} + #{{ tag }} + {%- if not loop.last %}{{ sep | safe }}{% endif -%} + {% endfor -%} + + {% endif -%} +{% endmacro tags %} diff --git a/src/blog/terminimal/templates/macros/title.html b/src/blog/terminimal/templates/macros/title.html new file mode 100644 index 0000000..a8575de --- /dev/null +++ b/src/blog/terminimal/templates/macros/title.html @@ -0,0 +1,17 @@ +{% macro title(page_title, main_title) %} + {%- if config.extra.page_titles == "combined" -%} + {%- if page_title -%} + {{ page_title }} | {{ main_title }} + {%- else -%} + {{ main_title }} + {%- endif -%} + {%- elif config.extra.page_titles == "page_only" -%} + {%- if page_title -%} + {{ page_title }} + {%- else -%} + {{ main_title }} + {%- endif -%} + {%- else -%} + {{ main_title }} + {%- endif -%} +{% endmacro title %} diff --git a/src/blog/terminimal/templates/page.html b/src/blog/terminimal/templates/page.html new file mode 100644 index 0000000..f59d965 --- /dev/null +++ b/src/blog/terminimal/templates/page.html @@ -0,0 +1,13 @@ +{% extends "index.html" %} + +{%- block title -%} +{{ title_macros::title(page_title=page.title, main_title=config.title) }} +{%- endblock -%} + +{% block content %} +
+ {{ post_macros::header(page=page) }} + {{ post_macros::content(page=page, summary=false) }} + {{ post_macros::earlier_later(page=page) }} +
+{% endblock content %} diff --git a/src/blog/terminimal/templates/shortcodes/figure.html b/src/blog/terminimal/templates/shortcodes/figure.html new file mode 100644 index 0000000..b9de271 --- /dev/null +++ b/src/blog/terminimal/templates/shortcodes/figure.html @@ -0,0 +1,8 @@ +{% if src %} +
+ + {% if caption %} +
{{ caption }}
+ {% endif %} +
+{% endif %} diff --git a/src/blog/terminimal/templates/shortcodes/image.html b/src/blog/terminimal/templates/shortcodes/image.html new file mode 100644 index 0000000..410be76 --- /dev/null +++ b/src/blog/terminimal/templates/shortcodes/image.html @@ -0,0 +1,3 @@ +{% if src %} + +{% endif %} diff --git a/src/blog/terminimal/templates/tags/list.html b/src/blog/terminimal/templates/tags/list.html new file mode 100644 index 0000000..98cd693 --- /dev/null +++ b/src/blog/terminimal/templates/tags/list.html @@ -0,0 +1,21 @@ +{% extends "index.html" %} + +{%- block title -%} +{{ title_macros::title(page_title="Tags", main_title=config.title) }} +{%- endblock -%} + +{% block content %} +
+

all tags

+ + +
+{% endblock content %} diff --git a/src/blog/terminimal/templates/tags/single.html b/src/blog/terminimal/templates/tags/single.html new file mode 100644 index 0000000..92183b6 --- /dev/null +++ b/src/blog/terminimal/templates/tags/single.html @@ -0,0 +1,21 @@ +{% extends "index.html" %} + +{%- block title -%} +{% set title = "Tag: " ~ term.name %} +{{ title_macros::title(page_title=title, main_title=config.title) }} +{%- endblock -%} + +{% block content %} +
+

+ tag: #{{ term.name }} + ({{ term.pages | length }} post{{ term.pages | length | pluralize }}) +

+ + + Show all tags + + + {{ post_macros::list_posts(pages=term.pages) }} +
+{% endblock content %} diff --git a/src/blog/terminimal/theme.toml b/src/blog/terminimal/theme.toml new file mode 100644 index 0000000..5bcbdb0 --- /dev/null +++ b/src/blog/terminimal/theme.toml @@ -0,0 +1,45 @@ +name = "terminimal" +description = "A simple, minimal retro theme" +license = "MIT" +homepage = "https://github.com/pawroman/zola-theme-terminimal" +min_version = "0.11.0" + +# An optional live demo URL +demo = "https://pawroman.github.io/zola-theme-terminimal/" + +[author] +name = "Paweł Romanowski" +homepage = "https://github.com/pawroman" + +# The original theme this one's been forked off. +[original] +author = "Radosław Kozieł" +homepage = "https://radoslawkoziel.pl/" +repo = "https://github.com/panr/hugo-theme-terminal" + +[extra] + +# One of: blue, green, orange, pink, red. +accent_color = "blue" + +# One of: blue, dark, green, orange, pink, red. +# Enabling dark background will also modify primary font color +# to be darker. +# Defaults to accent color (or, if not accent color specified, to blue). +background_color = "blue" + +# The logo text - defaults to 2 non-breaking spaces. +logo_text = "Terminimal theme" + +# Whether to show links to earlier and later posts +# on each post page. +enable_post_view_navigation = true + +# The text shown at the bottom of a post, +# before earlier/later post links. +post_view_navigation_prompt = "Thanks for reading! Read other posts?" + +# Use full Hack character set, not just a subset. +# Switch this to true if you need full unicode support. +# Defaults to false. +use_full_hack_font = false diff --git a/src/blog/themes/terminimal b/src/blog/themes/terminimal deleted file mode 160000 index 69c8d97..0000000 --- a/src/blog/themes/terminimal +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 69c8d978eafdd160f1cd26ef9005205959bd325b