mkdocs improvement

This commit is contained in:
2026-06-08 19:49:29 +03:00
parent 8f6341e840
commit 73725b8365
5 changed files with 73 additions and 66 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ jobs:
python-version: '3.x' python-version: '3.x'
- name: Install mkdocs and dependencies - name: Install mkdocs and dependencies
run: pip install mkdocs mkdocs-bootswatch run: pip install mkdocs mkdocs-material
- name: Build documentation - name: Build documentation
run: mkdocs build --strict run: mkdocs build --strict
+1 -1
View File
@@ -28,7 +28,7 @@ jobs:
python-version: '3.x' python-version: '3.x'
- name: Install mkdocs and dependencies - name: Install mkdocs and dependencies
run: pip install mkdocs mkdocs-bootswatch run: pip install mkdocs mkdocs-material
- name: Build documentation - name: Build documentation
run: mkdocs build --strict run: mkdocs build --strict
+15 -8
View File
@@ -1,11 +1,18 @@
/* Widen the navbar container */ /* Material header tweaks */
.navbar .container { .md-header,
max-width: 100%; /* adjust to your target width */ .md-tabs {
width: 95%; background-color: #101014;
} }
/* Tighter spacing between navbar items */ .md-header {
.navbar-nav > li > a { border-bottom: 1px solid rgba(255, 152, 0, 0.28);
padding-left: 8px; }
padding-right: 8px;
.md-tabs {
border-bottom: 1px solid rgba(255, 152, 0, 0.16);
}
.md-tabs__link--active,
.md-tabs__link:hover {
color: #ffb74d;
} }
+33 -54
View File
@@ -1,65 +1,44 @@
/* Normal links */ /* Material dark palette overrides */
a { [data-md-color-scheme="slate"] {
color: orange; --md-default-bg-color: #0f1117;
--md-default-fg-color: #e8eaed;
--md-primary-fg-color: #101014;
--md-primary-fg-color--light: #1a1a21;
--md-primary-fg-color--dark: #09090d;
--md-accent-fg-color: #ff9800;
--md-accent-fg-color--transparent: rgba(255, 152, 0, 0.14);
--md-typeset-a-color: #ffb74d;
--md-code-bg-color: #171a22;
--md-code-fg-color: #f5f7fa;
} }
.md-typeset a {
/* On hover/focus */ color: var(--md-typeset-a-color);
a:hover,
a:focus {
color: #ff9900; /* a slightly different orange, optional */
}
/* Navbar background */
.navbar,
.navbar-default,
.navbar-inverse {
background-color: #a26228 !important; /* your orange */
border-color: #ff6600 !important;
} }
/* Navbar brand + links */ .md-typeset a:hover,
.navbar .navbar-brand, .md-typeset a:focus {
.navbar .navbar-nav > li > a { color: #ffd180;
color: #ffffff !important;
} }
/* Active and hover states */ .md-tabs__item--active > .md-tabs__link,
.navbar .navbar-nav > .active > a, .md-tabs__link:hover,
.navbar .navbar-nav > .active > a:focus, .md-nav__link:hover,
.navbar .navbar-nav > .active > a:hover, .md-nav__link:focus,
.navbar .navbar-nav > li > a:hover, .md-nav__link--active,
.navbar .navbar-nav > li > a:focus { .md-nav__item .md-nav__link--active {
color: #ffffff !important; color: #ffb74d;
}
/* === DROPDOWN MENU BACKGROUND === */
.navbar .dropdown-menu {
border-color: #ff6600 !important;
} }
/* Caret icon (the little triangle) */ .md-typeset .md-button {
.navbar .dropdown-toggle .caret { border-color: #ff9800;
border-top-color: #ffffff !important; color: #ffb74d;
border-bottom-color: #ffffff !important;
} }
/* === BOOTSTRAP 3 STYLE ITEMS (mkdocs + bootswatch darkly often use this) === */ .md-typeset .md-button:hover,
.navbar .dropdown-menu > li > a { .md-typeset .md-button:focus,
color: #ffffff !important; .md-typeset .md-button--primary {
} background-color: #ff9800;
border-color: #ff9800;
.navbar .dropdown-menu > li > a:hover, color: #111111;
.navbar .dropdown-menu > li > a:focus {
background-color: #e65c00 !important; /* darker orange on hover */
color: #ffffff !important;
}
/* === BOOTSTRAP 4+ STYLE ITEMS (if your theme uses .dropdown-item) === */
.navbar .dropdown-item {
color: #ffffff !important;
}
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
background-color: #e65c00 !important;
color: #ffffff !important;
} }
+22 -1
View File
@@ -1,6 +1,27 @@
site_name: OMATH Docs site_name: OMATH Docs
theme: theme:
name: darkly name: material
font:
text: Roboto
code: Roboto Mono
palette:
scheme: slate
primary: black
accent: orange
features:
- navigation.instant
- navigation.tracking
- navigation.sections
- navigation.top
- search.highlight
- content.code.copy
markdown_extensions:
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.superfences
extra_css: extra_css:
- styles/center.css - styles/center.css
- styles/custom-header.css - styles/custom-header.css