diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index cbc7efb..b9f181d 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -11,9 +11,11 @@ permissions: jobs: deploy: runs-on: ubuntu-latest + env: + GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }} steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 @@ -21,11 +23,11 @@ jobs: run: | git config user.name github-actions[bot] git config user.email 41898282+github-actions[bot]@users.noreply.github.com - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: "3.11" - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - - uses: actions/cache@v3 + - uses: actions/cache@v5 with: key: mkdocs-material-${{ env.cache_id }} path: .cache diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 80766ee..d14e665 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -12,10 +12,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.x" @@ -26,7 +26,7 @@ jobs: run: python -m build - name: Store the distribution packages - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: python-package-distributions path: dist/ @@ -46,7 +46,7 @@ jobs: steps: - name: Download all the dists - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: python-package-distributions path: dist/ diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 61dd7c9..7b09391 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -20,10 +20,10 @@ jobs: python-version: [ "3.10", "3.11" ] steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} diff --git a/docs/.overrides/404.html b/docs/.overrides/404.html new file mode 100644 index 0000000..7ad930f --- /dev/null +++ b/docs/.overrides/404.html @@ -0,0 +1,48 @@ +{% extends "main.html" %} + + +{% block content %} + + + + +
+ The requested URL was not found in this documentation. +
+ ++ Try searching or go to PyORlib's home page. +
+ + + +{% endblock %} \ No newline at end of file diff --git a/docs/stylesheets/consent.css b/docs/stylesheets/consent.css new file mode 100644 index 0000000..3ff53de --- /dev/null +++ b/docs/stylesheets/consent.css @@ -0,0 +1,49 @@ +.md-consent__overlay { + pointer-events: none; + background-color: inherit; + -webkit-backdrop-filter: none; + backdrop-filter: none; +} + +.md-consent__inner { + background-color: color-mix(in srgb, var(--md-default-bg-color) 75%, transparent); + -webkit-backdrop-filter: blur(0.7rem); + backdrop-filter: blur(0.7rem); + border-radius: 0; + + h4 { + display: flex; + align-items: center; + } + + img { + width: 1.5rem; + height: 1.5rem; + margin-right: 0.5rem; + } + + .md-button { + border-radius: 1rem; + } + + &::before { + content: ""; + position: absolute; + pointer-events: none; + background-color: color-mix(in srgb, var(--md-primary-fg-color) 7%, transparent); + z-index: 0; + inset: 0; + } +} + +.md-consent__controls { + .md-button { + border-color: var(--md-primary-fg-color--dark); + color: var(--md-primary-fg-color--dark); + } + + .md-button--primary { + background-color: var(--md-primary-fg-color--dark); + color: var(--md-primary-bg-color); + } +} \ No newline at end of file diff --git a/docs/stylesheets/header.css b/docs/stylesheets/header.css new file mode 100644 index 0000000..a567821 --- /dev/null +++ b/docs/stylesheets/header.css @@ -0,0 +1,20 @@ +.md-header { + font-weight: bold; + background-color: color-mix(in srgb, var(--md-primary-fg-color) 53%, transparent); + -webkit-backdrop-filter: blur(0.5rem); + backdrop-filter: blur(0.5rem); + border-radius: 0; + + &::before { + content: ""; + position: absolute; + pointer-events: none; + background-color: color-mix(in srgb, var(--md-primary-fg-color--dark) 57%, transparent); + z-index: 0; + inset: 0; + } +} + +.md-header__source { + z-index: 0; +} \ No newline at end of file diff --git a/docs/stylesheets/search-bar.css b/docs/stylesheets/search-bar.css new file mode 100644 index 0000000..6025267 --- /dev/null +++ b/docs/stylesheets/search-bar.css @@ -0,0 +1,30 @@ +.md-search__input { + font-weight: bold; +} + +.md-search__form { + border-radius: 1rem; + border-top-right-radius: 1rem !important; + border-top-left-radius: 1rem !important; + + &:hover { + background-color: var(--md-default-fg-color--lighter); + } +} + +.md-search__output { + border-bottom-left-radius: 1rem !important; + border-bottom-right-radius: 1rem !important; +} + +@media screen and (max-width: 59.9844em) { + .md-search__form { + border-top-right-radius: inherit !important; + border-top-left-radius: inherit !important; + } + + .md-search__output { + border-bottom-left-radius: inherit !important; + border-bottom-right-radius: inherit !important; + } +} \ No newline at end of file diff --git a/docs/stylesheets/tabs.css b/docs/stylesheets/tabs.css new file mode 100644 index 0000000..a2d025b --- /dev/null +++ b/docs/stylesheets/tabs.css @@ -0,0 +1,25 @@ +.md-tabs { + font-weight: bold; + box-shadow: 0 0 .1rem #0000001a, 0 .1rem .2rem #0003; + background-color: color-mix(in srgb, var(--md-primary-fg-color) 53%, transparent); + -webkit-backdrop-filter: blur(0.5rem); + backdrop-filter: blur(0.5rem); + border-radius: 0; + + &::before { + content: ""; + position: absolute; + pointer-events: none; + background-color: color-mix(in srgb, var(--md-primary-fg-color--dark) 57%, transparent); + z-index: 0; + inset: 0; + } +} + +.md-tabs__item--active { + text-decoration: underline; + text-decoration-color: color-mix(in srgb, var(--md-primary-bg-color) 70%, transparent); + text-decoration-thickness: 0.25rem; + text-decoration-skip-ink: auto; + text-underline-offset: 0.375rem; +} \ No newline at end of file diff --git a/docs/stylesheets/task-list-indicator.css b/docs/stylesheets/task-list-indicator.css new file mode 100644 index 0000000..dc680c0 --- /dev/null +++ b/docs/stylesheets/task-list-indicator.css @@ -0,0 +1,11 @@ +.md-typeset .task-list-indicator::before { + background-color: var(--md-default-fg-color--lighter); +} + +.md-typeset [type="checkbox"]:checked+.task-list-indicator::before { + background-color: var(--md-primary-fg-color--dark); +} + +.md-typeset .task-list-item { + padding-left: 0.25rem; +} \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index ab055f9..c0d590a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -12,16 +12,24 @@ repo_url: https://github.com/dapensoft/pyorlib # Copyright copyright: | - Copyright © 2024 Isaac Da Pena, - Manuel Da Pena + Copyright © 2024-2026 Isaac Da Pena, + Manuel Da Pena – + Change Cookie Settings # Configuration theme: name: material language: en + custom_dir: docs/.overrides logo: images/logo/pyorlib-logo-white.svg favicon: images/favicon/pyorlib-logo.ico palette: + # Palette toggle for automatic mode + - media: "(prefers-color-scheme)" + toggle: + icon: material/weather-sunny + name: Switch to light mode + # Palette toggle for light mode - media: '(prefers-color-scheme: light)' scheme: default primary: pink @@ -29,13 +37,14 @@ theme: toggle: icon: material/weather-night name: Switch to dark mode + # Palette toggle for dark mode - media: '(prefers-color-scheme: dark)' scheme: slate primary: pink accent: amber toggle: - icon: material/weather-sunny - name: Switch to light mode + icon: material/brightness-auto + name: Switch to system preference features: - navigation.tabs - navigation.indexes @@ -56,11 +65,35 @@ extra: social: - icon: fontawesome/brands/github link: https://github.com/dapensoft + analytics: + provider: google + property: !ENV GOOGLE_ANALYTICS_KEY + feedback: + title: Was this page helpful? + ratings: + - icon: material/thumb-up-outline + name: This page was helpful + data: 1 + note: >- + Thanks for your feedback! + - icon: material/thumb-down-outline + name: This page could be improved + data: 0 + note: >- + Thanks for your feedback! + consent: + title: