├── LICENSE ├── README.md ├── assets ├── _default.scss ├── code.scss ├── footer.scss ├── header.scss ├── landing_page.scss ├── main.scss ├── navigation.scss ├── post.scss ├── styles.scss └── typography.scss ├── config.toml ├── images ├── mockup.png ├── screenshot.png └── tn.png ├── layouts ├── 404.html ├── _default │ ├── baseof.html │ ├── section.html │ └── single.html ├── index.html ├── landing_page.html ├── partials │ ├── deferred.html │ ├── footer.html │ ├── head.html │ ├── header.html │ ├── main.html │ ├── math.html │ ├── navigation.html │ ├── post.html │ ├── post_li.html │ └── post_title.html └── posts │ ├── list.html │ └── single.html └── theme.toml /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Timothy Gebhard 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

barks

2 | 3 | **barks** is a simple, minimalistic theme for the static website generator [Hugo](https://gohugo.io). Its was primarily developed as a theme for personal (academic) websites, although it may also be useful for other purposes 🙃 4 | 5 | 6 | 7 |
8 | 9 |

10 | 11 |

12 |
13 | 14 | ## 🚀 Live Demo 15 | 16 | A live demo that showcases **barks** in action is available [here](https://timothygebhard.de/projects/barks). 17 | 18 |
19 | 20 | ## ⚡️ Quickstart 21 | 22 | If you already have a Hugo site, you can use **barks** as your theme by calling: 23 | 24 | ```bash 25 | git submodule add https://github.com/timothygebhard/barks 26 | ``` 27 | 28 | in your `themes` directory, and changing the `theme` parameter in your `config.toml` to `"barks"`. 29 | 30 | Otherwise, you might want to check out the [Hugo quickstart guide](https://gohugo.io/getting-started/quick-start/). 31 | 32 | **Note:** Since *barks* makes use of [SCSS](https://en.wikipedia.org/wiki/Sass_(stylesheet_language)), which needs to be pre-compiled, you need to make sure that you are using the [extended version](https://gohugo.io/troubleshooting/faq/#i-get--this-feature-is-not-available-in-your-current-hugo-version) of Hugo! 33 | 34 |

35 | 36 | ## 📄 Layout for landing page 37 | 38 | If you want to use the landing page as shown in the screenshot above, put `layout: landing_page` into the header of your `_index.md` file. Additionally, you need to add `image: ` to specify the image that should be used. 39 | 40 |

41 | 42 | ## ⚙️ Configuration 43 | 44 | **barks** comes with a number of customization options to personalize its looks through the `[params]` section in the `config.toml` file. Most options should be rather self-explanatory; nevertheless, here is a quick overview: 45 | 46 |
47 | 48 | **Head:** 49 | 50 | You can add information about the author, a description and some keywords (all of which will be used to generate `` tags in the `` ) in the `[params.head]` section. Additionally, you can also specify the path to a custom CSS file in which you can change the stylesheets of **barks** or add new styles: 51 | 52 | ```toml 53 | [params.head] 54 | author = "Carl Barks" 55 | custom_css = "" 56 | description = "Hi, I'm Carl, and this is my website!" 57 | keywords = ["some", "keywords", "to", "describe", "this"] 58 | ``` 59 | 60 |
61 | 62 | **Navigation and footer:** 63 | 64 | You can disable the navigation (e.g., if all your content fits onto a single page) and the footer (e.g., if you don’t need the social media icons or a copyright notice) using: 65 | 66 | ```toml 67 | [params.navigation] 68 | show_navigation = false 69 | 70 | [params.footer] 71 | show_footer = false 72 | ``` 73 | 74 | Set these values to `true` (or omit them altogether) if you *do* want to use the navigation and the footer. 75 | 76 |
77 | 78 | **Typography:** 79 | 80 | You can choose the font for the website title (i.e., the header), as well as the main text using: 81 | 82 | ```toml 83 | [params.typography] 84 | title_font = "Bree Serif" 85 | body_font = "Source Sans Pro" 86 | ``` 87 | 88 | You can use *any* [Google Font](https://fonts.google.com/) here; **barks** will load them automatically. 89 | 90 |
91 | 92 | **Colors:** 93 | 94 | Change the colors of the [theme](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color), the background, the text, and the links in the navigation using: 95 | 96 | ```toml 97 | [params.colors] 98 | theme_color = "#333333" 99 | background_color = "#fcfbf9" 100 | text_color = "#333333" 101 | link_color = "#60c17d" 102 | ``` 103 | 104 |
105 | 106 | **Social media:** 107 | 108 | You can add your social media profiles and contact options to the footer via the `[params.social]` section. Here is an example of how this might look: 109 | 110 | ```toml 111 | [params.social] 112 | [params.social.email] 113 | name = "E-Mail" 114 | class = "fas fa-envelope" 115 | url = "mailto:@.com" 116 | weight = 1 117 | [params.social.github] 118 | name = "GitHub" 119 | class = "fab fa-github" 120 | url = "https://github.com/" 121 | weight = 2 122 | [params.social.google_scholar] 123 | name = "Google Scholar" 124 | class = "ai ai-google-scholar-square" 125 | url = "https://scholar.google.com/citations?user=" 126 | weight = 3 127 | ``` 128 | 129 | As you can see, each entry in the `[params.social]` section is itself a section with 4 keys: 130 | 131 | * `name`: This will be used for the `title` attribute of the link (which is what you see in the little pop-up if you place your cursor on the link). 132 | * `class`: This field controls which icon is used. You can use *any* icon from [FontAwesome](https://fontawesome.com/) or [Academicons](https://jpswalsh.github.io/academicons/). The icons are included as ``; see the [FontAwesome manual](https://fontawesome.com/v5.15/how-to-use/on-the-web/referencing-icons/basic-use) for more information. 133 | * `url`: The URL to your profile for the respective platform. For e-mail addresses, add a `mailto:` [prefix](https://en.m.wikipedia.org/wiki/Mailto). 134 | * `weight`: Use this field to define the order by which the icons are sorted. 135 | 136 |
137 | 138 | **Disabling page titles:** 139 | 140 | By default, each page prints the `title` that is specified in the header as a `

`-level heading at the top of the page. You can disable this for any given page by adding `hide_title: true` to the header. 141 | 142 |

143 | 144 | ## 🤓 LaTeX support 145 | 146 | You can enable LaTeX support (via [KaTeX](https://katex.org/)) by adding `math: true` to the header section of each page or post in which you want to use it. (That way the corresponding JS is only loaded when it is needed.) 147 | 148 | Use single dollar signs `$` for inline formulas, and double dollar signs `$$` for typesetting math in a block. 149 | 150 |
151 | 152 | ## 🦄 Contributing 153 | 154 | Direct contributions and pull requests to improve **barks** are always welcome! Otherwise, you can of course also help the development by creating issues for bugs that you have encountered, or for new features that you would like to see implemented 🙃 155 | 156 |
157 | 158 | ## ⚖️ License 159 | 160 | **barks** is released under the [MIT license](https://opensource.org/licenses/MIT); see [LICENSE](https://github.com/timothygebhard/barks/blob/main/LICENSE) file. 161 | -------------------------------------------------------------------------------- /assets/_default.scss: -------------------------------------------------------------------------------- 1 | 2 | * { 3 | border: 0; 4 | font: inherit; 5 | font-size: 100%; 6 | vertical-align: baseline; 7 | margin: 0; 8 | padding: 0; 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | box-sizing: border-box; 12 | } 13 | 14 | body { 15 | background-color: $background-color; 16 | font-family: $body-font, sans-serif; 17 | font-size: 20px; 18 | line-height: 160%; 19 | font-display: swap; 20 | } 21 | 22 | .outer { 23 | display: table; 24 | position: absolute; 25 | top: 0; 26 | left: 0; 27 | height: 100%; 28 | width: 100%; 29 | } 30 | 31 | .middle { 32 | display: table-cell; 33 | vertical-align: middle; 34 | } 35 | 36 | .inner { 37 | margin-left: auto; 38 | margin-right: auto; 39 | max-width: 768px; 40 | padding: 0 16px; 41 | box-sizing: border-box; 42 | } 43 | 44 | @media only screen and (max-width: 600px) { 45 | .inner { 46 | max-width: 400px; 47 | } 48 | } -------------------------------------------------------------------------------- /assets/code.scss: -------------------------------------------------------------------------------- 1 | pre, code { 2 | font-family: monospace; 3 | background-color: rgba(invert($background-color), 0.1); 4 | border-radius: 5px; 5 | } 6 | 7 | code { 8 | font-size: 12px; 9 | padding: 4px; 10 | } 11 | 12 | pre { 13 | margin-top: 1.5em; 14 | margin-bottom: 1.5em; 15 | word-wrap: normal; 16 | padding: 16px; 17 | overflow: auto; 18 | font-size: 85%; 19 | line-height: 1.45; 20 | } 21 | 22 | pre>code { 23 | padding: 0; 24 | margin: 0; 25 | font-size: 100%; 26 | word-break: normal; 27 | white-space: pre; 28 | background: transparent; 29 | border: 0; 30 | } 31 | 32 | pre code { 33 | display: inline; 34 | padding: 0; 35 | margin: 0; 36 | overflow: visible; 37 | line-height: inherit; 38 | word-wrap: normal; 39 | background-color: transparent; 40 | border: 0; 41 | } 42 | 43 | pre code::before, pre code::after { 44 | content: normal; 45 | } 46 | -------------------------------------------------------------------------------- /assets/footer.scss: -------------------------------------------------------------------------------- 1 | 2 | footer { 3 | width: 100%; 4 | text-align: center; 5 | margin-bottom: 60px; 6 | border-top: 1px solid $text-color; 7 | padding-top: 1em; 8 | font-size: small; 9 | color: $text-color; 10 | 11 | .fas, .fab, .ai { 12 | font-size: large; 13 | transition: all .15s ease-in-out; 14 | } 15 | 16 | .fas:hover, .fab:hover, .ai:hover { 17 | color: $link-color; 18 | transform: scale(1.5); 19 | } 20 | 21 | } 22 | 23 | footer ul li a i { 24 | color: $text-color; 25 | } 26 | 27 | footer ul { 28 | display: table; 29 | margin: auto; 30 | padding: 0; 31 | } 32 | 33 | footer li { 34 | list-style-type: none; 35 | display: inline-block; 36 | padding: 0px 10px; 37 | } 38 | 39 | footer a { 40 | color: $text-color; 41 | text-decoration: underline; 42 | text-decoration-style: dotted; 43 | text-underline-offset: 3px; 44 | } 45 | 46 | footer a:hover { 47 | text-decoration-style: solid; 48 | text-decoration-color: $link-color; 49 | } 50 | -------------------------------------------------------------------------------- /assets/header.scss: -------------------------------------------------------------------------------- 1 | 2 | header { 3 | text-align: center; 4 | position: static; 5 | margin-top: 60px; 6 | line-height: 1.1; 7 | } 8 | 9 | header .title { 10 | font-family: $title-font, serif; 11 | font-size: 52px; 12 | text-decoration: none; 13 | margin: 0; 14 | padding: 0; 15 | color: $text-color; 16 | font-display: swap; 17 | } 18 | 19 | @media only screen and (max-width: 600px) { 20 | 21 | header .title { 22 | margin-bottom: 10px; 23 | } 24 | 25 | header .title { 26 | font-size: 44px; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /assets/landing_page.scss: -------------------------------------------------------------------------------- 1 | .landing-page-wrapper { 2 | display: flex; 3 | flex-wrap: wrap; 4 | flex-direction: row; 5 | justify-content: space-between; 6 | } 7 | 8 | .landing-page-content { 9 | width: 64%; 10 | align-items: center; 11 | display: inline-flex; 12 | } 13 | 14 | .landing-page-image { 15 | align-items: center; 16 | width: 30%; 17 | text-align: center; 18 | padding: 0; 19 | display: inline-flex; 20 | } 21 | 22 | .landing-page-image img { 23 | margin: 0; 24 | height: auto; 25 | width: 100%; 26 | } 27 | 28 | 29 | @media only screen and (max-width: 600px) { 30 | 31 | .landing-page-content { 32 | width: 100%; 33 | padding: 0; 34 | margin-bottom: 1em; 35 | } 36 | 37 | .landing-page-image { 38 | width: 100%; 39 | margin: auto; 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /assets/main.scss: -------------------------------------------------------------------------------- 1 | 2 | main { 3 | 4 | text-align: left; 5 | width: 100%; 6 | padding-top: 25px; 7 | padding-bottom: 40px; 8 | color: $text-color; 9 | 10 | a { 11 | color: $text-color; 12 | text-decoration: underline; 13 | text-decoration-style: dotted; 14 | text-underline-offset: 3px; 15 | } 16 | 17 | a:hover { 18 | text-decoration-style: solid; 19 | text-decoration-color: $link-color; 20 | } 21 | 22 | 23 | figure { 24 | display: block; 25 | width: 90%; 26 | margin: 2em auto; 27 | text-align: center; 28 | } 29 | 30 | figure table { 31 | width: 100%; 32 | } 33 | 34 | figcaption { 35 | font-size: smaller; 36 | line-height: 1.5em; 37 | color: rgba($text-color, 0.75); 38 | margin-bottom: -1em; 39 | text-align: left; 40 | } 41 | 42 | figcaption a { 43 | @if (lightness($background-color) < 55%) { 44 | color: grayscale(darken(invert($background-color), 50%)) !important; 45 | } @else { 46 | color: grayscale(lighten(invert($background-color), 50%)) !important; 47 | } 48 | } 49 | 50 | figcaption h4 { 51 | display: inline; 52 | font-weight: normal; 53 | } 54 | 55 | .center { 56 | text-align: center; 57 | } 58 | 59 | } 60 | 61 | main > :first-child { margin-top: 0 !important; } 62 | -------------------------------------------------------------------------------- /assets/navigation.scss: -------------------------------------------------------------------------------- 1 | 2 | nav { 3 | margin-top: 1.5em; 4 | margin-bottom: 1em; 5 | padding: 0; 6 | color: $text-color; 7 | text-align: center; 8 | } 9 | 10 | nav a { 11 | display: inline-block; 12 | color: $link-color; 13 | text-decoration: none; 14 | } 15 | 16 | nav a::after { 17 | margin-top: 4px; 18 | content: ''; 19 | display: block; 20 | width: 0; 21 | height: 4px; 22 | background: $link-color; 23 | transition: width 0.25s; 24 | } 25 | 26 | nav a:hover::after { 27 | width: 100%; 28 | } 29 | 30 | nav ul { 31 | display: table; 32 | margin: auto; 33 | padding: 0; 34 | } 35 | 36 | nav li { 37 | list-style-type: none; 38 | display: inline-block; 39 | font-size: 24px; 40 | padding: 0; 41 | margin: 0; 42 | } 43 | 44 | nav li + li:before { 45 | content: "●"; 46 | padding: 16px; 47 | } 48 | 49 | @media only screen and (max-width: 600px) { 50 | 51 | nav { 52 | border-top: 1px solid invert($background-color); 53 | border-bottom: 1px solid invert($background-color); 54 | padding: 1em; 55 | } 56 | 57 | nav li { 58 | padding: 6px 0; 59 | display: block; 60 | } 61 | 62 | nav li + li:before { 63 | content: ""; 64 | padding: 0; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /assets/post.scss: -------------------------------------------------------------------------------- 1 | 2 | .post { 3 | 4 | h1 { 5 | margin-bottom: 0; 6 | } 7 | 8 | h1 a { 9 | text-decoration: none !important; 10 | margin-bottom: 0; 11 | } 12 | 13 | time { 14 | width: 100%; 15 | display: inline-block; 16 | text-align: center; 17 | font-size: small; 18 | margin-top: -1.5em; 19 | margin-bottom: 0.5em; 20 | padding: 0; 21 | } 22 | 23 | } 24 | 25 | .post > :first-child { margin-top: 0 !important; } 26 | 27 | .post-separator { 28 | width: 80%; 29 | margin: 64px auto; 30 | } 31 | 32 | .read-more { 33 | width: 90%; 34 | margin: 0 auto; 35 | text-align: center; 36 | } 37 | -------------------------------------------------------------------------------- /assets/styles.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Read the variables defined in the config.toml file and define the corresponding 3 | SCSS variables. This is achieved by `resources.ExecuteAsTemplate` in the ; 4 | warnings by a linter that the following is not valid SCSS can be ignored. 5 | */ 6 | 7 | $title-font: {{ .Site.Params.typography.title_font | default "Bree Serif" }}; 8 | $body-font: {{ .Site.Params.typography.body_font | default "Source Sans Pro" }}; 9 | 10 | $background-color: {{ .Site.Params.colors.background_color | default "#fcfbf9" }}; 11 | $text-color: {{ .Site.Params.colors.text_color | default "#333333" }}; 12 | $link-color: {{ .Site.Params.colors.link_color | default "#60c17d" }}; 13 | 14 | 15 | 16 | 17 | /* 18 | Load the rest of the stylesheets. 19 | */ 20 | 21 | @import "_default.scss"; 22 | @import "code.scss"; 23 | @import "footer.scss"; 24 | @import "header.scss"; 25 | @import "navigation.scss"; 26 | @import "landing_page.scss"; 27 | @import "main.scss"; 28 | @import "post.scss"; 29 | @import "typography.scss"; 30 | -------------------------------------------------------------------------------- /assets/typography.scss: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | General 4 | */ 5 | 6 | p { 7 | margin: 1em 0; 8 | } 9 | 10 | img { 11 | max-width: 100%; 12 | } 13 | 14 | em, q, em, dfn { 15 | font-style: italic; 16 | } 17 | 18 | strong { 19 | font-weight: 600; 20 | } 21 | 22 | del, s { 23 | text-decoration: line-through; 24 | } 25 | 26 | hr { 27 | width: 50%; 28 | height: 1px; 29 | background: $text-color; 30 | margin: 64px auto; 31 | } 32 | 33 | small, sub, sup { 34 | font-size: small; 35 | } 36 | 37 | sub { 38 | vertical-align: sub; 39 | } 40 | 41 | sup { 42 | vertical-align: super; 43 | } 44 | 45 | kbd { 46 | border: 1px solid $text-color; 47 | border-radius: 4px; 48 | font-size: smaller; 49 | padding: 0 0.25em; 50 | } 51 | 52 | 53 | 54 | /* 55 | Headings 56 | */ 57 | 58 | h1, h2, h3, h4, h5, h6 { 59 | padding: 0; 60 | text-align: center; 61 | font-weight: 700; 62 | margin-bottom: 0.6em; 63 | } 64 | 65 | h1 { 66 | font-size: 26px; 67 | margin-top: 2.4em; 68 | } 69 | 70 | h2 { 71 | font-size: 22px; 72 | margin-top: 2.0em; 73 | } 74 | 75 | h3 { 76 | font-size: 18px; 77 | margin-top: 1.8em; 78 | } 79 | 80 | h4 { 81 | font-size: 16px; 82 | margin-top: 1.6em; 83 | } 84 | 85 | h5 { 86 | font-size: 14px; 87 | margin-top: 1.4em; 88 | } 89 | 90 | h6 { 91 | font-size: 12px; 92 | margin-top: 1.2em; 93 | } 94 | 95 | 96 | 97 | /* 98 | Block quotes 99 | */ 100 | 101 | blockquote { 102 | border-left: 4px solid $link-color; 103 | font-style: italic; 104 | padding: 0.5em 2em; 105 | } 106 | 107 | blockquote cite { 108 | font-style: normal; 109 | display: block; 110 | font-size: smaller; 111 | width: 100%; 112 | text-align: right; 113 | } 114 | 115 | blockquote p { 116 | margin: 0; 117 | } 118 | 119 | 120 | 121 | /* 122 | Lists 123 | */ 124 | 125 | ol, ul { 126 | padding-left: 1.5em; 127 | } 128 | 129 | li { 130 | margin-bottom: 0.25em; 131 | } 132 | 133 | 134 | 135 | /* 136 | Tables 137 | */ 138 | 139 | table { 140 | border-collapse: collapse; 141 | margin: 1.5em auto; 142 | width: 90%; 143 | } 144 | 145 | table>tbody>tr:last-child { 146 | border-bottom: 2px solid rgba(invert($background-color), 0.2); 147 | } 148 | 149 | th { 150 | border-top: 2px solid rgba(invert($background-color), 0.2); 151 | border-bottom: 1px solid rgba(invert($background-color), 0.2); 152 | padding: 0.25em; 153 | } 154 | 155 | td { 156 | padding: 0.25em; 157 | } 158 | 159 | 160 | 161 | /* 162 | Footnotes 163 | */ 164 | 165 | .footnotes { 166 | font-size: small; 167 | } 168 | 169 | .footnotes ol li p { 170 | margin: 0; 171 | } 172 | 173 | .footnote-ref { 174 | color: $link-color; 175 | text-decoration: none !important; 176 | font-weight: 700; 177 | display: inline-block; 178 | padding: 0 1px; 179 | } 180 | 181 | .footnote-backref { 182 | color: $link-color; 183 | text-decoration: none !important; 184 | font-weight: 700; 185 | display: inline-block; 186 | padding: 0 1px; 187 | } 188 | 189 | 190 | 191 | /* 192 | LaTeX / KaTeX 193 | */ 194 | 195 | .katex { 196 | font-size: 1.1em !important; 197 | } 198 | 199 | span .katex-display { 200 | margin-top: 2em; 201 | margin-bottom: 2em; 202 | } 203 | -------------------------------------------------------------------------------- /config.toml: -------------------------------------------------------------------------------- 1 | [module] 2 | [module.hugoVersion] 3 | extended = true 4 | min = "0.87.0" -------------------------------------------------------------------------------- /images/mockup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timothygebhard/barks/22b3c5878f4ec8c2e1dbc2f1a40d210158441c82/images/mockup.png -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timothygebhard/barks/22b3c5878f4ec8c2e1dbc2f1a40d210158441c82/images/screenshot.png -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timothygebhard/barks/22b3c5878f4ec8c2e1dbc2f1a40d210158441c82/images/tn.png -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- 1 | 2 | {{ define "main" }} 3 |
4 | 404 — Page not found. 5 |
6 | {{ end }} 7 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{- partial "head.html" . -}} 6 | 7 | 8 | 9 |
10 |
11 |
12 | 13 | {{- partial "header.html" . -}} 14 | {{- partial "navigation.html" . -}} 15 | 16 |
17 | {{ block "main" . }} {{ end }} 18 |
19 | 20 | {{- partial "footer.html" . -}} 21 | 22 |
23 |
24 |
25 | 26 | {{- partial "math.html" . -}} 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /layouts/_default/section.html: -------------------------------------------------------------------------------- 1 | 2 | {{ define "main" }} 3 | 4 |

{{ .Title }}

5 | 6 | {{ .Content }} 7 | 8 | {{ with .Data.Pages }} 9 |
    10 | {{ range $i, $e := . }} 11 |
  • {{ .Title }}
  • 12 | {{ end }} 13 |
14 | {{ end }} 15 | 16 | {{ end }} 17 | -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | 2 | {{ define "main" }} 3 | {{ if not .Params.hide_title }} 4 |

{{ .Title | safeHTML }}

5 | {{ end }} 6 | {{ .Content | safeHTML }} 7 | {{ end }} 8 | -------------------------------------------------------------------------------- /layouts/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{ define "main" }} 3 | 4 |
5 | {{ .Content }} 6 |
7 | 8 | {{ range $i, $e := where site.RegularPages "Type" "in" site.Params.mainSections }} 9 | {{- if $i -}}
{{ end -}} 10 | {{ partial "post_li.html" $e }} 11 | {{end}} 12 | 13 | {{ end }} 14 | -------------------------------------------------------------------------------- /layouts/landing_page.html: -------------------------------------------------------------------------------- 1 | 2 | {{ define "main" }} 3 |
4 |
5 |
6 | {{ .Content | safeHTML }} 7 |
8 |
9 |
10 | {{ .Site.Params.header.title }} 11 |
12 |
13 | {{ end }} 14 | -------------------------------------------------------------------------------- /layouts/partials/deferred.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timothygebhard/barks/22b3c5878f4ec8c2e1dbc2f1a40d210158441c82/layouts/partials/deferred.html -------------------------------------------------------------------------------- /layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | 2 | {{ if not (eq .Site.Params.footer.show_footer false) }} 3 |
4 | 5 | {{ if isset .Site.Params "social" }} 6 | {{ with .Site.Params.social }} 7 |
    8 | {{ range sort . "weight" }} 9 |
  • 10 | {{ end }} 11 |
12 | {{ end }} 13 | {{ end }} 14 | 15 | {{ .Site.Copyright | safeHTML }} 16 | 17 |
18 | {{ end }} 19 | -------------------------------------------------------------------------------- /layouts/partials/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ hugo.Generator }} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | {{ with .Site.Params.head.keywords }} 20 | 21 | {{ end }} 22 | 23 | 24 | {{ if .IsHome}} 25 | {{- .Site.Title -}} • Home 26 | {{ else }} 27 | {{- .Site.Title -}} • {{- .Title -}} 28 | {{ end }} 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | {{ $template := resources.Get "styles.scss" }} 49 | {{ $style := $template | resources.ExecuteAsTemplate "styles.scss" . | resources.ToCSS (dict "outputStyle" "compressed") | fingerprint }} 50 | 51 | 52 | 53 | {{ with .Site.Params.head.custom_css }} 54 | 55 | {{ end }} 56 | 57 | 58 | 59 | 60 | 61 | {{ if isset .Site.Params.typography "title_font" }} 62 | 63 | 64 | {{ else }} 65 | 66 | 67 | {{ end }} 68 | {{ if isset .Site.Params.typography "body_font" }} 69 | 70 | 71 | {{ else }} 72 | 73 | 74 | {{ end }} 75 | 76 | 77 | {{ if isset .Site.Params "social" }} 78 | 79 | 80 | {{ end }} 81 | 82 | 83 | {{ if isset .Site.Params "social" }} 84 | 85 | 86 | {{ end }} 87 | 88 | 89 | -------------------------------------------------------------------------------- /layouts/partials/header.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | {{ .Site.Title | safeHTML }} 4 |
5 | -------------------------------------------------------------------------------- /layouts/partials/main.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | {{ block "main" . }} {{ end }} 4 |
5 | -------------------------------------------------------------------------------- /layouts/partials/math.html: -------------------------------------------------------------------------------- 1 | 2 | {{ if or .Params.math .Site.Params.math }} 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 24 | 25 | {{ end }} 26 | -------------------------------------------------------------------------------- /layouts/partials/navigation.html: -------------------------------------------------------------------------------- 1 | 2 | {{ if not (eq .Site.Params.navigation.show_navigation false) }} 3 | 10 | {{ end }} 11 | -------------------------------------------------------------------------------- /layouts/partials/post.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | {{ partial "post_title.html" . }} 5 | {{ .Content | safeHTML }} 6 | 7 |
8 | -------------------------------------------------------------------------------- /layouts/partials/post_li.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | {{ partial "post_title.html" . }} 5 | 6 | {{- .Content | safeHTML | truncate 600 -}} 7 | 8 | {{- if gt (len (.Content | safeHTML)) 600 -}} 9 | 12 | {{- end -}} 13 | 14 |
15 | -------------------------------------------------------------------------------- /layouts/partials/post_title.html: -------------------------------------------------------------------------------- 1 | 2 |

