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.

112 lines
4.9 KiB

4 years ago
  1. +++
  2. title = "Skin Styles"
  3. description = "Choose one of eight customizable skin styles."
  4. categories = ["customizing"]
  5. tags = ["color", "style", "branding"]
  6. features = ["code highlighter", "snippets", "related content"]
  7. aliases = [
  8. "/feature/display-variants/"
  9. ]
  10. [[copyright]]
  11. owner = "Josh Habdas"
  12. date = "2019"
  13. license = "agpl-3.0-or-later"
  14. +++
  15. After Dark uses {{< external href="https://hackcss.egoist.moe" text="hackcss" />}} to provide four color palettes and two display modes. Toggle between them from your {{< external href="https://gohugo.io/getting-started/configuration/" text="site configuration" />}} for 8 possible combinations:
  16. <style>
  17. table[summary] td pre {
  18. margin: 0;
  19. }
  20. .hack.dark table tr:nth-child(odd) td {
  21. background-color: initial;
  22. }
  23. </style>
  24. <table summary="Color palette and display mode settings">
  25. <thead>
  26. <tr>
  27. <th rowspan="2">Palette</th>
  28. <th colspan="2">Mode</th>
  29. </tr>
  30. <tr>
  31. <th>Hack</th>
  32. <th>Standard</th>
  33. </tr>
  34. </thead>
  35. <tbody>
  36. <tr>
  37. <td>Dark</td>
  38. <td><i>None required.</i></td>
  39. <td class="highlight">
  40. <pre><code><span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">hackcss</span><span class="p">]</span>
  41. <span class="nx">mode</span> <span class="p">=</span> <span class="s2">&quot;standard&quot;</span></code></pre>
  42. </td>
  43. </tr>
  44. <tr>
  45. <td style="background-color:#181818;color:#ccc">Dark Grey</td>
  46. <td class="highlight">
  47. <pre><code><span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">hackcss</span><span class="p">]</span>
  48. <span class="nx">palette</span> <span class="p">=</span> <span class="s2">&quot;dark-grey&quot;</span></code></pre>
  49. </td>
  50. <td class="highlight">
  51. <pre><code><span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">hackcss</span><span class="p">]</span>
  52. <span class="nx">mode</span> <span class="p">=</span> <span class="s2">&quot;standard&quot;</span>
  53. <span class="nx">palette</span> <span class="p">=</span> <span class="s2">&quot;dark-grey&quot;</span></code></pre>
  54. </td>
  55. </tr>
  56. <tr>
  57. <td style="background-color:#073642;color:#78909c">Solarized Dark</td>
  58. <td class="highlight">
  59. <pre><code><span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">hackcss</span><span class="p">]</span>
  60. <span class="nx">palette</span> <span class="p">=</span> <span class="s2">&quot;solarized-dark&quot;</span></code></pre>
  61. </td>
  62. <td class="highlight">
  63. <pre><code><span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">hackcss</span><span class="p">]</span>
  64. <span class="nx">mode</span> <span class="p">=</span> <span class="s2">&quot;standard&quot;</span>
  65. <span class="nx">palette</span> <span class="p">=</span> <span class="s2">&quot;solarized-dark&quot;</span></code></pre>
  66. </td>
  67. </tr>
  68. <tr>
  69. <td style="background-color:#fff;color:#000">Light</td>
  70. <td class="highlight">
  71. <pre><code><span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">hackcss</span><span class="p">]</span>
  72. <span class="nx">palette</span> <span class="p">=</span> <span class="s2">&quot;light&quot;</span></code></pre>
  73. </td>
  74. <td class="highlight">
  75. <pre><code><span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">hackcss</span><span class="p">]</span>
  76. <span class="nx">mode</span> <span class="p">=</span> <span class="s2">&quot;standard&quot;</span>
  77. <span class="nx">palette</span> <span class="p">=</span> <span class="s2">&quot;light&quot;</span></code></pre>
  78. </td>
  79. </tr>
  80. </tbody>
  81. </table>
  82. The default skin uses the `dark` color palette with the `hack` display mode. No configuration is necessary to use the default skin.
  83. Choose a skin style from your site configuration. For example, to set a dark grey color _without_ the stylistic `markdown` treatment update your config like:
  84. {{< hackcss-card header="config.toml" >}}
  85. {{< highlight toml "linenos=inline" >}}
  86. baseurl = "https://letterboxd.com/"
  87. languageCode = "en-US"
  88. title = "A Scanner Darkly"
  89. [params]
  90. description = "An undercover cop in a not-too-distant future becomes involved with a dangerous new drug and begins to lose his own identity as a result."
  91. images = ["https://a.ltrbxd.com/resized/sm/upload/e3/kt/un/fi/nZuqo9yQpEo447sH0w0MFBgdT6J-1200-1200-675-675-crop-000000.jpg"]
  92. [params.hackcss]
  93. mode = "standard"
  94. palette = "dark-grey"
  95. {{< /highlight >}}
  96. {{< /hackcss-card >}}
  97. Disable skin styles by setting the `disabled` flag:
  98. ```toml
  99. [params.hackcss]
  100. disabled = true # disable skin styles entirely
  101. ```
  102. When changing colors review [Custom Styles](../custom-styles), [Trim Color](../trim-color) and [Error Page](../error-page), making any adjustments necessary to achieve the desired look-and-feel.