From 2267fcfd5fc39f97b05c622847216336b871334b Mon Sep 17 00:00:00 2001 From: david-swift Date: Tue, 1 Apr 2025 15:57:02 +0200 Subject: [PATCH] Minimalize docs sidebar design Delete templates/docs.html as there is no need for a separate toc site. The new design is optimized for the sidebar. --- content/docs/_index.md | 1 - sass/_docs.scss | 4 ++-- sass/_general.scss | 1 + sass/_variables.scss | 2 ++ templates/docs.html | 27 --------------------------- 5 files changed, 5 insertions(+), 30 deletions(-) delete mode 100644 templates/docs.html diff --git a/content/docs/_index.md b/content/docs/_index.md index a94e515..ca21d17 100644 --- a/content/docs/_index.md +++ b/content/docs/_index.md @@ -1,7 +1,6 @@ +++ title = "Docs" sort_by = "weight" -template = "docs.html" page_template = "documentation_page.html" [extra] diff --git a/sass/_docs.scss b/sass/_docs.scss index 55ed3a0..f2fe21c 100644 --- a/sass/_docs.scss +++ b/sass/_docs.scss @@ -1,5 +1,4 @@ #docs { - background-color: var(--fg-muted-1-soft); padding: 0.5em 1em; border-radius: var(--rounded-corner); min-width: 200px; @@ -50,7 +49,8 @@ article { margin-left: auto; margin-right: auto; - max-width: min(var(--container-width), 90%); + max-width: var(--container-width); + min-width: var(--min-container-width); } } diff --git a/sass/_general.scss b/sass/_general.scss index 80f803b..7f15158 100644 --- a/sass/_general.scss +++ b/sass/_general.scss @@ -72,6 +72,7 @@ body { main { margin: 4.25rem auto 4rem; + max-width: var(--max-container-width) } .restricted-width { diff --git a/sass/_variables.scss b/sass/_variables.scss index 6cf0bc3..6525626 100644 --- a/sass/_variables.scss +++ b/sass/_variables.scss @@ -74,6 +74,8 @@ // CONTAINERS --container-width: 720px; + --max-container-width: 1500px; + --min-container-width: 350px; // CORNERS --rounded-corner: 0.75rem; diff --git a/templates/docs.html b/templates/docs.html deleted file mode 100644 index 4a9efe4..0000000 --- a/templates/docs.html +++ /dev/null @@ -1,27 +0,0 @@ -{% extends "restricted_base.html" %} - -{% block content %} - -

{{ section.title }}

- -{{ section.content | safe }} - -{#
- {%- if paginator.pages -%} - {%- set pages = paginator.pages -%} - {%- elif section.pages -%} - {%- set pages = section.pages -%} - {%- else -%} - {%- set pages = term.pages -%} - {%- endif -%} - - {%- for month, pages in pages | group_by(attribute="month") -%} - {%- set posts_per_bar = pages | length -%} - {%- set bar_height = pages | length * 10 -%} -
- {%- endfor -%} -
#} - -{% include "partials/docs_toc.html" %} - -{% endblock content %}