├── exampleSite ├── content │ ├── media │ │ ├── _index.md │ │ ├── video.mp4 │ │ └── image-1.jpg │ ├── tags │ │ └── _index.md │ ├── posts │ │ ├── 2014 │ │ │ ├── hugoisforlovers.md │ │ │ ├── migrate-from-jekyll.md │ │ │ └── goisforlovers.md │ │ ├── 2016 │ │ │ └── lorem-ipsum.md │ │ ├── 2017 │ │ │ ├── gist.md │ │ │ ├── vimeo.md │ │ │ ├── youtube.md │ │ │ ├── twitter.md │ │ │ ├── video.md │ │ │ ├── speakerdeck.md │ │ │ ├── instagram.md │ │ │ ├── tables.md │ │ │ ├── code.md │ │ │ ├── images.md │ │ │ └── typography.md │ │ ├── 2019 │ │ │ └── numbered_list.md │ │ └── _index.md │ ├── categories │ │ └── _index.md │ ├── photos.md │ ├── _index.md │ └── projects.md └── config.toml ├── images ├── tn.png └── screenshot.png ├── layouts ├── 404.html ├── _default │ ├── list.html │ ├── taxonomy.html │ ├── terms.html │ ├── baseof.html │ ├── rss.xml │ └── single.html ├── page │ └── single.html ├── shortcodes │ ├── youtube.html │ ├── vimeo.html │ ├── speakerdeck.html │ ├── video.html │ ├── adsense.html │ └── image.html ├── partials │ ├── navbar.html │ ├── footer.html │ ├── posts_list.html │ └── head.html ├── index.html └── sitemap.xml ├── .gitignore ├── assets └── src │ ├── images │ ├── favicon.ico │ └── apple-touch-icon.png │ ├── styles │ ├── _components │ │ ├── homepage.scss │ │ ├── elements.scss │ │ ├── footer.scss │ │ ├── base.scss │ │ ├── navbar.scss │ │ └── content.scss │ ├── styles.scss │ ├── _settings.scss │ ├── _chroma_friendly.scss │ └── _external │ │ ├── baguetteBox.css │ │ ├── normalize.css │ │ └── milligram.css │ └── scripts │ ├── main.js │ └── _external │ ├── lazyload.js │ ├── headroom.js │ └── baguetteBox.js ├── archetypes ├── page.md └── default.md ├── resources └── _gen │ ├── assets │ ├── scss │ │ └── src │ │ │ └── styles │ │ │ ├── styles.scss_6e769e1f8b8c9ae08c3b967a8651114c.json │ │ │ └── styles.scss_6e769e1f8b8c9ae08c3b967a8651114c.content │ ├── css │ │ └── assets │ │ │ └── css │ │ │ ├── external.css_d3f53f09220d597dac26fe7840c31fc9.json │ │ │ └── external.css_d3f53f09220d597dac26fe7840c31fc9.content │ └── js │ │ └── assets │ │ └── js │ │ └── scripts.js_d3f53f09220d597dac26fe7840c31fc9.json │ └── images │ └── media │ ├── image-1_hu3d03a01dcc18bc5be0e67db3d8d209a6_1073788_320x0_resize_q75_box.jpg │ ├── image-1_hu3d03a01dcc18bc5be0e67db3d8d209a6_1073788_480x0_resize_q75_box.jpg │ └── image-1_hu3d03a01dcc18bc5be0e67db3d8d209a6_1073788_768x0_resize_q75_box.jpg ├── i18n ├── en.toml └── pl.toml ├── theme.toml ├── LICENSE └── README.md /exampleSite/content/media/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Media Folder 3 | --- 4 | -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eshlox/simplicity/HEAD/images/tn.png -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | :no_entry_sign: 404 :cry: 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eshlox/simplicity/HEAD/images/screenshot.png -------------------------------------------------------------------------------- /exampleSite/content/tags/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tags 3 | language: en 4 | slug: /tags/ 5 | --- 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | assets/node_modules 2 | exampleSite/public 3 | exampleSite/resources 4 | exampleSite/themes 5 | -------------------------------------------------------------------------------- /layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ partial "posts_list.html" . }} 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /layouts/_default/taxonomy.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ partial "posts_list.html" . }} 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /assets/src/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eshlox/simplicity/HEAD/assets/src/images/favicon.ico -------------------------------------------------------------------------------- /exampleSite/content/posts/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: List of posts 3 | language: en 4 | slug: /posts/ 5 | --- 6 | -------------------------------------------------------------------------------- /exampleSite/content/categories/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Categories 3 | language: en 4 | slug: /categories/ 5 | --- 6 | -------------------------------------------------------------------------------- /exampleSite/content/media/video.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eshlox/simplicity/HEAD/exampleSite/content/media/video.mp4 -------------------------------------------------------------------------------- /exampleSite/content/media/image-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eshlox/simplicity/HEAD/exampleSite/content/media/image-1.jpg -------------------------------------------------------------------------------- /assets/src/images/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eshlox/simplicity/HEAD/assets/src/images/apple-touch-icon.png -------------------------------------------------------------------------------- /archetypes/page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .TranslationBaseName "-" " " | title }}" 3 | language: en 4 | slug: 5 | draft: true 6 | --- 7 | -------------------------------------------------------------------------------- /layouts/page/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 | {{ .Content }} 5 |
6 |
7 | {{ end }} 8 | -------------------------------------------------------------------------------- /resources/_gen/assets/scss/src/styles/styles.scss_6e769e1f8b8c9ae08c3b967a8651114c.json: -------------------------------------------------------------------------------- 1 | {"Target":"assets/css/styles.css","MediaType":"text/css","Data":{}} -------------------------------------------------------------------------------- /resources/_gen/assets/css/assets/css/external.css_d3f53f09220d597dac26fe7840c31fc9.json: -------------------------------------------------------------------------------- 1 | {"Target":"assets/css/external.min.css","MediaType":"text/css","Data":{}} -------------------------------------------------------------------------------- /resources/_gen/assets/js/assets/js/scripts.js_d3f53f09220d597dac26fe7840c31fc9.json: -------------------------------------------------------------------------------- 1 | {"Target":"assets/js/scripts.min.js","MediaType":"application/javascript","Data":{}} -------------------------------------------------------------------------------- /assets/src/styles/_components/homepage.scss: -------------------------------------------------------------------------------- 1 | body { 2 | main { 3 | .homepage-avatar { 4 | border-radius: 50%; 5 | margin-bottom: 2rem; 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /layouts/shortcodes/youtube.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /layouts/partials/navbar.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .TranslationBaseName "-" " " | title }}" 3 | date: {{ .Date }} 4 | categories: [] 5 | tags: [] 6 | language: en 7 | slug: 8 | draft: true 9 | --- 10 | -------------------------------------------------------------------------------- /layouts/shortcodes/vimeo.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /resources/_gen/images/media/image-1_hu3d03a01dcc18bc5be0e67db3d8d209a6_1073788_320x0_resize_q75_box.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eshlox/simplicity/HEAD/resources/_gen/images/media/image-1_hu3d03a01dcc18bc5be0e67db3d8d209a6_1073788_320x0_resize_q75_box.jpg -------------------------------------------------------------------------------- /resources/_gen/images/media/image-1_hu3d03a01dcc18bc5be0e67db3d8d209a6_1073788_480x0_resize_q75_box.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eshlox/simplicity/HEAD/resources/_gen/images/media/image-1_hu3d03a01dcc18bc5be0e67db3d8d209a6_1073788_480x0_resize_q75_box.jpg -------------------------------------------------------------------------------- /resources/_gen/images/media/image-1_hu3d03a01dcc18bc5be0e67db3d8d209a6_1073788_768x0_resize_q75_box.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eshlox/simplicity/HEAD/resources/_gen/images/media/image-1_hu3d03a01dcc18bc5be0e67db3d8d209a6_1073788_768x0_resize_q75_box.jpg -------------------------------------------------------------------------------- /layouts/shortcodes/speakerdeck.html: -------------------------------------------------------------------------------- 1 |
2 | 9 |
10 | -------------------------------------------------------------------------------- /i18n/en.toml: -------------------------------------------------------------------------------- 1 | [postsAbout] 2 | other = "Posts about:" 3 | 4 | [postsList] 5 | other = "List of posts" 6 | 7 | [homePage] 8 | other = "Homepage" 9 | 10 | [categories] 11 | other = "Categories" 12 | 13 | [tags] 14 | other = "Tags" 15 | 16 | [pages] 17 | other = "Pages" 18 | -------------------------------------------------------------------------------- /i18n/pl.toml: -------------------------------------------------------------------------------- 1 | [postsAbout] 2 | other = "Posty o:" 3 | 4 | [postsList] 5 | other = "Lista postów" 6 | 7 | [homePage] 8 | other = "Strona główna" 9 | 10 | [categories] 11 | other = "Kategorie" 12 | 13 | [tags] 14 | other = "Tagi" 15 | 16 | [pages] 17 | other = "Strony" 18 | -------------------------------------------------------------------------------- /assets/src/styles/styles.scss: -------------------------------------------------------------------------------- 1 | @import "chroma_friendly"; 2 | @import "settings"; 3 | @import "_components/base"; 4 | @import "_components/content"; 5 | @import "_components/elements"; 6 | @import "_components/footer"; 7 | @import "_components/homepage"; 8 | @import "_components/navbar"; 9 | -------------------------------------------------------------------------------- /exampleSite/content/photos.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Photos 3 | language: en 4 | slug: photos 5 | --- 6 | 7 | {{< image src="media/image-1.jpg" title="Photo by Ales Krivec on Unsplash" lightbox="true" >}} 8 | 9 | {{< image src="media/image-1.jpg" title="Photo by Ales Krivec on Unsplash" >}} 10 | -------------------------------------------------------------------------------- /exampleSite/content/posts/2017/gist.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Gist 3 | date: 2017-02-09T10:15:01+02:00 4 | categories: [writing] 5 | tags: [typography, elements] 6 | language: en 7 | slug: gist 8 | --- 9 | 10 | ```markdown 11 | {{}} 12 | ``` 13 | 14 | {{< gist spf13 7896402 >}} 15 | -------------------------------------------------------------------------------- /exampleSite/content/posts/2017/vimeo.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Vimeo 3 | date: 2018-09-09T10:15:01+02:00 4 | categories: [writing] 5 | tags: [typography, elements] 6 | language: en 7 | slug: vimeo 8 | --- 9 | 10 | ```markdown 11 | {{}} 12 | ``` 13 | 14 | {{< vimeo 265143954 >}} 15 | -------------------------------------------------------------------------------- /exampleSite/content/posts/2017/youtube.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Youtube 3 | date: 2018-10-09T10:15:01+02:00 4 | categories: [writing] 5 | tags: [typography, elements] 6 | language: en 7 | slug: youtube 8 | --- 9 | 10 | ```markdown 11 | {{}} 12 | ``` 13 | 14 | {{< youtube wwKBHrMy-Wc >}} 15 | -------------------------------------------------------------------------------- /layouts/index.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 | 8 | {{ .Content }} 9 |
10 |
11 | {{ end }} 12 | -------------------------------------------------------------------------------- /exampleSite/content/posts/2017/twitter.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Twitter 3 | date: 2018-02-09T10:15:01+02:00 4 | categories: [writing] 5 | tags: [typography, elements] 6 | language: en 7 | slug: twitter 8 | --- 9 | 10 | ```markdown 11 | {{}} 12 | ``` 13 | 14 | {{< tweet 935115588166471680 >}} 15 | -------------------------------------------------------------------------------- /exampleSite/content/posts/2017/video.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Video 3 | date: 2018-06-09T10:15:01+02:00 4 | categories: [writing] 5 | tags: [typography, elements] 6 | language: en 7 | slug: video 8 | --- 9 | 10 | ```markdown 11 | {{}} 12 | ``` 13 | 14 | {{< video src="media/video.mp4" >}} 15 | -------------------------------------------------------------------------------- /exampleSite/content/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Homepage 3 | language: en 4 | slug: / 5 | --- 6 | 7 | # Simplicity, Hugo theme. 8 | 9 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. 10 | 11 | [Posts](/posts/) • [Categories](/categories/) • [Tags](/tags/) 12 | 13 | [Photos](/photos/) • [Projects](/projects/) 14 | -------------------------------------------------------------------------------- /exampleSite/content/posts/2017/speakerdeck.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Speakerdeck 3 | date: 2017-07-09T10:15:01+02:00 4 | categories: [writing] 5 | tags: [typography, elements] 6 | language: en 7 | slug: speakerdeck 8 | --- 9 | 10 | ```markdown 11 | {{}} 12 | ``` 13 | 14 | {{< speakerdeck 50021f75cf1db900020005e7 >}} -------------------------------------------------------------------------------- /layouts/shortcodes/video.html: -------------------------------------------------------------------------------- 1 | {{ $src := (.Get "src") }} 2 | {{ $width := (.Get "width") }} 3 | {{ $height := (.Get "height") }} 4 | 5 | 6 | 7 | Your browser does not support the video tag. 8 | 9 | -------------------------------------------------------------------------------- /layouts/shortcodes/adsense.html: -------------------------------------------------------------------------------- 1 | 2 | 9 | 12 | -------------------------------------------------------------------------------- /layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /layouts/_default/terms.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |

{{ i18n (lower .Data.Plural) . }}

3 |
4 |
    5 | {{ range .Data.Terms.Alphabetical }} 6 |
  1. 7 | 8 | {{ .Term }} 9 | 10 | 11 | {{ .Count }} 12 | 13 |
  2. 14 | {{ end }} 15 |
16 | {{ end }} 17 | -------------------------------------------------------------------------------- /exampleSite/content/posts/2017/instagram.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Instagram 3 | date: 2017-04-09T10:15:01+02:00 4 | categories: [writing] 5 | tags: [typography, elements] 6 | language: en 7 | slug: instagram 8 | --- 9 | 10 | ```markdown 11 | {{}} 12 | ``` 13 | 14 | {{< instagram BbTLbYSH59J >}} 15 | 16 | ```markdown 17 | {{}} 18 | ``` 19 | 20 | {{< instagram BahBaqvnv5N hidecaption >}} -------------------------------------------------------------------------------- /exampleSite/content/posts/2019/numbered_list.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Numbered list with code 3 | date: 2019-01-06T12:17:01+02:00 4 | categories: [writing] 5 | tags: [typography, elements] 6 | language: en 7 | slug: numbered-list-with-code 8 | --- 9 | 10 | 1. Test 1. 11 | 12 | ```bash 13 | test 1 14 | ``` 15 | 2. Test 2. 16 | 17 | ```bash 18 | test 2 19 | ``` 20 | 21 | 3. Test 3. 22 | 23 | ```bash 24 | test 3 25 | ``` 26 | -------------------------------------------------------------------------------- /theme.toml: -------------------------------------------------------------------------------- 1 | name = "Simplicity" 2 | license = "MIT" 3 | licenselink = "https://github.com/eshlox/simplicity/blob/master/LICENSE" 4 | description = "Simple theme with clean typography." 5 | homepage = "https://github.com/eshlox/simplicity" 6 | tags = ["blog", "responsive", "minimal"] 7 | features = ["disqus", "lightbox"] 8 | min_version = "0.49" 9 | 10 | [author] 11 | name = "Przemysław Kołodziejczyk" 12 | homepage = "https://eshlox.net" 13 | -------------------------------------------------------------------------------- /assets/src/styles/_settings.scss: -------------------------------------------------------------------------------- 1 | $breakpoint: 800px; 2 | $itemMargin: 2.5rem; 3 | 4 | $color-brilliant-azure: #39f; 5 | $color-bara-red: #f0506e; 6 | $color-black: #000; 7 | $color-pale-grey: #fefefe; 8 | $color-silver: #c0c0c0; 9 | $color-zhen-zhu-bai-pearl: #f8f8f8; 10 | 11 | $base-background-color: $color-pale-grey; 12 | 13 | $navbar-background-color: $color-zhen-zhu-bai-pearl; 14 | $navbar-height: 5rem; 15 | $navbar-text-color: $color-black; 16 | 17 | $links-color: $color-brilliant-azure; 18 | -------------------------------------------------------------------------------- /assets/src/styles/_components/elements.scss: -------------------------------------------------------------------------------- 1 | ul.posts-list { 2 | list-style: none; 3 | 4 | li { 5 | .date { 6 | color: $color-silver; 7 | font-size: 0.8em; 8 | display: block; 9 | } 10 | 11 | .lang { 12 | color: $color-silver; 13 | font-size: 0.7em; 14 | text-transform: uppercase; 15 | 16 | a { 17 | color: $color-silver; 18 | text-decoration: none; 19 | 20 | &:hover, &:active, &:visited { 21 | text-decoration: underline; 22 | } 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /layouts/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | {{ range .Data.Pages }} 3 | {{ if ne .Params.Title "Media Folder" }} 4 | 5 | {{ .Permalink }}{{ if not .Lastmod.IsZero }} 6 | {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} 7 | {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} 8 | {{ .Sitemap.Priority }}{{ end }} 9 | 10 | {{ end }} 11 | {{ end }} 12 | 13 | -------------------------------------------------------------------------------- /assets/src/scripts/main.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', function(event) { 2 | // LazdyLoad 3 | const myLazyLoad = new LazyLoad() 4 | 5 | // Lightbox 6 | baguetteBox.run('main', {}) 7 | 8 | // Hide header 9 | const navbar = document.querySelector('nav') 10 | if (navbar) { 11 | const headroom = new Headroom(navbar, { 12 | 'offset': 205, 13 | 'tolerance': 5, 14 | 'classes': { 15 | 'initial': 'animated', 16 | 'pinned': 'slideDown', 17 | 'unpinned': 'slideUp' 18 | } 19 | }) 20 | headroom.init() 21 | } 22 | }) 23 | -------------------------------------------------------------------------------- /exampleSite/content/projects.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Projects 3 | language: en 4 | slug: projects 5 | --- 6 | 7 | # Projects. 8 | 9 | --- 10 | 11 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur condimentum lectus ornare ornare ultrices. Vivamus suscipit fringilla interdum. Nullam nisl dui, semper a sollicitudin vel, euismod eu risus. Pellentesque dignissim vel nunc nec condimentum. Nunc molestie ligula nec molestie faucibus. Aenean tincidunt sit amet leo quis cursus. Cras convallis lectus tincidunt pharetra condimentum. Aenean cursus consectetur massa sit amet volutpat. Aenean at arcu eget ligula dapibus volutpat in a sapien. Integer sed ex ex. 12 | 13 | 1. Project 1. 14 | 2. Project 2. 15 | 3. Project 3. 16 | -------------------------------------------------------------------------------- /assets/src/styles/_components/footer.scss: -------------------------------------------------------------------------------- 1 | body { 2 | > footer { 3 | align-items: right; 4 | color: $navbar-text-color; 5 | display: flex; 6 | font-size: 0.8em; 7 | justify-content: space-between; 8 | padding: 0.5rem; 9 | text-align: center; 10 | 11 | p { 12 | margin-bottom: 0; 13 | } 14 | 15 | // height: 3rem; 16 | // @media screen and (max-width: $breakpoint) { 17 | // height: 5rem; 18 | // } 19 | 20 | @media screen and (max-width: $breakpoint) { 21 | flex-direction: column; 22 | 23 | p { 24 | &:first-of-type { 25 | margin-bottom: 0.1rem; 26 | } 27 | &:last-of-type { 28 | margin-top: 0.1rem; 29 | } 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /layouts/partials/posts_list.html: -------------------------------------------------------------------------------- 1 |

2 | {{ if eq .Kind "section" }} 3 | {{ i18n "postsList" . }} 4 | {{ else }} 5 | {{ i18n "postsAbout" }} {{ .Title }} 6 | {{ end }} 7 | 8 | - RSS 9 | 10 |

11 |
12 | {{ range (where .Data.Pages "Type" "posts").GroupByDate "2006" }} 13 |

14 | {{ .Key }} 15 |

16 | 25 | {{ end }} -------------------------------------------------------------------------------- /exampleSite/content/posts/2017/tables.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tables 3 | date: 2018-01-09T10:15:01+02:00 4 | categories: [writing] 5 | tags: [typography, elements] 6 | language: en 7 | slug: tables 8 | --- 9 | 10 | First Header | Second Header | Third Header 11 | ------------ | ------------- | ------------ 12 | Content Cell | Content Cell | Content Cell 13 | Content Cell | Content Cell | Content Cell 14 | 15 | --- 16 | 17 | | First Header | Second Header | 18 | | ------------- | ------------- | 19 | | Content Cell | Content Cell | 20 | | Content Cell | Content Cell | 21 | 22 | --- 23 | 24 | First Header | Second Header | Third Header 25 | :----------- | :-----------: | -----------: 26 | Left | Center | Right 27 | Left | Center | Right 28 | 29 | --- 30 | 31 |   |   |   32 | :----------- | :-----------: | -----------: 33 | Left | Center | Right 34 | Left | Center | Right 35 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ partial "head.html" . }} 4 | 5 | {{ if not .IsHome }} 6 | {{ partial "navbar.html" . }} 7 | {{ end }} 8 |
9 | {{ block "main" . -}}{{- end }} 10 |
11 | {{ if not .IsHome }} 12 | {{ partial "footer.html" . }} 13 | {{ end }} 14 | 15 | {{ $baguetteBox := resources.Get "/src/scripts/_external/baguetteBox.js" }} 16 | {{ $headroom := resources.Get "/src/scripts/_external/headroom.js" }} 17 | {{ $lazyload := resources.Get "/src/scripts/_external/lazyload.js" }} 18 | {{ $main := resources.Get "/src/scripts/main.js" }} 19 | {{ $scripts := slice $baguetteBox $headroom $lazyload $main | resources.Concat "assets/js/scripts.js" | resources.Minify }} 20 | 21 | {{ template "_internal/google_analytics_async.html" . }} 22 | 23 | 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Przemysław Kołodziejczyk 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 | -------------------------------------------------------------------------------- /layouts/_default/rss.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} 4 | {{ .Permalink }} 5 | Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} 6 | Hugo -- gohugo.io 7 | {{ with .Site.LanguageCode }}{{.}}{{end}} 8 | {{ if not .Date.IsZero }}{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} 9 | {{ with .OutputFormats.Get "RSS" }} 10 | {{ printf "" .Permalink .MediaType | safeHTML }} 11 | {{ end }} 12 | {{ range .Data.Pages }} 13 | 14 | {{ .Title }} 15 | {{ .Permalink }} 16 | {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} 17 | {{ .Permalink }} 18 | {{ .Summary | html }} 19 | 20 | {{ end }} 21 | 22 | 23 | -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 | 5 | 8 | {{- if .Params.categories }} 9 | • 10 | {{ range $index, $category := .Params.categories }} 11 | {{ if gt $index 0 }}, {{ end }} 12 | {{- upper . -}} 13 | {{ end }} 14 | {{- end -}} 15 | 16 |

