diff --git a/sass/code-highlight-dark.scss b/sass/code-highlight-dark.scss deleted file mode 100644 index 39ca9c9..0000000 --- a/sass/code-highlight-dark.scss +++ /dev/null @@ -1,80 +0,0 @@ -/* - * based on Monokai, modified to fit reasonable colors - */ -@import 'reasonable-colors'; - - -.z-comment { -color: $color-gray-3; -} -.z-string { -color: $color-amber-2; -} -.z-constant.z-numeric { -color: $color-purple-3; -} -.z-constant.z-language { -color: $color-purple-3; -} -.z-constant.z-character, .z-constant.z-other { -color: $color-purple-3; -} -.z-keyword { -color: $color-raspberry-3; -} -.z-storage { -color: $color-raspberry-3; -} -.z-storage.z-type { -color: $color-powder-2; -font-style: italic; -} -.z-entity.z-name.z-class { -color: $color-green-2; -font-style: underline; -} -.z-entity.z-other.z-inherited-class { -color: $color-green-2; -font-style: underline; -font-style: italic; -} -.z-entity.z-name.z-function { -color: $color-green-2; -} -.z-variable.z-parameter { -color: $color-cinnamon-2; -font-style: italic; -} -.z-entity.z-name.z-tag { -color: $color-raspberry-3; -} -.z-entity.z-other.z-attribute-name { -color: $color-green-2; -} -.z-support.z-function { -color: $color-powder-2; -} -.z-support.z-constant { -color: $color-powder-2; -} -.z-support.z-type, .z-support.z-class { -color: $color-powder-2; -font-style: italic; -} -.z-invalid { -color: $color-gray-1; -background-color: $color-raspberry-3; -} -.z-invalid.z-deprecated { -color: $color-gray-1; -background-color: $color-purple-3; -} -.z-path { -color: $color-indigo-3; -} -.z-generic { -color: $color-green-3; -} -.z-return-type { -color: $color-green-2; -} \ No newline at end of file diff --git a/sass/style.sass b/sass/style.sass index 4bfe846..f49dc33 100644 --- a/sass/style.sass +++ b/sass/style.sass @@ -14,9 +14,9 @@ body display: grid - grid-template-areas: "nav content" "sidebar content" "footer content" + grid-template-areas: "sidebar content" "footer content" - grid-template-rows: 50px 1fr 50px + grid-template-rows: 1fr 50px grid-template-columns: 20rem 1fr grid-column-gap: 2rem @@ -34,6 +34,13 @@ body div.debug padding-left: 2ch + div.sections + display: flex + flex-flow: column nowrap + padding-bottom: 0.5rem + border-bottom: 2px solid silver + margin-bottom: 0.5rem + a color: #0053a7 text-decoration: underline 0.1em rgba(0, 83, 167, 0) @@ -71,18 +78,6 @@ body a white-space: nowrap - nav - @include padding-horiz(1rem) - grid-area: nav - - height: 50px - display: flex - flex-flow: row nowrap - justify-content: space-between - align-items: center - background-color: #f2f2e1 - - article @include padding-horiz(2rem) margin: 1rem 0 @@ -141,7 +136,6 @@ body grid-area: sidebar overflow-y: scroll background-color: #f2f2e1 - border-top: 2px solid rgba(0, 0, 0, 0.1) border-bottom: 2px solid rgba(0, 0, 0, 0.1) display: flex flex-flow: column nowrap @@ -157,56 +151,6 @@ body #theme-toggle cursor: pointer - - - -body.dark - // todo: fix lmao - background-color: #232327 - color: #e7e3d5 - - a - color: #207edb - text-decoration-color: rgba(30, 115, 201, 0) - &:hover - text-decoration-color: rgba(30, 115, 201, 0.5) - - &:visited - color: #aa99ff - - &:active - color: #ed4523 - - - article - font-family: "Iosevka Etoile Web" - color: #e9e3d3 - background-color: #0a0b0c - background-image: url("rocky-wall-50.png") - - pre - background-color: rgba(5, 5, 5, 0.6) - box-shadow: 0 0 0.5rem 0 rgba(255, 255, 255, 0.5) inset - - table td - mark - color: #e9e3d3 - - code - @import code-highlight-dark - - mark - background-color: rgba($color-yellow-2, 0.1) - - aside - background-color: #18181a - - nav - background-color: #18181a - - footer - background-color: #18181a - @media print body diff --git a/static/script.js b/static/script.js deleted file mode 100644 index f6aeb8e..0000000 --- a/static/script.js +++ /dev/null @@ -1,14 +0,0 @@ -let placeholder = document.getElementById('theme-toggle-placeholder'); - -if (placeholder) { - let toggle = document.createElement("span"); - toggle.id = "theme-toggle"; - toggle.addEventListener("click", () => { - toggle_theme_pref(); - update_theme(); - update_theme_toggle(); - }); - placeholder.replaceWith(toggle); - - update_theme_toggle(); -} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index d1916c5..1541d52 100644 --- a/templates/base.html +++ b/templates/base.html @@ -20,42 +20,7 @@ {% endblock css -%} - - - +
{%- block content %}

