From a80a1aa9ac49828d469374cdc1fb2dfed8749e62 Mon Sep 17 00:00:00 2001 From: Jonah Aragon Date: Fri, 29 Apr 2022 10:21:37 -0500 Subject: [PATCH] Update mkdocs-material-insiders (#1147) --- .github/workflows/deploy.yml | 23 +++++++++-------------- Pipfile.lock | 20 ++++++++++---------- docs/javascripts/feedback.js | 12 +++++++++++- docs/stylesheets/extra.css | 4 ++-- mkdocs-material | 2 +- 5 files changed, 33 insertions(+), 28 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index aa686bc8..90c65428 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,11 +18,15 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: '0' + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + ssh-key: ${{ secrets.ACTIONS_SSH_KEY }} + submodules: 'true' - name: Set up Python runtime uses: actions/setup-python@v3 with: - python-version: ${{ env.PYTHON_VERSION }} + python-version: '3.7' - name: Cache files uses: actions/cache@v3.0.2 @@ -32,24 +36,15 @@ jobs: - name: Install Python dependencies run: | - pip install 'mkdocs>=1.3.0' - pip install mkdocs-static-i18n - pip install mkdocs-git-revision-date-localized-plugin - - - name: Install mkdocs-material Insiders build - if: github.event.repository.fork == false - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git clone --depth 1 https://${GH_TOKEN}@github.com/privacyguides/mkdocs-material-insiders.git - pip install -e mkdocs-material-insiders + pip install pipenv + pipenv install - name: Build website run: | - mkdocs build + pipenv run mkdocs build mv .well-known site/ tar cvf site.tar site - mkdocs --version + pipenv run mkdocs --version - name: Package website uses: actions/upload-artifact@v3 diff --git a/Pipfile.lock b/Pipfile.lock index 64afc13e..23bba699 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -111,11 +111,11 @@ }, "click": { "hashes": [ - "sha256:24e1a4a9ec5bf6299411369b208c1df2188d9eb8d916302fe6bf03faed227f1e", - "sha256:479707fe14d9ec9a0757618b7a100a0ae4c4e236fac5b7f80ca68028141a1a72" + "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e", + "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48" ], "markers": "python_version >= '3.7'", - "version": "==8.1.2" + "version": "==8.1.3" }, "cssselect2": { "hashes": [ @@ -327,7 +327,7 @@ }, "mkdocs-material": { "path": "./mkdocs-material", - "version": "==8.2.8+insiders.4.12.0" + "version": "==8.2.11+insiders.4.13.1" }, "mkdocs-material-extensions": { "hashes": [ @@ -339,10 +339,10 @@ }, "mkdocs-static-i18n": { "hashes": [ - "sha256:0d97df64b5be7b34dc112d4ccfba28352b9fccd1b7a3babf229f30d25f6ebb36" + "sha256:5d69b4eb284931bd048a36f923367f2a7bd0dc7b0438008dce8ca1a8feee99e2" ], "index": "pypi", - "version": "==0.44" + "version": "==0.45" }, "packaging": { "hashes": [ @@ -405,11 +405,11 @@ }, "pygments": { "hashes": [ - "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb", - "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519" + "sha256:44238f1b60a76d78fc8ca0528ee429702aae011c265fe6a8dd8b63049ae41c65", + "sha256:4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a" ], - "markers": "python_version >= '3.6'", - "version": "==2.12.0" + "markers": "python_version >= '3.5'", + "version": "==2.11.2" }, "pymdown-extensions": { "hashes": [ diff --git a/docs/javascripts/feedback.js b/docs/javascripts/feedback.js index 814f6037..dc9937e5 100644 --- a/docs/javascripts/feedback.js +++ b/docs/javascripts/feedback.js @@ -1,5 +1,6 @@ var feedback = document.forms.feedback -feedback.removeAttribute("hidden"); +/* Show feedback */ +feedback.hidden = false feedback.addEventListener("submit", function(ev) { ev.preventDefault() @@ -10,4 +11,13 @@ feedback.addEventListener("submit", function(ev) { /* Send feedback value */ console.log(page, data) plausible(data) + + /* Disable form and show note, if given */ + feedback.firstElementChild.disabled = true + var note = feedback.querySelector( + ".md-feedback__note [data-md-value='" + data + "']" + ) + + if (note) + note.hidden = false }) diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 72302488..f35301e8 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -61,7 +61,7 @@ } /* Define brand */ -:root { +:root, [data-md-color-scheme="default"] { --md-primary-fg-color: #FFD06F; --md-primary-fg-color--light: #ffdd98; --md-primary-fg-color--dark: #db9d21; @@ -78,7 +78,7 @@ } /* Better contrast link colors */ -[data-md-color-scheme="default"] { +[data-md-color-scheme="default"] > * { --md-typeset-a-color: #3C00E0; } diff --git a/mkdocs-material b/mkdocs-material index f02ab2a1..d04fd628 160000 --- a/mkdocs-material +++ b/mkdocs-material @@ -1 +1 @@ -Subproject commit f02ab2a15ea952411410b37bc4828c03439d617c +Subproject commit d04fd6282c4a73a6cd011495ac931a2bd90daa25