{{- .Title -}}

17 |
18 |
19 | {{- .Content -}} 20 |
21 |
22 |
23 |
24 |

25 | {{ if .Params.tags }} 26 | {{ range $index, $tag := .Params.tags }} 27 | 28 | #{{- . -}} 29 | 30 | {{ end }} 31 | {{ end }} 32 |

33 |
34 |
35 | {{ template "_internal/disqus.html" . }} 36 |
37 |
38 | {{ end }} 39 | -------------------------------------------------------------------------------- /exampleSite/config.toml: -------------------------------------------------------------------------------- 1 | baseURL = "https://example.com" 2 | defaultContentLanguage = "en" 3 | disqusShortname = "test" 4 | enableEmoji = true 5 | enableRobotsTXT = true 6 | googleAnalytics = "" 7 | languageCode = "en-us" 8 | pygmentsCodeFences = true 9 | pygmentsStyle = "native" 10 | pygmentsUseClasses = true 11 | theme = "simplicity" 12 | title = "Simplicity - Hugo theme" 13 | [author] 14 | gravatarEmail = "test@example.com" 15 | homepageText = "Simplicity" 16 | name = "Przemysław `eshlox` Kołodziejczyk" 17 | rss = "/posts/index.xml" 18 | [imaging] 19 | anchor = "smart" 20 | resampleFilter = "box" 21 | quality = 75 22 | [[menu.pages]] 23 | name = "Projects" 24 | weight = -100 25 | identifier = "projects" 26 | url = "/projects/" 27 | [[menu.pages]] 28 | name = "Photos" 29 | weight = -90 30 | identifier = "photos" 31 | url = "/photos/" 32 | [outputs] 33 | home = ["HTML"] 34 | page = ["HTML"] 35 | section = ["HTML", "RSS"] 36 | taxonomy = ["HTML", "RSS"] 37 | taxonomyTerm = ["HTML"] 38 | [params] 39 | adsenseClient = '' 40 | adsenseSlot = '' 41 | description = "A blog about everything." 42 | licence = "[Some Rights Reserved](http://creativecommons.org/licenses/by-sa/4.0/)." 43 | displayPostLanguage = true 44 | [permalinks] 45 | posts = "/:year/:month/:day/:slug/" 46 | [pygmentsOptions] 47 | linenos = false 48 | -------------------------------------------------------------------------------- /assets/src/styles/_components/base.scss: -------------------------------------------------------------------------------- 1 | html, body { 2 | background-color: $base-background-color; 3 | font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; 4 | height: 100%; 5 | margin: 0; 6 | text-rendering: optimizeLegibility; 7 | } 8 | 9 | body { 10 | display: grid; 11 | grid-gap: 1rem; 12 | grid-template-areas: "nav" "main" "footer"; 13 | grid-template-columns: 1fr; 14 | height: 100%; 15 | 16 | grid-template-rows: $navbar-height 1fr 3rem; 17 | @media screen and (max-width: $breakpoint) { 18 | grid-template-rows: $navbar-height 1fr 5rem; 19 | } 20 | 21 | a { 22 | color: $links-color; 23 | text-decoration: none; 24 | 25 | &:hover, &:active, &:visited { 26 | text-decoration: underline; 27 | } 28 | } 29 | 30 | nav { 31 | grid-area: nav; 32 | } 33 | 34 | main { 35 | grid-area: main; 36 | justify-self: center; 37 | grid-column: 1 / -1; 38 | max-width: 80rem !important; 39 | padding-bottom: 3rem !important; 40 | padding-top: 3rem !important; 41 | 42 | &.home { 43 | align-items: center; 44 | display: flex; 45 | flex-direction: column; 46 | justify-content: center; 47 | text-align: center; 48 | } 49 | } 50 | 51 | footer { 52 | grid-area: footer; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /exampleSite/content/posts/2017/code.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Code 3 | date: 2017-01-09T10:15:01+02:00 4 | categories: [writing] 5 | tags: [typography, elements] 6 | language: en 7 | slug: code 8 | --- 9 | 10 | ``` 11 | import os 12 | 13 | # Very long line, very long line, very long line, very long line, very long line, very long line, very long line, very long line. 14 | filename = os.environ.get('PYTHONSTARTUP') 15 | if filename and os.path.isfile(filename): 16 | with open(filename) as fobj: 17 | startup_file = fobj.read() 18 | exec(startup_file) 19 | ``` 20 | 21 | --- 22 | 23 | ```python 24 | import os 25 | 26 | # Very long line, very long line, very long line, very long line, very long line, very long line, very long line, very long line. 27 | filename = os.environ.get('PYTHONSTARTUP') 28 | if filename and os.path.isfile(filename): 29 | with open(filename) as fobj: 30 | startup_file = fobj.read() 31 | exec(startup_file) 32 | ``` 33 | 34 | --- 35 | 36 | ```python 37 | import os 38 | 39 | filename = os.environ.get('PYTHONSTARTUP') 40 | if filename and os.path.isfile(filename): 41 | with open(filename) as fobj: 42 | startup_file = fobj.read() 43 | exec(startup_file) 44 | ``` 45 | 46 | --- 47 | 48 | {{< highlight html >}} 49 |
50 |
51 |

{{ .Title }}

52 | {{ range .Data.Pages }} 53 | {{ .Render "summary"}} 54 | {{ end }} 55 |
56 |
57 | {{< /highlight >}} 58 | -------------------------------------------------------------------------------- /layouts/partials/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{- .Title }} - {{ .Site.Title -}} 5 | 6 | 7 | 8 | {{ .Hugo.Generator }} 9 | 10 | 11 | {{ $normalize := resources.Get "/src/styles/_external/normalize.css" }} 12 | {{ $milligram := resources.Get "/src/styles/_external/milligram.css" }} 13 | {{ $baguetteBox := resources.Get "/src/styles/_external/baguetteBox.css" }} 14 | {{ $external := slice $normalize $milligram $baguetteBox | resources.Concat "assets/css/external.css" | resources.Minify }} 15 | 16 | 17 | {{ $options := (dict "targetPath" "assets/css/styles.css" "outputStyle" "compressed" "enableSourceMap" true "includePaths" (slice "assets/node_modules")) }} 18 | {{ $styles := resources.Get "/src/styles/styles.scss" | resources.ToCSS $options }} 19 | 20 | 21 | 22 | 23 | 24 | {{ $touchicon := resources.Get "/src/images/apple-touch-icon.png" }} 25 | {{ $favicon := resources.Get "/src/images/favicon.ico" }} 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | {{ template "_internal/opengraph.html" . }} 34 | {{ template "_internal/schema.html" . }} 35 | {{ template "_internal/twitter_cards.html" . }} 36 | 37 | -------------------------------------------------------------------------------- /assets/src/styles/_components/navbar.scss: -------------------------------------------------------------------------------- 1 | body { 2 | nav { 3 | align-items: center; 4 | background-color: #f4f5f6; 5 | color: $navbar-text-color; 6 | display: flex; 7 | height: $navbar-height; 8 | justify-content: space-between; 9 | left: 0; 10 | padding: 0.1rem 1rem; 11 | position: fixed; 12 | right: 0; 13 | top: 0; 14 | z-index: 10; 15 | border-bottom: .1rem solid #d1d1d1; 16 | 17 | a { 18 | color: $navbar-text-color; 19 | text-decoration: none; 20 | 21 | &:hover, &:active, &:visited { 22 | text-decoration: none; 23 | } 24 | } 25 | 26 | &.animated { 27 | animation-duration: 0.5s; 28 | animation-fill-mode: both; 29 | will-change: transform, opacity; 30 | 31 | &.slideDown { 32 | animation-name: slideDown; 33 | } 34 | 35 | &.slideUp { 36 | animation-name: slideUp; 37 | } 38 | } 39 | } 40 | } 41 | 42 | @-webkit-keyframes slideUp { 43 | 0% { 44 | -webkit-transform: translateY(0); 45 | } 46 | 47 | 100% { 48 | -webkit-transform: translateY(-100%); 49 | } 50 | } 51 | 52 | @-moz-keyframes slideUp { 53 | 0% { 54 | -moz-transform: translateY(0); 55 | } 56 | 57 | 100% { 58 | -moz-transform: translateY(-100%); 59 | } 60 | } 61 | 62 | @-o-keyframes slideUp { 63 | 0% { 64 | -o-transform: translateY(0); 65 | } 66 | 67 | 100% { 68 | -o-transform: translateY(-100%); 69 | } 70 | } 71 | 72 | @keyframes slideUp { 73 | 0% { 74 | transform: translateY(0); 75 | } 76 | 77 | 100% { 78 | transform: translateY(-100%); 79 | } 80 | } 81 | 82 | @-webkit-keyframes slideDown { 83 | 0% { 84 | -webkit-transform: translateY(-100%); 85 | } 86 | 87 | 100% { 88 | -webkit-transform: translateY(0); 89 | } 90 | } 91 | 92 | @-moz-keyframes slideDown { 93 | 0% { 94 | -moz-transform: translateY(-100%); 95 | } 96 | 97 | 100% { 98 | -moz-transform: translateY(0); 99 | } 100 | } 101 | 102 | @-o-keyframes slideDown { 103 | 0% { 104 | -o-transform: translateY(-100%); 105 | } 106 | 107 | 100% { 108 | -o-transform: translateY(0); 109 | } 110 | } 111 | 112 | @keyframes slideDown { 113 | 0% { 114 | transform: translateY(-100%); 115 | } 116 | 117 | 100% { 118 | transform: translateY(0); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /exampleSite/content/posts/2017/images.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Images 3 | date: 2017-03-11T10:15:01+02:00 4 | categories: ["writing"] 5 | tags: ["images", "lightbox"] 6 | language: en 7 | slug: images 8 | images: [/images/image-1.jpg] 9 | --- 10 | 11 | Use markdown to display an image. 12 | 13 | ```markdown 14 | ![Alt text](/media/image-1.jpg "Photo by Ales Krivec on Unsplash") 15 | ``` 16 | 17 | Result: 18 | 19 | ![Alt text](/media/image-1.jpg "Photo by Ales Krivec on Unsplash") 20 | 21 | You can use ```image``` shortcode to insert an image which automatically generates additional five sizes of image for various display sizes. 22 | 23 | Example code: 24 | 25 | ```html 26 | {{}} 27 | ``` 28 | 29 | Result: 30 | 31 | {{< image src="media/image-1.jpg" >}} 32 | 33 | You can insert image with caption. 34 | 35 | Example code: 36 | 37 | ```html 38 | {{}} 39 | ``` 40 | 41 | Result: 42 | 43 | {{< image src="media/image-1.jpg" title="Photo by Ales Krivec on Unsplash" >}} 44 | 45 | You can add ```lightbox="true"``` parameter to use lightbox plugin. 46 | 47 | Example code: 48 | 49 | ```html 50 | {{}} 51 | ``` 52 | 53 | Result (click on the image): 54 | 55 | {{< image src="media/image-1.jpg" title="Photo by Ales Krivec on Unsplash" lightbox="true" >}} 56 | 57 | You can add ```round="50"``` parameter to round the corners from 0% to 50%(full circle). 58 | 59 | Example code: 60 | 61 | ```html 62 | {{}} 63 | ``` 64 | 65 | Result (you can still click on it): 66 | 67 | {{< image src="media/image-1.jpg" title="Photo by Ales Krivec on Unsplash" lightbox="true" round="50" >}} 68 | 69 | 70 | You can add `full="true"` parameter to display image with full width. 71 | 72 | Example code: 73 | 74 | ```html 75 | {{}} 76 | ``` 77 | 78 | Result: 79 | 80 | {{< image src="media/image-1.jpg" title="Photo by Ales Krivec on Unsplash" full="true" >}} 81 | 82 | Add `resize=false` parameter to display original image without resizing (useful for animated GIFs). 83 | 84 | ```html 85 | {{}} 86 | ``` 87 | 88 | Result: 89 | 90 | {{< image src="media/image-1.jpg" title="Photo by Ales Krivec on Unsplash" resize="false" >}} 91 | -------------------------------------------------------------------------------- /exampleSite/content/posts/2014/hugoisforlovers.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Getting Started with Hugo" 3 | description = "" 4 | tags = [ 5 | "go", 6 | "golang", 7 | "hugo", 8 | "development", 9 | ] 10 | date = "2014-04-02" 11 | categories = [ 12 | "Development", 13 | "golang", 14 | ] 15 | menu = "main" 16 | +++ 17 | 18 | ## Step 1. Install Hugo 19 | 20 | Goto [hugo releases](https://github.com/spf13/hugo/releases) and download the 21 | appropriate version for your os and architecture. 22 | 23 | Save it somewhere specific as we will be using it in the next step. 24 | 25 | More complete instructions are available at [installing hugo](/overview/installing/) 26 | 27 | ## Step 2. Build the Docs 28 | 29 | Hugo has its own example site which happens to also be the documentation site 30 | you are reading right now. 31 | 32 | Follow the following steps: 33 | 34 | 1. Clone the [hugo repository](http://github.com/spf13/hugo) 35 | 2. Go into the repo 36 | 3. Run hugo in server mode and build the docs 37 | 4. Open your browser to http://localhost:1313 38 | 39 | Corresponding pseudo commands: 40 | 41 | git clone https://github.com/spf13/hugo 42 | cd hugo 43 | /path/to/where/you/installed/hugo server --source=./docs 44 | > 29 pages created 45 | > 0 tags index created 46 | > in 27 ms 47 | > Web Server is available at http://localhost:1313 48 | > Press ctrl+c to stop 49 | 50 | Once you've gotten here, follow along the rest of this page on your local build. 51 | 52 | ## Step 3. Change the docs site 53 | 54 | Stop the Hugo process by hitting ctrl+c. 55 | 56 | Now we are going to run hugo again, but this time with hugo in watch mode. 57 | 58 | /path/to/hugo/from/step/1/hugo server --source=./docs --watch 59 | > 29 pages created 60 | > 0 tags index created 61 | > in 27 ms 62 | > Web Server is available at http://localhost:1313 63 | > Watching for changes in /Users/spf13/Code/hugo/docs/content 64 | > Press ctrl+c to stop 65 | 66 | 67 | Open your [favorite editor](http://vim.spf13.com) and change one of the source 68 | content pages. How about changing this very file to *fix the typo*. How about changing this very file to *fix the typo*. 69 | 70 | Content files are found in `docs/content/`. Unless otherwise specified, files 71 | are located at the same relative location as the url, in our case 72 | `docs/content/overview/quickstart.md`. 73 | 74 | Change and save this file.. Notice what happened in your terminal. 75 | 76 | > Change detected, rebuilding site 77 | 78 | > 29 pages created 79 | > 0 tags index created 80 | > in 26 ms 81 | 82 | Refresh the browser and observe that the typo is now fixed. 83 | 84 | Notice how quick that was. Try to refresh the site before it's finished building.. I double dare you. 85 | Having nearly instant feedback enables you to have your creativity flow without waiting for long builds. 86 | 87 | ## Step 4. Have fun 88 | 89 | The best way to learn something is to play with it. 90 | -------------------------------------------------------------------------------- /exampleSite/content/posts/2016/lorem-ipsum.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ultrices elit et rhoncus maximus. 3 | date: 2016-11-11T10:15:01+02:00 4 | categories: ["lorem-ipsum"] 5 | tags: [] 6 | language: en 7 | slug: lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit-donec-ultrices-elit-et-rhoncus-maximus 8 | --- 9 | 10 | ## Part 1 11 | 12 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ultrices elit et rhoncus maximus. Suspendisse potenti. Vivamus ante lacus, congue vitae nisi vitae, pellentesque tempor justo. Aliquam congue tortor a urna ornare scelerisque. Fusce tristique in leo id scelerisque. Cras augue sapien, rhoncus sed nisl non, mattis varius nunc. Etiam accumsan velit placerat diam luctus, vel venenatis urna auctor. Aenean accumsan turpis enim, a facilisis nibh ullamcorper cursus. Cras ac metus ac diam lobortis euismod id ac quam. Nunc tempor ligula quis diam mattis, ac lobortis urna mattis. Sed a odio ut enim auctor ultricies nec nec lectus. Nam molestie dignissim malesuada. In vitae lectus eu dolor finibus accumsan nec eu enim. Nulla elementum at libero vel euismod. Aliquam sollicitudin orci id tincidunt dignissim. Quisque mollis quam pretium lacus finibus gravida. 13 | 14 | ## Part 2 15 | 16 | Vestibulum vel sollicitudin diam. Nulla hendrerit sapien mauris, in consequat turpis ornare vel. Nunc condimentum nunc ante, sit amet porta nunc cursus suscipit. Pellentesque erat metus, scelerisque sit amet euismod et, eleifend a est. Etiam quis congue ante. Sed suscipit enim placerat condimentum malesuada. Nam vitae metus fermentum, ullamcorper nibh vitae, ultricies purus. Cras nec efficitur felis, eleifend sodales mauris. Sed accumsan ligula ut libero porta, non blandit nulla suscipit. Etiam id posuere ante. 17 | 18 | ## Part 3 19 | 20 | Etiam non ipsum gravida, sagittis lorem a, mollis libero. Donec sed rutrum lectus. Aenean sagittis ante ut consequat ultrices. Cras dapibus nibh augue, et accumsan nisi dictum quis. Curabitur nec nibh justo. Pellentesque sit amet magna tristique, dapibus justo quis, porta erat. Ut cursus posuere magna, sed tristique ante porta non. Curabitur efficitur nunc sed pellentesque ullamcorper. Proin ac quam eget diam convallis volutpat. Vestibulum eget nibh egestas, semper sem ac, vestibulum nisi. Aliquam scelerisque id tellus id laoreet. Nunc sed justo justo. Praesent quis ipsum vel ligula consequat tincidunt. 21 | 22 | ## Part 4 23 | 24 | Praesent non libero vel eros semper cursus. Mauris accumsan volutpat lorem, id placerat est finibus vel. Integer vitae justo eleifend, tincidunt dolor eu, semper ligula. Cras sit amet ligula nec lorem vehicula tempor. Morbi hendrerit sollicitudin erat non malesuada. Duis at mi et mi tempor iaculis. Cras neque ex, faucibus quis leo id, convallis pharetra arcu. Vestibulum nec massa mauris. Nullam sollicitudin commodo commodo. Nullam placerat mattis metus a faucibus. Nunc non ex urna. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. 25 | 26 | ## Part 5 27 | 28 | Donec sodales, nulla ut pharetra eleifend, mauris erat malesuada diam, mattis placerat neque mi rutrum ante. Nulla ex nibh, ultricies eu gravida non, pellentesque ut elit. Sed ullamcorper erat non augue venenatis cursus. Aliquam vehicula quam lacus, quis cursus elit tristique venenatis. In eget suscipit tortor. Proin metus quam, malesuada ac posuere vitae, lobortis ut ipsum. Donec odio magna, feugiat posuere pulvinar ac, mollis quis augue. Vestibulum molestie lectus et libero porttitor, non viverra mi suscipit. Nulla ac elit quis arcu lobortis bibendum vel ac leo. Curabitur euismod, nulla eu rutrum congue, nunc velit euismod orci, non vehicula ipsum elit vulputate elit. Duis iaculis interdum leo sit amet viverra. Proin consequat a elit sed iaculis. Sed magna est, sodales nec dolor at, imperdiet eleifend nunc. Phasellus vel est ut est egestas dapibus. 29 | -------------------------------------------------------------------------------- /exampleSite/content/posts/2017/typography.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Typography 3 | date: 2018-03-09T10:15:01+02:00 4 | categories: [writing] 5 | tags: [typography, elements] 6 | language: en 7 | slug: typography 8 | --- 9 | 10 | Lorem ipsum dolor sit amet, consectetur adipiscing elit :wink:. Nullam nibh lorem, porta ut urna ut, scelerisque consequat magna. Pellentesque vel massa sed tortor cursus tempus at eget ligula. Duis leo odio, luctus eget suscipit vel, pharetra id velit. Mauris arcu enim, mollis placerat porta in, sagittis a nisl. Nam et augue eu justo porta tincidunt. In luctus nisl dolor, sed aliquet augue elementum eget. Vivamus laoreet, mauris vitae aliquam faucibus, tellus dolor feugiat felis, ac facilisis diam eros eget est. 11 | 12 | Ut dolor nunc, dictum vitae molestie pulvinar, condimentum quis dui. Mauris ullamcorper tincidunt magna, quis tristique ligula laoreet fringilla. Nam dapibus tellus vel est vehicula, sed mattis sapien tempus. Aenean suscipit erat in lacus luctus lacinia. Donec in justo arcu. Nunc nibh lorem, ultricies in nunc ac, posuere feugiat ligula. In convallis, urna dapibus vehicula gravida, justo massa aliquam nunc, vitae gravida justo metus non felis. Mauris sed augue risus. Quisque commodo quam in risus porttitor ultrices. Fusce pellentesque eget eros vitae pulvinar. Maecenas nec felis tortor. Etiam dictum felis eget augue congue finibus. Etiam nibh sapien, cursus sit amet feugiat non, posuere tincidunt dui. 13 | 14 | --- 15 | 16 | Ã ¾ Ķ Ŀ Ƿ ע ऋ ਉ ጇ ᚙ ឿ ظ ę Ó Ą Ś 17 | 18 | --- 19 | 20 | # H1 21 | ## H2 22 | ### H3 23 | #### H4 24 | ##### H5 25 | ###### H6 26 | 27 | --- 28 | 29 | # This is H1 30 | 31 | Maecenas nec felis tortor. Etiam dictum felis eget augue congue finibus. Etiam nibh sapien, cursus sit amet feugiat non, posuere tincidunt dui. 32 | 33 | ## This is H2 34 | 35 | Maecenas nec felis tortor. Etiam dictum felis eget augue congue finibus. Etiam nibh sapien, cursus sit amet feugiat non, posuere tincidunt dui. 36 | 37 | ### This is H3 38 | 39 | Maecenas nec felis tortor. Etiam dictum felis eget augue congue finibus. Etiam nibh sapien, cursus sit amet feugiat non, posuere tincidunt dui. 40 | 41 | #### This is H4 42 | 43 | Maecenas nec felis tortor. Etiam dictum felis eget augue congue finibus. Etiam nibh sapien, cursus sit amet feugiat non, posuere tincidunt dui. 44 | 45 | ##### This is H5 46 | 47 | Maecenas nec felis tortor. Etiam dictum felis eget augue congue finibus. Etiam nibh sapien, cursus sit amet feugiat non, posuere tincidunt dui. 48 | 49 | ###### This is H6 50 | 51 | Maecenas nec felis tortor. Etiam dictum felis eget augue congue finibus. Etiam nibh sapien, cursus sit amet feugiat non, posuere tincidunt dui. 52 | 53 | --- 54 | 55 | Use the `printf()` function. You can use also ```print()```. 56 | 57 | --- 58 | 59 | *italics* 60 | 61 | **bold** 62 | 63 | ~~strikethrough text~~ 64 | 65 | underline 66 | 67 | :heart_eyes: 68 | :boom: 69 | :smiling_imp: 70 | 71 | --- 72 | 73 | > Blockquote: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ac dolor elementum, consectetur tortor in, lacinia velit. Aenean dignissim tellus justo, sit amet suscipit tortor lacinia non. 74 | 75 | --- 76 | 77 | * Red 78 | * Green 79 | * Blue 80 | 81 | --- 82 | 83 | 1. Red 84 | 2. Green 85 | 3. Blue 86 | 87 | --- 88 | 89 | - [ ] Red 90 | - [ ] Green 91 | - [ ] **Blue** 92 | - [ ] Yellow 93 | - [x] Orange 94 | 95 | --- 96 | 97 | You can create footnotes like this[^footnote]. 98 | 99 | [^footnote]: Here is the *text* of the **footnote**. 100 | 101 | This is [an example](http://example.com/ "Title") link. 102 | 103 | An email link. 104 | 105 | # Table of Contents 106 | * [Chapter 1](#chapter-1) 107 | * [Chapter 2](#chapter-2) 108 | * [Chapter 3](#chapter-3) 109 | 110 | ## Chapter 1 111 | Content for chapter one. 112 | 113 | ## Chapter 2 114 | Content for chapter one. 115 | 116 | ## Chapter 3 117 | Content for chapter one. 118 | -------------------------------------------------------------------------------- /assets/src/styles/_chroma_friendly.scss: -------------------------------------------------------------------------------- 1 | /* Background */ .chroma { background-color: #f0f0f0 } 2 | /* Error */ .chroma .err { } 3 | /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } 4 | /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } 5 | /* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } 6 | /* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; } 7 | /* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; } 8 | /* Keyword */ .chroma .k { color: #007020; font-weight: bold } 9 | /* KeywordConstant */ .chroma .kc { color: #007020; font-weight: bold } 10 | /* KeywordDeclaration */ .chroma .kd { color: #007020; font-weight: bold } 11 | /* KeywordNamespace */ .chroma .kn { color: #007020; font-weight: bold } 12 | /* KeywordPseudo */ .chroma .kp { color: #007020 } 13 | /* KeywordReserved */ .chroma .kr { color: #007020; font-weight: bold } 14 | /* KeywordType */ .chroma .kt { color: #902000 } 15 | /* NameAttribute */ .chroma .na { color: #4070a0 } 16 | /* NameBuiltin */ .chroma .nb { color: #007020 } 17 | /* NameClass */ .chroma .nc { color: #0e84b5; font-weight: bold } 18 | /* NameConstant */ .chroma .no { color: #60add5 } 19 | /* NameDecorator */ .chroma .nd { color: #555555; font-weight: bold } 20 | /* NameEntity */ .chroma .ni { color: #d55537; font-weight: bold } 21 | /* NameException */ .chroma .ne { color: #007020 } 22 | /* NameFunction */ .chroma .nf { color: #06287e } 23 | /* NameLabel */ .chroma .nl { color: #002070; font-weight: bold } 24 | /* NameNamespace */ .chroma .nn { color: #0e84b5; font-weight: bold } 25 | /* NameTag */ .chroma .nt { color: #062873; font-weight: bold } 26 | /* NameVariable */ .chroma .nv { color: #bb60d5 } 27 | /* LiteralString */ .chroma .s { color: #4070a0 } 28 | /* LiteralStringAffix */ .chroma .sa { color: #4070a0 } 29 | /* LiteralStringBacktick */ .chroma .sb { color: #4070a0 } 30 | /* LiteralStringChar */ .chroma .sc { color: #4070a0 } 31 | /* LiteralStringDelimiter */ .chroma .dl { color: #4070a0 } 32 | /* LiteralStringDoc */ .chroma .sd { color: #4070a0; font-style: italic } 33 | /* LiteralStringDouble */ .chroma .s2 { color: #4070a0 } 34 | /* LiteralStringEscape */ .chroma .se { color: #4070a0; font-weight: bold } 35 | /* LiteralStringHeredoc */ .chroma .sh { color: #4070a0 } 36 | /* LiteralStringInterpol */ .chroma .si { color: #70a0d0; font-style: italic } 37 | /* LiteralStringOther */ .chroma .sx { color: #c65d09 } 38 | /* LiteralStringRegex */ .chroma .sr { color: #235388 } 39 | /* LiteralStringSingle */ .chroma .s1 { color: #4070a0 } 40 | /* LiteralStringSymbol */ .chroma .ss { color: #517918 } 41 | /* LiteralNumber */ .chroma .m { color: #40a070 } 42 | /* LiteralNumberBin */ .chroma .mb { color: #40a070 } 43 | /* LiteralNumberFloat */ .chroma .mf { color: #40a070 } 44 | /* LiteralNumberHex */ .chroma .mh { color: #40a070 } 45 | /* LiteralNumberInteger */ .chroma .mi { color: #40a070 } 46 | /* LiteralNumberIntegerLong */ .chroma .il { color: #40a070 } 47 | /* LiteralNumberOct */ .chroma .mo { color: #40a070 } 48 | /* Operator */ .chroma .o { color: #666666 } 49 | /* OperatorWord */ .chroma .ow { color: #007020; font-weight: bold } 50 | /* Comment */ .chroma .c { color: #60a0b0; font-style: italic } 51 | /* CommentHashbang */ .chroma .ch { color: #60a0b0; font-style: italic } 52 | /* CommentMultiline */ .chroma .cm { color: #60a0b0; font-style: italic } 53 | /* CommentSingle */ .chroma .c1 { color: #60a0b0; font-style: italic } 54 | /* CommentSpecial */ .chroma .cs { color: #60a0b0; background-color: #fff0f0 } 55 | /* CommentPreproc */ .chroma .cp { color: #007020 } 56 | /* CommentPreprocFile */ .chroma .cpf { color: #007020 } 57 | /* GenericDeleted */ .chroma .gd { color: #a00000 } 58 | /* GenericEmph */ .chroma .ge { font-style: italic } 59 | /* GenericError */ .chroma .gr { color: #ff0000 } 60 | /* GenericHeading */ .chroma .gh { color: #000080; font-weight: bold } 61 | /* GenericInserted */ .chroma .gi { color: #00a000 } 62 | /* GenericOutput */ .chroma .go { color: #888888 } 63 | /* GenericPrompt */ .chroma .gp { color: #c65d09; font-weight: bold } 64 | /* GenericStrong */ .chroma .gs { font-weight: bold } 65 | /* GenericSubheading */ .chroma .gu { color: #800080; font-weight: bold } 66 | /* GenericTraceback */ .chroma .gt { color: #0044dd } 67 | /* GenericUnderline */ .chroma .gl { text-decoration: underline } 68 | /* TextWhitespace */ .chroma .w { color: #bbbbbb } 69 | -------------------------------------------------------------------------------- /layouts/shortcodes/image.html: -------------------------------------------------------------------------------- 1 | {{ $src := (.Get "src") }} 2 | {{ $title := (.Get "title") }} 3 | {{ $full := (.Get "full") | default "false" }} 4 | {{ $lightbox := (.Get "lightbox") | default "false" }} 5 | {{ $resize := (.Get "resize") | default "true" }} 6 | {{ $round := (.Get "round") | default 0 }} 7 | 8 | {{ $fileName := index (last 1 (split $src "/")) 0 }} 9 | {{ $imageName := index (split $fileName ".") 0 }} 10 | {{ $section := replace $src (printf "/%s" $fileName) "" }} 11 | 12 | {{ with .Site.GetPage "section" $section }} 13 | {{ $original := .Resources.GetMatch (printf "%s*" ($imageName)) }} 14 | 15 | {{ if eq $resize "true" }} 16 | {{ if gt $original.Width 320 }} 17 | {{ $.Scratch.Set "resize_320" ($original.Resize "320x") }} 18 | {{ else }} 19 | {{ $.Scratch.Set "resize_320" ($original) }} 20 | {{ end }} 21 | 22 | {{ if gt ($original.Width) 480 }} 23 | {{ $.Scratch.Set "resize_480" ($original.Resize "480x") }} 24 | {{ else }} 25 | {{ $.Scratch.Set "resize_480" ($original) }} 26 | {{ end }} 27 | 28 | {{ if gt ($original.Width) 768 }} 29 | {{ $.Scratch.Set "resize_768" ($original.Resize "768x") }} 30 | {{ else }} 31 | {{ $.Scratch.Set "resize_768" ($original) }} 32 | {{ end }} 33 | 34 | {{ if gt ($original.Width) 1024 }} 35 | {{ $.Scratch.Set "resize_1024" ($original.Resize "1024x") }} 36 | {{ else }} 37 | {{ $.Scratch.Set "resize_1024" ($original) }} 38 | {{ end }} 39 | 40 | {{ if gt ($original.Width) 1280 }} 41 | {{ $.Scratch.Set "resize_1280" ($original.Resize "1280x") }} 42 | {{ else }} 43 | {{ $.Scratch.Set "resize_1280" ($original) }} 44 | {{ end }} 45 | 46 | {{ if gt ($original.Width) 1600 }} 47 | {{ $.Scratch.Set "resize_1600" ($original.Resize "1600x") }} 48 | {{ else }} 49 | {{ $.Scratch.Set "resize_1600" ($original) }} 50 | {{ end }} 51 | 52 | {{ if gt ($original.Width) 1920 }} 53 | {{ $.Scratch.Set "resize_1920" ($original.Resize "1920x") }} 54 | {{ else }} 55 | {{ $.Scratch.Set "resize_1920" ($original) }} 56 | {{ end }} 57 | 58 | 59 | {{ if eq $lightbox "true" }} 60 | 61 | 76 | 77 | {{ else }} 78 | 93 | {{ end }} 94 | {{ if $title }}
{{ $title }}
{{ end }} 95 | 96 | 97 | {{ $.Scratch.Delete "resize_320" }} 98 | {{ $.Scratch.Delete "resize_480" }} 99 | {{ $.Scratch.Delete "resize_768" }} 100 | {{ $.Scratch.Delete "resize_1024" }} 101 | {{ $.Scratch.Delete "resize_1280" }} 102 | {{ $.Scratch.Delete "resize_1600" }} 103 | {{ $.Scratch.Delete "resize_1920" }} 104 | {{ else }} 105 | 106 | {{ if eq $lightbox "true" }} 107 | 108 | 114 | 115 | {{ else }} 116 | 122 | {{ end }} 123 | {{ if $title }}
{{ $title }}
{{ end }} 124 | 125 | {{ end }} 126 | {{ end }} 127 | -------------------------------------------------------------------------------- /assets/src/styles/_components/content.scss: -------------------------------------------------------------------------------- 1 | body { 2 | main { 3 | article { 4 | header { 5 | margin-bottom: 5rem; 6 | text-align: center; 7 | 8 | time { 9 | color: $color-silver; 10 | } 11 | } 12 | 13 | section { 14 | ins.adsbygoogle, 15 | video { 16 | margin: 5rem auto; 17 | } 18 | 19 | figure { 20 | margin: $itemMargin 0; 21 | 22 | &.full { 23 | left: 50%; 24 | margin-left: -50vw; 25 | margin-right: -50vw; 26 | position: relative; 27 | right: 50%; 28 | width: 100vw; 29 | } 30 | 31 | img { 32 | display: block; 33 | height: auto; 34 | margin: 0 auto; 35 | max-width: 100%; 36 | padding: 0; 37 | 38 | &.full { 39 | left: 50%; 40 | margin-left: -50vw; 41 | margin-right: -50vw; 42 | position: relative; 43 | right: 50%; 44 | width: 100vw; 45 | } 46 | } 47 | 48 | figcaption { 49 | text-align: center; 50 | } 51 | } 52 | 53 | table { 54 | tbody { 55 | tr { 56 | td { 57 | &[align="left"] { 58 | text-align: left; 59 | } 60 | &[align="right"] { 61 | text-align: right; 62 | } 63 | &[align="center"] { 64 | text-align: center; 65 | } 66 | } 67 | } 68 | } 69 | } 70 | 71 | pre { 72 | border-left: 0.3rem solid $links-color; 73 | display: grid; 74 | // overflow: auto; 75 | 76 | code { 77 | background-color: transparent; 78 | min-width: 0; 79 | } 80 | } 81 | 82 | .gist { 83 | width: 100%; 84 | 85 | & table { 86 | table-layout: fixed; 87 | } 88 | 89 | & td.js-line-number{ 90 | width: 50px; 91 | text-align: center; 92 | } 93 | } 94 | 95 | iframe.instagram-media { 96 | margin-left: auto !important; 97 | margin-right: auto !important; 98 | } 99 | 100 | img { 101 | display: block; 102 | height: auto; 103 | margin: $itemMargin auto; 104 | max-width: 100%; 105 | padding: 0; 106 | 107 | &.full { 108 | left: 50%; 109 | margin-left: -50vw; 110 | margin-right: -50vw; 111 | position: relative; 112 | right: 50%; 113 | width: 100vw; 114 | } 115 | } 116 | 117 | p { 118 | code { 119 | background-color: $color-zhen-zhu-bai-pearl; 120 | color: $color-bara-red; 121 | white-space: normal; 122 | 123 | /* These are technically the same, but use both */ 124 | overflow-wrap: break-word; 125 | word-wrap: break-word; 126 | 127 | -ms-word-break: break-all; 128 | /* This is the dangerous one in WebKit, as it breaks things wherever */ 129 | word-break: break-all; 130 | /* Instead use this non-standard one: */ 131 | word-break: break-word; 132 | 133 | /* Adds a hyphen where the word breaks, if supported (No Blink) */ 134 | -ms-hyphens: auto; 135 | -moz-hyphens: auto; 136 | -webkit-hyphens: auto; 137 | hyphens: auto; 138 | } 139 | } 140 | 141 | ul { 142 | &.task-list { 143 | list-style: none; 144 | padding: 0; 145 | } 146 | } 147 | 148 | ol { 149 | list-style: decimal; 150 | } 151 | 152 | video { 153 | display: block; 154 | width: 100% 155 | } 156 | 157 | .embed-container { 158 | height: 0; 159 | max-width: 100%; 160 | overflow: hidden; 161 | padding-bottom: 56.25%; 162 | position: relative; 163 | 164 | embed, iframe, object { 165 | height: 100%; 166 | left: 0; 167 | position: absolute; 168 | top: 0; 169 | width: 100%; 170 | } 171 | } 172 | 173 | .speakerdeck { 174 | margin-left: auto !important; 175 | margin-right: auto !important; 176 | } 177 | 178 | .twitter-tweet { 179 | @media (max-width: 550px) { 180 | width: 0 !important; 181 | } 182 | 183 | margin-left: auto !important; 184 | margin-right: auto !important; 185 | } 186 | } 187 | 188 | footer { 189 | text-align: center; 190 | 191 | .meta { 192 | .tags { 193 | a { 194 | span { 195 | color: $color-silver; 196 | } 197 | } 198 | } 199 | } 200 | 201 | #disqus_thread { 202 | margin-left: auto !important; 203 | margin-right: auto !important; 204 | } 205 | } 206 | } 207 | } 208 | } 209 | -------------------------------------------------------------------------------- /assets/src/styles/_external/baguetteBox.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * baguetteBox.js 3 | * @author feimosi 4 | * @version 1.11.0 5 | * @url https://github.com/feimosi/baguetteBox.js 6 | */ 7 | #baguetteBox-overlay { 8 | display: none; 9 | opacity: 0; 10 | position: fixed; 11 | overflow: hidden; 12 | top: 0; 13 | left: 0; 14 | width: 100%; 15 | height: 100%; 16 | z-index: 1000000; 17 | background-color: #222; 18 | background-color: rgba(0, 0, 0, 0.8); 19 | -webkit-transition: opacity .5s ease; 20 | transition: opacity .5s ease; } 21 | #baguetteBox-overlay.visible { 22 | opacity: 1; } 23 | #baguetteBox-overlay .full-image { 24 | display: inline-block; 25 | position: relative; 26 | width: 100%; 27 | height: 100%; 28 | text-align: center; } 29 | #baguetteBox-overlay .full-image figure { 30 | display: inline; 31 | margin: 0; 32 | height: 100%; } 33 | #baguetteBox-overlay .full-image img { 34 | display: inline-block; 35 | width: auto; 36 | height: auto; 37 | max-height: 100%; 38 | max-width: 100%; 39 | vertical-align: middle; 40 | -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); 41 | -moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); 42 | box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); } 43 | #baguetteBox-overlay .full-image figcaption { 44 | display: block; 45 | position: absolute; 46 | bottom: 0; 47 | width: 100%; 48 | text-align: center; 49 | line-height: 1.8; 50 | white-space: normal; 51 | color: #ccc; 52 | background-color: #000; 53 | background-color: rgba(0, 0, 0, 0.6); 54 | font-family: sans-serif; } 55 | #baguetteBox-overlay .full-image:before { 56 | content: ""; 57 | display: inline-block; 58 | height: 50%; 59 | width: 1px; 60 | margin-right: -1px; } 61 | 62 | #baguetteBox-slider { 63 | position: absolute; 64 | left: 0; 65 | top: 0; 66 | height: 100%; 67 | width: 100%; 68 | white-space: nowrap; 69 | -webkit-transition: left .4s ease, -webkit-transform .4s ease; 70 | transition: left .4s ease, -webkit-transform .4s ease; 71 | transition: left .4s ease, transform .4s ease; 72 | transition: left .4s ease, transform .4s ease, -webkit-transform .4s ease, -moz-transform .4s ease; } 73 | #baguetteBox-slider.bounce-from-right { 74 | -webkit-animation: bounceFromRight .4s ease-out; 75 | animation: bounceFromRight .4s ease-out; } 76 | #baguetteBox-slider.bounce-from-left { 77 | -webkit-animation: bounceFromLeft .4s ease-out; 78 | animation: bounceFromLeft .4s ease-out; } 79 | 80 | @-webkit-keyframes bounceFromRight { 81 | 0% { 82 | margin-left: 0; } 83 | 50% { 84 | margin-left: -30px; } 85 | 100% { 86 | margin-left: 0; } } 87 | 88 | @keyframes bounceFromRight { 89 | 0% { 90 | margin-left: 0; } 91 | 50% { 92 | margin-left: -30px; } 93 | 100% { 94 | margin-left: 0; } } 95 | 96 | @-webkit-keyframes bounceFromLeft { 97 | 0% { 98 | margin-left: 0; } 99 | 50% { 100 | margin-left: 30px; } 101 | 100% { 102 | margin-left: 0; } } 103 | 104 | @keyframes bounceFromLeft { 105 | 0% { 106 | margin-left: 0; } 107 | 50% { 108 | margin-left: 30px; } 109 | 100% { 110 | margin-left: 0; } } 111 | 112 | .baguetteBox-button#next-button, .baguetteBox-button#previous-button { 113 | top: 50%; 114 | top: calc(50% - 30px); 115 | width: 44px; 116 | height: 60px; } 117 | 118 | .baguetteBox-button { 119 | position: absolute; 120 | cursor: pointer; 121 | outline: none; 122 | padding: 0; 123 | margin: 0; 124 | border: 0; 125 | -moz-border-radius: 15%; 126 | border-radius: 15%; 127 | background-color: #323232; 128 | background-color: rgba(50, 50, 50, 0.5); 129 | color: #ddd; 130 | font: 1.6em sans-serif; 131 | -webkit-transition: background-color .4s ease; 132 | transition: background-color .4s ease; } 133 | .baguetteBox-button:focus, .baguetteBox-button:hover { 134 | background-color: rgba(50, 50, 50, 0.9); } 135 | .baguetteBox-button#next-button { 136 | right: 2%; } 137 | .baguetteBox-button#previous-button { 138 | left: 2%; } 139 | .baguetteBox-button#close-button { 140 | top: 20px; 141 | right: 2%; 142 | right: calc(2% + 6px); 143 | width: 30px; 144 | height: 30px; } 145 | .baguetteBox-button svg { 146 | position: absolute; 147 | left: 0; 148 | top: 0; } 149 | 150 | /* 151 | Preloader 152 | Borrowed from http://tobiasahlin.com/spinkit/ 153 | */ 154 | .baguetteBox-spinner { 155 | width: 40px; 156 | height: 40px; 157 | display: inline-block; 158 | position: absolute; 159 | top: 50%; 160 | left: 50%; 161 | margin-top: -20px; 162 | margin-left: -20px; } 163 | 164 | .baguetteBox-double-bounce1, 165 | .baguetteBox-double-bounce2 { 166 | width: 100%; 167 | height: 100%; 168 | -moz-border-radius: 50%; 169 | border-radius: 50%; 170 | background-color: #fff; 171 | opacity: .6; 172 | position: absolute; 173 | top: 0; 174 | left: 0; 175 | -webkit-animation: bounce 2s infinite ease-in-out; 176 | animation: bounce 2s infinite ease-in-out; } 177 | 178 | .baguetteBox-double-bounce2 { 179 | -webkit-animation-delay: -1s; 180 | animation-delay: -1s; } 181 | 182 | @-webkit-keyframes bounce { 183 | 0%, 100% { 184 | -webkit-transform: scale(0); 185 | transform: scale(0); } 186 | 50% { 187 | -webkit-transform: scale(1); 188 | transform: scale(1); } } 189 | 190 | @keyframes bounce { 191 | 0%, 100% { 192 | -webkit-transform: scale(0); 193 | -moz-transform: scale(0); 194 | transform: scale(0); } 195 | 50% { 196 | -webkit-transform: scale(1); 197 | -moz-transform: scale(1); 198 | transform: scale(1); } } 199 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Simplicity 2 | 3 | Very simple, clean and readable (I think so) Hugo theme. 4 | 5 | #### Responsive design 6 | It works on mobile, tablet and desktop. 7 | #### Responsive images 8 | It generates several image sizes during the build process and displays the best one for given device/resolution. 9 | #### Lazy loading images 10 | This theme uses [LazyLoad](https://github.com/verlok/lazyload) to speed up your web application by loading images as they enter the viewport. 11 | #### Clean typography 12 | It should be a pleasure to read your blog, right? 13 | #### Additional shortcodes 14 | Shortcodes for Google Adsense, images, Speaker Deck, Video, Vimeo, Youtube. 15 | #### Google Adsense 16 | You can use the shortcode to insert Adsense Ad wherever you want. 17 | #### Google Analytics 18 | Just add a Google Analytics code to turn it on. 19 | #### Lightbox 20 | Image shortcode allows to turn on [baguetteBox.js](https://feimosi.github.io/baguetteBox.js/) for given image. 21 | #### Syntax highlighting. 22 | Built-in Chroma Native color theme. 23 | #### Auto-hide/show header 24 | This theme uses [headroom.js](http://wicky.nillia.ms/headroom.js/) script. 25 | #### Page scroll indicator 26 | Displays progress bar on the top of the page when user scrolls the page. 27 | #### Disqus 28 | Just add a Disqus shortname to enable comments. 29 | #### Categories 30 | A separate page with a list of all categories and list of posts for a selected category. 31 | #### Tags 32 | A separate page with a list of all categories and list of posts for a selected tag. 33 | #### RSS 34 | Custom RSS template without an e-mail address. 35 | #### Sitemap 36 | Custom sitemap template to prevent rendering content from media directory. 37 | #### Social icons 38 | Add information about your social profile in the config file to display it on the homepage. Supported services: email, Facebook, Github, Google+, LinkedIn, Messenger, Spotify, Stackoverflow, Telegram, Twitter. 39 | #### Gravatar support 40 | Just add your Gravatar email to the config file to display your avatar on the home page. 41 | #### and more 42 | - OpenGraph support 43 | - Schema Structured Data 44 | - Twitter card 45 | - Display license in footer 46 | - No JS frameworks, no CSS frameworks, no jQuery 47 | 48 | # Demo 49 | 50 | You can preview this theme on my blogs - [eshlox.net](https://eshlox.net) or [eshlox.pl](https://eshlox.pl). 51 | 52 | ## Table of Contents 53 | 54 | - [Table of Contents](#table-of-contents) 55 | - [Getting Started](#getting-started) 56 | - [exampleSite](#examplesite) 57 | - [config.toml](#configtoml) 58 | - [favicons](#favicons) 59 | - [Shortcodes](#shortcodes) 60 | - [figure](#figure) 61 | - [Development](#development) 62 | - [Browsers support](#browsers-support) 63 | - [License](#license) 64 | 65 | ## Getting Started 66 | 67 | Run the following commands in your Hugo site directory to download the theme: 68 | 69 | ``` 70 | mkdir themes 71 | cd themes 72 | git clone https://github.com/eshlox/simplicity.git 73 | ``` 74 | 75 | ### exampleSite 76 | 77 | Look inside `exampleSite` directory to find out how to configure your site. 78 | 79 | That's how the structure looks like: 80 | 81 | ``` 82 | exampleSite/ 83 | ├── config.toml 84 | ├── content 85 | │   ├── _index.md 86 | │   ├── categories 87 | │   │   └── _index.md 88 | │   ├── media 89 | │   │   ├── _index.md 90 | │   │   ├── image-1.jpg 91 | │   │   └── video.mp4 92 | │   ├── photos.md 93 | │   ├── posts 94 | │   │   ├── 2014 95 | │   │   │   ├── creating-a-new-theme.md 96 | │   │   │   ├── goisforlovers.md 97 | │   │   │   ├── hugoisforlovers.md 98 | │   │   │   └── migrate-from-jekyll.md 99 | │   │   ├── 2016 100 | │   │   │   └── lorem-ipsum.md 101 | │   │   ├── 2017 102 | │   │   │   ├── images.md 103 | │   │   │   └── typography.md 104 | │   │   └── _index.md 105 | │   ├── projects.md 106 | │   └── tags 107 | │   └── _index.md 108 | └── resources 109 | └── _gen 110 | └── images 111 | └── media 112 | ├── image-1_hu3d03a01dcc18bc5be0e67db3d8d209a6_1073788_320x0_resize_q75_box.jpg 113 | ├── image-1_hu3d03a01dcc18bc5be0e67db3d8d209a6_1073788_480x0_resize_q75_box.jpg 114 | └── image-1_hu3d03a01dcc18bc5be0e67db3d8d209a6_1073788_768x0_resize_q75_box.jpg 115 | ``` 116 | 117 | Every `_index.md` file contains a title, language and slug. 118 | 119 | ### config.toml 120 | 121 | Copy `config.toml` from `exampleSite` to the root directory of your Hugo site and modify it according to your needs. 122 | 123 | ### favicons 124 | 125 | This theme contains default favicon with `S` letter. If you want to change it, create a directory `assets/src/images` inside the root of your Hugo site and put your favicon files there. They should have names: `favicon.ico` and `apple-touch-icon.png`. 126 | 127 | ## Shortcodes 128 | 129 | This theme includes additional shortcodes. 130 | 131 | ### Adsense 132 | 133 | Add Adsense configuration and use `{{< adsense >}}` in your post to display an ad. 134 | 135 | ### Image 136 | 137 | All images should be stored in `content/images` directory. Each subdirectory should contain `_index.md` file with this content: 138 | 139 | ``` 140 | --- 141 | title: Media Folder 142 | --- 143 | 144 | ``` 145 | 146 | Insert responsive image with title: 147 | 148 | `{{< image src="media/image-1.jpg" title="Photo by Ales Krivec on Unsplash" >}}` 149 | 150 | Full page width image: 151 | 152 | `{{< image src="media/image-1.jpg" title="Photo by Ales Krivec on Unsplash" full="true">}}` 153 | 154 | Lightbox: 155 | 156 | `{{< image src="media/image-1.jpg" lightbox="true" >}}` 157 | 158 | Rounded corners: 159 | 160 | `{{< image src="media/image-1.jpg" round="50" >}}` 161 | 162 | Insert image without resizing (the same image for all devices/resolutions). 163 | 164 | `{{< image src="media/image-1.jpg" resize="false" >}}` 165 | 166 | ### Speaker Deck 167 | 168 | `{{< speakerdeck 50021f75cf1db900020005e7 >}}` 169 | 170 | ### Video 171 | 172 | `{{< video src="media/video.mp4" >}}` 173 | 174 | ### Responsive Vimeo 175 | 176 | `{{< vimeo 265143954 >}}` 177 | 178 | ### Responsive Youtube 179 | 180 | `{{< vimeo 265143954 >}}` 181 | 182 | ## Development 183 | 184 | 1. Install dependencies. 185 | 186 | ```cd assets && yarn install``` 187 | 188 | 2. Run development server. 189 | 190 | ```hugo server --source=exampleSite --themesDir=../..``` 191 | 192 | ## Browsers support 193 | 194 | Dekstop: 195 | 196 | - Firefox (latest) 197 | - Chrome (latest) 198 | - Safari (latest) 199 | 200 | Mobile: 201 | 202 | - Firefox (latest) 203 | - Chrome (latest) 204 | - Safari (latest) 205 | 206 | It probably works in other browsers but it hasn't been tested yet. 207 | 208 | ## Licence 209 | 210 | This theme is released under the MIT license. Please read the [license](https://github.com/eshlox/simplicity/blob/master/LICENSE) for more information. 211 | -------------------------------------------------------------------------------- /exampleSite/content/posts/2014/migrate-from-jekyll.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2014-03-10 3 | linktitle: Migrating from Jekyll 4 | menu: 5 | main: 6 | parent: tutorials 7 | prev: /tutorials/mathjax 8 | title: Migrate to Hugo from Jekyll 9 | # weight: 10 10 | --- 11 | 12 | ## Move static content to `static` 13 | Jekyll has a rule that any directory not starting with `_` will be copied as-is to the `_site` output. Hugo keeps all static content under `static`. You should therefore move it all there. 14 | With Jekyll, something that looked like 15 | 16 | ▾ / 17 | ▾ images/ 18 | logo.png 19 | 20 | should become 21 | 22 | ▾ / 23 | ▾ static/ 24 | ▾ images/ 25 | logo.png 26 | 27 | Additionally, you'll want any files that should reside at the root (such as `CNAME`) to be moved to `static`. 28 | 29 | ## Create your Hugo configuration file 30 | Hugo can read your configuration as JSON, YAML or TOML. Hugo supports parameters custom configuration too. Refer to the [Hugo configuration documentation](/overview/configuration/) for details. 31 | 32 | ## Set your configuration publish folder to `_site` 33 | The default is for Jekyll to publish to `_site` and for Hugo to publish to `public`. If, like me, you have [`_site` mapped to a git submodule on the `gh-pages` branch](http://blog.blindgaenger.net/generate_github_pages_in_a_submodule.html), you'll want to do one of two alternatives: 34 | 35 | 1. Change your submodule to point to map `gh-pages` to public instead of `_site` (recommended). 36 | 37 | git submodule deinit _site 38 | git rm _site 39 | git submodule add -b gh-pages git@github.com:your-username/your-repo.git public 40 | 41 | 2. Or, change the Hugo configuration to use `_site` instead of `public`. 42 | 43 | { 44 | .. 45 | "publishdir": "_site", 46 | .. 47 | } 48 | 49 | ## Convert Jekyll templates to Hugo templates 50 | That's the bulk of the work right here. The documentation is your friend. You should refer to [Jekyll's template documentation](http://jekyllrb.com/docs/templates/) if you need to refresh your memory on how you built your blog and [Hugo's template](/layout/templates/) to learn Hugo's way. 51 | 52 | As a single reference data point, converting my templates for [heyitsalex.net](http://heyitsalex.net/) took me no more than a few hours. 53 | 54 | ## Convert Jekyll plugins to Hugo shortcodes 55 | Jekyll has [plugins](http://jekyllrb.com/docs/plugins/); Hugo has [shortcodes](/doc/shortcodes/). It's fairly trivial to do a port. 56 | 57 | ### Implementation 58 | As an example, I was using a custom [`image_tag`](https://github.com/alexandre-normand/alexandre-normand/blob/74bb12036a71334fdb7dba84e073382fc06908ec/_plugins/image_tag.rb) plugin to generate figures with caption when running Jekyll. As I read about shortcodes, I found Hugo had a nice built-in shortcode that does exactly the same thing. 59 | 60 | Jekyll's plugin: 61 | 62 | module Jekyll 63 | class ImageTag < Liquid::Tag 64 | @url = nil 65 | @caption = nil 66 | @class = nil 67 | @link = nil 68 | // Patterns 69 | IMAGE_URL_WITH_CLASS_AND_CAPTION = 70 | IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK = /(\w+)(\s+)((https?:\/\/|\/)(\S+))(\s+)"(.*?)"(\s+)->((https?:\/\/|\/)(\S+))(\s*)/i 71 | IMAGE_URL_WITH_CAPTION = /((https?:\/\/|\/)(\S+))(\s+)"(.*?)"/i 72 | IMAGE_URL_WITH_CLASS = /(\w+)(\s+)((https?:\/\/|\/)(\S+))/i 73 | IMAGE_URL = /((https?:\/\/|\/)(\S+))/i 74 | def initialize(tag_name, markup, tokens) 75 | super 76 | if markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK 77 | @class = $1 78 | @url = $3 79 | @caption = $7 80 | @link = $9 81 | elsif markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION 82 | @class = $1 83 | @url = $3 84 | @caption = $7 85 | elsif markup =~ IMAGE_URL_WITH_CAPTION 86 | @url = $1 87 | @caption = $5 88 | elsif markup =~ IMAGE_URL_WITH_CLASS 89 | @class = $1 90 | @url = $3 91 | elsif markup =~ IMAGE_URL 92 | @url = $1 93 | end 94 | end 95 | def render(context) 96 | if @class 97 | source = "
" 98 | else 99 | source = "
" 100 | end 101 | if @link 102 | source += "" 103 | end 104 | source += "" 105 | if @link 106 | source += "" 107 | end 108 | source += "
#{@caption}
" if @caption 109 | source += "
" 110 | source 111 | end 112 | end 113 | end 114 | Liquid::Template.register_tag('image', Jekyll::ImageTag) 115 | 116 | is written as this Hugo shortcode: 117 | 118 | 119 |
120 | {{ with .Get "link"}}{{ end }} 121 | 122 | {{ if .Get "link"}}{{ end }} 123 | {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} 124 |
{{ if isset .Params "title" }} 125 | {{ .Get "title" }}{{ end }} 126 | {{ if or (.Get "caption") (.Get "attr")}}

127 | {{ .Get "caption" }} 128 | {{ with .Get "attrlink"}} {{ end }} 129 | {{ .Get "attr" }} 130 | {{ if .Get "attrlink"}} {{ end }} 131 |

{{ end }} 132 |
133 | {{ end }} 134 |
135 | 136 | 137 | ### Usage 138 | I simply changed: 139 | 140 | {% image full http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg "One of my favorite touristy-type photos. I secretly waited for the good light while we were "having fun" and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." ->http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/ %} 141 | 142 | to this (this example uses a slightly extended version named `fig`, different than the built-in `figure`): 143 | 144 | {{%/* fig class="full" src="http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg" title="One of my favorite touristy-type photos. I secretly waited for the good light while we were having fun and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." link="http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/" */%}} 145 | 146 | As a bonus, the shortcode named parameters are, arguably, more readable. 147 | 148 | ## Finishing touches 149 | ### Fix content 150 | Depending on the amount of customization that was done with each post with Jekyll, this step will require more or less effort. There are no hard and fast rules here except that `hugo server --watch` is your friend. Test your changes and fix errors as needed. 151 | 152 | ### Clean up 153 | You'll want to remove the Jekyll configuration at this point. If you have anything else that isn't used, delete it. 154 | 155 | ## A practical example in a diff 156 | [Hey, it's Alex](http://heyitsalex.net/) was migrated in less than a _father-with-kids day_ from Jekyll to Hugo. You can see all the changes (and screw-ups) by looking at this [diff](https://github.com/alexandre-normand/alexandre-normand/compare/869d69435bd2665c3fbf5b5c78d4c22759d7613a...b7f6605b1265e83b4b81495423294208cc74d610). 157 | -------------------------------------------------------------------------------- /assets/src/styles/_external/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */ 2 | 3 | /* Document 4 | ========================================================================== */ 5 | 6 | /** 7 | * 1. Correct the line height in all browsers. 8 | * 2. Prevent adjustments of font size after orientation changes in iOS. 9 | */ 10 | 11 | html { 12 | line-height: 1.15; /* 1 */ 13 | -webkit-text-size-adjust: 100%; /* 2 */ 14 | } 15 | 16 | /* Sections 17 | ========================================================================== */ 18 | 19 | /** 20 | * Remove the margin in all browsers. 21 | */ 22 | 23 | body { 24 | margin: 0; 25 | } 26 | 27 | /** 28 | * Correct the font size and margin on `h1` elements within `section` and 29 | * `article` contexts in Chrome, Firefox, and Safari. 30 | */ 31 | 32 | h1 { 33 | font-size: 2em; 34 | margin: 0.67em 0; 35 | } 36 | 37 | /* Grouping content 38 | ========================================================================== */ 39 | 40 | /** 41 | * 1. Add the correct box sizing in Firefox. 42 | * 2. Show the overflow in Edge and IE. 43 | */ 44 | 45 | hr { 46 | box-sizing: content-box; /* 1 */ 47 | height: 0; /* 1 */ 48 | overflow: visible; /* 2 */ 49 | } 50 | 51 | /** 52 | * 1. Correct the inheritance and scaling of font size in all browsers. 53 | * 2. Correct the odd `em` font sizing in all browsers. 54 | */ 55 | 56 | pre { 57 | font-family: monospace, monospace; /* 1 */ 58 | font-size: 1em; /* 2 */ 59 | } 60 | 61 | /* Text-level semantics 62 | ========================================================================== */ 63 | 64 | /** 65 | * Remove the gray background on active links in IE 10. 66 | */ 67 | 68 | a { 69 | background-color: transparent; 70 | } 71 | 72 | /** 73 | * 1. Remove the bottom border in Chrome 57- 74 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 75 | */ 76 | 77 | abbr[title] { 78 | border-bottom: none; /* 1 */ 79 | text-decoration: underline; /* 2 */ 80 | text-decoration: underline dotted; /* 2 */ 81 | } 82 | 83 | /** 84 | * Add the correct font weight in Chrome, Edge, and Safari. 85 | */ 86 | 87 | b, 88 | strong { 89 | font-weight: bolder; 90 | } 91 | 92 | /** 93 | * 1. Correct the inheritance and scaling of font size in all browsers. 94 | * 2. Correct the odd `em` font sizing in all browsers. 95 | */ 96 | 97 | code, 98 | kbd, 99 | samp { 100 | font-family: monospace, monospace; /* 1 */ 101 | font-size: 1em; /* 2 */ 102 | } 103 | 104 | /** 105 | * Add the correct font size in all browsers. 106 | */ 107 | 108 | small { 109 | font-size: 80%; 110 | } 111 | 112 | /** 113 | * Prevent `sub` and `sup` elements from affecting the line height in 114 | * all browsers. 115 | */ 116 | 117 | sub, 118 | sup { 119 | font-size: 75%; 120 | line-height: 0; 121 | position: relative; 122 | vertical-align: baseline; 123 | } 124 | 125 | sub { 126 | bottom: -0.25em; 127 | } 128 | 129 | sup { 130 | top: -0.5em; 131 | } 132 | 133 | /* Embedded content 134 | ========================================================================== */ 135 | 136 | /** 137 | * Remove the border on images inside links in IE 10. 138 | */ 139 | 140 | img { 141 | border-style: none; 142 | } 143 | 144 | /* Forms 145 | ========================================================================== */ 146 | 147 | /** 148 | * 1. Change the font styles in all browsers. 149 | * 2. Remove the margin in Firefox and Safari. 150 | */ 151 | 152 | button, 153 | input, 154 | optgroup, 155 | select, 156 | textarea { 157 | font-family: inherit; /* 1 */ 158 | font-size: 100%; /* 1 */ 159 | line-height: 1.15; /* 1 */ 160 | margin: 0; /* 2 */ 161 | } 162 | 163 | /** 164 | * Show the overflow in IE. 165 | * 1. Show the overflow in Edge. 166 | */ 167 | 168 | button, 169 | input { /* 1 */ 170 | overflow: visible; 171 | } 172 | 173 | /** 174 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 175 | * 1. Remove the inheritance of text transform in Firefox. 176 | */ 177 | 178 | button, 179 | select { /* 1 */ 180 | text-transform: none; 181 | } 182 | 183 | /** 184 | * Correct the inability to style clickable types in iOS and Safari. 185 | */ 186 | 187 | button, 188 | [type="button"], 189 | [type="reset"], 190 | [type="submit"] { 191 | -webkit-appearance: button; 192 | } 193 | 194 | /** 195 | * Remove the inner border and padding in Firefox. 196 | */ 197 | 198 | button::-moz-focus-inner, 199 | [type="button"]::-moz-focus-inner, 200 | [type="reset"]::-moz-focus-inner, 201 | [type="submit"]::-moz-focus-inner { 202 | border-style: none; 203 | padding: 0; 204 | } 205 | 206 | /** 207 | * Restore the focus styles unset by the previous rule. 208 | */ 209 | 210 | button:-moz-focusring, 211 | [type="button"]:-moz-focusring, 212 | [type="reset"]:-moz-focusring, 213 | [type="submit"]:-moz-focusring { 214 | outline: 1px dotted ButtonText; 215 | } 216 | 217 | /** 218 | * Correct the padding in Firefox. 219 | */ 220 | 221 | fieldset { 222 | padding: 0.35em 0.75em 0.625em; 223 | } 224 | 225 | /** 226 | * 1. Correct the text wrapping in Edge and IE. 227 | * 2. Correct the color inheritance from `fieldset` elements in IE. 228 | * 3. Remove the padding so developers are not caught out when they zero out 229 | * `fieldset` elements in all browsers. 230 | */ 231 | 232 | legend { 233 | box-sizing: border-box; /* 1 */ 234 | color: inherit; /* 2 */ 235 | display: table; /* 1 */ 236 | max-width: 100%; /* 1 */ 237 | padding: 0; /* 3 */ 238 | white-space: normal; /* 1 */ 239 | } 240 | 241 | /** 242 | * Add the correct vertical alignment in Chrome, Firefox, and Opera. 243 | */ 244 | 245 | progress { 246 | vertical-align: baseline; 247 | } 248 | 249 | /** 250 | * Remove the default vertical scrollbar in IE 10+. 251 | */ 252 | 253 | textarea { 254 | overflow: auto; 255 | } 256 | 257 | /** 258 | * 1. Add the correct box sizing in IE 10. 259 | * 2. Remove the padding in IE 10. 260 | */ 261 | 262 | [type="checkbox"], 263 | [type="radio"] { 264 | box-sizing: border-box; /* 1 */ 265 | padding: 0; /* 2 */ 266 | } 267 | 268 | /** 269 | * Correct the cursor style of increment and decrement buttons in Chrome. 270 | */ 271 | 272 | [type="number"]::-webkit-inner-spin-button, 273 | [type="number"]::-webkit-outer-spin-button { 274 | height: auto; 275 | } 276 | 277 | /** 278 | * 1. Correct the odd appearance in Chrome and Safari. 279 | * 2. Correct the outline style in Safari. 280 | */ 281 | 282 | [type="search"] { 283 | -webkit-appearance: textfield; /* 1 */ 284 | outline-offset: -2px; /* 2 */ 285 | } 286 | 287 | /** 288 | * Remove the inner padding in Chrome and Safari on macOS. 289 | */ 290 | 291 | [type="search"]::-webkit-search-decoration { 292 | -webkit-appearance: none; 293 | } 294 | 295 | /** 296 | * 1. Correct the inability to style clickable types in iOS and Safari. 297 | * 2. Change font properties to `inherit` in Safari. 298 | */ 299 | 300 | ::-webkit-file-upload-button { 301 | -webkit-appearance: button; /* 1 */ 302 | font: inherit; /* 2 */ 303 | } 304 | 305 | /* Interactive 306 | ========================================================================== */ 307 | 308 | /* 309 | * Add the correct display in Edge, IE 10+, and Firefox. 310 | */ 311 | 312 | details { 313 | display: block; 314 | } 315 | 316 | /* 317 | * Add the correct display in all browsers. 318 | */ 319 | 320 | summary { 321 | display: list-item; 322 | } 323 | 324 | /* Misc 325 | ========================================================================== */ 326 | 327 | /** 328 | * Add the correct display in IE 10+. 329 | */ 330 | 331 | template { 332 | display: none; 333 | } 334 | 335 | /** 336 | * Add the correct display in IE 10. 337 | */ 338 | 339 | [hidden] { 340 | display: none; 341 | } 342 | -------------------------------------------------------------------------------- /resources/_gen/assets/scss/src/styles/styles.scss_6e769e1f8b8c9ae08c3b967a8651114c.content: -------------------------------------------------------------------------------- 1 | .chroma{background-color:#f0f0f0}.chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}.chroma .lntable{border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block}.chroma .hl{display:block;width:100%;background-color:#ffffcc}.chroma .lnt{margin-right:0.4em;padding:0 0.4em 0 0.4em}.chroma .ln{margin-right:0.4em;padding:0 0.4em 0 0.4em}.chroma .k{color:#007020;font-weight:bold}.chroma .kc{color:#007020;font-weight:bold}.chroma .kd{color:#007020;font-weight:bold}.chroma .kn{color:#007020;font-weight:bold}.chroma .kp{color:#007020}.chroma .kr{color:#007020;font-weight:bold}.chroma .kt{color:#902000}.chroma .na{color:#4070a0}.chroma .nb{color:#007020}.chroma .nc{color:#0e84b5;font-weight:bold}.chroma .no{color:#60add5}.chroma .nd{color:#555555;font-weight:bold}.chroma .ni{color:#d55537;font-weight:bold}.chroma .ne{color:#007020}.chroma .nf{color:#06287e}.chroma .nl{color:#002070;font-weight:bold}.chroma .nn{color:#0e84b5;font-weight:bold}.chroma .nt{color:#062873;font-weight:bold}.chroma .nv{color:#bb60d5}.chroma .s{color:#4070a0}.chroma .sa{color:#4070a0}.chroma .sb{color:#4070a0}.chroma .sc{color:#4070a0}.chroma .dl{color:#4070a0}.chroma .sd{color:#4070a0;font-style:italic}.chroma .s2{color:#4070a0}.chroma .se{color:#4070a0;font-weight:bold}.chroma .sh{color:#4070a0}.chroma .si{color:#70a0d0;font-style:italic}.chroma .sx{color:#c65d09}.chroma .sr{color:#235388}.chroma .s1{color:#4070a0}.chroma .ss{color:#517918}.chroma .m{color:#40a070}.chroma .mb{color:#40a070}.chroma .mf{color:#40a070}.chroma .mh{color:#40a070}.chroma .mi{color:#40a070}.chroma .il{color:#40a070}.chroma .mo{color:#40a070}.chroma .o{color:#666666}.chroma .ow{color:#007020;font-weight:bold}.chroma .c{color:#60a0b0;font-style:italic}.chroma .ch{color:#60a0b0;font-style:italic}.chroma .cm{color:#60a0b0;font-style:italic}.chroma .c1{color:#60a0b0;font-style:italic}.chroma .cs{color:#60a0b0;background-color:#fff0f0}.chroma .cp{color:#007020}.chroma .cpf{color:#007020}.chroma .gd{color:#a00000}.chroma .ge{font-style:italic}.chroma .gr{color:#ff0000}.chroma .gh{color:#000080;font-weight:bold}.chroma .gi{color:#00a000}.chroma .go{color:#888888}.chroma .gp{color:#c65d09;font-weight:bold}.chroma .gs{font-weight:bold}.chroma .gu{color:#800080;font-weight:bold}.chroma .gt{color:#0044dd}.chroma .gl{text-decoration:underline}.chroma .w{color:#bbbbbb}html,body{background-color:#fefefe;font-family:Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;height:100%;margin:0;text-rendering:optimizeLegibility}body{display:grid;grid-gap:1rem;grid-template-areas:"nav" "main" "footer";grid-template-columns:1fr;height:100%;grid-template-rows:5rem 1fr 3rem}@media screen and (max-width: 800px){body{grid-template-rows:5rem 1fr 5rem}}body a{color:#39f;text-decoration:none}body a:hover,body a:active,body a:visited{text-decoration:underline}body nav{grid-area:nav}body main{grid-area:main;justify-self:center;grid-column:1 / -1;max-width:80rem !important;padding-bottom:3rem !important;padding-top:3rem !important}body main.home{align-items:center;display:flex;flex-direction:column;justify-content:center;text-align:center}body footer{grid-area:footer}body main article header{margin-bottom:5rem;text-align:center}body main article header time{color:silver}body main article section ins.adsbygoogle,body main article section video{margin:5rem auto}body main article section figure{margin:2.5rem 0}body main article section figure.full{left:50%;margin-left:-50vw;margin-right:-50vw;position:relative;right:50%;width:100vw}body main article section figure img{display:block;height:auto;margin:0 auto;max-width:100%;padding:0}body main article section figure img.full{left:50%;margin-left:-50vw;margin-right:-50vw;position:relative;right:50%;width:100vw}body main article section figure figcaption{text-align:center}body main article section table tbody tr td[align="left"]{text-align:left}body main article section table tbody tr td[align="right"]{text-align:right}body main article section table tbody tr td[align="center"]{text-align:center}body main article section pre{border-left:0.3rem solid #39f;display:grid}body main article section pre code{background-color:transparent;min-width:0}body main article section .gist{width:100%}body main article section .gist table{table-layout:fixed}body main article section .gist td.js-line-number{width:50px;text-align:center}body main article section iframe.instagram-media{margin-left:auto !important;margin-right:auto !important}body main article section img{display:block;height:auto;margin:2.5rem auto;max-width:100%;padding:0}body main article section img.full{left:50%;margin-left:-50vw;margin-right:-50vw;position:relative;right:50%;width:100vw}body main article section p code{background-color:#f8f8f8;color:#f0506e;white-space:normal;overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}body main article section ul.task-list{list-style:none;padding:0}body main article section ol{list-style:decimal}body main article section video{display:block;width:100%}body main article section .embed-container{height:0;max-width:100%;overflow:hidden;padding-bottom:56.25%;position:relative}body main article section .embed-container embed,body main article section .embed-container iframe,body main article section .embed-container object{height:100%;left:0;position:absolute;top:0;width:100%}body main article section .speakerdeck{margin-left:auto !important;margin-right:auto !important}body main article section .twitter-tweet{margin-left:auto !important;margin-right:auto !important}@media (max-width: 550px){body main article section .twitter-tweet{width:0 !important}}body main article footer{text-align:center}body main article footer .meta .tags a span{color:silver}body main article footer #disqus_thread{margin-left:auto !important;margin-right:auto !important}ul.posts-list{list-style:none}ul.posts-list li .date{color:silver;font-size:0.8em;display:block}ul.posts-list li .lang{color:silver;font-size:0.7em;text-transform:uppercase}ul.posts-list li .lang a{color:silver;text-decoration:none}ul.posts-list li .lang a:hover,ul.posts-list li .lang a:active,ul.posts-list li .lang a:visited{text-decoration:underline}body>footer{align-items:right;color:#000;display:flex;font-size:0.8em;justify-content:space-between;padding:0.5rem;text-align:center}body>footer p{margin-bottom:0}@media screen and (max-width: 800px){body>footer{flex-direction:column}body>footer p:first-of-type{margin-bottom:0.1rem}body>footer p:last-of-type{margin-top:0.1rem}}body main .homepage-avatar{border-radius:50%;margin-bottom:2rem}body nav{align-items:center;background-color:#f4f5f6;color:#000;display:flex;height:5rem;justify-content:space-between;left:0;padding:0.1rem 1rem;position:fixed;right:0;top:0;z-index:10;border-bottom:.1rem solid #d1d1d1}body nav a{color:#000;text-decoration:none}body nav a:hover,body nav a:active,body nav a:visited{text-decoration:none}body nav.animated{animation-duration:0.5s;animation-fill-mode:both;will-change:transform, opacity}body nav.animated.slideDown{animation-name:slideDown}body nav.animated.slideUp{animation-name:slideUp}@-webkit-keyframes slideUp{0%{-webkit-transform:translateY(0)}100%{-webkit-transform:translateY(-100%)}}@-moz-keyframes slideUp{0%{-moz-transform:translateY(0)}100%{-moz-transform:translateY(-100%)}}@-o-keyframes slideUp{0%{-o-transform:translateY(0)}100%{-o-transform:translateY(-100%)}}@keyframes slideUp{0%{transform:translateY(0)}100%{transform:translateY(-100%)}}@-webkit-keyframes slideDown{0%{-webkit-transform:translateY(-100%)}100%{-webkit-transform:translateY(0)}}@-moz-keyframes slideDown{0%{-moz-transform:translateY(-100%)}100%{-moz-transform:translateY(0)}}@-o-keyframes slideDown{0%{-o-transform:translateY(-100%)}100%{-o-transform:translateY(0)}}@keyframes slideDown{0%{transform:translateY(-100%)}100%{transform:translateY(0)}} 2 | 3 | /*# sourceMappingURL=styles.css.map */ -------------------------------------------------------------------------------- /exampleSite/content/posts/2014/goisforlovers.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "(Hu)go Template Primer" 3 | description = "" 4 | tags = [ 5 | "go", 6 | "golang", 7 | "templates", 8 | "themes", 9 | "development", 10 | ] 11 | date = "2014-04-02" 12 | categories = [ 13 | "Development", 14 | "golang", 15 | ] 16 | menu = "main" 17 | +++ 18 | 19 | Hugo uses the excellent [go][] [html/template][gohtmltemplate] library for 20 | its template engine. It is an extremely lightweight engine that provides a very 21 | small amount of logic. In our experience that it is just the right amount of 22 | logic to be able to create a good static website. If you have used other 23 | template systems from different languages or frameworks you will find a lot of 24 | similarities in go templates. 25 | 26 | This document is a brief primer on using go templates. The [go docs][gohtmltemplate] 27 | provide more details. 28 | 29 | ## Introduction to Go Templates 30 | 31 | Go templates provide an extremely simple template language. It adheres to the 32 | belief that only the most basic of logic belongs in the template or view layer. 33 | One consequence of this simplicity is that go templates parse very quickly. 34 | 35 | A unique characteristic of go templates is they are content aware. Variables and 36 | content will be sanitized depending on the context of where they are used. More 37 | details can be found in the [go docs][gohtmltemplate]. 38 | 39 | ## Basic Syntax 40 | 41 | Go lang templates are html files with the addition of variables and 42 | functions. 43 | 44 | **Go variables and functions are accessible within {{ }}** 45 | 46 | Accessing a predefined variable "foo": 47 | 48 | {{ foo }} 49 | 50 | **Parameters are separated using spaces** 51 | 52 | Calling the add function with input of 1, 2: 53 | 54 | {{ add 1 2 }} 55 | 56 | **Methods and fields are accessed via dot notation** 57 | 58 | Accessing the Page Parameter "bar" 59 | 60 | {{ .Params.bar }} 61 | 62 | **Parentheses can be used to group items together** 63 | 64 | {{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }} 65 | 66 | 67 | ## Variables 68 | 69 | Each go template has a struct (object) made available to it. In hugo each 70 | template is passed either a page or a node struct depending on which type of 71 | page you are rendering. More details are available on the 72 | [variables](/layout/variables) page. 73 | 74 | A variable is accessed by referencing the variable name. 75 | 76 | {{ .Title }} 77 | 78 | Variables can also be defined and referenced. 79 | 80 | {{ $address := "123 Main St."}} 81 | {{ $address }} 82 | 83 | 84 | ## Functions 85 | 86 | Go template ship with a few functions which provide basic functionality. The go 87 | template system also provides a mechanism for applications to extend the 88 | available functions with their own. [Hugo template 89 | functions](/layout/functions) provide some additional functionality we believe 90 | are useful for building websites. Functions are called by using their name 91 | followed by the required parameters separated by spaces. Template 92 | functions cannot be added without recompiling hugo. 93 | 94 | **Example:** 95 | 96 | {{ add 1 2 }} 97 | 98 | ## Includes 99 | 100 | When including another template you will pass to it the data it will be 101 | able to access. To pass along the current context please remember to 102 | include a trailing dot. The templates location will always be starting at 103 | the /layout/ directory within Hugo. 104 | 105 | **Example:** 106 | 107 | {{ template "chrome/header.html" . }} 108 | 109 | 110 | ## Logic 111 | 112 | Go templates provide the most basic iteration and conditional logic. 113 | 114 | ### Iteration 115 | 116 | Just like in go, the go templates make heavy use of range to iterate over 117 | a map, array or slice. The following are different examples of how to use 118 | range. 119 | 120 | **Example 1: Using Context** 121 | 122 | {{ range array }} 123 | {{ . }} 124 | {{ end }} 125 | 126 | **Example 2: Declaring value variable name** 127 | 128 | {{range $element := array}} 129 | {{ $element }} 130 | {{ end }} 131 | 132 | **Example 2: Declaring key and value variable name** 133 | 134 | {{range $index, $element := array}} 135 | {{ $index }} 136 | {{ $element }} 137 | {{ end }} 138 | 139 | ### Conditionals 140 | 141 | If, else, with, or, & and provide the framework for handling conditional 142 | logic in Go Templates. Like range, each statement is closed with `end`. 143 | 144 | 145 | Go Templates treat the following values as false: 146 | 147 | * false 148 | * 0 149 | * any array, slice, map, or string of length zero 150 | 151 | **Example 1: If** 152 | 153 | {{ if isset .Params "title" }}

{{ index .Params "title" }}

{{ end }} 154 | 155 | **Example 2: If -> Else** 156 | 157 | {{ if isset .Params "alt" }} 158 | {{ index .Params "alt" }} 159 | {{else}} 160 | {{ index .Params "caption" }} 161 | {{ end }} 162 | 163 | **Example 3: And & Or** 164 | 165 | {{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}} 166 | 167 | **Example 4: With** 168 | 169 | An alternative way of writing "if" and then referencing the same value 170 | is to use "with" instead. With rebinds the context `.` within its scope, 171 | and skips the block if the variable is absent. 172 | 173 | The first example above could be simplified as: 174 | 175 | {{ with .Params.title }}

{{ . }}

{{ end }} 176 | 177 | **Example 5: If -> Else If** 178 | 179 | {{ if isset .Params "alt" }} 180 | {{ index .Params "alt" }} 181 | {{ else if isset .Params "caption" }} 182 | {{ index .Params "caption" }} 183 | {{ end }} 184 | 185 | ## Pipes 186 | 187 | One of the most powerful components of go templates is the ability to 188 | stack actions one after another. This is done by using pipes. Borrowed 189 | from unix pipes, the concept is simple, each pipeline's output becomes the 190 | input of the following pipe. 191 | 192 | Because of the very simple syntax of go templates, the pipe is essential 193 | to being able to chain together function calls. One limitation of the 194 | pipes is that they only can work with a single value and that value 195 | becomes the last parameter of the next pipeline. 196 | 197 | A few simple examples should help convey how to use the pipe. 198 | 199 | **Example 1 :** 200 | 201 | {{ if eq 1 1 }} Same {{ end }} 202 | 203 | is the same as 204 | 205 | {{ eq 1 1 | if }} Same {{ end }} 206 | 207 | It does look odd to place the if at the end, but it does provide a good 208 | illustration of how to use the pipes. 209 | 210 | **Example 2 :** 211 | 212 | {{ index .Params "disqus_url" | html }} 213 | 214 | Access the page parameter called "disqus_url" and escape the HTML. 215 | 216 | **Example 3 :** 217 | 218 | {{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}} 219 | Stuff Here 220 | {{ end }} 221 | 222 | Could be rewritten as 223 | 224 | {{ isset .Params "caption" | or isset .Params "title" | or isset .Params "attr" | if }} 225 | Stuff Here 226 | {{ end }} 227 | 228 | 229 | ## Context (aka. the dot) 230 | 231 | The most easily overlooked concept to understand about go templates is that {{ . }} 232 | always refers to the current context. In the top level of your template this 233 | will be the data set made available to it. Inside of a iteration it will have 234 | the value of the current item. When inside of a loop the context has changed. . 235 | will no longer refer to the data available to the entire page. If you need to 236 | access this from within the loop you will likely want to set it to a variable 237 | instead of depending on the context. 238 | 239 | **Example:** 240 | 241 | {{ $title := .Site.Title }} 242 | {{ range .Params.tags }} 243 |
  • {{ . }} - {{ $title }}
  • 244 | {{ end }} 245 | 246 | Notice how once we have entered the loop the value of {{ . }} has changed. We 247 | have defined a variable outside of the loop so we have access to it from within 248 | the loop. 249 | 250 | # Hugo Parameters 251 | 252 | Hugo provides the option of passing values to the template language 253 | through the site configuration (for sitewide values), or through the meta 254 | data of each specific piece of content. You can define any values of any 255 | type (supported by your front matter/config format) and use them however 256 | you want to inside of your templates. 257 | 258 | 259 | ## Using Content (page) Parameters 260 | 261 | In each piece of content you can provide variables to be used by the 262 | templates. This happens in the [front matter](/content/front-matter). 263 | 264 | An example of this is used in this documentation site. Most of the pages 265 | benefit from having the table of contents provided. Sometimes the TOC just 266 | doesn't make a lot of sense. We've defined a variable in our front matter 267 | of some pages to turn off the TOC from being displayed. 268 | 269 | Here is the example front matter: 270 | 271 | ``` 272 | --- 273 | title: "Permalinks" 274 | date: "2013-11-18" 275 | aliases: 276 | - "/doc/permalinks/" 277 | groups: ["extras"] 278 | groups_weight: 30 279 | notoc: true 280 | --- 281 | ``` 282 | 283 | Here is the corresponding code inside of the template: 284 | 285 | {{ if not .Params.notoc }} 286 |
    287 | {{ .TableOfContents }} 288 |
    289 | {{ end }} 290 | 291 | 292 | 293 | ## Using Site (config) Parameters 294 | In your top-level configuration file (eg, `config.yaml`) you can define site 295 | parameters, which are values which will be available to you in chrome. 296 | 297 | For instance, you might declare: 298 | 299 | ```yaml 300 | params: 301 | CopyrightHTML: "Copyright © 2013 John Doe. All Rights Reserved." 302 | TwitterUser: "spf13" 303 | SidebarRecentLimit: 5 304 | ``` 305 | 306 | Within a footer layout, you might then declare a `