From 82310204410b39540d3a2532e374fb6b1480c717 Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 7 Jun 2024 04:28:23 +0200 Subject: [PATCH] Recolor and change git authors plugin --- .gitignore | 1 + docs/css/custom.css | 16 ++++++++++++++++ mkdocs.yml | 17 +++++++++++++---- overrides/main.html | 11 ----------- requirements.txt | 2 +- 5 files changed, 31 insertions(+), 16 deletions(-) create mode 100644 docs/css/custom.css delete mode 100644 overrides/main.html diff --git a/.gitignore b/.gitignore index 91af11df..53e63197 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ site /.vscode +.cache \ No newline at end of file diff --git a/docs/css/custom.css b/docs/css/custom.css new file mode 100644 index 00000000..93b00b95 --- /dev/null +++ b/docs/css/custom.css @@ -0,0 +1,16 @@ +:root { + --md-primary-fg-color: #e14a6d; + --md-primary-fg-color--light: #ffa5af; + --md-primary-fg-color--dark: #9e1c3b; + + --md-accent-fg-color: #ffa5af; + --md-accent-fg-color--transparent: rgba(255, 165, 175, 0.1); +} + +.md-header { + background-color: #402b66; +} + +.md-tabs { + background-color: #402b66; +} \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 45740128..5c1cd7b0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -92,13 +92,17 @@ theme: custom_dir: overrides palette: # Palette toggle for dark mode - - scheme: slate + - scheme: slate + primary: custom + accent: custom toggle: icon: material/brightness-4 name: Switch to light mode # Palette toggle for light mode - scheme: default + primary: custom + accent: custom toggle: icon: material/brightness-7 name: Switch to dark mode @@ -119,10 +123,15 @@ markdown_extensions: plugins: - search - - git-authors - - git-revision-date-localized + - git-committers: + repository: openshock/wiki + branch: master + - git-revision-date-localized: + enable_creation_date: true - tags: - enabled: true + enabled: true +extra_css: + - "css/custom.css" extra: # Tag definitions for tagging pages. diff --git a/overrides/main.html b/overrides/main.html deleted file mode 100644 index 0594cc1c..00000000 --- a/overrides/main.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "base.html" %} - -{% block content %} - {{ super() }} - - {% if git_page_authors %} - - Authors: {{ git_page_authors | default('enable mkdocs-git-authors-plugin') }} - - {% endif %} -{% endblock %} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index a618230b..08296d06 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ mkdocs mkdocs-material -mkdocs-git-authors-plugin +mkdocs-git-committers-plugin-2 mkdocs-git-revision-date-localized-plugin