commit 70f2d625faa5aa57e9dbd6e3013082a9871732d7 Author: Joe Roe Date: Fri Mar 5 10:44:42 2021 +0100 Initial commit diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5c93805 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2021 Joe Roe + +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..2f02768 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# risotto + +risotto is a minimalist, responsive [hugo](https://gohugo.io) theme inspired by terminal ricing aesthetics. + +![Screenshot of the risotto theme](https://raw.githubusercontent.com/joeroe/risotto/master/images/screenshot.png) + +## Install + +To use the theme, clone this repository into your site's `themes` directory: + +```shell +cd ./themes +git clone https://github.com/joeroe/risotto risotto +``` + +Then add `theme = risotto` to your site's `config.toml` or `config.yaml`. + +## Configuration + +See `exampleSite/config.toml` for the theme-specific parameters you need to add to your site's `config.toml` or `config.yaml` to configure the theme. + +## Updating + +Use git to get the latest version of the theme: + +```shell +cd ./themes/risotto +git pull +``` + + diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..ac36e06 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,2 @@ ++++ ++++ diff --git a/exampleSite/LICENSE b/exampleSite/LICENSE new file mode 100644 index 0000000..4527efb --- /dev/null +++ b/exampleSite/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Steve Francia + +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. \ No newline at end of file diff --git a/exampleSite/README.md b/exampleSite/README.md new file mode 100644 index 0000000..11a456c --- /dev/null +++ b/exampleSite/README.md @@ -0,0 +1,29 @@ +# hugoBasicExample + +This repository offers an example site for [Hugo](https://gohugo.io/) and also it provides the default content for demos hosted on the [Hugo Themes Showcase](https://themes.gohugo.io/). + +# Using + +1. [Install Hugo](https://gohugo.io/overview/installing/) +2. Clone this repository + +```bash +git clone https://github.com/gohugoio/hugoBasicExample.git +cd hugoBasicExample +``` + +3. Clone the repository you want to test. If you want to test all Hugo Themes then follow the instructions provided [here](https://github.com/gohugoio/hugoThemes#installing-all-themes) + +4. Run Hugo and select the theme of your choosing + +```bash +hugo server -t YOURTHEME +``` + +5. Under `/content/` this repository contains the following: + +- A section called `/post/` with sample markdown content +- A headless bundle called `homepage` that you may want to use for single page applications. You can find instructions about headless bundles over [here](https://gohugo.io/content-management/page-bundles/#headless-bundle) +- An `about.md` that is intended to provide the `/about/` page for a theme demo + +6. If you intend to build a theme that does not fit in the content structure provided in this repository, then you are still more than welcome to submit it for review at the [Hugo Themes](https://github.com/gohugoio/hugoThemes/issues) respository diff --git a/exampleSite/config.toml b/exampleSite/config.toml new file mode 100644 index 0000000..497477c --- /dev/null +++ b/exampleSite/config.toml @@ -0,0 +1,91 @@ +baseURL = "https://example.com" +theme = "risotto" +title = "risotto demo" +author = "Joe Roe" +copyright = "© 2021 Joe Roe" +paginate = 3 +languageCode = "en" +DefaultContentLanguage = "en" +enableInlineShortcodes = true +# prevent build failures when using Hugo's Instagram shortcode due to deprecated Instagram API. +# See https://github.com/gohugoio/hugo/issues/7228#issuecomment-714490456 +ignoreErrors = ["error-remote-getjson"] + +# Automatically add content sections to main menu +sectionPagesMenu = "main" + +[params] + +[params.theme] +palette = "gruvbox-dark" +mode = "dark-mode" + +# Sidebar: about/bio +[params.about] +title = "risotto" +description = "A [hugo](https://gohugo.io) theme inspired by terminal ricing." +logo = "images/rice.svg" + +# Sidebar: social links +# Available icon sets: +# * FontAwesome 5 ('fas fa-' or 'fab-fa' for brands) +# * Academicons ('ai ai-') + +[[params.socialLinks]] +icon = "fab fa-github" +title = "GitHub" +url = "https://github.com/joeroe/risotto" + +[[params.socialLinks]] +icon = "fas fa-envelope" +title = "Email" +url = "mailto:example@example.com" + +[[params.socialLinks]] +icon = "ai ai-orcid" +title = "ORCID" +url = "https://orcid.org/0000-0001-2345-6789" + +[menu] + + [[menu.main]] + identifier = "about" + name = "About" + url = "/about/" + weight = 10 + +[taxonomies] +category = "categories" +tag = "tags" +series = "series" + +# For hugo >= 0.60.0, enable inline HTML +[markup.goldmark.renderer] +unsafe = true + +[privacy] + + [privacy.vimeo] + disabled = false + simple = true + + [privacy.twitter] + disabled = false + enableDNT = true + simple = true + + [privacy.instagram] + disabled = false + simple = true + + [privacy.youtube] + disabled = false + privacyEnhanced = true + +[services] + + [services.instagram] + disableInlineCSS = true + + [services.twitter] + disableInlineCSS = true diff --git a/exampleSite/configTaxo.toml b/exampleSite/configTaxo.toml new file mode 100644 index 0000000..9220fcf --- /dev/null +++ b/exampleSite/configTaxo.toml @@ -0,0 +1,27 @@ +timeout = 30000 +enableInlineShortcodes = true + +[taxonomies] +category = "categories" +tag = "tags" +series = "series" + +[privacy] + + [privacy.vimeo] + disabled = false + simple = true + + [privacy.twitter] + disabled = false + enableDNT = true + simple = true + disableInlineCSS = true + + [privacy.instagram] + disabled = false + simple = true + + [privacy.youtube] + disabled = false + privacyEnhanced = true diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md new file mode 100644 index 0000000..ed6494b --- /dev/null +++ b/exampleSite/content/_index.md @@ -0,0 +1,3 @@ ++++ +author = "Hugo Authors" ++++ diff --git a/exampleSite/content/about.md b/exampleSite/content/about.md new file mode 100644 index 0000000..b31bf1d --- /dev/null +++ b/exampleSite/content/about.md @@ -0,0 +1,25 @@ ++++ +title = "About" +description = "Hugo, the world's fastest framework for building websites" +date = "2019-02-28" +aliases = ["about-us", "about-hugo", "contact"] +author = "Hugo Authors" ++++ + +Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows. + +Hugo makes use of a variety of open source projects including: + +* https://github.com/yuin/goldmark +* https://github.com/alecthomas/chroma +* https://github.com/muesli/smartcrop +* https://github.com/spf13/cobra +* https://github.com/spf13/viper + +Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages. + +Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases. + +Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider. + +Learn more and contribute on [GitHub](https://github.com/gohugoio). diff --git a/exampleSite/content/archives.md b/exampleSite/content/archives.md new file mode 100644 index 0000000..db16eed --- /dev/null +++ b/exampleSite/content/archives.md @@ -0,0 +1,5 @@ +--- +date: 2019-05-28 +type: section +layout: "archives" +--- diff --git a/exampleSite/content/homepage/about.md b/exampleSite/content/homepage/about.md new file mode 100644 index 0000000..b5d6981 --- /dev/null +++ b/exampleSite/content/homepage/about.md @@ -0,0 +1,7 @@ +--- +title: 'Our Difference' +button: 'About us' +weight: 2 +--- + +Lorem ipsum dolor sit amet, et essent mediocritatem quo, choro volumus oporteat an mei. Ipsum dolor sit amet, et essent mediocritatem quo. diff --git a/exampleSite/content/homepage/index.md b/exampleSite/content/homepage/index.md new file mode 100644 index 0000000..ca03031 --- /dev/null +++ b/exampleSite/content/homepage/index.md @@ -0,0 +1,3 @@ +--- +headless: true +--- diff --git a/exampleSite/content/homepage/work.md b/exampleSite/content/homepage/work.md new file mode 100644 index 0000000..f99bc99 --- /dev/null +++ b/exampleSite/content/homepage/work.md @@ -0,0 +1,7 @@ +--- +title: 'We Help Business Grow' +button: 'Our Work' +weight: 1 +--- + +Lorem ipsum dolor sit amet, et essent mediocritatem quo, choro volumus oporteat an mei. Numquam dolores mel eu, mea docendi omittantur et, mea ea duis erat. Elit melius cu ius. Per ex novum tantas putant, ei his nullam aliquam apeirian. Aeterno quaestio constituto sea an, no eum intellegat assueverit. diff --git a/exampleSite/content/post/_index.md b/exampleSite/content/post/_index.md new file mode 100644 index 0000000..8a084d9 --- /dev/null +++ b/exampleSite/content/post/_index.md @@ -0,0 +1,6 @@ ++++ +aliases = ["posts", "articles", "blog", "showcase", "docs"] +title = "Posts" +author = "Hugo Authors" +tags = ["index"] ++++ diff --git a/exampleSite/content/post/emoji-support.md b/exampleSite/content/post/emoji-support.md new file mode 100644 index 0000000..dc3589a --- /dev/null +++ b/exampleSite/content/post/emoji-support.md @@ -0,0 +1,46 @@ ++++ +author = "Hugo Authors" +title = "Emoji Support" +date = "2019-03-05" +description = "Guide to emoji usage in Hugo" +tags = [ + "emoji", +] ++++ + +Emoji can be enabled in a Hugo project in a number of ways. + +The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). + +To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g. + +