override the content block in a template

{% endblock -%} diff --git a/templates/index.html b/templates/index.html index f0fd607..0aafa0b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -20,14 +20,9 @@ {% endfor %} {% endblock %} -{% block nav %} - {{ config.extra.index_nav_text | default(value="") }} - -{% endblock nav %} - {% block footer %} - © {{ now() | date(format='%Y') }} + {{ now() | date(format='%Y') }} {% if section.extra.author %} {{ section.extra.author }} {% elif config.extra.author %} @@ -45,12 +40,7 @@ {% endif %} {% if section.subsections %} {{ config.extra.subsections_string | default(value="Subsections:") }} - + {{ macros::subsection_tree(subs=section.subsections) }} {% endif %} {% if config.extra.xscratch_debug_info %} Debug info: diff --git a/templates/macros.html b/templates/macros.html index cb02c69..f63822e 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -44,4 +44,28 @@ {{ thing }} {% endif %} -{% endmacro %} \ No newline at end of file +{% endmacro debug %} + +{% macro parent_tree(ancestors) %} +
+ {% for sect in ancestors %} + {% set sect = get_section(path=sect) %} + + + {{ sect.title }}/ + + + {% endfor %} +
+{% endmacro section_tree %} + +{% macro subsection_tree(subs) %} + +{% endmacro subsection_tree %} \ No newline at end of file diff --git a/templates/page.html b/templates/page.html index 9cdadf8..6bd3969 100644 --- a/templates/page.html +++ b/templates/page.html @@ -15,17 +15,14 @@ {% endif %} {% endblock %} -{% block nav %} - ../{{ page.slug }} - -{% endblock %} - {% block content %}

{{ page.title }}

{{ page.content | safe }} {% endblock %} {% block aside %} + {{ macros::parent_tree(ancestors=page.ancestors) }} + {% if page.date -%} Published: {% if page.updated %}, Updated: {% endif %} {%- endif %} @@ -51,7 +48,7 @@ {% block footer %} - © {{ now() | date(format='%Y') }} + {{ now() | date(format='%Y') }} {% if page.extra.author %} {{ page.extra.author }} {% elif config.extra.author %} diff --git a/templates/section.html b/templates/section.html index 2d0cd5c..fbb25f0 100644 --- a/templates/section.html +++ b/templates/section.html @@ -20,15 +20,9 @@ {% endfor %} {% endblock %} -{% block nav %} - {% set dom = section.relative_path | trim_end_matches(pat="/_index.md") %} - ../{{ dom }} - -{% endblock %} - {% block footer %} - © {{ now() | date(format='%Y') }} + {{ now() | date(format='%Y') }} {% if section.extra.author %} {{ section.extra.author }} {% elif config.extra.author %} @@ -38,6 +32,8 @@ {% endblock %} {% block aside %} + {{ macros::parent_tree(ancestors=section.ancestors) }} + {% if section.title %}

{{ section.title }}

{% endif %} @@ -46,12 +42,7 @@ {% endif %} {% if section.subsections %} {{ config.extra.subsections_string | default(value="Subsections:") }} -
    - {% for sub in section.subsections %} - {% set dom = sub | trim_end_matches(pat="/_index.md") %} -
  • {{ dom }}
  • - {% endfor %} -
+ {{ macros::subsection_tree(subs=section.subsections) }} {% endif %} {% if config.extra.xscratch_debug_info %} diff --git a/theme.toml b/theme.toml index b902a2c..7a1650e 100644 --- a/theme.toml +++ b/theme.toml @@ -7,14 +7,6 @@ min_version = "0.4.0" # An optional live demo URL demo = "" -# Any variable there can be overridden in the end user `config.toml` -# You don't need to prefix variables by the theme name but as this will -# be merged with user data, some kind of prefix or nesting is preferable -# Use snake_casing to be consistent with the rest of Zola -[extra] - -default_dark = false - # The theme author info: you! [author] name = "xenua"