Skip to content

Commit

Permalink
Update Ansible theme to match brand color (#99)
Browse files Browse the repository at this point in the history
* Update Ansible theme to match brand color

* chore: auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
cristianonicolai and pre-commit-ci[bot] authored Feb 5, 2024
1 parent 7844475 commit 5584787
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 13 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ site
src/mkdocs_ansible/_version.py
.cache
_readthedocs
_readthedocs
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ look and feel for any project related to [Ansible](https://docs.ansible.com/) ec
Some of the projects that use this theme are:

- [ansible-compat](https://ansible.readthedocs.io/projects/compat/)
- [ansible-devtools](https://ansible.readthedocs.io/projects/dev-tools/)
- [ansible-dev-tools](https://ansible.readthedocs.io/projects/dev-tools/)
- [ansible-language-server](https://ansible.readthedocs.io/projects/language-server/)
- [ansible-lint](https://ansible.readthedocs.io/projects/lint/)
- [ansible-navigator](https://ansible.readthedocs.io/projects/navigator/)
Expand Down
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ plugins:
- material/social
- material/search:
separator: '[\s\-,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])'
- material/tags
- material/offline
- minify:
minify_html: true

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ dependencies = { file = [".config/requirements.in"] }
[tool.setuptools]
include-package-data = true

[tool.setuptools.package-data]
"*" = ["*.css", "*.html", "*.js"]

[tool.setuptools.packages.find]
where = ["src"]

Expand Down
Empty file.
Binary file modified src/mkdocs_ansible/assets/images/favicon.ico
Binary file not shown.
Binary file modified src/mkdocs_ansible/assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/mkdocs_ansible/assets/stylesheets/ansible.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:root {
--md-primary-fg-color: #5bbdbf;
/* --md-primary-fg-color--light: #ECB7B7; */
/* --md-primary-fg-color--dark: #FF5850; */
}
3 changes: 3 additions & 0 deletions src/mkdocs_ansible/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% extends "base.html" %} {% block styles %} {{ super() }}
<link rel="stylesheet" href="assets/stylesheets/ansible.css" />
{% endblock %}
24 changes: 16 additions & 8 deletions src/mkdocs_ansible/mkdocs_theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,28 @@ extends: material

language: en
direction: ltr
features: []
palette:
- scheme: default
primary: teal
accent: teal
# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
name: Switch to light mode

# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: custom
toggle:
icon: material/brightness-7
name: Switch to dark mode
- scheme: slate
primary: teal
accent: teal

# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: custom
toggle:
icon: material/brightness-4
name: Switch to light mode
name: Switch to system preference

font:
# Must be a valid Google Font name from https://fonts.google.com/
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ description = Run all linters
basepython = python3.10
deps =
pre-commit>=2.6.0
setuptools>=51.1.1
setuptools>=65.3.0
pytest>=7.2.0 # to updated schemas
skip_install = true
commands =
Expand Down Expand Up @@ -85,14 +85,14 @@ setenv =
skip_install = false
usedevelop = true
commands =
mkdocs build --strict --strict --site-dir=_readthedocs/html/ {posargs:}
mkdocs build -v -c --strict --site-dir=_readthedocs/html/ {posargs:}
linkchecker -f linkcheckerrc _readthedocs/html/

[testenv:pkg]
description =
Build package, verify metadata, install package and assert behavior when ansible is missing.
deps =
build >= 0.9.0
build >= 1.0.3
twine >= 4.0.1
skip_install = true
# Ref: https://twitter.com/di_codes/status/1044358639081975813
Expand Down

0 comments on commit 5584787

Please sign in to comment.