🙈 :see_no_evil: 🙉 :hear_no_evil: 🙊 :speak_no_evil:

+
+ +The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes. + +*** + +**N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g. + +{{< highlight html >}} +.emoji { + font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; +} +{{< /highlight >}} + +{{< css.inline >}} + +{{< /css.inline >}} diff --git a/exampleSite/content/post/markdown-syntax.md b/exampleSite/content/post/markdown-syntax.md new file mode 100644 index 0000000..06990d7 --- /dev/null +++ b/exampleSite/content/post/markdown-syntax.md @@ -0,0 +1,148 @@ ++++ +author = "Hugo Authors" +title = "Markdown Syntax Guide" +date = "2019-03-11" +description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements." +tags = [ + "markdown", + "css", + "html", +] +categories = [ + "themes", + "syntax", +] +series = ["Themes Guide"] +aliases = ["migrate-from-jekyl"] ++++ + +This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme. + + +## Headings + +The following HTML `

`—`

` elements represent six levels of section headings. `

` is the highest section level while `

` is the lowest. + +# H1 +## H2 +### H3 +#### H4 +##### H5 +###### H6 + +## Paragraph + +Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat. + +Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat. + +## Blockquotes + +The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations. + +#### Blockquote without attribution + +> Tiam, ad mint andaepu dandae nostion secatur sequo quae. +> **Note** that you can use *Markdown syntax* within a blockquote. + +#### Blockquote with attribution + +> Don't communicate by sharing memory, share memory by communicating.
+> — Rob Pike[^1] + +[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. + +## Tables + +Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box. + + Name | Age +--------|------ + Bob | 27 + Alice | 23 + +#### Inline Markdown within tables + +| Italics | Bold | Code | +| -------- | -------- | ------ | +| *italics* | **bold** | `code` | + +## Code Blocks + +#### Code block with backticks + +```html + + + + + Example HTML5 Document + + +

