Browse Source

Fresh start

main
Jo Jerrica Decker 3 years ago
parent
commit
1884adf518
  1. 73
      CHANGELOG.md
  2. 9
      LICENSE.md
  3. 203
      README.md
  4. 16
      archetypes/blog.md
  5. 23
      archetypes/default.md
  6. 43
      assets/scss/hugo-toc.scss
  7. 20
      assets/scss/hyde-hyde.scss
  8. 140
      assets/scss/hyde-hyde/_base.scss
  9. 93
      assets/scss/hyde-hyde/_blog.scss
  10. 58
      assets/scss/hyde-hyde/_code.scss
  11. 56
      assets/scss/hyde-hyde/_gist.scss
  12. 27
      assets/scss/hyde-hyde/_list.scss
  13. 25
      assets/scss/hyde-hyde/_misc.scss
  14. 26
      assets/scss/hyde-hyde/_mixins.scss
  15. 66
      assets/scss/hyde-hyde/_navigation.scss
  16. 42
      assets/scss/hyde-hyde/_post.scss
  17. 53
      assets/scss/hyde-hyde/_print.scss
  18. 122
      assets/scss/hyde-hyde/_project.scss
  19. 162
      assets/scss/hyde-hyde/_responsive.scss
  20. 88
      assets/scss/hyde-hyde/_sidebar.scss
  21. 37
      assets/scss/hyde-hyde/_taxonomies.scss
  22. 88
      assets/scss/hyde-hyde/_theme.scss
  23. 119
      assets/scss/hyde-hyde/_variables.scss
  24. 78
      assets/scss/poole/_base.scss
  25. 78
      assets/scss/poole/_code.scss
  26. 15
      assets/scss/poole/_layout.scss
  27. 25
      assets/scss/poole/_masthead.scss
  28. 11
      assets/scss/poole/_message.scss
  29. 51
      assets/scss/poole/_pagination.scss
  30. 23
      assets/scss/poole/_poole.scss
  31. 67
      assets/scss/poole/_posts.scss
  32. 65
      assets/scss/poole/_syntax.scss
  33. 117
      assets/scss/poole/_type.scss
  34. 30
      assets/scss/poole/_variables.scss
  35. 2
      assets/scss/print.scss
  36. 31
      assets/scss/tocbot.scss
  37. 3
      exampleSite/.gitignore
  38. 77
      exampleSite/config.toml
  39. 17
      exampleSite/content/about.md
  40. 3
      exampleSite/content/portfolio/_index.md
  41. 10
      exampleSite/content/portfolio/dera.md
  42. BIN
      exampleSite/content/portfolio/dera.png
  43. 11
      exampleSite/content/portfolio/hyde-hyde.md
  44. BIN
      exampleSite/content/portfolio/hyde-hyde.png
  45. 10
      exampleSite/content/portfolio/laramod.md
  46. BIN
      exampleSite/content/portfolio/laramod.png
  47. 1147
      exampleSite/content/posts/creating-a-new-theme.md
  48. 343
      exampleSite/content/posts/goisforlovers.md
  49. 88
      exampleSite/content/posts/hugoisforlovers.md
  50. 154
      exampleSite/content/posts/migrate-from-jekyll.md
  51. 0
      exampleSite/layouts/.gitkeep
  52. 0
      exampleSite/static/.gitignore
  53. BIN
      exampleSite/static/img/hugo.png
  54. BIN
      images/main.png
  55. BIN
      images/mobile.png
  56. BIN
      images/portfolio.png
  57. BIN
      images/post.png
  58. BIN
      images/screenshot.png
  59. BIN
      images/tn.png
  60. 11
      layouts/404.html
  61. 11
      layouts/_default/baseof.html
  62. 11
      layouts/_default/list.html
  63. 13
      layouts/_default/single.html
  64. 14
      layouts/about/single.html
  65. 11
      layouts/blog/list.html
  66. 36
      layouts/index.html
  67. 53
      layouts/partials/blog/content.html
  68. 5
      layouts/partials/blog/footer.html
  69. 1
      layouts/partials/footer/font-awesome-js.html
  70. 20
      layouts/partials/header.html
  71. 1
      layouts/partials/header/custom.html
  72. 3
      layouts/partials/header/feeds.html
  73. 3
      layouts/partials/header/font-awesome-css.html
  74. 17
      layouts/partials/header/meta.html
  75. 10
      layouts/partials/header/styles-highlight.html
  76. 19
      layouts/partials/header/styles.html
  77. 2
      layouts/partials/header/web-fonts.html
  78. 18
      layouts/partials/highlight-js.html
  79. 6
      layouts/partials/page-list/content.html
  80. 5
      layouts/partials/page-list/footer.html
  81. 25
      layouts/partials/page-single/comment/commento.html
  82. 29
      layouts/partials/page-single/comment/disqus.html
  83. 10
      layouts/partials/page-single/comment/graphcomment.html
  84. 7
      layouts/partials/page-single/comment/utterances.html
  85. 52
      layouts/partials/page-single/content.html
  86. 25
      layouts/partials/page-single/footer.html
  87. 11
      layouts/partials/page-single/post-comment.html
  88. 34
      layouts/partials/page-single/post-meta.html
  89. 17
      layouts/partials/page-single/post-navigation.html
  90. 12
      layouts/partials/page-single/post-related.html
  91. 2
      layouts/partials/page-single/variables-deinit.html
  92. 2
      layouts/partials/page-single/variables-init.html
  93. 39
      layouts/partials/pagination.html
  94. 65
      layouts/partials/portfolio/content.html
  95. 5
      layouts/partials/portfolio/footer.html
  96. 10
      layouts/partials/posts-list.html
  97. 44
      layouts/partials/sidebar.html
  98. 15
      layouts/partials/sidebar/about.html
  99. 13
      layouts/partials/sidebar/copyright.html
  100. 27
      layouts/partials/sidebar/menu.html

73
CHANGELOG.md

