mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-15 16:24:04 +02:00
Fix theme configuration for proper light/dark mode
- Restructure zensical.toml to match working agent-cli config - Add three-way palette toggle (system/light/dark) - Use proper [project.theme] structure - Simplify extra.css to not override theme colors - Add Inter font for text, JetBrains Mono for code
This commit is contained in:
parent
75a9ece107
commit
c1bd799928
2 changed files with 91 additions and 264 deletions
|
|
@ -1,18 +1,5 @@
|
|||
/* Adaptive Lighting Documentation Custom Styles */
|
||||
|
||||
/* Sun-themed color adjustments */
|
||||
:root {
|
||||
--md-primary-fg-color: #FF9800;
|
||||
--md-primary-fg-color--light: #FFB74D;
|
||||
--md-primary-fg-color--dark: #F57C00;
|
||||
--md-accent-fg-color: #FFC107;
|
||||
}
|
||||
|
||||
[data-md-color-scheme="slate"] {
|
||||
--md-primary-fg-color: #FFB74D;
|
||||
--md-accent-fg-color: #FFD54F;
|
||||
}
|
||||
|
||||
/* Hero section on index page */
|
||||
.md-content__inner > h1:first-child {
|
||||
font-size: 2.5rem;
|
||||
|
|
@ -24,180 +11,36 @@
|
|||
height: 1.8rem;
|
||||
}
|
||||
|
||||
/* Feature grid for homepage */
|
||||
.feature-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 1rem;
|
||||
margin: 1.5rem 0;
|
||||
}
|
||||
|
||||
.feature-card {
|
||||
padding: 1.25rem;
|
||||
border-radius: 0.5rem;
|
||||
background: var(--md-code-bg-color);
|
||||
border: 1px solid var(--md-default-fg-color--lightest);
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.feature-card:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.feature-card h3 {
|
||||
margin-top: 0;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.feature-card p {
|
||||
margin-bottom: 0;
|
||||
font-size: 0.9rem;
|
||||
color: var(--md-default-fg-color--light);
|
||||
}
|
||||
|
||||
/* Configuration table improvements */
|
||||
.md-typeset table:not([class]) {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.md-typeset table:not([class]) th {
|
||||
background-color: var(--md-primary-fg-color);
|
||||
color: white;
|
||||
}
|
||||
|
||||
[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
|
||||
background-color: var(--md-primary-fg-color--dark);
|
||||
}
|
||||
|
||||
/* Code block in table cells */
|
||||
.md-typeset table:not([class]) code {
|
||||
font-size: 0.8rem;
|
||||
padding: 0.1rem 0.3rem;
|
||||
}
|
||||
|
||||
/* Admonition styling - sun theme */
|
||||
.md-typeset .admonition.tip,
|
||||
.md-typeset details.tip {
|
||||
border-color: #FFC107;
|
||||
}
|
||||
|
||||
.md-typeset .admonition.tip > .admonition-title,
|
||||
.md-typeset details.tip > summary {
|
||||
background-color: rgba(255, 193, 7, 0.1);
|
||||
}
|
||||
|
||||
.md-typeset .admonition.tip > .admonition-title::before,
|
||||
.md-typeset details.tip > summary::before {
|
||||
background-color: #FFC107;
|
||||
}
|
||||
|
||||
/* Service section styling */
|
||||
.service-section {
|
||||
margin: 2rem 0;
|
||||
padding: 1.5rem;
|
||||
background: var(--md-code-bg-color);
|
||||
border-radius: 0.5rem;
|
||||
border-left: 4px solid var(--md-primary-fg-color);
|
||||
}
|
||||
|
||||
.service-section h2 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* Badge styling for status indicators */
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: 0.2rem 0.5rem;
|
||||
border-radius: 0.25rem;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.badge-required {
|
||||
background-color: #f44336;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.badge-optional {
|
||||
background-color: #4caf50;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Responsive video container */
|
||||
.video-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding-bottom: 56.25%;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.video-container iframe,
|
||||
.video-container video {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
/* Simulator link button styling */
|
||||
.simulator-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
display: inline-block;
|
||||
padding: 0.75rem 1.5rem;
|
||||
background: linear-gradient(135deg, #FF9800, #FFC107);
|
||||
background: linear-gradient(135deg, var(--md-primary-fg-color), var(--md-accent-fg-color));
|
||||
color: white !important;
|
||||
text-decoration: none;
|
||||
border-radius: 2rem;
|
||||
font-weight: 600;
|
||||
text-decoration: none !important;
|
||||
font-size: 1.1rem;
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.simulator-link:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
|
||||
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Hide doctoc generated content in docs (we use mkdocs nav) */
|
||||
.md-typeset [id^="doctoc"] {
|
||||
display: none;
|
||||
/* Code block improvements */
|
||||
.highlight code {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
/* Details/collapsible sections - match README style */
|
||||
.md-typeset details {
|
||||
margin: 1rem 0;
|
||||
/* Table improvements */
|
||||
.md-typeset table:not([class]) {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.md-typeset details summary {
|
||||
cursor: pointer;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Emoji in headings - ensure proper sizing */
|
||||
.md-typeset h1 .twemoji,
|
||||
.md-typeset h2 .twemoji,
|
||||
.md-typeset h3 .twemoji {
|
||||
height: 1em;
|
||||
vertical-align: -0.1em;
|
||||
}
|
||||
|
||||
/* Graph images */
|
||||
.md-typeset img[alt*="graph"],
|
||||
.md-typeset img[alt*="brightness"],
|
||||
.md-typeset img[alt*="color_temp"] {
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* Contributors section - hide in docs, link to README instead */
|
||||
.contributors-section {
|
||||
text-align: center;
|
||||
padding: 2rem;
|
||||
background: var(--md-code-bg-color);
|
||||
border-radius: 0.5rem;
|
||||
margin: 2rem 0;
|
||||
.md-typeset table:not([class]) th {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
|
|
|||
182
zensical.toml
182
zensical.toml
|
|
@ -2,126 +2,110 @@
|
|||
# Built with Zensical - https://zensical.org
|
||||
|
||||
[project]
|
||||
name = "Adaptive Lighting"
|
||||
site_name = "Adaptive Lighting"
|
||||
site_url = "https://adaptive-lighting.nijho.lt"
|
||||
repo_url = "https://github.com/basnijholt/adaptive-lighting"
|
||||
repo_name = "basnijholt/adaptive-lighting"
|
||||
edit_uri = "edit/main/docs/"
|
||||
site_description = "Automatically adjust brightness and color of lights based on the sun position"
|
||||
site_author = "Bas Nijholt"
|
||||
site_url = "https://adaptive-lighting.nijho.lt/"
|
||||
copyright = "Copyright © 2020-2026 Bas Nijholt"
|
||||
|
||||
[theme]
|
||||
name = "material"
|
||||
custom_dir = "docs/overrides"
|
||||
logo = "assets/logo.png"
|
||||
favicon = "assets/logo.png"
|
||||
icon = { repo = "fontawesome/brands/github" }
|
||||
repo_url = "https://github.com/basnijholt/adaptive-lighting"
|
||||
repo_name = "GitHub"
|
||||
edit_uri = "edit/main/docs"
|
||||
|
||||
[[theme.palette]]
|
||||
scheme = "default"
|
||||
primary = "amber"
|
||||
accent = "orange"
|
||||
toggle = { icon = "lucide/sun", name = "Switch to dark mode" }
|
||||
|
||||
[[theme.palette]]
|
||||
scheme = "slate"
|
||||
primary = "amber"
|
||||
accent = "orange"
|
||||
toggle = { icon = "lucide/moon", name = "Switch to light mode" }
|
||||
|
||||
[theme.features]
|
||||
content = [
|
||||
"content.action.edit",
|
||||
"content.action.view",
|
||||
"content.code.copy",
|
||||
"content.code.annotate",
|
||||
"content.tabs.link",
|
||||
"content.tooltips",
|
||||
]
|
||||
navigation = [
|
||||
"navigation.instant",
|
||||
"navigation.instant.prefetch",
|
||||
"navigation.tracking",
|
||||
"navigation.tabs",
|
||||
"navigation.sections",
|
||||
"navigation.top",
|
||||
"navigation.footer",
|
||||
]
|
||||
search = [
|
||||
"search.highlight",
|
||||
"search.suggest",
|
||||
]
|
||||
|
||||
[[nav]]
|
||||
Home = "index.md"
|
||||
|
||||
[[nav]]
|
||||
"Getting Started" = "getting-started.md"
|
||||
|
||||
[[nav]]
|
||||
Configuration = "configuration.md"
|
||||
|
||||
[[nav]]
|
||||
Services = "services.md"
|
||||
|
||||
[[nav]]
|
||||
"Automation Examples" = "automation-examples.md"
|
||||
|
||||
[[nav]]
|
||||
Troubleshooting = "troubleshooting.md"
|
||||
|
||||
[[nav]]
|
||||
Advanced = [
|
||||
nav = [
|
||||
{ "Home" = "index.md" },
|
||||
{ "Getting Started" = "getting-started.md" },
|
||||
{ "Configuration" = "configuration.md" },
|
||||
{ "Services" = "services.md" },
|
||||
{ "Automation Examples" = "automation-examples.md" },
|
||||
{ "Troubleshooting" = "troubleshooting.md" },
|
||||
{ "Advanced" = [
|
||||
{ "Brightness Modes" = "advanced/brightness-modes.md" },
|
||||
{ "Manual Control" = "advanced/manual-control.md" },
|
||||
{ "Sleep Mode" = "advanced/sleep-mode.md" },
|
||||
] },
|
||||
{ "See Also" = "see-also.md" },
|
||||
]
|
||||
|
||||
[[nav]]
|
||||
"See Also" = "see-also.md"
|
||||
[project.theme]
|
||||
custom_dir = "docs/overrides"
|
||||
language = "en"
|
||||
logo = "assets/logo.png"
|
||||
|
||||
[markdown_extensions.toc]
|
||||
permalink = true
|
||||
toc_depth = 3
|
||||
features = [
|
||||
"announce.dismiss",
|
||||
"content.action.edit",
|
||||
"content.action.view",
|
||||
"content.code.annotate",
|
||||
"content.code.copy",
|
||||
"content.code.select",
|
||||
"content.footnote.tooltips",
|
||||
"content.tabs.link",
|
||||
"content.tooltips",
|
||||
"navigation.footer",
|
||||
"navigation.indexes",
|
||||
"navigation.instant",
|
||||
"navigation.instant.prefetch",
|
||||
"navigation.path",
|
||||
"navigation.top",
|
||||
"navigation.tracking",
|
||||
"search.highlight",
|
||||
]
|
||||
|
||||
[markdown_extensions.admonition]
|
||||
# Three-way toggle: system preference -> light -> dark -> system preference
|
||||
[[project.theme.palette]]
|
||||
media = "(prefers-color-scheme)"
|
||||
toggle.icon = "lucide/sun-moon"
|
||||
toggle.name = "Switch to light mode"
|
||||
|
||||
[markdown_extensions.pymdownx_details]
|
||||
[[project.theme.palette]]
|
||||
media = "(prefers-color-scheme: light)"
|
||||
scheme = "default"
|
||||
primary = "amber"
|
||||
accent = "orange"
|
||||
toggle.icon = "lucide/sun"
|
||||
toggle.name = "Switch to dark mode"
|
||||
|
||||
[markdown_extensions.pymdownx_superfences]
|
||||
[[project.theme.palette]]
|
||||
media = "(prefers-color-scheme: dark)"
|
||||
scheme = "slate"
|
||||
primary = "amber"
|
||||
accent = "orange"
|
||||
toggle.icon = "lucide/moon-star"
|
||||
toggle.name = "Switch to system preference"
|
||||
|
||||
[markdown_extensions.pymdownx_highlight]
|
||||
anchor_linenums = true
|
||||
line_spans = "__span"
|
||||
pygments_lang_class = true
|
||||
[project.theme.font]
|
||||
text = "Inter"
|
||||
code = "JetBrains Mono"
|
||||
|
||||
[markdown_extensions.pymdownx_inlinehilite]
|
||||
[project.theme.icon]
|
||||
repo = "lucide/github"
|
||||
|
||||
[markdown_extensions.pymdownx_tabbed]
|
||||
alternate_style = true
|
||||
slugify = { "!!python/object/apply:pymdownx.slugs.slugify" = { kwds = { case = "lower" } } }
|
||||
[project.extra]
|
||||
generator = false
|
||||
|
||||
[markdown_extensions.pymdownx_emoji]
|
||||
emoji_index = "!!python/name:material.extensions.emoji.twemoji"
|
||||
emoji_generator = "!!python/name:material.extensions.emoji.to_svg"
|
||||
|
||||
[markdown_extensions.attr_list]
|
||||
|
||||
[markdown_extensions.md_in_html]
|
||||
|
||||
[markdown_extensions.tables]
|
||||
|
||||
[markdown_extensions.def_list]
|
||||
|
||||
[extra]
|
||||
[[extra.social]]
|
||||
[[project.extra.social]]
|
||||
icon = "fontawesome/brands/github"
|
||||
link = "https://github.com/basnijholt/adaptive-lighting"
|
||||
|
||||
[[extra.social]]
|
||||
[[project.extra.social]]
|
||||
icon = "fontawesome/brands/discord"
|
||||
link = "https://discord.gg/home-assistant"
|
||||
|
||||
[plugins.search]
|
||||
# Enable GitHub-style admonitions (> [!NOTE], > [!TIP], etc.)
|
||||
[project.markdown_extensions.gfm_admonition]
|
||||
|
||||
[plugins.tags]
|
||||
# Enable syntax highlighting for fenced code blocks
|
||||
[project.markdown_extensions.pymdownx.highlight]
|
||||
anchor_linenums = true
|
||||
|
||||
[project.markdown_extensions.pymdownx.superfences]
|
||||
|
||||
# Enable tabs (=== "Tab Name" syntax)
|
||||
[project.markdown_extensions.pymdownx.tabbed]
|
||||
alternate_style = true
|
||||
|
||||
# Enable emoji/icon support
|
||||
[project.markdown_extensions.pymdownx.emoji]
|
||||
emoji_index = "zensical.extensions.emoji.twemoji"
|
||||
emoji_generator = "zensical.extensions.emoji.to_svg"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue