the code for my website (https://www.annwan.me)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
6.7 KiB

10 months ago
  1. # 🍚 risotto
  2. risotto is a minimalist, responsive [hugo](https://gohugo.io) theme inspired by terminal ricing aesthetics.
  3. [![Hugo Themes](https://img.shields.io/badge/Hugo_Themes-risotto-blue?logo=hugo)](https://themes.gohugo.io/themes/risotto/)
  4. [![Version](https://img.shields.io/badge/semver-v0.4.0-blue)](https://semver.org)
  5. ![hugo build status](https://github.com/joeroe/risotto/actions/workflows/hugo-build-exampleSite.yml/badge.svg)
  6. [![W3C Validation](https://img.shields.io/w3c-validation/html?targetUrl=https%3A%2F%2Frisotto.joeroe.io)](https://validator.nu/?doc=https%3A%2F%2Frisotto.joeroe.io)
  7. ![Code size](https://img.shields.io/github/languages/code-size/joeroe/risotto)
  8. ![Screenshot of the risotto theme](https://raw.githubusercontent.com/joeroe/risotto/master/images/screenshot.png)
  9. ## Features
  10. * Plain, semantic HTML with no Javascript
  11. * Plain CSS – no frameworks, no preprocessors, just simple and easy-to-customise stylesheets
  12. * Uses [CSS Grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout) for native responsive behaviour without arbitrary breakpoints
  13. * Comes with [16 built-in colour schemes](#colour-schemes) based on popular terminal themes plus the ability to use custom themes using the [base16 system](https://github.com/monicfenga/base16-styles)
  14. ## Install
  15. The easiest way to install the theme is to [download the latest release](https://github.com/joeroe/risotto/releases/tag/release) and extract it to your project's `themes/` directory.
  16. You can also clone this repository into your site's `themes` directory and checkout the latest release:
  17. ```shell
  18. git clone https://github.com/joeroe/risotto themes/risotto && cd themes/risotto
  19. git checkout $(git tag -l | grep '^v[0-9.]*$' | sort -V | tail -n 1)
  20. ```
  21. Note that this will not work if your site is itself a git repository.
  22. In that case, you can add the theme as a [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules), but this is not recommended due to the difficulty of tracking a specific release.
  23. ## Update
  24. If you installed the theme using `git clone`, pull the repository to get the latest version:
  25. ```shell
  26. cd themes/risotto
  27. git pull
  28. ```
  29. Otherwise, simply [download the latest release](https://github.com/joeroe/risotto/releases/tag/release) and extract it to your project's `themes/` directory, replacing the old version.
  30. ## Configure
  31. To use the theme, add `theme = 'risotto'` to your site's `hugo.toml`, or `theme: risotto` to your `hugo.yaml`.
  32. See `exampleSite/config.toml` for the theme-specific parameters you need to add to your site's `hugo.toml` or `hugo.yaml` to configure the theme.
  33. ### Colour schemes
  34. risotto uses the [base16 framework](https://github.com/chriskempson/base16) to define colour schemes that can be used with the `theme.palette` parameter.
  35. A selection of 16 palettes (10 dark, 6 light) are bundled with the theme: `apprentice`, `base16-dark`, `base16-light`, `dracula`, `gruvbox-dark`, `gruvbox-light`, `material`, `papercolor-dark`, `papercolor-light`, `solarized-dark`, `solarized-light`, `tender`, `tokyo-night-dark`, `tokyo-night-light`, `windows-95` and `windows-95-light`.
  36. The default is `base16-dark`.
  37. <!-- TODO: add screenshots of default themes -->
  38. The easiest way to use other base16 styles is to place .css file from https://github.com/monicfenga/base16-styles/tree/master/css-variables and place it in your `static/css/palettes` directory.
  39. Or to define a wholly custom theme, you will need to define the following CSS variables for the following base16 colours (see [base16-dark.css](blob/main/static/css/palettes/base16-dark.css) for an example):
  40. | Base | Default colour | Used for | Examples |
  41. | ---- | ------------------------------------------ | ------------------- | ------------------------------------ |
  42. | 00 | <span class="base00">Dark</span> | Background | Page background |
  43. | 01 | <span class="base01"></span> | Alt. background | Content background |
  44. | 02 | <span class="base02"></span> | In-text backgrounds | `<pre>`, `<code>`, `<kbd>`, `<samp>` |
  45. | 03 | <span class="base03"></span> | Muted text | `:before` & `:marker` symbols |
  46. | 04 | <span class="base04"></span> | Alt. foreground | Aside text |
  47. | 05 | <span class="base05"></span> | Foreground | Content text |
  48. | 06 | <span class="base06"></span> | | |
  49. | 07 | <span class="base07">Light</span> | | |
  50. | 08 | <span class="base08">Red</span> | | |
  51. | 09 | <span class="base09">Orange</span> | | |
  52. | 0A | <span class="base0A">Yellow</span> | Highlights | Selected text, `<mark>` |
  53. | 0B | <span class="base0B">Green</span> | Primary accent | Logo |
  54. | 0C | <span class="base0C">Cyan</span> | Active links | `a:active`, `a:hover` |
  55. | 0D | <span class="base0D">Blue</span> | Links | `a:link`, `a:visited` |
  56. | 0E | <span class="base0E">Magenta</span> | | |
  57. | 0F | <span class="base0F">Brown</span> | | |
  58. For light mode palettes, the sequence of 00–07 should be reversed (light to dark, not dark to light).
  59. Note that not all colours are currently used in the theme.
  60. You you use these colours directly in content using the convenience classes `.baseXX` and `.bg-baseXX`.
  61. For example:
  62. ```html
  63. <span class="base0A">Yellow text</span>
  64. <mark class="base0D">Text highlighted in green</mark>
  65. ```
  66. ## Favicon
  67. risotto will automatically use favicons placed in the `static/` directory.
  68. The following files will be detected and included in your site's `<head>` section:
  69. * `favicon.ico`
  70. * `favicon-16x16.png`
  71. * `favicon-32x32.png`
  72. * `apple-touch-icon.png`
  73. * `site.webmanifest`
  74. You can generate these from an image or emoji using [favicon.io](https://favicon.io/) or a similar service.
  75. They must be placed directly under your site's `static/` directory, i.e. not in in a subdirectory or `themes/risotto/static/`.
  76. ## Acknowledgements
  77. The 'cooked rice' emoji used as a favicon for the example site was created by the [Twemoji project](https://twemoji.twitter.com/) and is licensed under [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/).