Test

+ + +``` + +#### Code block indented with four spaces + + + + + + Example HTML5 Document + + +

Test

+ + + +#### Code block with Hugo's internal highlight shortcode +{{< highlight html >}} + + + + + Example HTML5 Document + + +

Test

+ + +{{< /highlight >}} + +## List Types + +#### Ordered List + +1. First item +2. Second item +3. Third item + +#### Unordered List + +* List item +* Another item +* And another item + +#### Nested list + +* Fruit + * Apple + * Orange + * Banana +* Dairy + * Milk + * Cheese + +## Other Elements — abbr, sub, sup, kbd, mark + +GIF is a bitmap image format. + +H2O + +Xn + Yn = Zn + +Press CTRL+ALT+Delete to end the session. + +Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. diff --git a/exampleSite/content/post/math-typesetting.md b/exampleSite/content/post/math-typesetting.md new file mode 100644 index 0000000..48fdc79 --- /dev/null +++ b/exampleSite/content/post/math-typesetting.md @@ -0,0 +1,49 @@ +--- +author: Hugo Authors +title: Math Typesetting +date: 2019-03-08 +description: A brief guide to setup KaTeX +math: true +--- + +Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries. + + +In this example we will be using [KaTeX](https://katex.org/) + +- Create a partial under `/layouts/partials/math.html` +- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally. +- Include the partial in your templates like so: + +```bash +{{ if or .Params.math .Site.Params.math }} +{{ partial "math.html" . }} +{{ end }} +``` + +- To enable KaTex globally set the parameter `math` to `true` in a project's configuration +- To enable KaTex on a per page basis include the parameter `math: true` in content files + +**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html) + +{{< math.inline >}} +{{ if or .Page.Params.math .Site.Params.math }} + + + + +{{ end }} +{{}} + +### Examples + +{{< math.inline >}} +

+Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\) +

+{{}} + +Block math: +$$ + \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } +$$ diff --git a/exampleSite/content/post/placeholder-text.md b/exampleSite/content/post/placeholder-text.md new file mode 100644 index 0000000..9ed5f69 --- /dev/null +++ b/exampleSite/content/post/placeholder-text.md @@ -0,0 +1,45 @@ ++++ +author = "Hugo Authors" +title = "Placeholder Text" +date = "2019-03-09" +description = "Lorem Ipsum Dolor Si Amet" +tags = [ + "markdown", + "text", +] ++++ + +Lorem est tota propiore conpellat pectoribus de pectora summo. Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum. + +1. Exierant elisi ambit vivere dedere +2. Duce pollice +3. Eris modo +4. Spargitque ferrea quos palude + +Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis. + +1. Comas hunc haec pietate fetum procerum dixit +2. Post torum vates letum Tiresia +3. Flumen querellas +4. Arcanaque montibus omnes +5. Quidem et + +# Vagus elidunt + + + +[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon) + +## Mane refeci capiebant unda mulcebat + +Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis. + +Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et. + +Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**. + +{{< css.inline >}} + +{{< /css.inline >}} diff --git a/exampleSite/content/post/rich-content.md b/exampleSite/content/post/rich-content.md new file mode 100644 index 0000000..92b4b03 --- /dev/null +++ b/exampleSite/content/post/rich-content.md @@ -0,0 +1,34 @@ ++++ +author = "Hugo Authors" +title = "Rich Content" +date = "2019-03-10" +description = "A brief description of Hugo Shortcodes" +tags = [ + "shortcodes", + "privacy", +] ++++ + +Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds. + +--- + +## YouTube Privacy Enhanced Shortcode + +{{< youtube ZJthWmvUzzc >}} + +
+ +--- + +## Twitter Simple Shortcode + +{{< twitter_simple 1085870671291310081 >}} + +
+ +--- + +## Vimeo Simple Shortcode + +{{< vimeo_simple 48912912 >}} diff --git a/exampleSite/layouts/.gitkeep b/exampleSite/layouts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/exampleSite/static/.gitignore b/exampleSite/static/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/images/screenshot.png b/images/screenshot.png new file mode 100644 index 0000000..d28a9ab Binary files /dev/null and b/images/screenshot.png differ diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..853f211 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,36 @@ + + + + + {{- partial "head.html" . -}} + + + +
+ + + +
+ {{- block "main" . }}{{- end }} +
+ +
+
+ {{- partial "about.html" . -}} +
+
+
+ {{- block "aside" . }}{{- end }} +
+
+ +
+ {{- partial "footer.html" . -}} +
+ +
+ + + diff --git a/layouts/_default/li.html b/layouts/_default/li.html new file mode 100644 index 0000000..c85e091 --- /dev/null +++ b/layouts/_default/li.html @@ -0,0 +1 @@ +
  • {{ .Title | markdownify }}
  • diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..f91cdb0 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,12 @@ +{{ define "main" }} +

    {{ .Title | markdownify }}

    + + {{ .Content }} + +
      + {{ range .Pages }} + {{ .Render "li" }} + {{ end }} +
    + +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..1a276fa --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,14 @@ +{{ define "main" }} +
    +

    {{ .Title | markdownify }}

    +
    +
    + {{ .Content }} +
    +
    +{{ end }} + +{{define "aside" }} +

    {{ .Params.description }}

    +

    By {{ .Params.author }}, {{ .Date.Format "2 January 2006" }}

    +{{ end }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..c346e42 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,4 @@ +{{ define "main" }} + {{ .Content }} +{{ end }} + diff --git a/layouts/partials/about.html b/layouts/partials/about.html new file mode 100644 index 0000000..f717e62 --- /dev/null +++ b/layouts/partials/about.html @@ -0,0 +1,17 @@ +{{ with .Site.Params.about }} +
    +{{ with .logo }}{{ end }} +

    {{ .title }}

    +{{ with .description }}

    {{ . | markdownify }}

    {{ end }} +
    +{{ end }} + + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..6e06cf7 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,2 @@ + + diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..513b665 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,15 @@ +{{ with .Title }}{{ . }} – {{end}}{{ .Site.Title }} + + + + + + + + + + + + + + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..103ea8d --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,10 @@ +

    {{ .Site.Title }}

    + + diff --git a/layouts/post/list.html b/layouts/post/list.html new file mode 100644 index 0000000..027e282 --- /dev/null +++ b/layouts/post/list.html @@ -0,0 +1,22 @@ +{{ define "main" }} +
    +

    {{ .Title | markdownify }}

    + {{ .Content }} +
    + + {{ range .Pages }} + + {{ end }} +{{ end }} diff --git a/static/css/about.css b/static/css/about.css new file mode 100644 index 0000000..6c12ba4 --- /dev/null +++ b/static/css/about.css @@ -0,0 +1,26 @@ +/* About/bio section */ +.about__logo { + height: 1.5rem; +} + +.about__title { + display: inline; + vertical-align: top; +} + +.about__title::before { + content: none; +} + +/* Social media links */ +.aside__social-links { + padding: 0; +} + +.aside__social-links li { + display: inline-block; +} + +.aside__social-links li::marker { + content: none; +} diff --git a/static/css/colour/dark-mode.css b/static/css/colour/dark-mode.css new file mode 100644 index 0000000..386f99d --- /dev/null +++ b/static/css/colour/dark-mode.css @@ -0,0 +1,7 @@ +:root { + --bg: var(--black); + --dark-bg: var(--dark-black); + --bright-bg: var(--bright-black); + --fg: var(--white); + --bright-fg: var(--bright-white); +} diff --git a/static/css/colour/gruvbox-dark.css b/static/css/colour/gruvbox-dark.css new file mode 100644 index 0000000..04d998b --- /dev/null +++ b/static/css/colour/gruvbox-dark.css @@ -0,0 +1,22 @@ +/* gruvbox dark mode + * https://github.com/morhetz/gruvbox + */ +:root { + --black: #282828; + --red: #cc241d; + --green: #98971a; + --yellow: #d79921; + --blue: #458588; + --magenta: #b16286; + --cyan: #689d6a; + --white: #ebdbb2; + --dark-black: #1d2021; + --bright-black: #928374; + --bright-red: #fb4934; + --bright-green: #b8bb26; + --bright-yellow: #fabd2f; + --bright-blue: #83a598; + --bright-magenta: #d3869b; + --bright-cyan: #8ec07c; + --bright-white: #fbf1c7; +} diff --git a/static/css/colour/gruvbox-light.css b/static/css/colour/gruvbox-light.css new file mode 100644 index 0000000..830933a --- /dev/null +++ b/static/css/colour/gruvbox-light.css @@ -0,0 +1,23 @@ +/* gruvbox light mode + * https://github.com/morhetz/gruvbox + */ +:root { + --black: #3c3836; + --red: #9d0006; + --green: #79740e; + --yellow: #b57614; + --blue: #076678; + --magenta: #8f3f71; + --cyan: #427b58; + --white: #fbf1c7; + --dark-black: #282828; + --dark-white: #f2e5bc; + --bright-black: #928374; + --bright-red: #cc241d; + --bright-green: #98971a; + --bright-yellow: #d79921; + --bright-blue: #458588; + --bright-magenta: #b16286; + --bright-cyan: #689d6a; + --bright-white: #f9f5d7; +} diff --git a/static/css/colour/light-mode.css b/static/css/colour/light-mode.css new file mode 100644 index 0000000..3ac2827 --- /dev/null +++ b/static/css/colour/light-mode.css @@ -0,0 +1,7 @@ +:root { + --bg: var(--white); + --dark-bg: var(--dark-white); + --bright-bg: var(--bright-black); + --fg: var(--black); + --bright-fg: var(--bright-black); +} diff --git a/static/css/custom.css b/static/css/custom.css new file mode 100644 index 0000000..71949ed --- /dev/null +++ b/static/css/custom.css @@ -0,0 +1 @@ +/* Override this file to customise the theme's CSS for your site */ diff --git a/static/css/footer.css b/static/css/footer.css new file mode 100644 index 0000000..3c5d6e9 --- /dev/null +++ b/static/css/footer.css @@ -0,0 +1,7 @@ +.page__footer { + color: var(--bright-bg); +} + +.page__footer p { + margin: 0; +} diff --git a/static/css/header.css b/static/css/header.css new file mode 100644 index 0000000..875201b --- /dev/null +++ b/static/css/header.css @@ -0,0 +1,18 @@ +/* Main menu */ +.main-nav ul { + display: flex; + flex-flow: row wrap; + justify-content: flex-start; + margin: 0; + padding: 0.25rem 0; +} + +.main-nav li { + margin-left: 2.5rem; + text-transform: lowercase; +} + +.main-nav li::marker { + content: "./"; +} + diff --git a/static/css/layout.css b/static/css/layout.css new file mode 100644 index 0000000..9f7fb7e --- /dev/null +++ b/static/css/layout.css @@ -0,0 +1,56 @@ +/* 1rem = 16px by default */ + +.page { + max-width: 64rem; + margin: 1rem auto; + display: grid; + grid-template-areas: + "header" + "body" + "aside" + "footer"; + grid-template-columns: minmax(0, 1fr); /* https://css-tricks.com/preventing-a-grid-blowout/ */ + grid-row-gap: 2rem; +} + +@media (min-width: 45rem) { + .page { + grid-template-areas: + "header header" + "body aside" + "footer footer"; + grid-template-columns: minmax(0, 1fr) 15rem; + grid-column-gap: 2rem; + } +} + +/* Header */ +.page__header { + grid-area: header; + display: flex; +} + +.page__logo { + flex-shrink: 0; +} + +.page__nav { + flex-grow: 1; +} + +/* Body + aside */ +.page__body { + grid-area: body; + background-color: var(--bg); + outline: 1rem solid var(--bg); +} + +.page__aside { + grid-area: aside; + color: var(--bright-bg); +} + +/* Footer */ +.page__footer { + grid-area: footer; +} diff --git a/static/css/logo.css b/static/css/logo.css new file mode 100644 index 0000000..be24b86 --- /dev/null +++ b/static/css/logo.css @@ -0,0 +1,36 @@ +.page__logo { + padding: 0; + margin: 0; + font-weight: inherit; + color: var(--bg); +} + +.page__logo:before { + content: none; +} + +.page__logo-inner { + display: block; + background: var(--green); + padding: 0.25rem; +} + +a.page__logo-inner:link, a.page__logo-inner:visited { + color: inherit; + text-decoration: inherit; +} + +a.page__logo-inner:hover, +a.page__logo-inner:active { + background: var(--bright-green); +} + +.page__logo-inner:before { + content: "["; + color: var(--bg); +} + +.page__logo-inner:after { + content: "] $"; + color: var(--bg); +} diff --git a/static/css/risotto.css b/static/css/risotto.css new file mode 100644 index 0000000..3c2969d --- /dev/null +++ b/static/css/risotto.css @@ -0,0 +1,11 @@ +@import 'typography.css'; +@import 'layout.css'; +@import 'header.css'; +@import 'logo.css'; +@import 'about.css'; +@import 'footer.css'; + +body { + background-color: var(--dark-bg); + color: var(--fg); +} diff --git a/static/css/typography.css b/static/css/typography.css new file mode 100644 index 0000000..5901591 --- /dev/null +++ b/static/css/typography.css @@ -0,0 +1,155 @@ +/* Fonts */ +:root { + --font-monospace: "Fira Mono", monospace; +} + +body { + font-family: var(--font-monospace); + font-size: 16px; + line-height: 1.5rem; +} + +/* Headings */ +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: 1rem; + margin: 1.5rem 0 0 0; + font-weight: 600; +} + +h1+h2, +h1+h3, +h1+h4, +h1+h5, +h1+h6, +h2+h3, +h2+h4, +h2+h5, +h2+h6, +h3+h4, +h3+h5, +h3+h6, +h4+h5, +h4+h6, +h5+h6 { + margin: 0; +} + +h1:before { content: "# "; } +h2:before { content: "## "; } +h3:before { content: "### "; } +h4:before { content: "#### "; } +h5:before { content: "##### "; } +h6:before { content: "###### "; } + +h1:before, +h2:before, +h3:before, +h4:before, +h5:before, +h6:before { + color: var(--bright-bg); +} + +h1:first-child { + margin-top: 0; +} + +/* Paragraphs */ +p { + margin: 0 0 1.5rem 0; +} + +/* Links */ + +a:link, a:visited { + color: var(--fg); +} + +a:hover, a:active { + color: var(--bright-fg); +} + +/* Lists */ +ul { + margin: 1rem 0; + padding-left: 1.25rem; +} + +ol { + margin: 1rem 0; + padding-left: 1.75rem; +} + +ul ul, +ul ol, +ol ul, +ol ol { + margin: 0; +} + +ul li::marker { + content: '∗ '; + color: var(--bright-bg); +} + +ol li::marker { + color: var(--bright-bg); +} + +/* Blockquotes */ +blockquote { + position: relative; + margin-left: 1.5rem; +} + +blockquote::before { + position: absolute; + left: -1.5rem; + content: ">"; + color: var(--bright-bg); +} + +.twitter-tweet::before { + content: "\f099"; + font-family: "Font Awesome 5 Brands"; + font-weight: 400; +} + +/* Code */ +pre, +code, +kbd { + overflow-x: scroll; + background: var(--dark-bg); + font-family: var(--font-monospace); + color: var(--bright-bg); +} + +/* Emphasis */ +b, +strong { + font-weight: 600; +} + +/* Highlighting */ +::selection, +mark { + background-color: var(--yellow); + color: var(--bg); +} + +/* Other typographic elements */ +hr { + border: 0; +} + +hr:after { + content: '---'; + color: var(--bright-bg); +} + diff --git a/static/images/rice.svg b/static/images/rice.svg new file mode 100644 index 0000000..53e480c --- /dev/null +++ b/static/images/rice.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/theme.toml b/theme.toml new file mode 100644 index 0000000..2c1dde3 --- /dev/null +++ b/theme.toml @@ -0,0 +1,13 @@ +name = "risotto" +license = "MIT" +licenselink = "https://github.com/joeroe/risotto/blob/master/LICENSE" +description = "A minimalist, responsive theme inspired by terminal ricing aesthetics." +homepage = "https://risotto.joeroe.io" +tags = [] +features = [] +min_version = "0.41.0" + +[author] + name = "Joe Roe" + homepage = "https://joeroe.io" +