@ -0,0 +1,73 @@
# Changelog
This changelog mainly documented some major changes, updates or fixes (with credits) for reference purposes. It by no means covers all contributors. Nonetheless, to the bottom of my heart, I truly appreciate all of your time and contributions.
__2018-11__
* Per PR [#56](https://github.com/htr3n/hyde-hyde/commit/5ed13e17400bbc09a342b60fd50cd9fe3e6f1525), Gravatar pics can be used exclusively to `.Site.Params.authorimage` via the parameter `.Site.Params.social.gravatar`
* ```toml
[params.social]
gravatar = "your.email@domain.com"
```
* Fix Hugo demo (issue [#53](https://github.com/htr3n/hyde-hyde/issues/53))
* Fix mobile header (PR [#51](https://github.com/htr3n/hyde-hyde/pull/51): credits to [@gamingrobot](https://github.com/gamingrobot))
* Add Utterances comments (PR [#50](https://github.com/htr3n/hyde-hyde/pull/50): credits to [@gamingrobot](https://github.com/gamingrobot))
__2018-10__
* Enable `hyde-hyde` to work directly with SCSSs instead of generated CSSs (PR [#45](https://github.com/htr3n/hyde-hyde/pull/45): credits to [@jd4no](https://github.com/jd4no))
* Patch potential vulnerabilities of `target="_blank"` (PR [#48](https://github.com/htr3n/hyde-hyde/pull/48): credits to [@gfrcsd](https://github.com/gfrcsd))
__2018-09__
* Add _Table of Contents_
* Configure using `.Site.Params.toc` with two possible value: "hugo" (using Hugo `{{ .TableOfContents }}`, and "tocbot" (using [Tocbot](https://tscanlin.github.io/tocbot/)), remove `.Site.Params.toc` to disable TOC
* Change [_layouts/partials/header/styles.html_](https://github.com/htr3n/hyde-hyde/blob/master/layouts/partials/header/styles.html) to check `.Site.Params.toc` and add the corresponding styles
* Change [_layouts/partials/page-single/content.html_](https://github.com/htr3n/hyde-hyde/blob/master/layouts/partials/page-single/content.html ) to add TOC per `.Site.Params.toc`
* Add styles [_static-src/scss/hugo-toc.scss_](https://github.com/htr3n/hyde-hyde/blob/v2.0.2/static-src/scss/hugo-toc.scss) and [_static-src/scss/tocbot.scss_](https://github.com/htr3n/hyde-hyde/blob/v2.0.2/static-src/scss/tocbot.scss) that generate `hugo-toc.css` and `tocbot.css`, respectively
* Tocbot can be configured in [_layouts/partials/page-single/footer.html_](layouts/partials/page-single/footer.html) with options as described in [its documentation](https://tscanlin.github.io/tocbot/#api)
__2018-07__
* Revise the shortcode ['fig.html'](https://github.com/htr3n/hyde-hyde/blob/master/layouts/shortcodes/fig.html)
* Rename `header/font-awesome.html` to `header/font-awesome-css.html` and adds [_footer/font-awesome-js.html_](https://github.com/htr3n/hyde-hyde/blob/master/layouts/partials/footer/font-awesome-js.html), uses Font-Awesome 5 deferred JavaScript loading to reduce CSS rendering blocking
* Refactor and consolidate all responsive breakpoints and creates a new style [_\_responsive.scss_](https://github.com/htr3n/hyde-hyde/blob/v2.0.1/static-src/scss/hyde-hyde/_responsive.scss)
* Refactor portfolio's projects into [_\_project.scss_](https://github.com/htr3n/hyde-hyde/blob/v2.0.1/static-src/scss/hyde-hyde/_project.scss)
* Refactor styles for a list of posts into [_\_list.scss_](https://github.com/htr3n/hyde-hyde/blob/v2.0.1/static-src/scss/hyde-hyde/_list.scss)
* Refactor misc. styles into [_\_misc.scss_](https://github.com/htr3n/hyde-hyde/blob/v2.0.1/static-src/scss/hyde-hyde/_misc.scss)
* Remove [_\_customised.scss_](https://github.com/htr3n/hyde-hyde/blob/v2.0.0/static-src/scss/hyde-hyde/_customised.scss)
__Version 2.0__
* The main styles are refactored and redeveloped using SCSS (see [_static-src/scss_](https://github.com/htr3n/hyde-hyde/tree/v2.0.0/static-src/scss))
and we no longer need `poole.css` and `hyde.css` because `hyde-hyde.scss` already incorporates relevant elements
* `Hyde-hyde` can be customised by changing SCSS styles in [_static-src/scss/hyde-hyde_](https://github.com/htr3n/hyde-hyde/tree/v2.0.0/static-src/scss/hyde-hyde) and layouts in [_layouts_](https://github.com/htr3n/hyde-hyde/tree/v2.0.0/layouts)
* To generate `hyde-hyde.css`, please use any SCSS compiler to compile the main file `hyde-hyde.scss`
* Restructure/modularise further the layouts (see [_layouts_](https://github.com/htr3n/hyde-hyde/tree/v2.0.0/layouts))
* Add '[_Portfolio_](https://github.com/htr3n/hyde-hyde/tree/v2.0.0/layouts/portfolio)' page inspired by Xiaoying Riley ([@3rdwave_themes](https://twitter.com/3rdwave_themes)) [Developer-Theme](https://github.com/xriley/developer-theme)
* Change the main body font to use system fonts (see [_\_variables.scss_](https://github.com/htr3n/hyde-hyde/tree/v2.0.0/static-src/scss/hyde-hyde/_variables.scss))
* In case you prefer Web fonts, just include the template "[web-fonts.html](https://github.com/htr3n/hyde-hyde/tree/v2.0.0/layouts/partials/header/web-fonts.html)" to "[header.html](https://github.com/htr3n/hyde-hyde/tree/v2.0.0/layouts/partials/header.html)"
* Switch to main fixed width font [Source Code Pro](https://fonts.google.com/specimen/Source+Code+Pro)
* Add OpenGraph and TwitterCard templates (for SEO)
* Add '_Related Articles_' (see [_layouts/partials/post-related.html_](https://github.com/htr3n/hyde-hyde/tree/v2.0.0/layouts/partials/post-related.html))
* Add page navigation _NEXT / PREVIOUS_
* Switch datetime format to `"Jan 02 '06"` in the list of posts (see [_layouts/partials/post-list.html_](https://github.com/htr3n/hyde-hyde/tree/v2.0.0/layouts/partials/post-list.html)) to save some space
* Change styles for links, tags, text
* Add some handy shortcodes for `<kbd></kbd>` and `<blockquote></blockquote>`
* The License under '_Some Rights Reversed_' in the sidebar is switched from [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/) to [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/).
__Version 1.0__
* Color tones and layouts are inspired by [Nate Finch's blog](https://npf.io)
* Restructure/modularise the layouts (see [`layouts/_default/baseof.html`](https://github.com/htr3n/hyde-hyde/tree/v1.0.0/layouts/_default/baseof.html), [`layouts/_default/single.html`](https://github.com/htr3n/hyde-hyde/tree/v1.0.0/layouts/_default/single.html), [`layouts/_default/list.html`](https://github.com/htr3n/hyde-hyde/tree/v1.0.0/layouts/_default/list.html) and [`layouts/partials`](https://github.com/htr3n/hyde-hyde/tree/v1.0.0/layouts/partials/))
* Use [highlight.js](https://highlightjs.org) for code highlighting
* Use [Font-Awesome 5](https://fontawesome.com)'s icons
* Use main font [Fira-Sans](https://fonts.google.com/specimen/Fira+Sans) + fixed width font [Roboto Mono](https://fonts.google.com/specimen/Roboto+Mono)
* Add [GraphComment](https://graphcomment.com) for replacing the built-in [Disqus](https://disqus.com)
* Fork from [Hyde](https://github.com/spf13/hyde)
* Refactor `basedof.html` and corresponding pages `index.html`, `single.html`, `list.html`
- define blocks `content` and `footer` that will be fulfilled by each different type of layout.

9
LICENSE.md

@ -0,0 +1,9 @@
# Released under MIT License
Copyright (c) 2018 Huy Tran.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

203
README.md

@ -1,3 +1,202 @@
# hyde-decker
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](https://github.com/htr3n/hyde-hyde/blob/master/LICENSE.md) ![GitHub release](https://img.shields.io/github/release/htr3n/hyde-hyde.svg) ![GitHub stars](https://img.shields.io/github/stars/htr3n/hyde-hyde.svg) ![GitHub forks](https://img.shields.io/github/forks/htr3n/hyde-hyde.svg) ![GitHub issues](https://img.shields.io/github/issues/htr3n/hyde-hyde.svg) ![GitHub issues closed](https://img.shields.io/github/issues-closed/htr3n/hyde-hyde.svg)
Fork of the Hugo theme hyde-hyde that introduces some necessary cleanup and changes.
# Hyde-hyde
__`Hyde-hyde`__ is a [Hugo](https://gohugo.io)'s theme inspired and derived from @spf13's [Hyde](https://github.com/spf13/hyde.git) and [Nate Finch's blog](https://npf.io).
> NOTICE: Maintainers / collaborators seeking: As I'm underwater with my full time job at the moment, I'm actively looking for and welcome any new maintainers or collaborators. If you are interested, comment on [#130](https://github.com/htr3n/hyde-hyde/issues/130) and I can add you to the project. TIA.
## Breaking Changes
Since version 2.0, __`hyde-hyde`__ has been overhauled and, therefore, might cause some disruptions.
* The main styles are refactored and redeveloped using SCSS (see [_assets/scss_](https://github.com/htr3n/hyde-hyde/blob/master/assets/scss)), `poole.css` and `hyde.css` are no longer needed because `hyde-hyde.scss` already incorporates relevant elements (I still keep them there for reference purpose)
* Per PR [#45 by [@jd4no](https://github.com/jd4no), `hyde-hyde` can use SCSSs directly in the templates instead of the generated CSSs. The generated CSSs and the generated resources are still kept in `hyde-hyde` in order to ensure the demo on [Hugo theme site](https://themes.gohugo.io) working.
* The layouts have been heavily restructured and modularised further (see [_layouts_](https://github.com/htr3n/hyde-hyde/blob/master/layouts))
* Adding '[_Portfolio_](https://github.com/htr3n/hyde-hyde/blob/master/layouts/portfolio)' page inspired by Xiaoying Riley (@3rdwave_themes) [Developer-Theme](https://github.com/xriley/developer-theme)
* Switching to use system fonts instead of Web fonts (e.g. privacy issues)
* Experimenting a collapsible menu in mobile mode
* Adding _Table of Contents_
* Configure using `.Site.Params.toc` with two possible value: "hugo" (using Hugo `{{ .TableOfContents }}`, and "tocbot" (using [Tocbot](https://tscanlin.github.io/tocbot/)), remove `.Site.Params.toc` to disable TOC
* Tocbot can be configured in [layouts/partials/page-single/footer.html](layouts/partials/page-single/footer.html) with options as described in [its documentation](https://tscanlin.github.io/tocbot/#api)
For more details, please refer to [CHANGELOG](https://github.com/htr3n/hyde-hyde/blob/master/CHANGELOG.md). A real site in action can be found [here](https://htr3n.github.io) and its [WIP source](https://github.com/htr3n/htr3n-blog) for reference.
## Usage
### Installation
__`Hyde-hyde`__ can be easily installed as many other Hugo themes:
```sh
$ cd HUGO_PROJECT
# then either clone hyde-hyde
$ git clone https://github.com/htr3n/hyde-hyde.git themes/hyde-hyde
# or just add hyde-hyde as a submodule
$ git submodule add https://github.com/htr3n/hyde-hyde.git themes/hyde-hyde
```
After that, choose `hyde-hyde` as the main theme.
* `config.toml`
```toml
theme = "hyde-hyde"
```
* `config.yaml`
```yaml
theme : "hyde-hyde"
```
That's all. You can render your site using `hugo` and see `hyde-hyde` in action.
### Options
__`Hyde-hyde`__ essentially inherits most of Hyde's [options](https://github.com/spf13/hyde#options). There are some extra options though
* `highlightjs = true`: use [highlight.js](https://highlightjs.org) instead of Hugo built-in support for code highlighting
* `highlightjsstyle="highlight-style"`: only when `highlightjs = true`, please choose one of many _highlight.js_'s [styles](https://highlightjs.org/static/demo).
* Since [v2.0.1](https://github.com/htr3n/hyde-hyde/tree/v2.0.1), highlighting for each page can be fine-tuned in the front matter, for example
* `highlight = false` (default `true`)
* `highlightjslanguages = ["swift", "objectivec"]`
* `postNavigation = true|false` (default `true`): Setting to `false` will disable the navigation _Previous Post_/ _Next Post_
* `relatedPosts = false|true` (default `false`): Setting to `true` allows related posts. Please refer [here](https://gohugo.io/content-management/related) for more details on related contents with Hugo.
* `GraphCommentId = "your-graphcomment-id"`: to use [GraphComment](https://graphcomment.com) instead of the built-in [Disqus](https://disqus.com). This option should be used exclusively with `disqusShortname = "disqus-shortname"`.
* `UtterancesRepo = "owner/repo-name"`: to use [Utterances](https://utteranc.es/) instead of the built-in [Disqus](https://disqus.com). This option should be used exclusively with `disqusShortname = "disqus-shortname"`.
* `UtterancesIssueTerm = "pathname"` Method for Utterances to match issue's to posts (pathname, url, title, og:title)
* `UtterancesTheme = "github-light"` Theme for Utterances (github-light, github-dark)
* `Commento = true`: to use [Commento](https://commento.io/) instead of the built-in [Disqus](https://disqus.com). This option should be used exclusively with `disqusShortname = "disqus-shortname"`.
* `CommentoHost = "your-commento-instance"` [Self-hosted Commento](https://docs.commento.io/installation/self-hosting/) instance. This is not required if you're a [Commento.io](https://commento.io) user.
* `[params.social]`: in this section, you can set many social identities such as Twitter, Facebook, Github, Bitbucket, Gitlab, Instagram, LinkedIn, StackOverflow, Medium, Xing, Keybase.
```toml
[params.social]
twitter = "htr3n"
keybase = "htr3n"
github = "htr3n"
...
```
* `include_toc = false`: Setting to `false` in FrontMatter will disable too short TOC data as your want.
* Per PR [#56](https://github.com/htr3n/hyde-hyde/commit/5ed13e17400bbc09a342b60fd50cd9fe3e6f1525), Gravatar pics can be used exclusively to `.Site.Params.authorimage` via the parameter `.Site.Params.social.gravatar`
* ```toml
[params.social]
gravatar = "your.email@domain.com"
```
### Customisations
* Most of the customisable SCSS styles in [_assets/scss/hyde-hyde_](https://github.com/htr3n/hyde-hyde/blob/master/assets/scss/hyde-hyde) and Hugo templates in [_hyde-hyde/layouts_](https://github.com/htr3n/hyde-hyde/blob/master/layouts) are modularised and can be altered/adapted easily.
## Portfolio
Since version 2.0+, I added a portfolio page just in case. If you need it, simply add a menu section '_Portfolio_' in `config.toml` as following.
```toml
[[menu.main]]
name = "Portfolio"
identifier = "portfolio"
weight = xyz
url = "/portfolio/"
```
In the folder `content` , create a subfolder `portfolio` and use the following folder/content structure as reference.
```
$ tree portfolio
portfolio
├── _index.md
├── p1.md
├── p1.png
├── p2.md
├── p2.png
...
├── pn.md
└── pn.png
```
As I design the section _portfolio_ to be rendered as _list_, `_index.md` can be used to set the title for your portfolio (you can read more about `_index.md` [here](https://gohugo.io/content-management/organization/#index-pages-index-md)). For instance, when I want to set the title of my portfolio "_Projects_", the front matter of `_index.md` will be:
```markdown
---
title: 'Projects'
---
```
The remaining of `_index.md` will be ignored.
For each project, just create a Markdown file with the following parameters in the front matter:
```markdown
---
title: "Project P1's Title"
description: "A short description"
date: '2018-01-02'
link: 'https://project-p1.com'
screenshot: 'p1.png'
layout: 'portfolio'
featured: true
---
Here is a longer summary of the project. You can write as long as you wish.
```
> __Note__:
>
> * `date` is important to sort the project chronologically
> * `layout 'portfolio'` is important as you don't want your project's page appear in the list of posts in the main page of your Web site but only in the _Portfolio_ ;)
> * `featured: true` : when you want to show a project as featured project. It is default to `false`. Note that only one project should be marked `featured: true` , otherwise, the result could be random as [the Hugo template](https://github.com/htr3n/hyde-hyde/blob/master/layouts/partials/portfolio/content.html) will take the first one.
> * The body of the Markdown file will be the summary of the project.
If you want to adjust the portfolio page to your needs, please have a look at the [main template](https://github.com/htr3n/hyde-hyde/blob/master/layouts/portfolio/list.html), that uses this [partial template](https://github.com/htr3n/hyde-hyde/blob/master/layouts/partials/portfolio/content.html) and [this SCSS style](https://github.com/htr3n/hyde-hyde/blob/master/assets/scss/hyde-hyde/_project.scss).
### Posts in home page
By default hugo will show in your home page the most populated section.
This means that if you have more projects than posts, by default your home page will list your projects instead of your posts.
If you want to change this behaviour you can change the [mainsections](https://gohugo.io/functions/where/#mainsections).
For example, for the [exampleSite](https://github.com/htr3n/hyde-hyde/tree/master/exampleSite) this is how you should change the `config.toml` file:
```
[params]
mainSections = ["posts"]
```
## Some Screenshots
### Main page
![hyde-hyde main screen](https://github.com/htr3n/hyde-hyde/raw/master/images/main.png)
### A post
![A post in hyde-hyde](https://github.com/htr3n/hyde-hyde/raw/master/images/post.png)
### Portfolio
![Portfolio hyde-hyde](https://github.com/htr3n/hyde-hyde/raw/master/images/portfolio.png)
### Mobile Mode with Collapsible Menu
<img src='https://github.com/htr3n/hyde-hyde/raw/master/images/mobile.png' alt='hyde-hyde in mobile mode' width='60%'>
## Author(s)
* Original developed by [Mark Otto](https://github.com/mdo)
* Hugo's `hyde` ported by [Steve Francia](https://github.com/spf13)
## License
Open sourced under the [MIT license](LICENSE.md)

16
archetypes/blog.md

@ -0,0 +1,16 @@
---
title: "{{ replace .Name "-" " " | title }}"
description: ""
date: {{ .Date }}
tags : []
categories : []
layout: post
type: "post"
draft: true
slug: ""
---

23
archetypes/default.md

@ -0,0 +1,23 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
lastmod: {{ .Date }}
tags : [ "dev", "hugo", "hyde-hyde"]
categories : [ "dev" ]
layout: post
type: "post"
highlight: false
draft: true
---
**Insert Lead paragraph here.**
A augue nunc lacus auctor efficitur tempor placerat, dictum volutpat mi vitae viverra porta non sem, himenaeos senectus vivamus potenti cubilia sollicitudin. Curae cursus inceptos tincidunt magna mi nibh ad enim etiam, molestie eu quis primis hendrerit taciti phasellus. Feugiat ultricies dictumst iaculis potenti odio laoreet urna at, ultrices curae leo accumsan proin sem lobortis.
## Heading 2
Sollicitudin ornare odio blandit aenean enim lacus accumsan elementum vestibulum porta mauris lorem, ullamcorper class fermentum sem hendrerit ante augue penatibus scelerisque felis leo proin,ad nascetur venenatis sodales dignissim viverra suspendisse turpis convallis condimentum sapien.
### Heading 3
At quisque litora ullamcorper maecenas ultricies ut dignissim luctus curabitur, cras congue eget primis aliquam fringilla nulla dictum posuere, vestibulum sit magnis nisl praesent eros ipsum nunc. Ligula lacus ipsum orci aenean integer pharetra habitasse interdum, porttitor etiam hac feugiat placerat morbi posuere turpis leo, quam at amet gravida commodo fringilla erat.

43
assets/scss/hugo-toc.scss

@ -0,0 +1,43 @@
// Hugo {{ .TableOfContents }}
$toc-background-color: #eee;
$toc-font-size: .9rem;
.toc-wrapper {
font-size: $toc-font-size;
padding: 0.5em 0.5em 0.5em 0em;
background: $toc-background-color;
label {
background: url(/img/menu-close-dark.svg) no-repeat right center;
display: block;
cursor: pointer;
padding-left: 1em;
}
}
#TableOfContents {
overflow: hidden;
margin-top: 0;
max-height: 100%;
> ul {
list-style-type: none;
padding-left: 0;
> li ul {
list-style-type: none;
padding-left: 1em;
}
}
}
input#tocToggle {
display: none;
+ label {
font-weight: bold;
}
&:checked {
+ label {
background-image: url(/img/menu-open-dark.svg);
}
~ #TableOfContents {
max-height: 0;
}
}
}

20
assets/scss/hyde-hyde.scss

@ -0,0 +1,20 @@
@import "hyde-hyde/variables";
// poole
@import "poole/base";
@import "poole/layout";
@import "poole/posts";
// hyde-hyde
@import 'hyde-hyde/mixins';
@import 'hyde-hyde/base';
@import 'hyde-hyde/sidebar';
@import 'hyde-hyde/list';
@import 'hyde-hyde/post';
@import 'hyde-hyde/code';
@import 'hyde-hyde/gist';
@import 'hyde-hyde/navigation';
@import 'hyde-hyde/taxonomies';
@import 'hyde-hyde/project';
@import 'hyde-hyde/responsive';
@import 'hyde-hyde/misc';
@import 'hyde-hyde/theme';
@import 'hyde-hyde/blog';

140
assets/scss/hyde-hyde/_base.scss

@ -0,0 +1,140 @@
* {
box-sizing: border-box;
}
html {
-webkit-text-size-adjust: 100%; // for iOS
box-direction: normal;
font-family: $root-font-family;
font-size: $small-device-font-size;
line-height: $root-line-height;
font-weight: $root-font-weight;
}
html, body {
margin: 12;
padding: 0;
}
h1,
h2,
h3,
h4 {
font-weight: $heading-font-weight;
}
h1 {
font-size: $h1-font-size;
line-height: $h1-line-height;
margin-bottom: 1rem;
}
h2 {
font-size: $h2-font-size;
margin-bottom: .5rem;
}
h3 {
font-size: $h3-font-size;
}
h4 {
font-size: $h4-font-size;
}
h5 {
font-size: $h5-font-size;
}
figure {
max-width: 100%;
margin: 0;
padding: 0;
}
%quotebox {
padding: .8889rem;
margin-top: 1rem;
margin-left: 0px;
margin-right: 0px;
//border-radius: 6px;
border-left: 6px solid;
border-right: 6px solid transparent;
border-right-width: 6px;
border-right-style: solid;
border-right-color: rgba(0, 0, 0, 0) transparent;
color: #7a7a7a;
}
blockquote {
background-color: #fafafa;
border-left-color: #e6e6e6;
@extend %quotebox;
}
.important {
background-color: #fbf8e8;
border-left-color: #fee450;
@extend %quotebox;
}
.warning {
background-color: #f2dbdc;
border-left-color: #ae272f;
@extend %quotebox;
}
kbd {
font-family: $root-font-family;
padding: 2px 7px;
border: 1px solid $gray-4;
font-size: 0.8em;
line-height: 1.4;
background-color: #f3f3f3;
color: $gray-9;
box-shadow: 0 0 0 rgba(0, 0, 0, 0.2), 0 0 0 2px $white inset;
border-radius: 3px;
display: inline-block;
text-shadow: 0 1px 0 $white;
white-space: nowrap;
}
a {
//border-bottom: 1px dotted;
color: $link-color;
text-decoration: none;
word-wrap: break-word;
&.sidebar-nav-item {
&:hover {
@include link-no-decoration();
}
&:focus {
@include link-no-decoration();
}
}
&:focus {
@include link-hover();
&.tag {
@include link-no-decoration();
}
}
&:hover {
@include link-hover();
&.tag {
@include link-no-decoration();
}
}
&.tag {
@include link-no-decoration();
}
&.read-more-symbol {
text-decoration: none;
@include link-no-decoration();
}
}
.content {
padding-bottom: 2rem;
padding-top: 2rem;
}

93
assets/scss/hyde-hyde/_blog.scss

@ -0,0 +1,93 @@
.blog__content {
section {
margin-bottom: 1.765rem;
}
}
.blog__featured-post {
margin: 0 0 1.765rem;
img {
margin: 0 0 1rem;
box-shadow: 1px 1px $gray-2;
}
}
.blog__image {
border: 1px solid $gray-2;
box-shadow: 1px 1px $gray-2;
}
.blog__title {
margin-top: 1.765rem;
letter-spacing: 1px;
font-size: $blog__title-font-size;
}
%subtitle {
font-style: $blog__subtitle-font-style;
color: $blog__subtitle-color;
display: block;
margin-top: 0.5rem;
margin: 0 0 1rem;
}
.blog__subtitle-big {
@extend %subtitle;
font-size: $blog__subtitle-font-size-big;
}
.blog__subtitle-small {
@extend %subtitle;
font-size: $blog__subtitle-font-size-small;
}
.blog__featured-image {
position: relative;
}
.blog__summary {
margin-bottom: 1.765rem;
text-align: left;
}
.divider {
margin-bottom: 3.5rem;
}
.row-space {
margin-bottom: 1rem;
}
// only needs some pieces from Bootstrap
%col_extend {
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
position: relative;
}
.row {
margin-left: -15px;
margin-right: -15px;
}
.col-xs-12 {
width: 100%;
@extend %col_extend;
}
.col-sm-4 {
@extend %col_extend;
}
.col-md-4 {
@extend %col_extend;
}
.col-sm-8 {
@extend %col_extend;
}
.col-md-8 {
@extend %col_extend;
}
.img-responsive {
display: block;
max-width: 100%;
height: auto;
}

58
assets/scss/hyde-hyde/_code.scss

@ -0,0 +1,58 @@
pre {
//border: 1px solid $gray-1;
//border-radius: 2px;
tab-size: 2;
//width: 111%;
//margin-left: -11%;
//padding-left: 9%;
//padding-right: 2%;
//background: #29292e;
code {
white-space: pre-wrap;
}
}
%code-font {
font-family: $code-font-family;
font-size: $code-font-size;
}
%code-in-rounded-box {
border-radius: 4px;
padding: 2px 4px;
color: #bf616a;
background-color: #f9f2f4;
}
%code-style-codersblock {
padding: 2px 4px;
border: 1px dotted #adb5db;
background-color: $gray-1;
}
%code-style-npf {
padding: .1em .1em;
color: #ab5979;
border-radius: 3px;
}
a {
code {
color: $link-color;
}
}
code {
@extend %code-font;
@extend %code-style-npf;
}
// highlight.js
.hljs {
font-family: $code-font-family;
font-size: $code-fence-font-size;
line-height: $root-line-height;
white-space: pre;
border: 1px solid $gray-3;
border-radius: 4px;
}

56
assets/scss/hyde-hyde/_gist.scss

@ -0,0 +1,56 @@
// https://codersblock.com/blog/customizing-github-gists
/*
body .gist {
.gist-file {
margin-bottom: 0;
border-radius: 0;
}
.gist-data {
border-bottom: none;
border-radius: 0;
background-color: $gray-3;
}
.blob-wrapper {
border-radius: 0;
}
.highlight {
background-color: transparent;
font-family: Droid Sans Mono, monospace;
font-size: 14px;
td {
border: none;
padding: 5px 15px !important;
line-height: 1;
font-family: inherit;
font-size: inherit;
}
}
tr {
&:first-child td {
padding-top: 15px !important;
}
&:last-child td {
padding-bottom: 15px !important;
}
}
.blob-num {
color: #ced4da;
background-color: #495057;
pointer-events: none;
}
.gist-meta {
//display: none;
}
}
*/
body .gist {
.gist-data {
background-color: $gray-0;
}
.highlight {
background-color: transparent;
}
td {
border: none;
}
}

27
assets/scss/hyde-hyde/_list.scss

@ -0,0 +1,27 @@
// for the list of posts
.section__title {
font-size: $section__title-font-size;
}
.post-list__item {
margin-bottom: 3em;
}
.item__title--big {
display: block;
font-size: $item__title-big-font-size;
line-height: 1.25;
}
.item__title--small {
font-size: 1rem;
}
.item__date {
color: $item__date-color;
display: block;
font-size: $item__date-font-size;
margin-bottom: .2rem;
margin-top: .2rem;
}

25
assets/scss/hyde-hyde/_misc.scss

@ -0,0 +1,25 @@
// some misc styles
.element--center {
display: block;
margin-left: auto;
margin-right: auto;
}
.menu {
background-color: #f3f3f3;
color: #333;
border-radius: 2px;
padding: 1px 5px;
}
.text-center {
text-align: center;
}
.pull-right {
float: right;
}
.draft {
color: #999 !important;
}

26
assets/scss/hyde-hyde/_mixins.scss

@ -0,0 +1,26 @@
@mixin transform($string){
-webkit-transform: $string;
-moz-transform: $string;
-ms-transform: $string;
-o-transform: $string;
}
@mixin rotate($deg){
-webkit-transform: rotate($deg);
-moz-transform: rotate($deg);
-ms-transform: rotate($deg);
-o-transform: rotate($deg);
}
@mixin link-no-decoration() {
border-style: none;
text-decoration: none;
}
@mixin link-hover() {
color: $link-hover-color;
border-bottom: 1px dotted $gray-4;
text-decoration: none;
background: transparent;
background-color: transparent;
word-wrap: break-word;
}

66
assets/scss/hyde-hyde/_navigation.scss

@ -0,0 +1,66 @@
ul.pagination {
list-style: none;
li.page-item {
display: inline-block;
a {
padding: 0.05em 0.4em;
}
&.active {
a {
color: $navigation-color;
border-bottom: 3px solid $navigation-color;
}
}
}
}
.navigation {
max-width: calc(100% - 0px);
margin: 0 auto;
margin-top: 60px;
a {
font-size: 0.8rem;
display: flex;
align-items: center;
justify-content: center;
padding: 15px;
color: $navigation-color;
border: 2px solid $navigation-color;
line-height: 1.25;
text-transform: uppercase;
&:hover {
padding: 14px;
border-width: 3px;
}
&:nth-child(2) {
margin-top: 10px;
}
&:first-child:last-child {
width: 100%;
}
}
.fa {
font-size: 0.8rem;
}
.navigation-prev {
text-align: left;
.fa {
padding-right: 10px;
}
.navigation-tittle {
padding-left: 4px;
}
}
.navigation-next {
text-align: right;
.fa {
padding-left: 10px;
}
.navigation-tittle {
padding-right: 4px;
}
}
}
.navigation-single a {
text-transform: none;
}

42
assets/scss/hyde-hyde/_post.scss

@ -0,0 +1,42 @@
.post__meta {
font-size: $meta-font-size;
color: $meta-color;
font-weight: $meta-font-weight;
}
.post__category {
font-weight: bold;
}
.post__tag {
background: $tag-background-color;
border-radius: 2px;
color: $tag-color;
font-size: $tag-font-size;
font-weight: bold;
padding: 2px 6px;
}
.post__title {
background-image: -webkit-linear-gradient(left, $gradient-color-1, $gradient-color-2); /* For Chrome and Safari */
background-image: -moz-linear-gradient(left, $gradient-color-1, $gradient-color-2); /* For old Fx (3.6 to 15) */
background-image: -ms-linear-gradient(left, $gradient-color-1, $gradient-color-2); /* For pre-releases of IE 10*/
background-image: -o-linear-gradient(left, $gradient-color-1, $gradient-color-2); /* For old Opera (11.1 to 12.0) */
background-image: linear-gradient(to right, $gradient-color-1, $gradient-color-2); /* Standard syntax; must be last */
color:transparent;
-webkit-background-clip: text;
background-clip: text;
}
.post__subtitle {
display: block;
font-size: $post__subtitle-font-size;
font-style: italic;
padding: 0 0 1rem 0;
}
#references {
li {
font-size: 0.9rem;
}
}

53
assets/scss/hyde-hyde/_print.scss

@ -0,0 +1,53 @@
@page {
margin: 1cm !important;
}
body {
font-size: $small-device-font-size;
line-height: 1.3;
background: #fff;
color: #000;
}
.content {
margin: 0 auto;
width: 100%;
float: none;
display: initial;
}
.container {
width: 100%;
float: none;
display: initial;
padding-left: 1rem;
padding-right: 1rem;
margin: 0 auto;
}
img {
max-width: 100%;
}
blockquote,
ul {
margin: 0;
}
.sidebar {
display: none !important;
}
.navigation {
display: none !important;
}
.post__related {
display: none !important;
}
.gist-meta {
display: none !important;
}
#disqus_thread {
display: none !important;
}

122
assets/scss/hyde-hyde/_project.scss

@ -0,0 +1,122 @@
.portfolio__content {
section {
margin-bottom: 1.765rem;
}
}
.portfolio__featured-project {
margin: 0 0 1.765rem;
img {
margin: 0 0 1rem;
box-shadow: 1px 1px $gray-2;
}
}
.project__image {
border: 1px solid $gray-2;
box-shadow: 1px 1px $gray-2;
}
.project__first-screen {
display: block;
margin-left: auto;
margin-right: auto;
}
.project__additional-screens {
display: block;
margin-left: auto;
margin-right: auto;
}
.project__single-screen {
display: inline-block;
width: 48%;
}
.project__primary-screen {
width: 30%;
float: left;
margin-right: 1em;
}
.project__extra-screen {
float:left;
height:50%
}
.project__title {
margin-top: 1.765rem;
letter-spacing: 1px;
font-size: $project__title-font-size;
}
%subtitle {
font-style: $project__subtitle-font-style;
color: $project__subtitle-color;
display: block;
margin-top: 0.5rem;
margin: 0 0 1rem;
}
.project__subtitle-big {
@extend %subtitle;
font-size: $project__subtitle-font-size-big;
}
.project__subtitle-small {
@extend %subtitle;
font-size: $project__subtitle-font-size-small;
}
.project__featured-image {
position: relative;
}
.project__summary {
margin-bottom: 1.765rem;
text-align: left;
}
.divider {
margin-bottom: 3.5rem;
}
.row-space {
margin-bottom: 1rem;
}
// only needs some pieces from Bootstrap
%col_extend {
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
position: relative;
}
.row {
margin-left: -15px;
margin-right: -15px;
}
.col-xs-12 {
width: 100%;
@extend %col_extend;
}
.col-sm-4 {
@extend %col_extend;
}
.col-md-4 {
@extend %col_extend;
}
.col-sm-8 {
@extend %col_extend;
}
.col-md-8 {
@extend %col_extend;
}
.img-responsive {
display: block;
max-width: 100%;
height: auto;
}

162
assets/scss/hyde-hyde/_responsive.scss

@ -0,0 +1,162 @@
// mobile ~320..480px
// 320px ~ 16rem/16px ~ 18.8235/17px ~ 17.7778/18px
// 480px ~ 30rem/16px ~ 28.2353rem/17px ~ 26.6667rem/18px
@media (min-width: 320px) and (max-width: 767px) {
html,
body {
font-size: $small-device-font-size;
}
.sidebar {
li {
padding: .1rem 0;
}
.container {
padding-left: 0;
padding-right: 0;
}
}
.hidden-tablet {
display: none;
}
.sidebar-about,
.copyright {
display: none;
}
.sidebar {
margin: 0;
padding: 0;
}
.menu-content {
padding: 0 0 0 0px;
max-height: 0;
overflow: hidden;
margin-top: 0; }
.collapsible-menu {
padding: 0px 0px;
}
.collapsible-menu ul {
list-style-type: none;
padding: 0;
}
.collapsible-menu li {
display: block;
}
.collapsible-menu a {
text-decoration: none;
cursor: pointer; }
.collapsible-menu label {
background: url(/img/menu-open.svg) no-repeat left center;
background-position: 1.5rem;
display: block;
cursor: pointer;
color: #fff;
padding: 10px 0 10px 0px; }
input#menuToggle {
display: none;
}
input#menuToggle + label {
font-weight: bold;
}
input#menuToggle:checked + label {
background-image: url(/img/menu-close.svg);
background-position: 1.5rem;
color: #fff;
}
input#menuToggle:checked ~ .menu-content {
max-height: 100% !important;
}
.social {
padding: 1em 0 1em 0;
}
}
// tablet/medium device ~768px+
// 768px ~ 48em/16px ~ 45.1765em/17px ~ 42.6667/18px
@media (min-width: 768px) {
html,
body {
font-size: $small-device-font-size;
}
.sidebar {
bottom: 0;
left: 0;
position: fixed;
text-align: left;
top: 0;
width: $sidebar-width;
}
.sidebar-sticky {
left: 1rem;
position: absolute;
right: 1rem;
top: 1rem;
}
.content {
margin-left: $content-margin-left;
margin-right: $content-margin-right;
max-width: $content-max-width;
}
.layout-reverse {
.sidebar {
left: auto;
right: 0;
}
.content {
margin-left: $content-margin-right;
margin-right: $content-margin-left;
}
}
.col-sm-8 {
width: 66.66666667%;
}
.project__title {
margin-top: 0.2rem;
}
.navigation {
display: flex;
justify-content: space-between;
a {
width: calc(50% - 10px);
&:nth-child(2) {
margin-top: 0;
}
}
}
input#menuToggle,
input#menuToggle + label {
display: none;
}
}
// Large devices (laptops/desktops, 992px and up)
// ~ 62rem/16px ~ 58.3529rem/17px ~ 55.1111rem/18px
@media (min-width: 992px) {
html,
body {
font-size: $large-device-font-size;
}
.layout-reverse .content {
margin-left: 4rem;
margin-right: 22rem;
}
.col-md-4 {
float: left;
width: 33.33333333%;
}
.col-md-8 {
float: left;
width: 66.66666667%;
}
.portfolio-container {
width: 68rem;
}
}
// Large device ~1024px
// 1024px ~ 64rem/16px ~ 60.2353rem/17px 56.8889rem/18px
@media (min-width: 1024px) {
// styles
}

88
assets/scss/hyde-hyde/_sidebar.scss

@ -0,0 +1,88 @@
.sidebar {
background-color: $sidebar-color;
color: rgb(255, 255, 255);
color: rgba(255, 255, 255, 0.5);
padding: 2rem 1rem;
text-align: center;
a {
color: $gray-1;
border: none;
&:hover {
color: $link-color;
}
&:focus {
color: $link-color;
}
}
.sidebar-about {
text-align: center;
}
.author-image {
display: block;
margin-top: 4px;
}
}
.sidebar-nav {
text-align: center;
list-style: none;
margin-bottom: 2rem;
margin-top: 2rem;
padding-left: 0;
}
.sidebar-nav-item {
display: block;
line-height: 1.75;
.active {
font-weight: bold;
}
}
.site__title {
font-size: $site__title-font-size;
margin-bottom: 0.5rem;
a:hover {
border: none;
}
}
.site__description {
font-size: 1.285rem;
font-weight: 300;
}
.social {
text-align: center;
a {
padding: 0 4px;
@include link-no-decoration();
}
}
.img--circle {
border-radius: 50%;
}
.img--headshot {
height: 115px;
width: 115px;
}
.img--caption {
font-style: italic;
}
%small-center-text {
font-size: $font-scale-dot7;
line-height: 1.1rem;
text-align: center;
}
.copyright {
padding-top: 1rem;
@extend %small-center-text;
}
.builtwith {
padding-top: .2rem;
@extend %small-center-text;
}

37
assets/scss/hyde-hyde/_taxonomies.scss

@ -0,0 +1,37 @@
.badge-category,
a.badge-category {
color: #fff !important;
background-color: #0088cc;
&:hover, &:focus {
color: #0088cc !important;
background: transparent;
background-color: transparent;
text-decoration: none;
border-bottom: none;
}
}
.badge-tag,
a.badge-tag {
color: #fff !important;
background-color: #7766cc;
&:hover, &:focus {
color: #7766cc !important;
background: transparent;
background-color: transparent;
text-decoration: none;
border-bottom: none;
}
}
.badge {
display: inline-block;
padding: 0.25em 0.4em;
font-size: 0.75rem;
font-weight: bold;
line-height: 1;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: 0.25rem;
}

88
assets/scss/hyde-hyde/_theme.scss

@ -0,0 +1,88 @@
.theme-base-08 {
.sidebar {
background-color: #ac4142;
}
.content a {
color: #ac4142;
}
.related-posts li a:hover {
color: #ac4142;
}
}
.theme-base-09 {
.sidebar {
background-color: #d28445;
}
.content a {
color: #d28445;
}
.related-posts li a:hover {
color: #d28445;
}
}
.theme-base-0a {
.sidebar {
background-color: #f4bf75;
}
.content a {
color: #f4bf75;
}
.related-posts li a:hover {
color: #f4bf75;
}
}
.theme-base-0b {
.sidebar {
background-color: #90a959;
}
.content a {
color: #90a959;
}
.related-posts li a:hover {
color: #90a959;
}
}
.theme-base-0c {
.sidebar {
background-color: #75b5aa;
}
.content a {
color: #75b5aa;
}
.related-posts li a:hover {
color: #75b5aa;
}
}
.theme-base-0d {
.sidebar {
background-color: #6a9fb5;
}
.content a {
color: #6a9fb5;
}
.related-posts li a:hover {
color: #6a9fb5;
}
}
.theme-base-0e {
.sidebar {
background-color: #aa759f;
}
.content a {
color: #aa759f;
}
.related-posts li a:hover {
color: #aa759f;
}
}
.theme-base-0f {
.sidebar {
background-color: #8f5536;
}
.content a {
color: #8f5536;
}
.related-posts li a:hover {
color: #8f5536;
}
}

119
assets/scss/hyde-hyde/_variables.scss

@ -0,0 +1,119 @@
$gray-0: #fafafa;
$gray-1: #f9f9f9;
$gray-2: #eee;
$gray-3: #ddd;
$gray-4: #ccc;
$gray-5: #bbb;
$gray-6: #878787;
$gray-7: #767676;
$gray-8: #515151;
$gray-9: #313131;
$white: #fff;
$red: #ac4142;
$orange: #d28445;
$yellow: #f4bf75;
$green: #90a959;
$cyan: #75b5aa;
$blue: #268bd2;
$brown: #8f5536;
//https://www.client9.com/css-system-font-stack-sans-serif-v3
$root-font-family: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Droid Sans", "Ubuntu", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol";
// poole's variables
$root-font-size: 17px;
$root-font-weight: 400;
// golden ratio https://grtcalculator.com
// 18px @ 33 px, 20px @ 33 px ~ 1.667em
$root-line-height: 1.667em;
$body-color: $gray-8;
$body-bg: #fff;
$border-color: #e5e5e5;
$large-breakpoint: 38em;
$large-font-size: 19px;
$font-scale-dot7: .7rem;
$font-scale-dot8: .8rem;
//
// hyde-hyde
$small-device-font-size: $root-font-size;
$large-device-font-size: $large-font-size;
// https://www.client9.com/css-system-font-stack-monospace-v2
$code-font-family: "SFMono-Regular", "SF-Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Roboto Mono", "Ubuntu Mono", "Courier New", Courier, monospace;
$code-font-size: .9rem;
$code-fence-font-size: .8rem;
//$code-color: #bf616a;
//$code-background-color: #f9f2f4;
$code-line-height: 1.4;
// links
$link-color: $blue;
$link-hover-color: $body-color;
// section
$section__title-font-size: 2.15rem;
// post
$post__subtitle-font-size: 1.5rem;
$gradient-color-1: #ff2c2c;
$gradient-color-2: #7a5e91;
// post meta
$meta-font-size: $font-scale-dot8;
$meta-font-weight: 300;
$meta-color: $gray-6;
// post tags
$tag-background-color: $gray-2;
$tag-color: #606570;
$tag-font-size: .667rem;
// list of posts
$item__date-color: #9a9a9a;
$item__date-font-size: 1rem;
$item__title-big-font-size: 1.785rem;
// heading
$heading-font-weight: 400;
$h1-font-size: 2.15rem;
$h1-line-height: 1.25;
$h2-font-size: 1.85rem;
$h3-font-size: 1.5rem;
$h4-font-size:1.3rem;
$h5-font-size:1rem;
// sidebar
$sidebar-color: #300030;
$sidebar-width: 16rem;
$site__title-font-size: 2.5rem;
$copyright-font-size: $font-scale-dot7;
// content
$content-max-width: 100%; // @ ~70 CPL
$content-margin-left: $sidebar-width + 2rem;
$content-margin-right: 2rem;
// navigation
$navigation-color: #c2255c;
// portfolio
$project__title-font-size: $h2-font-size;
$project__subtitle-font-size-big: $h3-font-size;
$project__subtitle-font-size-small: $h4-font-size;
$project__subtitle-font-style: italic;
$project__subtitle-color: #778492;
$ribbon-color: #276582;
$ribbon-background-color: #479fc8;
// blog
$blog__title-font-size: $project__title-font-size;
$blog__subtitle-font-size-big: $project__subtitle-font-size-big;
$blog__subtitle-font-size-small: $project__subtitle-font-size-small;
$blog__subtitle-font-style: $project__subtitle-font-style;
$blog__subtitle-color: $project__subtitle-color;

78
assets/scss/poole/_base.scss

@ -0,0 +1,78 @@
// Body resets
//
// Update the foundational and global aspects of the page.
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
}
html {
font-family: $root-font-family;
font-size: $root-font-size;
line-height: $root-line-height;
@media (min-width: $large-breakpoint) {
font-size: $large-font-size;
}
}
body {
color: $body-color;
background-color: $body-bg;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
// No `:visited` state is required by default (browsers will use `a`)
a {
color: $link-color;
text-decoration: none;
// `:focus` is linked to `:hover` for basic accessibility
&:hover,
&:focus {
text-decoration: underline;
}
strong {
color: inherit;
}
}
img {
display: block;
max-width: 100%;
margin: 0 0 1rem;
border-radius: 5px;
}
table {
margin-bottom: 1rem;
width: 100%;
font-size: 85%;
border: 1px solid #e5e5e5;
border-collapse: collapse;
}
td,
th {
padding: .25rem .5rem;
border: 1px solid #e5e5e5;
}
th {
text-align: left;
}
tbody tr:nth-child(odd) td,
tbody tr:nth-child(odd) th {
background-color: #f9f9f9;
}

78
assets/scss/poole/_code.scss

@ -0,0 +1,78 @@
// Code
//
// Inline and block-level code snippets. Includes tweaks to syntax highlighted
// snippets from Pygments/Rouge and Gist embeds.
code,
pre {
font-family: $code-font-family;
}
code {
padding: .25em .5em;
font-size: 85%;
color: $code-color;
background-color: #f9f9f9;
border-radius: 3px;
}
pre {
margin-top: 0;
margin-bottom: 1rem;
}
pre code {
padding: 0;
font-size: 100%;
color: inherit;
background-color: transparent;
}
// Pygments via Jekyll
.highlight {
padding: 1rem;
margin-bottom: 1rem;
font-size: .8rem;
line-height: 1.4;
background-color: #f9f9f9;
border-radius: .25rem;
pre {
margin-bottom: 0;
overflow-x: auto;
}
.lineno {
display: inline-block; // Ensures the null space also isn't selectable
padding-right: .75rem;
padding-left: .25rem;
color: #999;
// Make sure numbers aren't selectable
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
}
// Gist via GitHub Pages
// .gist .gist-file {
// font-family: Menlo, Monaco, "Courier New", monospace !important;
// }
// .gist .markdown-body {
// padding: 15px;
// }
// .gist pre {
// padding: 0;
// background-color: transparent;
// }
// .gist .gist-file .gist-data {
// font-size: .8rem !important;
// line-height: 1.4;
// }
// .gist code {
// padding: 0;
// color: inherit;
// background-color: transparent;
// border-radius: 0;
// }

15
assets/scss/poole/_layout.scss

@ -0,0 +1,15 @@
// Layout
//
// Styles for managing the structural hierarchy of the site.
.container {
max-width: 38rem;
padding-left: 1.5rem;
padding-right: 1.5rem;
margin-left: auto;
margin-right: auto;
}
footer {
margin-bottom: 2rem;
}

25
assets/scss/poole/_masthead.scss

@ -0,0 +1,25 @@
// Masthead
//
// Super small header above the content for site name and short description.
.masthead {
padding-top: 1rem;
padding-bottom: 1rem;
margin-bottom: 3rem;
}
.masthead-title {
margin-top: 0;
margin-bottom: 0;
color: $gray-4;
a {
color: inherit;
}
small {
font-size: 75%;
font-weight: 400;
opacity: .5;
}
}

11
assets/scss/poole/_message.scss

@ -0,0 +1,11 @@
// Messages
//
// Show alert messages to users. You may add it to single elements like a `<p>`,
// or to a parent if there are multiple elements to show.
.message {
margin-bottom: 1rem;
padding: 1rem;
color: #717171;
background-color: #f9f9f9;
}

51
assets/scss/poole/_pagination.scss

@ -0,0 +1,51 @@
// Pagination
//
// Super lightweight (HTML-wise) blog pagination. `span`s are provide for when
// there are no more previous or next posts to show.
.pagination {
overflow: hidden; // clearfix
margin: 0 -1.5rem 1rem;
color: #ccc;
text-align: center;
}
// Pagination items can be `span`s or `a`s
.pagination-item {
display: block;
padding: 1rem;
border: solid #eee;
border-width: 1px 0;
&:first-child {
margin-bottom: -1px;
}
}
// Only provide a hover state for linked pagination items
a.pagination-item:hover {
background-color: #f5f5f5;
}
@media (min-width: 30em) {
.pagination {
margin: 3rem 0;
}
.pagination-item {
float: left;
width: 50%;
border-width: 1px;
&:first-child {
margin-bottom: 0;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
&:last-child {
margin-left: -1px;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
}
}

23
assets/scss/poole/_poole.scss

@ -0,0 +1,23 @@
//
// ___
// /\_ \
// _____ ___ ___\//\ \ __
// /\ '__`\ / __`\ / __`\\ \ \ /'__`\
// \ \ \_\ \/\ \_\ \/\ \_\ \\_\ \_/\ __/
// \ \ ,__/\ \____/\ \____//\____\ \____\
// \ \ \/ \/___/ \/___/ \/____/\/____/
// \ \_\
// \/_/
//
// Designed, built, and released under MIT license by @mdo. Learn more at
// https://github.com/poole/poole.
@import "variables";
@import "base";
@import "type";
@import "syntax";
@import "code";
@import "layout";
@import "masthead";
@import "posts";
@import "pagination";
@import "message";

67
assets/scss/poole/_posts.scss

@ -0,0 +1,67 @@
// Posts and pages
//
// Each post is wrapped in `.post` and is used on default and post layouts. Each
// page is wrapped in `.page` and is only used on the page layout.
.page,
.post {
margin-bottom: 4em;
li + li {
margin-top: .25rem;
}
}
// Blog post or page title
.page-title,
.post-title,
.post-title a {
color: #303030;
}
.page-title,
.post-title {
margin-top: 0;
}
// Meta data line below post title
.post-date {
display: block;
margin-top: -.5rem;
margin-bottom: 1rem;
color: #9a9a9a;
}
// Related posts
.related {
padding-top: 2rem;
padding-bottom: 2rem;
margin-bottom: 2rem;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
}
.related-posts {
padding-left: 0;
list-style: none;
h3 {
margin-top: 0;
}
li {
small {
font-size: 75%;
color: #999;
}
a:hover {
color: #268bd2;
text-decoration: none;
small {
color: inherit;
}
}
}
}

65
assets/scss/poole/_syntax.scss

@ -0,0 +1,65 @@
.highlight .hll { background-color: #ffc; }
.highlight .c { color: #999; } /* Comment */
.highlight .err { color: #a00; background-color: #faa } /* Error */
.highlight .k { color: #069; } /* Keyword */
.highlight .o { color: #555 } /* Operator */
.highlight .cm { color: #09f; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #099 } /* Comment.Preproc */
.highlight .c1 { color: #999; } /* Comment.Single */
.highlight .cs { color: #999; } /* Comment.Special */
.highlight .gd { background-color: #fcc; border: 1px solid #c00 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #f00 } /* Generic.Error */
.highlight .gh { color: #030; } /* Generic.Heading */
.highlight .gi { background-color: #cfc; border: 1px solid #0c0 } /* Generic.Inserted */
.highlight .go { color: #aaa } /* Generic.Output */
.highlight .gp { color: #009; } /* Generic.Prompt */
.highlight .gs { } /* Generic.Strong */
.highlight .gu { color: #030; } /* Generic.Subheading */
.highlight .gt { color: #9c6 } /* Generic.Traceback */
.highlight .kc { color: #069; } /* Keyword.Constant */
.highlight .kd { color: #069; } /* Keyword.Declaration */
.highlight .kn { color: #069; } /* Keyword.Namespace */
.highlight .kp { color: #069 } /* Keyword.Pseudo */
.highlight .kr { color: #069; } /* Keyword.Reserved */
.highlight .kt { color: #078; } /* Keyword.Type */
.highlight .m { color: #f60 } /* Literal.Number */
.highlight .s { color: #d44950 } /* Literal.String */
.highlight .na { color: #4f9fcf } /* Name.Attribute */
.highlight .nb { color: #366 } /* Name.Builtin */
.highlight .nc { color: #0a8; } /* Name.Class */
.highlight .no { color: #360 } /* Name.Constant */
.highlight .nd { color: #99f } /* Name.Decorator */
.highlight .ni { color: #999; } /* Name.Entity */
.highlight .ne { color: #c00; } /* Name.Exception */
.highlight .nf { color: #c0f } /* Name.Function */
.highlight .nl { color: #99f } /* Name.Label */
.highlight .nn { color: #0cf; } /* Name.Namespace */
.highlight .nt { color: #2f6f9f; } /* Name.Tag */
.highlight .nv { color: #033 } /* Name.Variable */
.highlight .ow { color: #000; } /* Operator.Word */
.highlight .w { color: #bbb } /* Text.Whitespace */
.highlight .mf { color: #f60 } /* Literal.Number.Float */
.highlight .mh { color: #f60 } /* Literal.Number.Hex */
.highlight .mi { color: #f60 } /* Literal.Number.Integer */
.highlight .mo { color: #f60 } /* Literal.Number.Oct */
.highlight .sb { color: #c30 } /* Literal.String.Backtick */
.highlight .sc { color: #c30 } /* Literal.String.Char */
.highlight .sd { color: #c30; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #c30 } /* Literal.String.Double */
.highlight .se { color: #c30; } /* Literal.String.Escape */
.highlight .sh { color: #c30 } /* Literal.String.Heredoc */
.highlight .si { color: #a00 } /* Literal.String.Interpol */
.highlight .sx { color: #c30 } /* Literal.String.Other */
.highlight .sr { color: #3aa } /* Literal.String.Regex */
.highlight .s1 { color: #c30 } /* Literal.String.Single */
.highlight .ss { color: #fc3 } /* Literal.String.Symbol */
.highlight .bp { color: #366 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #033 } /* Name.Variable.Class */
.highlight .vg { color: #033 } /* Name.Variable.Global */
.highlight .vi { color: #033 } /* Name.Variable.Instance */
.highlight .il { color: #f60 } /* Literal.Number.Integer.Long */
.css .o,
.css .o + .nt,
.css .nt + .nt { color: #999; }

117
assets/scss/poole/_type.scss

@ -0,0 +1,117 @@
// Typography
//
// Headings, body text, lists, and other misc typographic elements.
h1, h2, h3, h4, h5, h6 {
margin-bottom: .5rem;
font-weight: 600;
line-height: 1.25;
color: #313131;
text-rendering: optimizeLegibility;
}
h1 {
font-size: 2rem;
}
h2 {
margin-top: 1rem;
font-size: 1.5rem;
}
h3 {
margin-top: 1.5rem;
font-size: 1.25rem;
}
h4, h5, h6 {
margin-top: 1rem;
font-size: 1rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
strong {
color: #303030;
}
ul, ol, dl {
margin-top: 0;
margin-bottom: 1rem;
}
dt {
font-weight: bold;
}
dd {
margin-bottom: .5rem;
}
hr {
position: relative;
margin: 1.5rem 0;
border: 0;
border-top: 1px solid #eee;
border-bottom: 1px solid #fff;
}
abbr {
font-size: 85%;
font-weight: bold;
color: #555;
text-transform: uppercase;
&[title] {
cursor: help;
border-bottom: 1px dotted #e5e5e5;
}
}
blockquote {
padding: .5rem 1rem;
margin: .8rem 0;
color: #7a7a7a;
border-left: .25rem solid #e5e5e5;
p:last-child {
margin-bottom: 0;
}
@media (min-width: 30em) {
padding-right: 5rem;
padding-left: 1.25rem;
}
}
// Markdown footnotes
//
// See the example content post for an example.
// Footnote number within body text
a[href^="#fn:"],
// Back to footnote link
a[href^="#fnref:"] {
display: inline-block;
margin-left: .1rem;
font-weight: bold;
}
// List of footnotes
.footnotes {
margin-top: 2rem;
font-size: 85%;
}
// Custom type
//
// Extend paragraphs with `.lead` for larger introductory text.
.lead {
font-size: 1.25rem;
font-weight: 300;
}

30
assets/scss/poole/_variables.scss

@ -0,0 +1,30 @@
$gray-1: #f9f9f9;
$gray-2: #ccc;
$gray-3: #767676;
$gray-4: #515151;
$gray-5: #313131;
$red: #ac4142;
$orange: #d28445;
$yellow: #f4bf75;
$green: #90a959;
$cyan: #75b5aa;
$blue: #268bd2;
// $blue: #6a9fb5;
$brown: #8f5536;
$root-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
$root-font-size: 16px;
$root-line-height: 1.5;
$body-color: #515151;
$body-bg: #fff;
$link-color: $blue;
$border-color: #e5e5e5;
$large-breakpoint: 38em;
$large-font-size: 20px;
$code-font-family: Menlo, Monaco, "Courier New", monospace;
$code-color: #bf616a;

2
assets/scss/print.scss

@ -0,0 +1,2 @@
@import "hyde-hyde/variables";
@import 'hyde-hyde/print';

31
assets/scss/tocbot.scss

@ -0,0 +1,31 @@
@import 'hugo-toc';
.toc {
font-size: $toc-font-size;
overflow-y: auto;
background: $toc-background-color;
padding-left: 0rem;
padding-top: 1em;
> .toc-list {
overflow: hidden;
position: relative;
li {
list-style: none;
}
}
}
.toc-list {
margin: 0;
padding-left: 1rem;
}
.is-collapsible {
max-height: 1000px;
overflow: hidden;
}
.is-collapsed {
max-height: 0;
}
.is-position-fixed {
position: fixed;
top: 0;
}

3
exampleSite/.gitignore

@ -0,0 +1,3 @@
/public
/themes
.DS_Store

77
exampleSite/config.toml

@ -0,0 +1,77 @@
## Basic Configuration
baseurl = "https://example.com/"
languageCode = "en"
title = "Title"
theme = "hyde-hyde"
## Hugo Built-in Features
# disqusShortname = "your-disqus-shortname"
# googleAnalytics = "your-google-analytics-id"
# enableRobotsTXT = true
# summarylength = 30
#paginate = 5
## Site Settings
[params]
author = "Author"
title = "Title"
# description = "..."
authorimage = "/img/hugo.png"
dateformat = "Jan 2, 2006"
# sidebar, copyright & license
#logoimage = "/img/hugo.png"
copyright = "htr3n"
since = 2019
license = "CC BY-SA 4.0"
licenseURL = "https://creativecommons.org/licenses/by-sa/4.0"
showBuiltWith = true
# https://highlightjs.org
highlightjs = true
highlightjsstyle = "github"
# please choose either GraphComment or Disqus or Utterances
#GraphCommentId = "..."
#UtterancesRepo = "..." # https://utteranc.es/
#UtterancesIssueTerm = "..." # pathname, url, title, og:title
#UtterancesTheme = "..." # github-light or github-dark
# Table of contents
#toc = none, "hugo", or "tocbot"
## Social Accounts
[params.social]
github = "<username>"
instagram = "<username>"
xing = "<username>"
linkedin = "<username>"
twitter = "<username>"
facebook = "<username>"
microblog = "<username>"
stackoverflow = "<username>"
telegram = "<username>"
# orcid = "<xxxx-xxxx-xxxx-xxxx>"
email = "your-email@example.com"
# gravatar = "your-email@example.com"
# pgpkey = "<path-to-your-key-in-/static>"
## Main Menu
[[menu.main]]
name = "Posts"
weight = 100
identifier = "posts"
url = "/posts/"
[[menu.main]]
name = "Portfolio"
identifier = "portfolio"
weight = 200
url = "/portfolio/"
[[menu.main]]
name = "About"
identifier = "about"
weight = 300
url = "/about/"

17
exampleSite/content/about.md

@ -0,0 +1,17 @@
+++
title = "About Hugo"
date = "2014-04-09"
+++
Hugo is a static site engine written in Go.
It makes use of a variety of open source projects including:
* [Cobra](https://github.com/spf13/cobra)
* [Viper](https://github.com/spf13/viper)
* [J Walter Weatherman](https://github.com/spf13/jWalterWeatherman)
* [Cast](https://github.com/spf13/cast)
Learn more and contribute on [GitHub](https://github.com/gohugoio).

3
exampleSite/content/portfolio/_index.md

@ -0,0 +1,3 @@
---
title: 'Projects'
---

10
exampleSite/content/portfolio/dera.md

@ -0,0 +1,10 @@
---
title: "DERA"
description: "Dynamic Event-Driven Actors"
link: https://github.com/htr3n/dera
screenshot: dera.png
date: '2018-06-21'
layout: 'portfolio'
---
This is a Java reference implementation of dynamic event-driven actors runtime aiming at providing adequate abstraction levels and mechanisms for modelling and developing (distributed) event-based systems. DERA leverages the intrinsic loose coupling of event-driven communication styles to support various kinds of _run-time evolution and adaptation_ (i.e., enabling run-time flexibility) while _minimizing the non-deterministic nature of traditional event-based applications_ (i.e., supporting formal analysis).

BIN
exampleSite/content/portfolio/dera.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

11
exampleSite/content/portfolio/hyde-hyde.md

@ -0,0 +1,11 @@
---
title: "hyde-hyde"
description: "A simple and cool Hugo theme"
date: '2018-01-27'
link: 'https://github.com/htr3n/hyde-hyde'
screenshot: 'hyde-hyde.png'
layout: 'portfolio'
featured: 'true'
---
[_Hyde-hyde_](https://github.com/htr3n/hyde-hyde) is a responsive [Hugo](https://gohugo.io) theme inspired by @spf13's [Hyde](https://github.com/spf13/hyde.git) and its variant [Nate Finch's blog](https://npf.io). It was heavily restructured with modularised page layouts for easier maintenance and modification. _Hyde-hyde_ offers awesome features such as nice colour tone, [code highlighting](https://highlightjs.org), [Font-Awesome 5's sidebar icons](https://fontawesome.com)), a cool portfolio page, more choices for commenting (e.g. [GraphComment](https://graphcomment.com), [Disqus](https://disqus.com)).

BIN
exampleSite/content/portfolio/hyde-hyde.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 KiB

10
exampleSite/content/portfolio/laramod.md

@ -0,0 +1,10 @@
---
title: "LaraMod"
description: "A modularised Laravel framework"
link: https://github.com/htr3n/laramod
screenshot: laramod.png
date: '2018-01-19'
layout: portfolio
---
[LaraMod](https://github.com/htr3n/laramod) is another modularisation effort to systematically organising a [Laravel](https://laravel.com) based project. The idea stems from my struggle to structure a Laravel-based project so that I can work effectively on individual modules whilst keeping Laravel codebase intact as much as possible and also keeping the project's codebase separate from Laravel.

BIN
exampleSite/content/portfolio/laramod.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 KiB

1147
exampleSite/content/posts/creating-a-new-theme.md

File diff suppressed because it is too large

343
exampleSite/content/posts/goisforlovers.md

@ -0,0 +1,343 @@
+++
title = "(Hu)go Template Primer"
description = ""
tags = [
"go",
"golang",
"templates",
"themes",
"development",
]
date = "2014-04-02"
categories = [
"Development",
"golang",
]
+++
Hugo uses the excellent [go][] [html/template][gohtmltemplate] library for
its template engine. It is an extremely lightweight engine that provides a very
small amount of logic. In our experience that it is just the right amount of
logic to be able to create a good static website. If you have used other
template systems from different languages or frameworks you will find a lot of
similarities in go templates.
This document is a brief primer on using go templates. The [go docs][gohtmltemplate]
provide more details.
## Introduction to Go Templates
Go templates provide an extremely simple template language. It adheres to the
belief that only the most basic of logic belongs in the template or view layer.
One consequence of this simplicity is that go templates parse very quickly.
A unique characteristic of go templates is they are content aware. Variables and
content will be sanitized depending on the context of where they are used. More
details can be found in the [go docs][gohtmltemplate].
## Basic Syntax
Go lang templates are html files with the addition of variables and
functions.
**Go variables and functions are accessible within {{ }}**
Accessing a predefined variable "foo":
{{ foo }}
**Parameters are separated using spaces**
Calling the add function with input of 1, 2:
{{ add 1 2 }}
**Methods and fields are accessed via dot notation**
Accessing the Page Parameter "bar"
{{ .Params.bar }}
**Parentheses can be used to group items together**
{{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }}
## Variables
Each go template has a struct (object) made available to it. In hugo each
template is passed either a page or a node struct depending on which type of
page you are rendering. More details are available on the
[variables](/layout/variables) page.
A variable is accessed by referencing the variable name.
<title>{{ .Title }}</title>
Variables can also be defined and referenced.
{{ $address := "123 Main St."}}
{{ $address }}
## Functions
Go template ship with a few functions which provide basic functionality. The go
template system also provides a mechanism for applications to extend the
available functions with their own. [Hugo template
functions](/layout/functions) provide some additional functionality we believe
are useful for building websites. Functions are called by using their name
followed by the required parameters separated by spaces. Template
functions cannot be added without recompiling hugo.
**Example:**
{{ add 1 2 }}
## Includes
When including another template you will pass to it the data it will be
able to access. To pass along the current context please remember to
include a trailing dot. The templates location will always be starting at
the /layout/ directory within Hugo.
**Example:**
{{ template "chrome/header.html" . }}
## Logic
Go templates provide the most basic iteration and conditional logic.
### Iteration
Just like in go, the go templates make heavy use of range to iterate over
a map, array or slice. The following are different examples of how to use
range.
**Example 1: Using Context**
{{ range array }}
{{ . }}
{{ end }}
**Example 2: Declaring value variable name**
{{range $element := array}}
{{ $element }}
{{ end }}
**Example 2: Declaring key and value variable name**
{{range $index, $element := array}}
{{ $index }}
{{ $element }}
{{ end }}
### Conditionals
If, else, with, or, & and provide the framework for handling conditional
logic in Go Templates. Like range, each statement is closed with `end`.
Go Templates treat the following values as false:
* false
* 0
* any array, slice, map, or string of length zero
**Example 1: If**
{{ if isset .Params "title" }}<h4>{{ index .Params "title" }}</h4>{{ end }}
**Example 2: If -> Else**
{{ if isset .Params "alt" }}
{{ index .Params "alt" }}
{{else}}
{{ index .Params "caption" }}
{{ end }}
**Example 3: And & Or**
{{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
**Example 4: With**
An alternative way of writing "if" and then referencing the same value
is to use "with" instead. With rebinds the context `.` within its scope,
and skips the block if the variable is absent.
The first example above could be simplified as:
{{ with .Params.title }}<h4>{{ . }}</h4>{{ end }}
**Example 5: If -> Else If**
{{ if isset .Params "alt" }}
{{ index .Params "alt" }}
{{ else if isset .Params "caption" }}
{{ index .Params "caption" }}
{{ end }}
## Pipes
One of the most powerful components of go templates is the ability to
stack actions one after another. This is done by using pipes. Borrowed
from unix pipes, the concept is simple, each pipeline's output becomes the
input of the following pipe.
Because of the very simple syntax of go templates, the pipe is essential
to being able to chain together function calls. One limitation of the
pipes is that they only can work with a single value and that value
becomes the last parameter of the next pipeline.
A few simple examples should help convey how to use the pipe.
**Example 1 :**
{{ if eq 1 1 }} Same {{ end }}
is the same as
{{ eq 1 1 | if }} Same {{ end }}
It does look odd to place the if at the end, but it does provide a good
illustration of how to use the pipes.
**Example 2 :**
{{ index .Params "disqus_url" | html }}
Access the page parameter called "disqus_url" and escape the HTML.
**Example 3 :**
{{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
Stuff Here
{{ end }}
Could be rewritten as
{{ isset .Params "caption" | or isset .Params "title" | or isset .Params "attr" | if }}
Stuff Here
{{ end }}
## Context (aka. the dot)
The most easily overlooked concept to understand about go templates is that {{ . }}
always refers to the current context. In the top level of your template this
will be the data set made available to it. Inside of a iteration it will have
the value of the current item. When inside of a loop the context has changed. .
will no longer refer to the data available to the entire page. If you need to
access this from within the loop you will likely want to set it to a variable
instead of depending on the context.
**Example:**
{{ $title := .Site.Title }}
{{ range .Params.tags }}
<li> <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a> - {{ $title }} </li>
{{ end }}
Notice how once we have entered the loop the value of {{ . }} has changed. We
have defined a variable outside of the loop so we have access to it from within
the loop.
# Hugo Parameters
Hugo provides the option of passing values to the template language
through the site configuration (for sitewide values), or through the meta
data of each specific piece of content. You can define any values of any
type (supported by your front matter/config format) and use them however
you want to inside of your templates.
## Using Content (page) Parameters
In each piece of content you can provide variables to be used by the
templates. This happens in the [front matter](/content/front-matter).
An example of this is used in this documentation site. Most of the pages
benefit from having the table of contents provided. Sometimes the TOC just
doesn't make a lot of sense. We've defined a variable in our front matter
of some pages to turn off the TOC from being displayed.
Here is the example front matter:
```
---
title: "Permalinks"
date: "2013-11-18"
aliases:
- "/doc/permalinks/"
groups: ["extras"]
groups_weight: 30
notoc: true
---
```
Here is the corresponding code inside of the template:
{{ if not .Params.notoc }}
<div id="toc" class="well col-md-4 col-sm-6">
{{ .TableOfContents }}
</div>
{{ end }}
## Using Site (config) Parameters
In your top-level configuration file (eg, `config.yaml`) you can define site
parameters, which are values which will be available to you in chrome.
For instance, you might declare:
```yaml
params:
CopyrightHTML: "Copyright &#xA9; 2013 John Doe. All Rights Reserved."
TwitterUser: "spf13"
SidebarRecentLimit: 5
```
Within a footer layout, you might then declare a `<footer>` which is only
provided if the `CopyrightHTML` parameter is provided, and if it is given,
you would declare it to be HTML-safe, so that the HTML entity is not escaped
again. This would let you easily update just your top-level config file each
January 1st, instead of hunting through your templates.
```
{{if .Site.Params.CopyrightHTML}}<footer>
<div class="text-center">{{.Site.Params.CopyrightHTML | safeHtml}}</div>
</footer>{{end}}
```
An alternative way of writing the "if" and then referencing the same value
is to use "with" instead. With rebinds the context `.` within its scope,
and skips the block if the variable is absent:
```
{{with .Site.Params.TwitterUser}}<span class="twitter">
<a href="https://twitter.com/{{.}}" rel="author">
<img src="/images/twitter.png" width="48" height="48" title="Twitter: {{.}}"
alt="Twitter"></a>
</span>{{end}}
```
Finally, if you want to pull "magic constants" out of your layouts, you can do
so, such as in this example:
```
<nav class="recent">
<h1>Recent Posts</h1>
<ul>{{range first .Site.Params.SidebarRecentLimit .Site.Recent}}
<li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
{{end}}</ul>
</nav>
```
[go]: <http://golang.org/>
[gohtmltemplate]: <http://golang.org/pkg/html/template/>

88
exampleSite/content/posts/hugoisforlovers.md

@ -0,0 +1,88 @@
+++
title = "Getting Started with Hugo"
description = ""
tags = [
"go",
"golang",
"hugo",
"development",
]
date = "2014-04-02"
categories = [
"Development",
"golang",
]
+++
## Step 1. Install Hugo
Goto [hugo releases](https://github.com/spf13/hugo/releases) and download the
appropriate version for your os and architecture.
Save it somewhere specific as we will be using it in the next step.
More complete instructions are available at [installing hugo](/overview/installing/)
## Step 2. Build the Docs
Hugo has its own example site which happens to also be the documentation site
you are reading right now.
Follow the following steps:
1. Clone the [hugo repository](http://github.com/spf13/hugo)
2. Go into the repo
3. Run hugo in server mode and build the docs
4. Open your browser to http://localhost:1313
Corresponding pseudo commands:
git clone https://github.com/spf13/hugo
cd hugo
/path/to/where/you/installed/hugo server --source=./docs
> 29 pages created
> 0 tags index created
> in 27 ms
> Web Server is available at http://localhost:1313
> Press ctrl+c to stop
Once you've gotten here, follow along the rest of this page on your local build.
## Step 3. Change the docs site
Stop the Hugo process by hitting ctrl+c.
Now we are going to run hugo again, but this time with hugo in watch mode.
/path/to/hugo/from/step/1/hugo server --source=./docs --watch
> 29 pages created
> 0 tags index created
> in 27 ms
> Web Server is available at http://localhost:1313
> Watching for changes in /Users/spf13/Code/hugo/docs/content
> Press ctrl+c to stop
Open your [favorite editor](http://vim.spf13.com) and change one of the source
content pages. How about changing this very file to *fix the typo*. How about changing this very file to *fix the typo*.
Content files are found in `docs/content/`. Unless otherwise specified, files
are located at the same relative location as the url, in our case
`docs/content/overview/quickstart.md`.
Change and save this file.. Notice what happened in your terminal.
> Change detected, rebuilding site
> 29 pages created
> 0 tags index created
> in 26 ms
Refresh the browser and observe that the typo is now fixed.
Notice how quick that was. Try to refresh the site before it's finished building.. I double dare you.
Having nearly instant feedback enables you to have your creativity flow without waiting for long builds.
## Step 4. Have fun
The best way to learn something is to play with it.

154
exampleSite/content/posts/migrate-from-jekyll.md

@ -0,0 +1,154 @@
---
date: 2014-03-10
linktitle: Migrating from Jekyll
title: Migrate to Hugo from Jekyll
weight: 10
categories: [ "Development", "golang" ]
tags: ["hugo", "jekyll", "migration"]
---
## Move static content to `static`
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.
With Jekyll, something that looked like
<root>/
▾ images/
logo.png
should become
<root>/
▾ static/
▾ images/
logo.png
Additionally, you'll want any files that should reside at the root (such as `CNAME`) to be moved to `static`.
## Create your Hugo configuration file
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.
## Set your configuration publish folder to `_site`
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:
1. Change your submodule to point to map `gh-pages` to public instead of `_site` (recommended).
git submodule deinit _site
git rm _site
git submodule add -b gh-pages git@github.com:your-username/your-repo.git public
2. Or, change the Hugo configuration to use `_site` instead of `public`.
{
..
"publishdir": "_site",
..
}
## Convert Jekyll templates to Hugo templates
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.
As a single reference data point, converting my templates for [heyitsalex.net](http://heyitsalex.net/) took me no more than a few hours.
## Convert Jekyll plugins to Hugo shortcodes
Jekyll has [plugins](http://jekyllrb.com/docs/plugins/); Hugo has [shortcodes](/doc/shortcodes/). It's fairly trivial to do a port.
### Implementation
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.
Jekyll's plugin:
module Jekyll
class ImageTag < Liquid::Tag
@url = nil
@caption = nil
@class = nil
@link = nil
// Patterns
IMAGE_URL_WITH_CLASS_AND_CAPTION =
IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK = /(\w+)(\s+)((https?:\/\/|\/)(\S+))(\s+)"(.*?)"(\s+)->((https?:\/\/|\/)(\S+))(\s*)/i
IMAGE_URL_WITH_CAPTION = /((https?:\/\/|\/)(\S+))(\s+)"(.*?)"/i
IMAGE_URL_WITH_CLASS = /(\w+)(\s+)((https?:\/\/|\/)(\S+))/i
IMAGE_URL = /((https?:\/\/|\/)(\S+))/i
def initialize(tag_name, markup, tokens)
super
if markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK
@class = $1
@url = $3
@caption = $7
@link = $9
elsif markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION
@class = $1
@url = $3
@caption = $7
elsif markup =~ IMAGE_URL_WITH_CAPTION
@url = $1
@caption = $5
elsif markup =~ IMAGE_URL_WITH_CLASS
@class = $1
@url = $3
elsif markup =~ IMAGE_URL
@url = $1
end
end
def render(context)
if @class
source = "<figure class='#{@class}'>"
else
source = "<figure>"
end
if @link
source += "<a href=\"#{@link}\">"
end
source += "<img src=\"#{@url}\">"
if @link
source += "</a>"
end
source += "<figcaption>#{@caption}</figcaption>" if @caption
source += "</figure>"
source
end
end
end
Liquid::Template.register_tag('image', Jekyll::ImageTag)
is written as this Hugo shortcode:
<!-- image -->
<figure {{ with .Get "class" }}class="{{.}}"{{ end }}>
{{ with .Get "link"}}<a href="{{.}}">{{ end }}
<img src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}"{{ end }} />
{{ if .Get "link"}}</a>{{ end }}
{{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
<figcaption>{{ if isset .Params "title" }}
{{ .Get "title" }}{{ end }}
{{ if or (.Get "caption") (.Get "attr")}}<p>
{{ .Get "caption" }}
{{ with .Get "attrlink"}}<a href="{{.}}"> {{ end }}
{{ .Get "attr" }}
{{ if .Get "attrlink"}}</a> {{ end }}
</p> {{ end }}
</figcaption>
{{ end }}
</figure>
<!-- image -->
### Usage
I simply changed:
{% 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/ %}
to this (this example uses a slightly extended version named `fig`, different than the built-in `figure`):
{{%/* 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/" */%}}
As a bonus, the shortcode named parameters are, arguably, more readable.
## Finishing touches
### Fix content
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.
### Clean up
You'll want to remove the Jekyll configuration at this point. If you have anything else that isn't used, delete it.
## A practical example in a diff
[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).

0
exampleSite/layouts/.gitkeep

0
exampleSite/static/.gitignore

BIN
exampleSite/static/img/hugo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
images/main.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 KiB

BIN
images/mobile.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 KiB

BIN
images/portfolio.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1014 KiB

BIN
images/post.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 KiB

BIN
images/screenshot.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 KiB

BIN
images/tn.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

11
layouts/404.html

@ -0,0 +1,11 @@
{{ define "header" }}
{{ partial "header.html" . }}
{{ end }}
{{ define "content" }}
<h1>404: Page not found</h1>
<p class="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href="{{ .Site.BaseURL }}">Head back home</a> to try finding it again.</p>
{{ end }}
{{ define "footer" }}
{{ end }}

11
layouts/_default/baseof.html

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
{{ block "header" . }}{{ end }}
<body class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}">
{{ partial "sidebar.html" . }}
<div class="content container">
{{ block "content" . }}{{ end }}
</div>
{{ block "footer" . }}{{ end }}
</body>
</html>

11
layouts/_default/list.html

@ -0,0 +1,11 @@
{{ define "header" }}
{{ partial "header.html" . }}
{{ end }}
{{ define "content" }}
{{ partial "page-list/content.html" . }}
{{ end }}
{{ define "footer" }}
{{ partial "page-list/footer.html" . }}
{{ end }}

13
layouts/_default/single.html

@ -0,0 +1,13 @@
{{ define "header" }}
{{ partial "page-single/variables-init.html" . }}
{{ partial "header.html" . }}
{{ end }}
{{ define "content" }}
{{ partial "page-single/content.html" . }}
{{ end }}
{{ define "footer" }}
{{ partial "page-single/footer.html" . }}
{{ partial "page-single/variables-deinit.html" . }}
{{ end }}

14
layouts/about/single.html

@ -0,0 +1,14 @@
{{ define "header" }}
{{ partial "header.html" . }}
{{ end }}
{{ define "content" }}
<div class="post">
<h1>{{ .Title }}</h1>
{{ .Content }}
</div>
{{ end }}
{{ define "footer" }}
{{ partial "footer/font-awesome-js.html" . }}
{{ end }}

11
layouts/blog/list.html

@ -0,0 +1,11 @@
{{ define "header" }}
{{ partial "header.html" . }}
{{ end }}
{{ define "content" }}
{{ partial "blog/content.html" . }}
{{ end }}
{{ define "footer" }}
{{ partial "blog/footer.html" . }}
{{ end }}

36
layouts/index.html

@ -0,0 +1,36 @@
{{ define "header" }}
{{ partial "header.html" . }}
{{ end }}
{{ define "content" }}
<div class="post-list">
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" site.Params.mainSections) }}
{{ range $paginator.Pages }}
<div class="col-md-8 col-sm-8 col-xs-12">
<span class="blog__title">
<a href="{{ .RelPermalink }}" target="_blank" rel="noopener noreferrer">{{ .Title }}</a>
</span>
<span class="blog__meta">
{{ partial "page-single/post-meta.html" . }}
</span>
<span class="blog__summary">
{{ .Summary }}
</span>
<span class="read_more">
<a href="{{ .RelPermalink }}" target="_blank" rel="noopener noreferrer">READ MORE</a>
</span>
</div>
</div>
<div class="row-space">&nbsp;</div>
{{ end }}
</div>
{{ partial "pagination.html" . }}
{{ end }}
{{ define "footer" }}
{{ if .Site.GoogleAnalytics }}
<!-- Google Analytics -->
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
{{ partial "footer/font-awesome-js.html" . }}
{{ end }}

53
layouts/partials/blog/content.html

@ -0,0 +1,53 @@
<span class="section__title">{{ .Title | default "Blog" }}</span>
<div class="blog__content">
{{ range first 1 (where .Data.Pages "Params.featured" "==" true) }}
<section class="blog__featured-post">
<div class="section-inner">
<div class="blog_content">
<div class="item featured text-center">
<span class="blog__title">
<a href="{{ .RelPermalink }}" target="_blank" rel="noopener noreferrer">{{ .Title }}</a>
</span>
<div class="blog__featured-image">
{{ if .Params.image }}
<img src="{{ .Params.image }}" alt="{{ .Title }}">
{{ end }}
</div>
<span class="blog__meta">
{{ partial "page-single/post-meta.html" . }}
</span>
<div class="blog__summary">
{{ .Summary }}
</div>
<span class="read_more">
<a href="{{ .RelPermalink }}" target="_blank" rel="noopener noreferrer">READ MORE</a>
</span>
</div>
</div>
</div>
</section>
{{ end }}
<section>
<div class="blog_content">
<hr class="divider">
{{ range (where .Data.Pages "Params.featured" "!=" true).ByDate.Reverse }}
<div class="col-md-8 col-sm-8 col-xs-12">
<span class="blog__title">
<a href="{{ .RelPermalink }}" target="_blank" rel="noopener noreferrer">{{ .Title }}</a>
</span>
<span class="blog__meta">
{{ partial "page-single/post-meta.html" . }}
</span>
<span class="blog__summary">
{{ .Summary }}
</span>
<span class="read_more">
<a href="{{ .RelPermalink }}" target="_blank" rel="noopener noreferrer">READ MORE</a>
</span>
</div>
</div>
<div class="row-space">&nbsp;</div>
{{ end }}
</div>
</section>
</div>

5
layouts/partials/blog/footer.html

@ -0,0 +1,5 @@
{{ if .Site.GoogleAnalytics }}
<!-- Google Analytics -->
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
{{ partial "footer/font-awesome-js.html" . }}

1
layouts/partials/footer/font-awesome-js.html

@ -0,0 +1 @@
<script defer src="https://use.fontawesome.com/releases/v5.12.1/js/all.js" integrity="sha384-ZbbbT1gw3joYkKRqh0kWyRp32UAvdqkpbLedQJSlnI8iLQcFVxaGyrOgOJiDQTTR" crossorigin="anonymous"></script>

20
layouts/partials/header.html

@ -0,0 +1,20 @@
<head>
<link href="https://gmpg.org/xfn/11" rel="profile">
{{ if .Params.canonicalUrl }}
<link rel="canonical" href="{{ .Params.canonicalUrl }}">
{{ else }}
<link rel="canonical" href="{{ .Permalink }}">
{{ end }}
{{ partial "header/meta.html" . }}
{{ partial "header/styles.html" . }}
{{ `<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->` | safeHTML }}
{{ "<!-- Icons -->" | safeHTML }}
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="/favicon.png">
{{ partial "header/feeds.html" . }}
{{ partial "header/custom.html" }}
</head>

1
layouts/partials/header/custom.html

@ -0,0 +1 @@

3
layouts/partials/header/feeds.html

@ -0,0 +1,3 @@
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}

3
layouts/partials/header/font-awesome-css.html

@ -0,0 +1,3 @@
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/solid.css" integrity="sha384-TbilV5Lbhlwdyc4RuIV/JhD8NR+BfMrvz4BL5QFa2we1hQu6wvREr3v6XSRfCTRp" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/brands.css" integrity="sha384-7xAnn7Zm3QC1jFjVc1A6v/toepoG3JXboQYzbM0jrPzou9OFXm/fY6Z/XiIebl/k" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/fontawesome.css" integrity="sha384-ozJwkrqb90Oa3ZNb+yKFW2lToAWYdTiF1vt8JiH5ptTGHTGcN7qdoR1F95e0kYyG" crossorigin="anonymous">

17
layouts/partials/header/meta.html

@ -0,0 +1,17 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
{{ "<!-- Enable responsiveness on mobile devices -->" | safeHTML }}
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
{{ hugo.Generator }}
{{ if .IsHome }}
{{ $.Scratch.Set "theTitle" .Site.Title }}
{{else}}
{{ $.Scratch.Set "theTitle" .Title}}
{{ $.Scratch.Add "theTitle" " • "}}
{{ $.Scratch.Add "theTitle" .Site.Title}}
{{ end }}
<title>{{ $.Scratch.Get "theTitle" }}</title>
{{ with .Site.Params.meta.description }}<meta name="description" content="{{ . }}">{{ end }}
{{ with .Site.Params.meta.keywords }}<meta name="keywords" content="{{.}}">{{ end }}
{{ template "_internal/twitter_cards.html" . }}
{{ template "_internal/opengraph.html" . }}

10
layouts/partials/header/styles-highlight.html

@ -0,0 +1,10 @@
{{ if .Site.Params.highlightjs }}
{{ if or (not (isset .Params "highlight")) (.Params.highlight) }}
<!-- highlightjs -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/{{ .Site.Params.highlightjsstyle | default "default" }}.min.css">
{{ end }}
{{ end }}
{{ if .Site.Params.PygmentsUseClasses }}
<!-- Pygments Syntax -->
<link rel="stylesheet" href="{{ "css/syntax.min.css" | relURL }}">
{{ end }}

19
layouts/partials/header/styles.html

@ -0,0 +1,19 @@
{{ partial "header/styles-highlight.html" . }}
{{ $options := (dict "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $style := resources.Get "scss/hyde-hyde.scss" | toCSS $options | fingerprint }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}">
{{ $printStyle := resources.Get "scss/print.scss" | toCSS $options | fingerprint }}
<link rel="stylesheet" href="{{ $printStyle.RelPermalink }}" integrity="{{ $printStyle.Data.Integrity }}" media="print">
{{ with .Site.Params.toc }}
{{ if eq . "hugo" }}
{{ $hugoToc := resources.Get "scss/hugo-toc.scss" | toCSS $options | fingerprint }}
<link rel="stylesheet" href="{{ $hugoToc.RelPermalink }}" integrity="{{ $hugoToc.Data.Integrity }}">
{{ else if eq . "tocbot"}}
{{ $tocbot := resources.Get "scss/tocbot.scss" | toCSS $options | fingerprint }}
<link rel="stylesheet" href="{{ $tocbot.RelPermalink }}" integrity="{{ $tocbot.Data.Integrity }}">
{{ end }}
{{ end }}

2
layouts/partials/header/web-fonts.html

@ -0,0 +1,2 @@
<link rel="dns-prefetch" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans:300,300i,400,400i,700|Source+Code+Pro:400,400i" rel="stylesheet">

18
layouts/partials/highlight-js.html

@ -0,0 +1,18 @@
{{- if (.Site.Params.highlightjs) -}}
{{ if (or (not (isset .Params "highlight")) (and (isset .Params "highlight") .Params.highlight)) }}
{{ $.Scratch.Set "hl_languages" (union (.Site.Params.highlightjslanguages) (.Params.highlightjslanguages)) }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>
{{ with $.Scratch.Get "hl_languages" }}
{{ range . }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/languages/{{.}}.min.js"></script>
{{ end }}
{{ end }}
<script type="text/javascript">
{{ with $.Scratch.Get "hl_languages" }}
hljs.configure({languages: [{{(delimit . ", ")}}]});
{{ end }}
hljs.initHighlightingOnLoad();
</script>
{{ $.Scratch.Delete "hl_languages" }}
{{ end }}
{{- end -}}

6
layouts/partials/page-list/content.html

@ -0,0 +1,6 @@
<span class="section__title">{{ .Title }}</span>
<ul class="posts">
{{ with .Data.Pages }}
{{ partial "posts-list.html" . }}
{{ end }}
</ul>

5
layouts/partials/page-list/footer.html

@ -0,0 +1,5 @@
{{ if .Site.GoogleAnalytics }}
<!-- Google Analytics -->
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
{{ partial "footer/font-awesome-js.html" . }}

25
layouts/partials/page-single/comment/commento.html

@ -0,0 +1,25 @@
<div id="commento"></div>
<script type="text/javascript">
/*
Check and don't inject Commento on localhost/127.0.0.1, however, it does not
work for customised local domains, e.g. example.test, example.dev
*/
(function () {
if (location.hostname === "localhost" ||
location.hostname === "127.0.0.1" ||
location.hostname === "") {
return;
}
var cmt = document.createElement('script');
cmt.type = 'text/javascript';
cmt.async = true;
var commento_host = '{{ with .Site.Params.CommentoHost }}{{ . }}{{else}}https://cdn.commento.io{{ end }}';
cmt.src = commento_host + '/js/commento.js';
(document.getElementsByTagName('head')[0] ||
document.getElementsByTagName('body')[0]).appendChild(cmt);
})();
</script>
<noscript>
Please enable JavaScript to load the comments.
</noscript>

29
layouts/partials/page-single/comment/disqus.html

@ -0,0 +1,29 @@
<div id="disqus_thread"></div>
<script type="text/javascript">
/*
Check and don't inject Disqus on localhost/127.0.0.1, however, it does not
work for customised local domains, e.g. example.test, example.dev
*/
(function () {
if (location.hostname === "localhost" ||
location.hostname === "127.0.0.1" ||
location.hostname === "") {
return;
}
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
var disqus_shortname = '{{ .Site.DisqusShortname }}';
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] ||
document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>
Please enable JavaScript to view the
<a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>
</noscript>
<a href="http://disqus.com/" class="dsq-brlink">comments powered by
<span class="logo-disqus">Disqus</span>
</a>

10
layouts/partials/page-single/comment/graphcomment.html

@ -0,0 +1,10 @@
<div id="graphcomment"></div>
<script type="text/javascript">
window.graphcomment_id = '{{ .Site.Params.GraphCommentId }}';
/* - - - DON'T EDIT BELOW THIS LINE - - - */
(function() {
var gc = document.createElement('script'); gc.type = 'text/javascript'; gc.async = true;
gc.src = 'https://graphcomment.com/js/integration.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gc);
})();
</script>

7
layouts/partials/page-single/comment/utterances.html

@ -0,0 +1,7 @@
<script src="https://utteranc.es/client.js"
repo="{{ .Site.Params.UtterancesRepo }}"
issue-term="{{ .Site.Params.UtterancesIssueTerm }}"
theme="{{ with .Site.Params.UtterancesTheme }}{{ . }}{{else}}github-light{{ end }}"
crossorigin="anonymous"
async>
</script>

52
layouts/partials/page-single/content.html

@ -0,0 +1,52 @@
{{ $include_toc := .Params.include_toc}}
<article>
<header>
<h1>{{ .Title }}</h1>
{{ with .Params.subtitle }}
<span class="post__subtitle">
{{.}}
</span>
{{ end }}
{{ partial "page-single/post-meta.html" . }}
</header>
{{ $screenshotsExist := .Params.screenshots }}
{{ if $screenshotsExist }}
<a href={{ .Params.screenshots.s1.file }} target="_blank" rel="noopener noreferrer"><img class="project__image project__first-screen img-responsive" src="{{ .Params.screenshots.s1.file }}" alt="{{ .Params.screenshots.s1.caption }}" title="{{ .Params.screenshots.s1.caption }}"></a>
{{ end }}
{{ $tableOfContents := .TableOfContents }}
{{ with .Site.Params.toc }}
{{ if ne $include_toc false }}
<div class="toc-wrapper">
<input type="checkbox" id="tocToggle">
<label for="tocToggle">Table of Content</label>
{{ if eq . "hugo" }}
{{ $tableOfContents }}
{{ else if eq . "tocbot"}}
<div class="toc" id="TableOfContents"></div>
{{ end }}
{{ if $screenshotsExist }}
<a href=#additional-screenshots>Additional Screenshots</a>
{{ end }}
</div>
{{ end }}
{{ end }}
<div class="post">
{{ .Content }}
</div>
{{ if $screenshotsExist }}
<h2 id=additional-screenshots>Additional Screenshots</h2>
<div class = "project__additional-screens">
{{ range $index, $element := $screenshotsExist }}
{{ if not (eq $index "s1") }}
<div class = "project__single-screen">
<a href={{ .file }} target="_blank" rel="noopener oreferrer"><img class="project__image project__extra-screen img-responsive" src="{{ .file }}" alt="{{ .caption }}" title="{{ .caption }}"></a>
</div>
{{ end }}
{{ end }}
</div>
{{ end }}
{{ partial "page-single/post-navigation.html" . }}
{{ partial "page-single/post-related.html" . }}
{{ partial "page-single/post-comment.html" . }}
</article>

25
layouts/partials/page-single/footer.html

@ -0,0 +1,25 @@
{{ $include_toc := .Params.include_toc}}
{{ if .Site.GoogleAnalytics }}
<!-- Google Analytics -->
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
{{ partial "footer/font-awesome-js.html" . }}
{{ partial "highlight-js.html" . }}
{{ with .Site.Params.toc }}
{{ if and (eq . "tocbot") (ne $include_toc false) }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.4.2/tocbot.js"></script>
<script type="text/javascript">
if (tocbot) {
tocbot.init({
// Where to render the table of contents.
tocSelector: '.toc',
// Where to grab the headings to build the table of contents.
contentSelector: '.post',
// Which headings to grab inside of the contentSelector element.
headingSelector: 'h2, h3, h4',
collapseDepth: 4
});
}
</script>
{{ end }}
{{ end }}

11
layouts/partials/page-single/post-comment.html

@ -0,0 +1,11 @@
{{ if ne .Params.showcomments false }}
{{ if .Site.DisqusShortname }}
{{ partial "page-single/comment/disqus.html" . }}
{{ else if .Site.Params.GraphCommentId }}
{{ partial "page-single/comment/graphcomment.html" . }}
{{ else if .Site.Params.UtterancesRepo }}
{{ partial "page-single/comment/utterances.html" . }}
{{ else if .Site.Params.Commento }}
{{ partial "page-single/comment/commento.html" . }}
{{ end }}
{{ end }}

34
layouts/partials/page-single/post-meta.html

@ -0,0 +1,34 @@
{{ if ne .Params.showpagemeta false }}
<div class="post__meta">
<!-- published date -->
{{ if not .Date.IsZero }}
<i class="fas fa-calendar-alt"></i> {{ .Date.Format (.Site.Params.dateformat | default "Jan 02, 2006") }}
{{ end }}
<!-- categories -->
{{ with .Params.categories }}
{{ $total := len . }}
{{ if gt $total 0 }}
in
{{ $total := sub $total 1 }}
{{ range $i, $cat := sort . }}
<a class="badge badge-category" href="{{ "/categories/" | relURL }}{{ $cat | urlize }}">{{ $cat | upper }}</a>
{{ if lt $i $total }}•{{ end }}
{{ end }}
{{ end }}
{{ end }}
<!-- tags -->
{{ with .Params.tags }}
{{ $total := len . }}
{{ if gt $total 0 }}
<br/>
{{ $subtotal := sub $total 1 }} <i class="fas fa-tags"></i>
{{ range $i, $tag := . }}
<a class="badge badge-tag" href="{{ "/tags/" | relURL }}{{ $tag | urlize }}">{{ $tag | lower }}</a>
{{ if lt $i $subtotal }} {{ end }}
{{ end }}
{{ end }}
{{ end }}
<br/>
<i class="fas fa-clock"></i> {{ .ReadingTime }} min read
</div>
{{ end }}

17
layouts/partials/page-single/post-navigation.html

@ -0,0 +1,17 @@
{{ $enabledPostNavigation := .Site.Params.postNavigation | default true }}
{{ if $enabledPostNavigation }}
<div class="navigation navigation-single">
{{ with .PrevInSection }}
<a href="{{ .RelPermalink }}" class="navigation-prev">
<i aria-hidden="true" class="fa fa-chevron-left"></i>
<span class="navigation-tittle">{{ .Title }}</span>
</a>
{{ end }}
{{ with .NextInSection }}
<a href="{{ .RelPermalink }}" class="navigation-next">
<span class="navigation-tittle">{{ .Title }}</span>
<i aria-hidden="true" class="fa fa-chevron-right"></i>
</a>
{{ end }}
</div>
{{ end }}

12
layouts/partials/page-single/post-related.html

@ -0,0 +1,12 @@
{{ if .Site.Params.relatedPosts }}
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related }}
<div class="post__related">
<!-- related content -->
<h2>Related Articles</h2>
<ul class="related-posts">
{{ partial "posts-list.html" . }}
</ul>
</div>
{{ end }}
{{ end }}

2
layouts/partials/page-single/variables-deinit.html

@ -0,0 +1,2 @@
{{ $.Page.Scratch.Delete "fig" }}
{{ $.Page.Scratch.Delete "table" }}

2
layouts/partials/page-single/variables-init.html

@ -0,0 +1,2 @@
{{ $.Page.Scratch.Set "fig" 1 }}
{{ $.Page.Scratch.Set "table" 1 }}

39
layouts/partials/pagination.html

@ -0,0 +1,39 @@
{{ $pag := $.Paginator }}
{{ if gt $pag.TotalPages 1 }}
<ul class="pagination">
{{ with $pag.First }}
<li class="page-item">
<a href="{{ .URL }}" class="page-link" aria-label="First"><span aria-hidden="true">&laquo;&laquo;</span></a>
</li>
{{ end }}
<li class="page-item{{ if not $pag.HasPrev }} disabled{{ end }}">
<a href="{{ if $pag.HasPrev }}{{ $pag.Prev.URL }}{{ end }}" class="page-link" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a>
</li>
{{ $.Scratch.Set "__paginator.ellipsed" false }}
{{ range $pag.Pagers }}
{{ $right := sub .TotalPages .PageNumber }}
{{ $showNumber := or (le .PageNumber 3) (eq $right 0) }}
{{ $showNumber := or $showNumber (and (gt .PageNumber (sub $pag.PageNumber 2)) (lt .PageNumber (add $pag.PageNumber 2))) }}
{{ if $showNumber }}
{{ $.Scratch.Set "__paginator.ellipsed" false }}
{{ $.Scratch.Set "__paginator.shouldEllipse" false }}
{{ else }}
{{ $.Scratch.Set "__paginator.shouldEllipse" (not ($.Scratch.Get "__paginator.ellipsed") ) }}
{{ $.Scratch.Set "__paginator.ellipsed" true }}
{{ end }}
{{ if $showNumber }}
<li class="page-item{{ if eq . $pag }} active{{ end }}"><a class="page-link" href="{{ .URL }}">{{ .PageNumber }}</a></li>
{{ else if ($.Scratch.Get "__paginator.shouldEllipse") }}
<li class="page-item disabled"><span aria-hidden="true">&nbsp;&hellip;&nbsp;</span></li>
{{ end }}
{{ end }}
<li class="page-item{{ if not $pag.HasNext }} disabled{{ end }}">
<a href="{{ if $pag.HasNext }}{{ $pag.Next.URL }}{{ end }}" class="page-link" aria-label="Next"><span aria-hidden="true">&raquo;</span></a>
</li>
{{ with $pag.Last }}
<li class="page-item">
<a href="{{ .URL }}" class="page-link" aria-label="Last"><span aria-hidden="true">&raquo;&raquo;</span></a>
</li>
{{ end }}
</ul>
{{ end }}

65
layouts/partials/portfolio/content.html

@ -0,0 +1,65 @@
<span class="section__title">{{ .Title | default "Projects" }}</span>
<div class="portfolio__content">
{{ range first 1 (where .Data.Pages "Params.featured" "==" true) }}
<section class="portfolio__featured-project">
<div class="section-inner">
<div class="portfolio_content">
<div class="item featured text-center">
<span class="project__title">
<a href="{{ .RelPermalink }}" target="_blank" rel="noopener noreferrer">{{ .Title }}</a>
</span>
<p class="project__subtitle-big">
{{ .Params.description }}
</p>
<span class="blog__meta">
{{ partial "page-single/post-meta.html" . }}
</span>
<span class="project__screenshot">
{{ if .Params.screenshots }}
<a href={{ .RelPermalink }} target="_blank" rel="noopener noreferrer"><img class="project__image img-responsive" src="{{ .Params.screenshots.s1.file }}" alt="{{ .Params.screenshots.s1.caption }}" title="{{ .Params.screenshots.s1.caption }}"></a>
{{ end }}
</span>
<div class="project__summary">
{{ .Summary }}
</div>
<span class="read_more">
<a href="{{ .RelPermalink }}" target="_blank" rel="noopener noreferrer">READ MORE</a>
</span>
</div>
</div>
</div>
</section>
{{ end }}
<section>
<div class="portfolio_content">
<hr class="divider">
{{ range (where .Data.Pages "Params.featured" "!=" true).ByDate.Reverse }}
<div class="row">
<div class="col-md-8 col-sm-8 col-xs-12">
<span class="project__title">
<a href="{{ .RelPermalink }}" target="_blank" rel="noopener noreferrer">{{ .Title }}</a>
</span>
<span class="project__subtitle-small">
{{ .Params.description }}
</span>
<span class="project__meta">
{{ partial "page-single/post-meta.html" . }}
</span>
<span class="project__primary-screen">
{{ if .Params.screenshots }}
<a href={{ .RelPermalink }} target="_blank" rel="noopener noreferrer"><img class="project__image img-responsive" src="{{ .Params.screenshots.s1.file }}" alt="{{ .Params.screenshots.s1.caption }}" title="{{ .Params.screenshots.s1.caption }}"></a>
{{ end }}
</span>
<span class="project__summary">
{{ .Summary }}
</span>
<span class="read_more">
<a href="{{ .RelPermalink }}" target="_blank" rel="noopener noreferrer">READ MORE</a>
</span>
</div>
</div>
<div class="row-space">&nbsp;</div>
{{ end }}
</div>
</section>
</div>

5
layouts/partials/portfolio/footer.html

@ -0,0 +1,5 @@
{{ if .Site.GoogleAnalytics }}
<!-- Google Analytics -->
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
{{ partial "footer/font-awesome-js.html" . }}

10
layouts/partials/posts-list.html

@ -0,0 +1,10 @@
{{ range . }}
<li>
<span class="list__title--small">
<a href="{{ .RelPermalink }}" {{if .Draft}}class="draft"{{end}}>{{ .Title }}</a>
{{if not .Date.IsZero}}
<time class="pull-right hidden-tablet">{{ .Date.Format (.Site.Params.dateformat | default "Jan 02 '06") }}</time>
{{end}}
</span>
</li>
{{ end }}

44
layouts/partials/sidebar.html

@ -0,0 +1,44 @@
<!-- Sidebar -->
<div class="sidebar">
<div class="container {{ with .Site.Params.sidebarSticky }}sidebar-sticky{{ end }}">
<div class="sidebar-about">
<span class="site__title">
<a href="{{ .Site.BaseURL }}">
{{ with .Site.Params.logoimage }}
{{ $strippedSlash := ($.Site.Params.logoimage | replaceRE "^(/)+(.*)" "$2") }}
{{ $logoImage := (printf "%s%s" $.Site.BaseURL $strippedSlash) }}
<img src="{{$logoImage}}" alt="Logo Image" class="element--center">
{{ else }}
{{ .Site.Title }}
{{ end }}
</a>
</span>
{{ if and (isset .Site.Params "authorimage") (not (isset .Site.Params.social "gravatar")) }}
{{ with .Site.Params.authorimage }}
{{ $strippedSlash := ($.Site.Params.authorimage | replaceRE "^(/)+(.*)" "$2") }}
{{ $authorImage := (printf "%s%s" $.Site.BaseURL $strippedSlash) }}
<div class="author-image">
<img src="{{$authorImage}}" alt="Author Image" class="img--circle img--headshot element--center">
</div>
{{ end }}
{{ end }}
{{ with .Site.Params.social.gravatar}}
<div class="author-image">
<img src="https://www.gravatar.com/avatar/{{md5 .}}?s=240&d=mp" class="img--circle img--headshot element--center" alt="gravatar">
</div>
{{ end }}
<p class="site__description">
{{ with .Site.Params.description }} {{.}} {{end}}
</p>
</div>
<div class="collapsible-menu">
<input type="checkbox" id="menuToggle">
<label for="menuToggle">{{ .Site.Title }}</label>
<div class="menu-content">
{{ partial "sidebar/menu.html" . }}
{{ partial "sidebar/social.html" . }}
</div>
</div>
{{ partial "sidebar/copyright.html" . }}
</div>
</div>

15
layouts/partials/sidebar/about.html

@ -0,0 +1,15 @@
<div class="sidebar-about">
<span class="site__title">
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
</span>
{{ with .Site.Params.authorimage }}
{{ $strippedSlash := ($.Site.Params.authorimage | replaceRE "^(/)+(.*)" "$2") }}
{{ $authorImage := (printf "%s%s" $.Site.BaseURL $strippedSlash) }}
<div class="author-image">
<img src="{{$authorImage}}" alt="Author Image" class="img--circle img--headshot element--center">
</div>
{{ end }}
<p class="site__description">
{{ with .Site.Params.description }} {{.}} {{end}}
</p>
</div>

13
layouts/partials/sidebar/copyright.html

@ -0,0 +1,13 @@
{{ with .Site.Params.copyright }}
<div class="copyright">
&copy; {{ with $.Site.Params.since }}{{ if lt . now.Year }}{{ . | safeHTML }} - {{ end }}{{ end }}{{ now.Format "2006"}} {{ . | safeHTML }}
{{ with $.Site.Params.license }}
<a href="{{$.Site.Params.licenseURL | safeHTML}}">{{ . | safeHTML }}</a>
{{end}}
</div>
{{ end }}
{{ with .Site.Params.showBuiltWith }}
<div class="builtwith">
Built with <a href="https://gohugo.io">Hugo</a> ❤️ <a href="https://github.com/htr3n/hyde-hyde">hyde-hyde</a>.
</div>
{{ end }}

27
layouts/partials/sidebar/menu.html

@ -0,0 +1,27 @@
<div>
<ul class="sidebar-nav">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
{{ if .HasChildren }}
<li {{ if $currentPage.HasMenuCurrent "main" . }}class="active"{{ end }}>
<a href="#">{{ .Pre }}
<span>{{ .Name }}</span>
</a>
<ul class="sidebar-nav">
{{ range .Children }}
<li {{ if $currentPage.IsMenuCurrent "main" . }}class="active"{{ end }}>
<a href="{{ .URL }}">{{ .Name | title }}</a>
</li>
{{ end }}
</ul>
</li>
{{ else }} <!-- No children -->
<li>
<a href="{{.URL}}">{{ .Pre }}
<span>{{ .Name | title }}</span>
</a>
</li>
{{ end }}
{{ end }}
</ul>
</div>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save