commit 3c3caedd3c1cfd867519d5c27ae7f4d6ce24286d Author: Syed Zayyan Masud Date: Sat Oct 29 09:39:10 2022 +0100 first commit diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..165903c Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..993f6fa --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# apollo + +Simple blog theme powered by [Zola](getzola.org). See a live preview [here](https://not-matthias.github.io/apollo). + +Name derived from the Bengali Word - সাধারণ which translates to "generic" + +
+ Dark theme + + ![blog-dark]() +
+ +## Features + +- [X] Pagination +- [X] Themes (light, dark). Default theme is dark with a switcher in the navbar +- [X] Projects page +- [x] Social Links +- [x] Tags + +## Installation + +1. Download the theme +``` +git submodule add xxxxx themes/apollo +``` + +2. Add `theme = "shadharon"` to your `config.toml` +3. Copy the example content + +``` +cp themes/apollo/content content +``` + +## Options +These filenames are relative to the root of the site. In this example, the two CSS files would be in the `static` folder. + +## References + +This theme is based on [apollo](https://github.com/not-matthias/apollo). \ No newline at end of file diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..0bac017 --- /dev/null +++ b/config.toml @@ -0,0 +1,29 @@ +base_url = "https://syedzayyan.com" +title = "Heisenberg" +description = "Walter is kind, caring and timid, but also demanding, calculating, and ruthless. His invented pseudonym, Heisenberg, becomes an alter ego – a fantasy for him to live out a love of power. Beneath both sides of his dual personality, he views the world in the rarefied scientific terms of chemistry." + +generate_feed = true +compile_sass = true +minify_html = true + +taxonomies = [ + {name = "tags", feed = true}, +] + +[markdown] +highlight_code = true +highlight_theme = "ayu-dark" + +[extra] +toc = true +use_cdn = false +favicon = "" +headerImage = "" + +menu = [ + { name = "Projects", url = "/projects", weight = 1, icon = "projects.png" }, +] + +socials = [ + { name = "github", url = "https://github.com/syedzayyan/", icon = "github" }, +] \ No newline at end of file diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..59b0539 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,4 @@ ++++ +[extra] +section_path = "posts/_index.md" ++++ diff --git a/content/posts/_index.md b/content/posts/_index.md new file mode 100644 index 0000000..71f2b61 --- /dev/null +++ b/content/posts/_index.md @@ -0,0 +1,9 @@ ++++ +paginate_by = 7 +path = "posts" +title = "Articles" +sort_by = "date" + +[extra] +desc = {title = "Hello! I am Heisenberg", img = "https://hips.hearstapps.com/esq.h-cdn.co/assets/16/38/480x480/square-1474665651-breaking-bad.png?resize=640:*", text = "Walter is kind, caring and timid, but also demanding, calculating, and ruthless. His invented pseudonym, Heisenberg, becomes an alter ego – a fantasy for him to live out a love of power. Beneath both sides of his dual personality, he views the world in the rarefied scientific terms of chemistry."} ++++ diff --git a/content/posts/markdown.md b/content/posts/markdown.md new file mode 100644 index 0000000..52601c4 --- /dev/null +++ b/content/posts/markdown.md @@ -0,0 +1,23 @@ ++++ +title = "Markdown Test" +date = "2022-01-01" ++++ + +## Code Block + +```rust +fn main() { + println!("Hello World"); +} +``` + +## Quote + +> I'm gonna make him an offer he can't refuse +- Godfather + + +## Code tags + +Lorem ipsum `dolor` sit amet, `consectetur adipiscing` elit. +`Lorem ipsum dolor sit amet, consectetur adipiscing elit.` \ No newline at end of file diff --git a/content/posts/toc.md b/content/posts/toc.md new file mode 100644 index 0000000..bebeeae --- /dev/null +++ b/content/posts/toc.md @@ -0,0 +1,42 @@ ++++ +title = "Table of Contents Test" +date = "2022-01-02" ++++ + +# Heading 1 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sed mollis augue, vel efficitur lacus. Pellentesque eu egestas mi. Etiam ultrices lectus sit amet aliquet ullamcorper. Praesent in erat quis est sagittis finibus. Etiam nec sapien in nulla interdum faucibus. Integer iaculis lorem quis arcu lobortis, non malesuada neque vehicula. Aenean nec tellus eu metus bibendum tempus. Sed rutrum urna ut commodo tempor. Vestibulum aliquet elit posuere turpis maximus condimentum. Sed urna libero, ornare eu tellus vitae, laoreet condimentum risus. Aenean elit lectus, mattis quis nibh nec, faucibus rutrum sapien. Sed iaculis consectetur mi, eget posuere turpis finibus et. + +## Heading 2 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sed mollis augue, vel efficitur lacus. Pellentesque eu egestas mi. Etiam ultrices lectus sit amet aliquet ullamcorper. Praesent in erat quis est sagittis finibus. Etiam nec sapien in nulla interdum faucibus. Integer iaculis lorem quis arcu lobortis, non malesuada neque vehicula. Aenean nec tellus eu metus bibendum tempus. Sed rutrum urna ut commodo tempor. Vestibulum aliquet elit posuere turpis maximus condimentum. Sed urna libero, ornare eu tellus vitae, laoreet condimentum risus. Aenean elit lectus, mattis quis nibh nec, faucibus rutrum sapien. Sed iaculis consectetur mi, eget posuere turpis finibus et. +### Heading 3 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sed mollis augue, vel efficitur lacus. Pellentesque eu egestas mi. Etiam ultrices lectus sit amet aliquet ullamcorper. Praesent in erat quis est sagittis finibus. Etiam nec sapien in nulla interdum faucibus. Integer iaculis lorem quis arcu lobortis, non malesuada neque vehicula. Aenean nec tellus eu metus bibendum tempus. Sed rutrum urna ut commodo tempor. Vestibulum aliquet elit posuere turpis maximus condimentum. Sed urna libero, ornare eu tellus vitae, laoreet condimentum risus. Aenean elit lectus, mattis quis nibh nec, faucibus rutrum sapien. Sed iaculis consectetur mi, eget posuere turpis finibus et. +#### Heading 4 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sed mollis augue, vel efficitur lacus. Pellentesque eu egestas mi. Etiam ultrices lectus sit amet aliquet ullamcorper. Praesent in erat quis est sagittis finibus. Etiam nec sapien in nulla interdum faucibus. Integer iaculis lorem quis arcu lobortis, non malesuada neque vehicula. Aenean nec tellus eu metus bibendum tempus. Sed rutrum urna ut commodo tempor. Vestibulum aliquet elit posuere turpis maximus condimentum. Sed urna libero, ornare eu tellus vitae, laoreet condimentum risus. Aenean elit lectus, mattis quis nibh nec, faucibus rutrum sapien. Sed iaculis consectetur mi, eget posuere turpis finibus et. +#### Heading 4 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sed mollis augue, vel efficitur lacus. Pellentesque eu egestas mi. Etiam ultrices lectus sit amet aliquet ullamcorper. Praesent in erat quis est sagittis finibus. Etiam nec sapien in nulla interdum faucibus. Integer iaculis lorem quis arcu lobortis, non malesuada neque vehicula. Aenean nec tellus eu metus bibendum tempus. Sed rutrum urna ut commodo tempor. Vestibulum aliquet elit posuere turpis maximus condimentum. Sed urna libero, ornare eu tellus vitae, laoreet condimentum risus. Aenean elit lectus, mattis quis nibh nec, faucibus rutrum sapien. Sed iaculis consectetur mi, eget posuere turpis finibus et. + +### Heading 3 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sed mollis augue, vel efficitur lacus. Pellentesque eu egestas mi. Etiam ultrices lectus sit amet aliquet ullamcorper. Praesent in erat quis est sagittis finibus. Etiam nec sapien in nulla interdum faucibus. Integer iaculis lorem quis arcu lobortis, non malesuada neque vehicula. Aenean nec tellus eu metus bibendum tempus. Sed rutrum urna ut commodo tempor. Vestibulum aliquet elit posuere turpis maximus condimentum. Sed urna libero, ornare eu tellus vitae, laoreet condimentum risus. Aenean elit lectus, mattis quis nibh nec, faucibus rutrum sapien. Sed iaculis consectetur mi, eget posuere turpis finibus et. +#### Heading 4 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sed mollis augue, vel efficitur lacus. Pellentesque eu egestas mi. Etiam ultrices lectus sit amet aliquet ullamcorper. Praesent in erat quis est sagittis finibus. Etiam nec sapien in nulla interdum faucibus. Integer iaculis lorem quis arcu lobortis, non malesuada neque vehicula. Aenean nec tellus eu metus bibendum tempus. Sed rutrum urna ut commodo tempor. Vestibulum aliquet elit posuere turpis maximus condimentum. Sed urna libero, ornare eu tellus vitae, laoreet condimentum risus. Aenean elit lectus, mattis quis nibh nec, faucibus rutrum sapien. Sed iaculis consectetur mi, eget posuere turpis finibus et. +#### Heading 4 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sed mollis augue, vel efficitur lacus. Pellentesque eu egestas mi. Etiam ultrices lectus sit amet aliquet ullamcorper. Praesent in erat quis est sagittis finibus. Etiam nec sapien in nulla interdum faucibus. Integer iaculis lorem quis arcu lobortis, non malesuada neque vehicula. Aenean nec tellus eu metus bibendum tempus. Sed rutrum urna ut commodo tempor. Vestibulum aliquet elit posuere turpis maximus condimentum. Sed urna libero, ornare eu tellus vitae, laoreet condimentum risus. Aenean elit lectus, mattis quis nibh nec, faucibus rutrum sapien. Sed iaculis consectetur mi, eget posuere turpis finibus et. + +--- + + +## Heading 2 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sed mollis augue, vel efficitur lacus. Pellentesque eu egestas mi. Etiam ultrices lectus sit amet aliquet ullamcorper. Praesent in erat quis est sagittis finibus. Etiam nec sapien in nulla interdum faucibus. Integer iaculis lorem quis arcu lobortis, non malesuada neque vehicula. Aenean nec tellus eu metus bibendum tempus. Sed rutrum urna ut commodo tempor. Vestibulum aliquet elit posuere turpis maximus condimentum. Sed urna libero, ornare eu tellus vitae, laoreet condimentum risus. Aenean elit lectus, mattis quis nibh nec, faucibus rutrum sapien. Sed iaculis consectetur mi, eget posuere turpis finibus et. +### Heading 3 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sed mollis augue, vel efficitur lacus. Pellentesque eu egestas mi. Etiam ultrices lectus sit amet aliquet ullamcorper. Praesent in erat quis est sagittis finibus. Etiam nec sapien in nulla interdum faucibus. Integer iaculis lorem quis arcu lobortis, non malesuada neque vehicula. Aenean nec tellus eu metus bibendum tempus. Sed rutrum urna ut commodo tempor. Vestibulum aliquet elit posuere turpis maximus condimentum. Sed urna libero, ornare eu tellus vitae, laoreet condimentum risus. Aenean elit lectus, mattis quis nibh nec, faucibus rutrum sapien. Sed iaculis consectetur mi, eget posuere turpis finibus et. +#### Heading 4 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sed mollis augue, vel efficitur lacus. Pellentesque eu egestas mi. Etiam ultrices lectus sit amet aliquet ullamcorper. Praesent in erat quis est sagittis finibus. Etiam nec sapien in nulla interdum faucibus. Integer iaculis lorem quis arcu lobortis, non malesuada neque vehicula. Aenean nec tellus eu metus bibendum tempus. Sed rutrum urna ut commodo tempor. Vestibulum aliquet elit posuere turpis maximus condimentum. Sed urna libero, ornare eu tellus vitae, laoreet condimentum risus. Aenean elit lectus, mattis quis nibh nec, faucibus rutrum sapien. Sed iaculis consectetur mi, eget posuere turpis finibus et. +#### Heading 4 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sed mollis augue, vel efficitur lacus. Pellentesque eu egestas mi. Etiam ultrices lectus sit amet aliquet ullamcorper. Praesent in erat quis est sagittis finibus. Etiam nec sapien in nulla interdum faucibus. Integer iaculis lorem quis arcu lobortis, non malesuada neque vehicula. Aenean nec tellus eu metus bibendum tempus. Sed rutrum urna ut commodo tempor. Vestibulum aliquet elit posuere turpis maximus condimentum. Sed urna libero, ornare eu tellus vitae, laoreet condimentum risus. Aenean elit lectus, mattis quis nibh nec, faucibus rutrum sapien. Sed iaculis consectetur mi, eget posuere turpis finibus et. + +### Heading 3 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sed mollis augue, vel efficitur lacus. Pellentesque eu egestas mi. Etiam ultrices lectus sit amet aliquet ullamcorper. Praesent in erat quis est sagittis finibus. Etiam nec sapien in nulla interdum faucibus. Integer iaculis lorem quis arcu lobortis, non malesuada neque vehicula. Aenean nec tellus eu metus bibendum tempus. Sed rutrum urna ut commodo tempor. Vestibulum aliquet elit posuere turpis maximus condimentum. Sed urna libero, ornare eu tellus vitae, laoreet condimentum risus. Aenean elit lectus, mattis quis nibh nec, faucibus rutrum sapien. Sed iaculis consectetur mi, eget posuere turpis finibus et. +#### Heading 4 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sed mollis augue, vel efficitur lacus. Pellentesque eu egestas mi. Etiam ultrices lectus sit amet aliquet ullamcorper. Praesent in erat quis est sagittis finibus. Etiam nec sapien in nulla interdum faucibus. Integer iaculis lorem quis arcu lobortis, non malesuada neque vehicula. Aenean nec tellus eu metus bibendum tempus. Sed rutrum urna ut commodo tempor. Vestibulum aliquet elit posuere turpis maximus condimentum. Sed urna libero, ornare eu tellus vitae, laoreet condimentum risus. Aenean elit lectus, mattis quis nibh nec, faucibus rutrum sapien. Sed iaculis consectetur mi, eget posuere turpis finibus et. +#### Heading 4 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sed mollis augue, vel efficitur lacus. Pellentesque eu egestas mi. Etiam ultrices lectus sit amet aliquet ullamcorper. Praesent in erat quis est sagittis finibus. Etiam nec sapien in nulla interdum faucibus. Integer iaculis lorem quis arcu lobortis, non malesuada neque vehicula. Aenean nec tellus eu metus bibendum tempus. Sed rutrum urna ut commodo tempor. Vestibulum aliquet elit posuere turpis maximus condimentum. Sed urna libero, ornare eu tellus vitae, laoreet condimentum risus. Aenean elit lectus, mattis quis nibh nec, faucibus rutrum sapien. Sed iaculis consectetur mi, eget posuere turpis finibus et. \ No newline at end of file diff --git a/content/projects/_index.md b/content/projects/_index.md new file mode 100644 index 0000000..9b00a12 --- /dev/null +++ b/content/projects/_index.md @@ -0,0 +1,5 @@ ++++ +title = "Projects" +sort_by = "weight" +template = "cards.html" ++++ diff --git a/content/projects/well-ts.md b/content/projects/well-ts.md new file mode 100644 index 0000000..c14cbe4 --- /dev/null +++ b/content/projects/well-ts.md @@ -0,0 +1,9 @@ ++++ +title = "Shadharon" +description = "A very good theme probably" +weight = 1 + +[extra] +remote_image = "https://i.natgeofe.com/n/8a3e578f-346b-479f-971d-29dd99a6b699/nationalgeographic_2751013_16x9.jpg" +link_to = "https://github.com/syedzayyan/well-ts" ++++ \ No newline at end of file diff --git a/sass/main.scss b/sass/main.scss new file mode 100644 index 0000000..1eb331b --- /dev/null +++ b/sass/main.scss @@ -0,0 +1,107 @@ +@font-face { + font-family: 'Open Sans'; + src: url("/fonts/IBM_Plex_Mono/IBMPlexMono-Regular.ttf"); +} +@import "parts/_cards.scss"; +@import "parts/_code.scss"; +@import "parts/_header.scss"; +@import "parts/_image.scss"; +@import "parts/misc.scss"; +@import "parts/table.scss"; +@import "parts/home-banner.scss"; +@import "parts/footer.scss"; +@import "parts/theme-switch.scss"; + +:root { + --max-layout-width:900px; + --normal-layout-width:600px; + --medium-layout-width:350px; + --small-layout-width:200px; + font-family: 'Roboto Mono', monospace; + line-height: 180%; + + + --bg-0: #121212; + --bg-1: rgba(255, 255, 255, 5%); + --bg-2: rgba(23, 23, 23, 100%); + --primary-color: #ef5350; + --hover-color: white; + --background-color:#29292e; + --navbar-color:#222226; + --secondary-color:#1b1b20; + --highlights: #b35a5a; + --links: #449cf8; + --text-color: #f2f2f2; + --code: #ef476f; + --border-color: #111; + --light-border-color: rgba(255, 255, 255, 0.1); + --input-back: #4b4a4a; + --input-color: #294797; +} + +[data-theme="light"] { + --bg-0: #fff; + --bg-1: #f2f2f2; + --bg-2: #fefefe; + --primary-color: #ef5350; + --hover-color: white; + --background-color:#fff; + --navbar-color:#e3e3e3; + --secondary-color:rgb(158, 158, 158); + --text-color: #222226; + --border-color: rgb(114, 114, 114); + --light-border-color: rgba(255, 255, 255, 0.1); + --input-back: #161616; + --input-color: #294797; + --input-back: rgb(158, 158, 158); + --input-color: #fbec48; +} + +html { + background-color: var(--background-color); + color: var(--text-color); + line-height: 1.6em; +} +body{ + margin:0; + padding:0; +} +.content { + max-width: var(--max-layout-width); + margin: 0 auto; + padding: 0 24px; + word-wrap: break-word; + min-height: 80vh; +} +@media only screen and (max-width:1000px) { + .content{ + max-width: var(--normal-layout-width); + } +} +@media only screen and (max-width:600px) { + .content{ + max-width: var(--medium-layout-width); + } +} +@media only screen and (max-width:300px) { + .content{ + max-width: var(--small-layout-width); + } +} +@media all and (min-width:640px) { + html { + font-size: 16.5px; + } +} + +@media all and (min-width:720px) { + html { + font-size: 17px; + } +} + +@media all and (min-width:960px) { + html { + font-size: 18px; + } +} \ No newline at end of file diff --git a/sass/parts/_cards.scss b/sass/parts/_cards.scss new file mode 100644 index 0000000..ede28df --- /dev/null +++ b/sass/parts/_cards.scss @@ -0,0 +1,75 @@ +.cards { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); + grid-template-rows: auto; + gap: 24px; + padding: 12px 0; +} + +.card { + min-height: 100px; + background: var(--bg-2); + border: 2px solid var(--border-color); + border-radius: 10px; + overflow: hidden; +} + +.card-info { + padding: 0 24px 24px 24px; +} + +.card-title { + margin-top: 0.7em; +} + +.card-image { + border: unset; + width: 100%; +} + +.card-image-placeholder { + height: 12px; + width: 100%; +} + +.card-description { + margin-top: 0.5em; + overflow: hidden; +} + +@media all and (max-width:720px) { + .cards { + gap: 18px; + } +} + +.bloglist-table-row{ + padding:2%; + background-color:var(--navbar-color); + border-radius: 5px; + transition: 300ms; + width: 28%; + margin-right:1%; + margin-top:3%; +} +.bloglist-container{ + display:flex; + flex-wrap: wrap; +} +.bloglist-table-row:hover{ + box-shadow: 2px 5px var(--border-color); +} +.bloglist-links{ + text-decoration:none; +} +.bloglist-table-row-data{ + padding:10px; +} +.bloglist-table-row-date{ + font-size:12px; +} +@media only screen and (max-width:600px) { + .bloglist-table-row{ + width:100%; + } + } \ No newline at end of file diff --git a/sass/parts/_code.scss b/sass/parts/_code.scss new file mode 100644 index 0000000..7c5758e --- /dev/null +++ b/sass/parts/_code.scss @@ -0,0 +1,113 @@ + +code { + background-color: var(--bg-1); + padding: 0.1em 0.2em; + border-radius: 5px; + border: 1px solid var(--border-color); +} + +pre { + /* Rounded border */ + border-radius: 5px; + border: 1px solid var(--border-color); + + line-height: 1.4; + overflow-x: auto; + padding: 1em; +} + +pre code { + background-color: transparent; + color: inherit; + font-size: 100%; + padding: 0; + + // We only want a border around `code` and not `pre code` blocks. + border: 0; +} + +pre { + font-family: var(--code-font); + position: relative; + -webkit-overflow-scrolling: touch; +} + +pre code[class*="language-"] { + -webkit-overflow-scrolling: touch; +} + +pre code[class*="language-"]::before { + background: black; + border-radius: 0 0 0.25rem 0.25rem; + color: white; + font-size: 12px; + letter-spacing: 0.025rem; + padding: 0.1rem 0.5rem; + position: absolute; + right: 0.1rem; + margin-top: 0.1rem; + text-align: right; + text-transform: uppercase; + top: 0; +} + +pre code[class="language-javaScript"]::before, +pre code[class="language-js"]::before { + content: "js"; + background: #f7df1e; + color: black; +} + +pre code[class*="language-yml"]::before, +pre code[class*="language-yaml"]::before { + content: "yaml"; + background: #f71e6a; + color: white; +} + +pre code[class*="language-shell"]::before, +pre code[class*="language-bash"]::before, +pre code[class*="language-sh"]::before { + content: "shell"; + background: green; + color: white; +} + +pre code[class*="language-json"]::before { + content: "json"; + background: dodgerblue; + color: #000000; +} + +pre code[class*="language-python"]::before, +pre code[class*="language-py"]::before { + content: "py"; + background: blue; + color: yellow; +} + +pre code[class*="language-css"]::before { + content: "css"; + background: cyan; + color: black; +} + +pre code[class*="language-go"]::before { + content: "Go"; + background: cyan; + color: royalblue; +} + +pre code[class*="language-md"]::before, +pre code[class*="language-md"]::before { + content: "Markdown"; + background: royalblue; + color: whitesmoke; +} + +pre code[class*="language-rust"]::before, +pre code[class*="language-rs"]::before { + content: "rust"; + background: #fff8f6; + color: #ff4647; +} \ No newline at end of file diff --git a/sass/parts/_footer.scss b/sass/parts/_footer.scss new file mode 100644 index 0000000..00f07c2 --- /dev/null +++ b/sass/parts/_footer.scss @@ -0,0 +1,19 @@ +footer { + background-color: var(--navbar-color); + border-top: 1px solid var(--light-border-color); + padding: 3rem 0; + font-family: var(--post-font-family); + margin-top: 1rem; + } + + footer section { + display: flex; + flex-direction: column; + align-items: center; + gap: 1.25rem; + } + footer nav { + display: flex; + gap: 0.25rem; + margin: 0 1rem; + } \ No newline at end of file diff --git a/sass/parts/_header.scss b/sass/parts/_header.scss new file mode 100644 index 0000000..55a30ff --- /dev/null +++ b/sass/parts/_header.scss @@ -0,0 +1,117 @@ +.page-header { + font-size: 3em; + line-height: 100%; + font-family: var(--header-font); + margin: 4rem 0px 1rem 0px; +} + +.centered-header { + font-family: var(--header-font); + + position: absolute; + top: 40%; + left: 50%; + transform: translate(-50%, -50%); + text-align: center; + font-size: 1em; +} + +header { + width: 100%; + background-color: var(--navbar-color); +} +.navbar{ + max-width : var(--max-layout-width); + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; + padding: 1em 0; + margin:0 auto; +} +@media only screen and (max-width:1000px) { + .navbar{ + max-width: var(--normal-layout-width); + } + .nav-navs{ + margin: 0 auto; + display:flex; + justify-content: center; + align-items: center; + } +} +@media only screen and (max-width:600px) { + .navbar{ + max-width: var(--medium-layout-width); + } +} +@media only screen and (max-width:300px) { + .navbar{ + max-width: var(--small-layout-width); + } +} +.nav-links{ + text-decoration: none; + color: var(--text-color); + padding:5px; + border-radius:5px; + transition:100ms; +} +.nav-links:hover { + color: var(--links); + background-color:var(--secondary-color); +} +header .main { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; + align-items: flex-start; + gap: 12px; + font-size: 1.5rem; + + /* Otherwise header and menu is too close on small screens*/ + margin-bottom: 10px; +} +.nav-navs img{ + border: none; +} +.home-title{ + font-size: 1.6em; + color:#ff3344; +} +.socials { + /* flex-child */ + flex-grow: 0; + /* flex-container */ + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: flex-start; + align-items: flex-end; + gap: 6px; +} + +.social { + border-bottom: unset; + background-image: unset; + padding: 2px; +} + +.social>img { + border: unset; + width: 24px; + height: 24px; + +} + +.meta { + color: #999; + letter-spacing: -0.5px; +} + +@media (prefers-color-scheme: dark) { + .social>img { + filter: invert(1); + } +} \ No newline at end of file diff --git a/sass/parts/_home-banner.scss b/sass/parts/_home-banner.scss new file mode 100644 index 0000000..3f6dd05 --- /dev/null +++ b/sass/parts/_home-banner.scss @@ -0,0 +1,41 @@ +#banner-container-home { + display: flex; + width: 100%; + margin: 20px auto; + align-items: center; + justify-content: center; +} + +.image-container-home { + position: relative; + width: 30%; + overflow: hidden; + border-radius: 10px; +} + +#home-banner-text { + width: 70%; + font-size: 1.1em; + line-height: 200%; + padding-right: 5%; +} +.banner-home-img{ + border-radius: 50%; + border:none; +} +@media only screen and (max-width: 600px) { + #banner-container-home { + display: block; + margin: 0 auto; + } + + .image-container-home { + width: 95%; + height: 50vh; + } + + #home-banner-text { + width: 95%; + + } +} \ No newline at end of file diff --git a/sass/parts/_image.scss b/sass/parts/_image.scss new file mode 100644 index 0000000..447f930 --- /dev/null +++ b/sass/parts/_image.scss @@ -0,0 +1,35 @@ +img { + border: 3px solid #ececec; + max-width: 100%; +} + +figure { + box-sizing: border-box; + display: inline-block; + margin: 0; + max-width: 100%; +} + +figure img { + max-height: 500px; +} + +@media screen and (min-width: 600px) { + figure { + padding: 0 40px; + } +} + +figure h4 { + font-size: 1rem; + margin: 0; + margin-bottom: 1em; +} + +figure h4::before { + content: "↳ "; +} + +svg { + max-height: 15px; +} \ No newline at end of file diff --git a/sass/parts/_misc.scss b/sass/parts/_misc.scss new file mode 100644 index 0000000..56ac472 --- /dev/null +++ b/sass/parts/_misc.scss @@ -0,0 +1,63 @@ +.primary-color { + color: var(--primary-color); +} + +.draft-label { + color: var(--hover-color); + text-decoration: none; + padding: 2px 4px; + border-radius: 4px; + margin-left: 6px; + background-color: var(--primary-color); +} + +::-moz-selection { + background: var(--primary-color); + color: var(--hover-color); + text-shadow: none; +} + +::selection { + background: var(--primary-color); + color: var(--hover-color); +} + +p { + line-height: 1.5; +} + +hr { + border: 0; + border-top: 3px solid var(--border-color); + margin: 1em 0; +} + +blockquote { + border-left: 3px solid var(--border-color); + color: #737373; + margin: 0; + padding-left: 1em; +} + +a{ + color:var(--text-color); + text-decoration-color: var(--links); + font-weight:1000; +} + +a:hover { + background-color: var(--primary-color); + color: var(--hover-color); +} + +time { + color: grey; +} + +/* Remove post list padding */ +@media screen and (max-width: 600px) { + .list>ul { + margin: 0; + padding: 0; + } +} \ No newline at end of file diff --git a/sass/parts/_table.scss b/sass/parts/_table.scss new file mode 100644 index 0000000..247db0f --- /dev/null +++ b/sass/parts/_table.scss @@ -0,0 +1,15 @@ +table { + border-spacing: 0; + border-collapse: collapse; +} + +table th { + padding: 6px 13px; + border: 1px solid #dfe2e5; + font-size: large; +} + +table td { + padding: 6px 13px; + border: 1px solid #dfe2e5; +} \ No newline at end of file diff --git a/sass/parts/_theme-switch.scss b/sass/parts/_theme-switch.scss new file mode 100644 index 0000000..9e7c775 --- /dev/null +++ b/sass/parts/_theme-switch.scss @@ -0,0 +1,80 @@ +.theme-switcher{ + top: -13px; + width: 50px; + height: 20px; + position: relative; + cursor: pointer; + margin: 0 auto; + .background{ + width: 50px; + height: 20px; + background-color: var(--input-back); + border-radius: 30px; + } + .switch{ + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + height: 30px; + width: 30px; + background-color: var(--input-color); + position: absolute; + top: -5px; + left: 0px; + border-radius: 50%; + transition: all 0.3s ease-in-out; + display: flex; + justify-content: center; + align-items: center; + img{ + width: 60%; + height: auto; + position: absolute; + transition: all 0.2s ease-in-out; + border:none; + } + .sun{ + opacity: 0; + } + .moon{ + opacity: 1; + } + } + input{ + display: none; + &:checked + .switch { + left: 20px; + .sun{ + opacity: 1; + } + .moon{ + opacity: 0; + } + } + } +} + + + + + +.logo { + position: fixed; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + left: 10px; + top: 10px; + flex-direction: row; + z-index: 1000; + + a { + display: block; + height: 30px; + width: auto; + cursor: pointer; + margin-right: 10px; + img { + height: 100%; + width: auto; + } + } + } \ No newline at end of file diff --git a/static/.DS_Store b/static/.DS_Store new file mode 100644 index 0000000..2b1d9f3 Binary files /dev/null and b/static/.DS_Store differ diff --git a/static/fonts/IBM_Plex_Mono/IBMPlexMono-Regular.ttf b/static/fonts/IBM_Plex_Mono/IBMPlexMono-Regular.ttf new file mode 100644 index 0000000..93331e2 Binary files /dev/null and b/static/fonts/IBM_Plex_Mono/IBMPlexMono-Regular.ttf differ diff --git a/static/fonts/IBM_Plex_Mono/OFL.txt b/static/fonts/IBM_Plex_Mono/OFL.txt new file mode 100644 index 0000000..379e735 --- /dev/null +++ b/static/fonts/IBM_Plex_Mono/OFL.txt @@ -0,0 +1,93 @@ +Copyright © 2017 IBM Corp. with Reserved Font Name "Plex" + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/static/js/main.js b/static/js/main.js new file mode 100644 index 0000000..def90cd --- /dev/null +++ b/static/js/main.js @@ -0,0 +1,27 @@ +//https://codepen.io/codeorum/pen/bGedRJO + +var themeSwitcher = document.querySelector('.theme-switcher input'); +var currentTheme = localStorage.getItem('theme'); + +// check what is current theme right now and activate it +if (currentTheme) { + document.documentElement.setAttribute('data-theme', currentTheme); + if (currentTheme === 'light') { + themeSwitcher.checked = true; + } +} + +// switch between themes +function switchTheme(e) { + if (e.target.checked) { + document.documentElement.setAttribute('data-theme', 'light'); + localStorage.setItem('theme', 'light'); + } + else { + document.documentElement.setAttribute('data-theme', 'dark'); + localStorage.setItem('theme', 'dark'); + } +} + +// event listener on checkbox change +themeSwitcher.addEventListener('change', switchTheme, false); \ No newline at end of file diff --git a/static/menu_icon/moon.png b/static/menu_icon/moon.png new file mode 100644 index 0000000..0eca4d7 Binary files /dev/null and b/static/menu_icon/moon.png differ diff --git a/static/menu_icon/projects.png b/static/menu_icon/projects.png new file mode 100755 index 0000000..ce5a868 Binary files /dev/null and b/static/menu_icon/projects.png differ diff --git a/static/menu_icon/sun.png b/static/menu_icon/sun.png new file mode 100644 index 0000000..dc37957 Binary files /dev/null and b/static/menu_icon/sun.png differ diff --git a/static/social_icons/LICENSE b/static/social_icons/LICENSE new file mode 100644 index 0000000..993facc --- /dev/null +++ b/static/social_icons/LICENSE @@ -0,0 +1 @@ +All icons in this directory are downloaded from [FontAwesome](https://fontawesome.com/). They are part of the [free offer](https://fontawesome.com/license/free) and are licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). \ No newline at end of file diff --git a/static/social_icons/apple.svg b/static/social_icons/apple.svg new file mode 100644 index 0000000..d0532d5 --- /dev/null +++ b/static/social_icons/apple.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/bitcoin.svg b/static/social_icons/bitcoin.svg new file mode 100644 index 0000000..941d9b0 --- /dev/null +++ b/static/social_icons/bitcoin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/deviantart.svg b/static/social_icons/deviantart.svg new file mode 100644 index 0000000..7dbd0b6 --- /dev/null +++ b/static/social_icons/deviantart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/diaspora.svg b/static/social_icons/diaspora.svg new file mode 100644 index 0000000..55527b5 --- /dev/null +++ b/static/social_icons/diaspora.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/discord.svg b/static/social_icons/discord.svg new file mode 100644 index 0000000..f0dfeab --- /dev/null +++ b/static/social_icons/discord.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/discourse.svg b/static/social_icons/discourse.svg new file mode 100644 index 0000000..343bea6 --- /dev/null +++ b/static/social_icons/discourse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/email.svg b/static/social_icons/email.svg new file mode 100644 index 0000000..85245e2 --- /dev/null +++ b/static/social_icons/email.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/ethereum.svg b/static/social_icons/ethereum.svg new file mode 100644 index 0000000..af202de --- /dev/null +++ b/static/social_icons/ethereum.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/etsy.svg b/static/social_icons/etsy.svg new file mode 100644 index 0000000..ebc040a --- /dev/null +++ b/static/social_icons/etsy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/facebook.svg b/static/social_icons/facebook.svg new file mode 100644 index 0000000..0afaf7a --- /dev/null +++ b/static/social_icons/facebook.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/github.svg b/static/social_icons/github.svg new file mode 100644 index 0000000..e32807a --- /dev/null +++ b/static/social_icons/github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/gitlab.svg b/static/social_icons/gitlab.svg new file mode 100644 index 0000000..b577d3f --- /dev/null +++ b/static/social_icons/gitlab.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/google.svg b/static/social_icons/google.svg new file mode 100644 index 0000000..b3776b0 --- /dev/null +++ b/static/social_icons/google.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/hacker-news.svg b/static/social_icons/hacker-news.svg new file mode 100644 index 0000000..23e3980 --- /dev/null +++ b/static/social_icons/hacker-news.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/instagram.svg b/static/social_icons/instagram.svg new file mode 100644 index 0000000..89f63c4 --- /dev/null +++ b/static/social_icons/instagram.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/linkedin.svg b/static/social_icons/linkedin.svg new file mode 100644 index 0000000..d54fcf5 --- /dev/null +++ b/static/social_icons/linkedin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/mastodon.svg b/static/social_icons/mastodon.svg new file mode 100644 index 0000000..5e12f81 --- /dev/null +++ b/static/social_icons/mastodon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/paypal.svg b/static/social_icons/paypal.svg new file mode 100644 index 0000000..efdc81a --- /dev/null +++ b/static/social_icons/paypal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/pinterest.svg b/static/social_icons/pinterest.svg new file mode 100644 index 0000000..eb977c2 --- /dev/null +++ b/static/social_icons/pinterest.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/quora.svg b/static/social_icons/quora.svg new file mode 100644 index 0000000..375d302 --- /dev/null +++ b/static/social_icons/quora.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/reddit.svg b/static/social_icons/reddit.svg new file mode 100644 index 0000000..a8a3a96 --- /dev/null +++ b/static/social_icons/reddit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/rss.svg b/static/social_icons/rss.svg new file mode 100644 index 0000000..b862886 --- /dev/null +++ b/static/social_icons/rss.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/skype.svg b/static/social_icons/skype.svg new file mode 100644 index 0000000..3369aba --- /dev/null +++ b/static/social_icons/skype.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/slack.svg b/static/social_icons/slack.svg new file mode 100644 index 0000000..0dbc26d --- /dev/null +++ b/static/social_icons/slack.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/snapchat.svg b/static/social_icons/snapchat.svg new file mode 100644 index 0000000..2cd79dd --- /dev/null +++ b/static/social_icons/snapchat.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/soundcloud.svg b/static/social_icons/soundcloud.svg new file mode 100644 index 0000000..4724d74 --- /dev/null +++ b/static/social_icons/soundcloud.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/spotify.svg b/static/social_icons/spotify.svg new file mode 100644 index 0000000..1d393ba --- /dev/null +++ b/static/social_icons/spotify.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/stack-exchange.svg b/static/social_icons/stack-exchange.svg new file mode 100644 index 0000000..0a3177f --- /dev/null +++ b/static/social_icons/stack-exchange.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/stack-overflow.svg b/static/social_icons/stack-overflow.svg new file mode 100644 index 0000000..2ca50c7 --- /dev/null +++ b/static/social_icons/stack-overflow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/steam.svg b/static/social_icons/steam.svg new file mode 100644 index 0000000..b61f374 --- /dev/null +++ b/static/social_icons/steam.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/telegram.svg b/static/social_icons/telegram.svg new file mode 100644 index 0000000..02f48c0 --- /dev/null +++ b/static/social_icons/telegram.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/twitter.svg b/static/social_icons/twitter.svg new file mode 100644 index 0000000..0778f72 --- /dev/null +++ b/static/social_icons/twitter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/vimeo.svg b/static/social_icons/vimeo.svg new file mode 100644 index 0000000..d98368e --- /dev/null +++ b/static/social_icons/vimeo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/whatsapp.svg b/static/social_icons/whatsapp.svg new file mode 100644 index 0000000..d259142 --- /dev/null +++ b/static/social_icons/whatsapp.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/social_icons/youtube.svg b/static/social_icons/youtube.svg new file mode 100644 index 0000000..287dca2 --- /dev/null +++ b/static/social_icons/youtube.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..b3cff67 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,8 @@ +{% extends "page.html" %} + +{% block main_content %} +
+ {{ post_macros::page_header(title="404")}} + You have reached somewhere I do not know, or I knew and I have hidden it to preserve my sanity +
+{% endblock main_content %} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..26050b1 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,19 @@ +{% import "macros/macros.html" as post_macros %} + + + +{% include "partials/header.html" %} + + + {% include "partials/nav.html" %} +
+ + {# Post page is the default #} + {% block main_content %} + Nothing here?! + {% endblock main_content %} +
+ {% include "partials/footer.html" %} + + + \ No newline at end of file diff --git a/templates/cards.html b/templates/cards.html new file mode 100644 index 0000000..2c67f32 --- /dev/null +++ b/templates/cards.html @@ -0,0 +1,35 @@ +{% extends "base.html" %} + +{% block main_content %} + {% if section.extra.section_path -%} + {% set section = get_section(path=section.extra.section_path) %} + {% endif -%} + + {{ post_macros::page_header(title=section.title) }} + +
+ {%- if paginator %} + {%- set show_pages = paginator.pages -%} + {% else %} + {%- set show_pages = section.pages -%} + {% endif -%} + + {{ post_macros::cards_posts(pages=show_pages) }} +
+ + {% if paginator %} + + {% endif %} +{% endblock main_content %} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..e1f3940 --- /dev/null +++ b/templates/index.html @@ -0,0 +1 @@ +{% extends "section.html" %} \ No newline at end of file diff --git a/templates/macros/macros.html b/templates/macros/macros.html new file mode 100644 index 0000000..042c23d --- /dev/null +++ b/templates/macros/macros.html @@ -0,0 +1,214 @@ +{% macro list_posts(pages) %} +
+ {%- for page in pages %} +
+

+ {{page.title}} +

+ +
+ {%- if page.date %} + + {% endif -%} +
+ {{ page.reading_time }} minute read + {% if page.draft %} + DRAFT + {% endif %} + +
+ +
+
+ {% if page.description %} + {{ page.description }} + {% elif page.summary %} + {{ page.summary | safe }}… + {% else %} + {% set hide_read_more = true %} + {% endif %} +
+ + {% if not hide_read_more %} + Read more ⟶ + {% endif %} +
+ + {% endfor -%} +
+{% 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 %} + + {%- if not loop.last %}{{ sep | safe }}{% endif -%} + {% endfor -%} + +{% endif -%} +{% endmacro tags %} + +{% macro page_header(title) %} +

+ {{ title }} +

+{% endmacro content %} + + +{% macro page_desc(desc) %} + +{% endmacro content %} + +{% macro content(page) %} +
+
+
+ {#

{{ page.title }}

#} + {{ post_macros::page_header(title=page.title) }} + +
+ {% if page.date %} + Posted on + {% endif %} + + {% if page.draft %} + DRAFT + {% endif %} + + {% if page.taxonomies and page.taxonomies.tags %} + + {% endif %} + || {{ page.reading_time }} minute read +
+
+ + {% if page.extra.tldr %} +
+ tl;dr: + {{ page.extra.tldr }} +
+ {% endif %} + + {# Optional table of contents #} + {% if config.extra.toc | default(value=false) %} + {% if page.toc %} +

Table of Contents

+
    + {% for h1 in page.toc %} +
  • + {{ h1.title }} + {% if h1.children %} +
      + {% for h2 in h1.children %} +
    • + {{ h2.title }} +
    • + + {% if h2.children %} + + {% endif %} + {% endfor %} +
    + {% endif %} +
  • + {% endfor %} +
+ {% endif %} + {% endif %} + +
+ {{ page.content | safe }} +
+ +
+
+{% endmacro content %} + +{% macro cards_posts(pages) %} +
+ {%- for page in pages %} +
+ {% if page.extra.local_image %} + {{ + {% elif page.extra.remote_image %} + {{ + {% else %} +
+ {% endif %} + +
+

+ {% if page.extra.link_to %} + {{page.title}} + {% else %} + {{page.title}} + {% endif %} +

+ +
+ {%- if page.date %} + + {% endif -%} + {% if page.draft %} + DRAFT + {% endif %} +
+ +
+ {% if page.description %} + {{ page.description }} + {% endif %} +
+
+
+ + {% endfor -%} +
+{% endmacro cards_posts %} + +{% macro list_title(pages, tag_name=false) %} +{% if tag_name %} +

Entries tagged - "{{ term.name }}"

+{% else %} +

All articles

+{% endif %} + + +{% endmacro list_title %} \ No newline at end of file diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..9bf0abb --- /dev/null +++ b/templates/page.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} + +{% block main_content %} + {{ post_macros::content(page=page)}} +{% endblock main_content %} \ No newline at end of file diff --git a/templates/partials/footer.html b/templates/partials/footer.html new file mode 100644 index 0000000..ae9696f --- /dev/null +++ b/templates/partials/footer.html @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/templates/partials/header.html b/templates/partials/header.html new file mode 100644 index 0000000..9128138 --- /dev/null +++ b/templates/partials/header.html @@ -0,0 +1,63 @@ +{% import "macros/macros.html" as post_macros %} + + + + + + + {# Site title #} + {% set current_path = current_path | default(value="/") %} + {% if current_path == "/" %} + + {{ config.title | default(value="Home") }} + + {% else %} + + {{ page.title | default(value=config.title) | default(value="Post") }} + + {% endif %} + + {# Favicon #} + {% if config.extra.favicon %} + + {% endif %} + + + + {# RSS #} + + + + + {% if config.extra.stylesheets %} + {% for stylesheet in config.extra.stylesheets %} + + {% endfor %} + {% endif %} + + + + + + {% if is_404 %} + + {% else %} + + {% endif %} + + + + + {% if config.extra.headerImage %} + + + {% endif %} + + {% set current_url = current_url | default(value="/") %} + + + + + + \ No newline at end of file diff --git a/templates/partials/nav.html b/templates/partials/nav.html new file mode 100644 index 0000000..d49ae3c --- /dev/null +++ b/templates/partials/nav.html @@ -0,0 +1,40 @@ +
+ +
\ No newline at end of file diff --git a/templates/section.html b/templates/section.html new file mode 100644 index 0000000..3e791fb --- /dev/null +++ b/templates/section.html @@ -0,0 +1,40 @@ +{% extends "base.html" %} + +{% block main_content %} +{% if section.extra.section_path -%} +{% set section = get_section(path=section.extra.section_path) %} +{% endif -%} + +{%- if section.extra.desc %} + {{ post_macros::page_desc(desc=section.extra.desc) }} +{% endif -%} + +{{ post_macros::page_header(title=section.title) }} + +
+ {%- if paginator %} + {%- set show_pages = paginator.pages -%} + {% else %} + {%- set show_pages = section.pages -%} + {% endif -%} + + {{ post_macros::list_posts(pages=show_pages) }} +
+ +{% if paginator %} + +{% endif %} +{% endblock main_content %} \ No newline at end of file diff --git a/templates/tags/list.html b/templates/tags/list.html new file mode 100644 index 0000000..7b242ed --- /dev/null +++ b/templates/tags/list.html @@ -0,0 +1,19 @@ +{% extends "index.html" %} + + +{% block main_content %} +

Tags

+ +
+ +
+ +{% endblock main_content %} \ No newline at end of file diff --git a/templates/tags/single.html b/templates/tags/single.html new file mode 100644 index 0000000..6e0bd11 --- /dev/null +++ b/templates/tags/single.html @@ -0,0 +1,7 @@ +{% extends "index.html" %} + +{% block main_content %} + +{{ post_macros::list_title(pages=term.pages, tag_name=term.name) }} + +{% endblock main_content %} \ No newline at end of file