Mkdocs Upgrade (#243)

* fix links

* actually fix #238

* Feature/mkdocs version bump (#240)

* fix links (#239)

Co-authored-by: hay-kot <hay-kot@pm.me>

* fix #238

* bump mkdocs version

* light/dark toggle

* light/dark mode css

* API_DOCS defaults to True

* disable build on push for master

Co-authored-by: hay-kot <hay-kot@pm.me>

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden 2021-03-31 16:31:11 -08:00 committed by GitHub
parent 114e878384
commit b8cddfd6c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 36 additions and 23 deletions

View File

@ -1,9 +1,8 @@
name: Docker Build Production name: Docker Build Production
on: on:
push: release:
branches: types: [published]
- master
jobs: jobs:
build: build:

View File

@ -1,14 +1,20 @@
:root { [data-md-color-scheme="mealie"] {
--md-primary-fg-color: #e58325; --md-primary-fg-color: #e58325;
--md-primary-fg-color--light: #e58325; --md-primary-fg-color--light: #e58325;
--md-primary-fg-color--dark: #e58325;
--md-accent-fg-color: #e58325; --md-accent-fg-color: #e58325;
--md-custom-h2-color: #333;
--md-accent-fg-color--light: #e58325; --md-accent-fg-color--light: #e58325;
--md-accent-fg-color--dark: #e58325; --md-default-accent-bg-color: #f7fafc;
} }
body { [data-md-color-scheme="slate"] {
background: var(--md-primary-bg-color); --md-primary-fg-color: #e58325;
--md-primary-fg-color--dark: #e58325;
--md-accent-fg-color: #e58325;
--md-accent-fg-color--dark: #e58325;
--md-custom-h2-color: rgb(167, 167, 167);
--md-default-bg-color: #1a1b1b;
--md-default-accent-bg-color: #1f1e1e;
} }
/* frontpage elements */ /* frontpage elements */

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,6 @@
.tx-container { .tx-container {
padding-top: .0rem; padding-top: .0rem;
background: var(--md-primary-bg-color)
} }
.tx-hero { .tx-hero {
@ -27,7 +26,7 @@
.tx-hero h1 { .tx-hero h1 {
margin-bottom: 1rem; margin-bottom: 1rem;
font-family: "Roboto"; font-family: "Roboto";
color: #30353a; color: var(--md-custom-h2-color);
font-weight: 500 font-weight: 500
} }
@ -68,7 +67,7 @@
} }
.feature-container { .feature-container {
background-color: #F7FAFC; background-color: var(--md-default-accent-bg-color);
} }
.top-hr { .top-hr {
@ -85,7 +84,7 @@
} }
.feature-item h2 { .feature-item h2 {
color: #333; color: var(--md-custom-h2-color);
font-weight: 300; font-weight: 300;
font-size: 25px; font-size: 25px;
white-space: nowrap; white-space: nowrap;
@ -102,7 +101,7 @@
line-height: 1.8em; line-height: 1.8em;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
color: #111; color: var(--webkit-print-color-adjust);
margin: 0 0 10px; margin: 0 0 10px;
display: block; display: block;
} }
@ -162,11 +161,6 @@
flex: 1; flex: 1;
min-width: 0; min-width: 0;
} }
/* .feature-item:hover {
background-color: #fea55247;
border-radius: 3px;
} */
} }
.hr { .hr {

View File

@ -1,8 +1,22 @@
site_name: Mealie site_name: Mealie
demo_url: https://mealie-demo.hay-kot.dev/ demo_url: https://mealie-demo.hay-kot.dev/
theme: theme:
palette:
# Light mode
- media: "(prefers-color-scheme: light)"
scheme: mealie
toggle:
icon: material/weather-night
name: Switch to dark mode
# Dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/weather-sunny
name: Switch to light mode
custom_dir: docs/overrides custom_dir: docs/overrides
features: features:
- navigation.top
- navigation.instant - navigation.instant
- navigation.expand - navigation.expand
- navigation.sections - navigation.sections

View File

@ -80,7 +80,7 @@ class AppSettings:
self.PRODUCTION = bool(os.environ.get("ENV")) self.PRODUCTION = bool(os.environ.get("ENV"))
self.IS_DEMO = os.getenv("DEMO", "False") == "True" self.IS_DEMO = os.getenv("DEMO", "False") == "True"
self.API_PORT = int(os.getenv("API_PORT", 9000)) self.API_PORT = int(os.getenv("API_PORT", 9000))
self.API = os.getenv("API_DOCS", "False") == "True" self.API = os.getenv("API_DOCS", "True") == "True"
self.DOCS_URL = "/docs" if self.API else None self.DOCS_URL = "/docs" if self.API else None
self.REDOC_URL = "/redoc" if self.API else None self.REDOC_URL = "/redoc" if self.API else None
self.SECRET = determine_secrets(app_dirs.DATA_DIR, self.PRODUCTION) self.SECRET = determine_secrets(app_dirs.DATA_DIR, self.PRODUCTION)

6
poetry.lock generated
View File

@ -519,7 +519,7 @@ tornado = ">=5.0"
[[package]] [[package]]
name = "mkdocs-material" name = "mkdocs-material"
version = "7.0.6" version = "7.1.0"
description = "A Material Design theme for MkDocs" description = "A Material Design theme for MkDocs"
category = "dev" category = "dev"
optional = false optional = false
@ -1577,8 +1577,8 @@ mkdocs = [
{file = "mkdocs-1.1.2.tar.gz", hash = "sha256:f0b61e5402b99d7789efa032c7a74c90a20220a9c81749da06dbfbcbd52ffb39"}, {file = "mkdocs-1.1.2.tar.gz", hash = "sha256:f0b61e5402b99d7789efa032c7a74c90a20220a9c81749da06dbfbcbd52ffb39"},
] ]
mkdocs-material = [ mkdocs-material = [
{file = "mkdocs-material-7.0.6.tar.gz", hash = "sha256:e1423286dcb2ac6b9417e9e04a3f63a97f12f7f64802af09c8257561e9f3a319"}, {file = "mkdocs-material-7.1.0.tar.gz", hash = "sha256:1afaa5b174265eaa4a886f73187bb0e302a9596e9bfedb5aa2cb260d8b1d994e"},
{file = "mkdocs_material-7.0.6-py2.py3-none-any.whl", hash = "sha256:a89f8a08a5f0a5ecce2c7a4a61a1ddd2c2cbac86f17978264eb8b8ce2ca5411b"}, {file = "mkdocs_material-7.1.0-py2.py3-none-any.whl", hash = "sha256:13e73b3571d36f7e4a7dc11093323cff92095f4f219a00ba19c77a5e53aa6c55"},
] ]
mkdocs-material-extensions = [ mkdocs-material-extensions = [
{file = "mkdocs-material-extensions-1.0.1.tar.gz", hash = "sha256:6947fb7f5e4291e3c61405bad3539d81e0b3cd62ae0d66ced018128af509c68f"}, {file = "mkdocs-material-extensions-1.0.1.tar.gz", hash = "sha256:6947fb7f5e4291e3c61405bad3539d81e0b3cd62ae0d66ced018128af509c68f"},