Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added theme toggle button and upgraded mkdocs-material #81

Merged
merged 3 commits into from
Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions docs/en/docs/assets/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.md-typeset__table table {
font-size: .75rem !important;
font-size: 0.75rem !important;
}

.md-typeset__table table tr td:first-child {
Expand All @@ -8,16 +8,16 @@

.md-typeset code {
background-color: rgb(240, 240, 240);
font-size: .95em;
font-size: 0.95em;
}

.md-typeset pre > code {
background-color: rgb(245, 245, 245);
font-size: .90em;
font-size: 0.9em;
}

.md-typeset .admonition {
font-size: .70rem;
font-size: 0.7rem;
}

body {
Expand All @@ -29,7 +29,7 @@ body {
border-bottom-color: rgb(234, 236, 239);
border-bottom-style: solid;
border-bottom-width: 1px;
padding-bottom: .3rem;
padding-bottom: 0.3rem;
}

.md-content a:hover {
Expand All @@ -39,3 +39,22 @@ body {
.highlight code .cp {
color: #a83;
}

a code {
color: #472a63 !important;
}

[data-md-color-scheme="dark"] {
--md-primary-fg-color: #321860;
--md-default-bg-color: #170a1c;
--md-default-fg-color: #dabaff;
--md-typeset-color: #ffffff;
--md-default-fg-color--light: #b0a8b9;
--md-typeset-a-color: #b596d2;
--md-code-bg-color: #f5f5f5;
--md-code-fg-color: #170a1c;
--md-admonition-fg-color: #ffffff;
--md-default-fg-color--lighter: #acb7c0;
--md-default-fg-color--lightest: #d2d5db;
--md-code-hl-variable-color: #815abb;
}
77 changes: 44 additions & 33 deletions docs/en/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,70 @@
# Project information
site_name: 'Sailfish Documentation'
site_name: "Sailfish Documentation"
# site_description: 'Sailfish Documentation'
site_author: 'Ryohei Machida'
site_author: "Ryohei Machida"
# site_url: 'https://***.com'

# Copyright
copyright: '© 2020 Ryohei Machida'
copyright: "© 2020 Ryohei Machida"

# Repository
repo_name: 'rust-sailfish/sailfish'
repo_url: 'https://github.com/rust-sailfish/sailfish'
repo_name: "rust-sailfish/sailfish"
repo_url: "https://github.com/rust-sailfish/sailfish"

# Configuration
theme:
name: 'material'
language: 'en'
logo: 'images/logo.svg'
name: "material"
language: "en"
logo: "images/logo.svg"
palette:
scheme: 'default'
primary: 'deep purple'
accent: 'deep purple'
favicon: 'images/favicon.ico'
- media: "(prefers-color-scheme: dark)"
scheme: "dark"
primary: "deep purple"
accent: "deep purple"
toggle:
icon: "material/lightbulb-outline"
name: "Light Mode"
- media: "(prefers-color-scheme: light)"
scheme: "default"
primary: "deep purple"
accent: "deep purple"
toggle:
icon: "material/lightbulb"
name: "Dark Mode"
favicon: "images/favicon.ico"
font:
text: 'Ubuntu'
code: 'Ubuntu Mono'
text: "Ubuntu"
code: "Ubuntu Mono"
features:
- 'navigation.expand'
- "navigation.expand"

# Extensions
markdown_extensions:
- 'admonition'
- 'footnotes'
- 'pymdownx.highlight'
- 'pymdownx.tabbed'
- 'pymdownx.superfences':
- "admonition"
- "footnotes"
- "pymdownx.highlight"
- "pymdownx.tabbed":
alternate_style: true
- "pymdownx.superfences":
custom_fences:
- name: mermaid
class: mermaid

extra_css:
- 'assets/css/custom.css'
- "assets/css/custom.css"

extra:
social:
- icon: 'fontawesome/brands/github-alt'
link: 'https://github.com/rust-sailfish'
- icon: "fontawesome/brands/github-alt"
link: "https://github.com/rust-sailfish"

# Page tree
nav:
- 'Welcome': 'index.md'
- 'Installation': 'installation.md'
- 'Getting Started': 'getting-started.md'
- 'Configuration': 'options.md'
- 'Syntax':
- 'Overview': 'syntax/overview.md'
- 'Tags': 'syntax/tags.md'
- 'Includes': 'syntax/includes.md'
- 'Filters': 'syntax/filters.md'
- "Welcome": "index.md"
- "Installation": "installation.md"
- "Getting Started": "getting-started.md"
- "Configuration": "options.md"
- "Syntax":
- "Overview": "syntax/overview.md"
- "Tags": "syntax/tags.md"
- "Includes": "syntax/includes.md"
- "Filters": "syntax/filters.md"
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mkdocs-material==5.2.3
mkdocs-material==8.2.3
mkdocs==1.2.3