{{ .Title }}

3 | 4 | {{ if not .Date.IsZero }} 5 | 6 | {{ end }} 7 | -------------------------------------------------------------------------------- /layouts/posts/list.html: -------------------------------------------------------------------------------- 1 | 2 | {{ define "main" }} 3 | 4 | {{ range $i, $e := .Data.Pages }} 5 | {{- if $i -}}
{{ end -}} 6 | {{ partial "post_li.html" $e }} 7 | {{ end }} 8 | 9 | {{ end }} 10 | -------------------------------------------------------------------------------- /layouts/posts/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ partial "post.html" . }} 3 | {{ end }} -------------------------------------------------------------------------------- /theme.toml: -------------------------------------------------------------------------------- 1 | name = "barks" 2 | description = "A simple, minimalistic theme for personal (or academic) websites." 3 | license = "MIT" 4 | licenselink = "https://github.com/timothygebhard/barks/blob/main/LICENSE" 5 | 6 | # The home page of the theme, where the source can be found. 7 | homepage = "https://github.com/timothygebhard/barks/" 8 | 9 | # If you have a running demo of the theme. 10 | demosite = "https://timothygebhard.de/projects/barks/" 11 | 12 | tags = ["blog", "company"] 13 | features = ["some", "awesome", "features"] 14 | 15 | # If the theme has a single author 16 | [author] 17 | name = "Timothy Gebhard" 18 | homepage = "https://timothygebhard.de" 19 | --------------------------------------------------------------------------------