From afd44ee9907b14809cc76dfb51c781a5334ab83b Mon Sep 17 00:00:00 2001 From: Nick Slowinski Date: Tue, 4 Jul 2023 23:27:58 +0200 Subject: [PATCH] update base config, adding wanted stuff --- docs/assets/stylesheets/extra.css | 6 +++- docs/mitwirkende.md | 5 +++ mkdocs.yml | 60 +++++++++++++++++++++---------- overrides/main.html | 5 +++ overrides/partials/actions.html | 55 ++++++++++++++++++++++++++++ 5 files changed, 112 insertions(+), 19 deletions(-) create mode 100644 docs/mitwirkende.md create mode 100644 overrides/main.html create mode 100644 overrides/partials/actions.html diff --git a/docs/assets/stylesheets/extra.css b/docs/assets/stylesheets/extra.css index 24c3a72..8abb95e 100644 --- a/docs/assets/stylesheets/extra.css +++ b/docs/assets/stylesheets/extra.css @@ -45,4 +45,8 @@ :root { --md-code-font: "Source Code Pro"; - } \ No newline at end of file + } + +.md-grid { + max-width: 90%; +} \ No newline at end of file diff --git a/docs/mitwirkende.md b/docs/mitwirkende.md new file mode 100644 index 0000000..0a97830 --- /dev/null +++ b/docs/mitwirkende.md @@ -0,0 +1,5 @@ +# Mitwirkende + +Folgende Menschen haben haben an dieser Dokumentation mitgewirkt: + +* [Nick Slowinski](https://git.nick-slowinski.de/NickSlowinski) \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 2bf75a8..ab114c6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,6 +1,8 @@ site_name: Dokumentation von nick-slowinski.de repo_url: https://git.nick-slowinski.de/nick-slowinski.de/docs repo_name: nick-slowinski.de/docs +edit_uri: _edit/main/docs/ +copyright: Copyright © 2023 Nick Slowinski und Mitwirkende plugins: - git-revision-date-localized: @@ -11,6 +13,11 @@ plugins: markdown_extensions: - admonition + - attr_list + - footnotes + - pymdownx.emoji: + emoji_index: !!python/name:materialx.emoji.twemoji + emoji_generator: !!python/name:materialx.emoji.to_svg - pymdownx.details - pymdownx.superfences - pymdownx.tasklist: @@ -18,33 +25,50 @@ markdown_extensions: theme: name: material + custom_dir: overrides language: de icon: repo: simple/forgejo font: false features: + - header.autohide + - announce.dismiss + - content.action.edit + - content.action.view + - navigation.instant + - navigation.tracking + - navigation.sections + - navigation.indexes + - navigation.top - search.suggest - search.highlight - search.share + - toc.follow + - toc.integrate palette: - # Palette toggle for automatic mode - - media: "(prefers-color-scheme)" - toggle: - icon: material/brightness-auto - name: In den Helligkeitsmodus wechseln - - # Palette toggle for light mode - - media: "(prefers-color-scheme: light)" - scheme: default - toggle: - icon: material/brightness-7 - name: In den Dunkelmodus wechseln - # Palette toggle for dark mode - - media: "(prefers-color-scheme: dark)" - scheme: slate + - scheme: slate toggle: - icon: material/brightness-4 - name: Zur Systempräferenz wechseln + icon: material/weather-night + name: In den Dunkelmodus wechseln + # Palette toggle for light mode + - scheme: default + toggle: + icon: material/weather-sunny + name: In den Helligkeitsmodus wechseln +extra_css: [ assets/stylesheets/extra.css ] -extra_css: [ assets/stylesheets/extra.css ] \ No newline at end of file +extra: + social: + - icon: octicons/link-16 + link: https://www.nick-slowinski.de + - icon: simple/weblate + link: https://weblate.nick-slowinski.de + - icon: simple/forgejo + link: https://git.nick-slowinski.de/ + - icon: octicons/mail-16 + link: mailto:nick@nick-slowinski.de + - icon: simple/discourse + link: https://community.nick-slowinski.de + - icon: simple/teamspeak + link: ts3server://nick-slowinski.de \ No newline at end of file diff --git a/overrides/main.html b/overrides/main.html new file mode 100644 index 0000000..7213f6d --- /dev/null +++ b/overrides/main.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} + +{% block announce %} +

Diese Dokumentation ist noch im Aufbau und daher unvollständig. Sie sollte bis zur Fertigstellung nur als grober Richtwert betrachtet werden.

+{% endblock %} \ No newline at end of file diff --git a/overrides/partials/actions.html b/overrides/partials/actions.html new file mode 100644 index 0000000..dfb75ae --- /dev/null +++ b/overrides/partials/actions.html @@ -0,0 +1,55 @@ + + + +{% if page.edit_url %} + + + {% if "content.action.edit" in features %} + + {% set icon = config.theme.icon.edit or "material/file-edit-outline" %} + {% include ".icons/" ~ icon ~ ".svg" %} + + {% endif %} + + + {% if "content.action.view" in features %} + {% if "/blob/" in page.edit_url %} + {% set part = "blob" %} + {% else %} + {% set part = "_edit" %} + {% endif %} + + {% set icon = config.theme.icon.view or "material/file-eye-outline" %} + {% include ".icons/" ~ icon ~ ".svg" %} + + {% endif %} +{% endif %} \ No newline at end of file