diff --git a/Dockerfile b/Dockerfile index 60fce0c..7e70da2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ # Install the base requirements for the app. # This stage is to support development. FROM python:alpine AS base +RUN apk add --no-cache g++ WORKDIR /app COPY requirements.txt . RUN pip install -r requirements.txt diff --git a/docs/css/styles.css b/docs/css/styles.css index b44b61f..ddfc538 100644 --- a/docs/css/styles.css +++ b/docs/css/styles.css @@ -4,7 +4,7 @@ article img { border: 1px solid #eee; - box-shadow: 0 0 1em #ccc; + box-shadow: 0 0 1em rgba(0, 0, 0, .6); margin: 30px auto 10px; } @@ -24,30 +24,17 @@ article img.emojione { background-color: #0d9cec !important; } -@font-face{ - font-family: "Geomanist"; - src: url("../fonts/hinted-Geomanist-Book.ttf") +.md-header__button.md-logo img, +.md-nav__title .md-nav__button.md-logo img { + height: 1.4rem; + width: auto; } -body { - font-family: "Open Sans", sans-serif; - font-size: 15px; - font-weight: normal; - font-style: normal; - font-stretch: normal; - line-height: 1.5; - letter-spacing: normal; - color: #577482; -} - -h1, h2, h3, h4, .md-footer-nav__inner, .md-header-nav__title, footer.md-footer { - font-family: Geomanist; -} - -.md-header-nav__title { - line-height: 2.9rem; +.md-nav__title .md-nav__button img { + height: 30px; + margin-top: 10px; } .md-header-nav__button img { width: 145px; -} \ No newline at end of file +} diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 6d9c155..0000000 --- a/docs/index.md +++ /dev/null @@ -1,2 +0,0 @@ -redirect: /tutorial/ - diff --git a/docs/js/index.js b/docs/js/index.js new file mode 100644 index 0000000..86a47f6 --- /dev/null +++ b/docs/js/index.js @@ -0,0 +1,4 @@ +const settings = JSON.parse(localStorage.getItem(__prefix('__palette'))); +const scheme = settings?.color.scheme || (matchMedia('(prefers-color-scheme: dark)').matches ? 'slate' : 'default' ); + +document.body.setAttribute('data-md-color-scheme', scheme); diff --git a/mkdocs.yml b/mkdocs.yml index d0a0d14..ed419e2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -6,6 +6,7 @@ site_author: Docker # Repository repo_name: docker/getting-started repo_url: https://github.com/docker/getting-started +repo_icon: fontawesome/brands/github-alt edit_uri: "" # Copyright @@ -16,28 +17,50 @@ theme: name: material language: en palette: - primary: blue - accent: blue + # Light mode + - media: "(prefers-color-scheme: light)" + scheme: default + primary: blue + accent: blue + toggle: + icon: material/toggle-switch-off-outline + name: Switch to dark mode + + # Dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: blue + accent: blue + toggle: + icon: material/toggle-switch + name: Switch to light mode font: text: Roboto code: Roboto Mono + icon: + repo: fontawesome/brands/github-alt favicon: assets/images/favicon.png logo: 'images/docker-labs-logo.svg' extra_css: - css/styles.css - - css/dark-mode.css + +extra_javascript: + - js/index.js # Plugins plugins: - search - minify: minify_html: true + - redirects: + redirect_maps: + index.md: tutorial/index.md # Customization extra: social: - - type: github-alt + - icon: fontawesome/brands/github-alt link: https://github.com/docker/getting-started # Extensions diff --git a/requirements.txt b/requirements.txt index 848bb8d..a4f95af 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ -mkdocs==1.0.4 -mkdocs-material==4.6.3 -mkdocs-minify-plugin==0.2.3 +mkdocs==1.1.2 +mkdocs-material==7.1.4 +mkdocs-minify-plugin==0.4.0 pygments==2.7.4 pymdown-extensions==7.0 +mkdocs-redirects==1.0.1