diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 1ab7830a..e6d09fe0 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -1,4 +1,4 @@ -name: Testing for visual regression on old theme +name: Running Playwright test on UI # Run the workflow when code is pushed or when a pull request is created on: @@ -25,19 +25,16 @@ jobs: - name: Install dependencies and playwright browsers run: cd tests && npm ci && npx playwright install --with-deps - name: Run Playwright tests - id: test-visual + id: test-ui run: | make tests | tee output.log - if grep -q -e "Error: A snapshot doesn't exist at" -e "Screenshot comparison failed" output.log; then - echo "Playwright tests failed due to a snapshot issue." - exit 1 - elif grep -q "failed" output.log; then - echo "Playwright tests failed due to a non-snapshot issue." + if grep -q "failed" output.log; then + echo "Playwright tests failed. Please view the Playwright report to see full error." exit 1 fi - uses: actions/upload-artifact@v4 id: artifact-upload - if: ${{ !cancelled() && failure() && steps.test-visual.conclusion == 'failure' }} + if: ${{ !cancelled() && failure() && steps.test-ui.conclusion == 'failure' }} with: name: playwright-report path: tests/playwright-report/ @@ -47,10 +44,9 @@ jobs: if: ${{ failure() }} with: script: | - const body = `### Playwright visual snapshot differences were detected. + const body = `### Playwright differences were detected. - View the [Playwright report](${{ steps.artifact-upload.outputs.artifact-url }}) - **To approve the snapshot changes and update the snapshots, please comment:** /approve-snapshots`; + View the [Playwright report](${{ steps.artifact-upload.outputs.artifact-url }})`; await github.rest.issues.createComment({ issue_number: context.issue.number, diff --git a/.github/workflows/update-screenshot.yml b/.github/workflows/update-screenshot.yml deleted file mode 100644 index 30f7f39f..00000000 --- a/.github/workflows/update-screenshot.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Update screenshot on comment -on: - issue_comment: - types: [created] -jobs: - update-screenshots: - name: Update Screenshot - if: github.event.issue.pull_request && contains(github.event.comment.body, '/approve-snapshots') - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - steps: - - uses: xt0rted/pull-request-comment-branch@v3 - id: comment-branch - - uses: actions/checkout@v4 - if: success() - with: - ref: ${{ steps.comment-branch.outputs.head_ref }} - - name: Comment on PR with Playwright updates - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 - with: - script: | - const body = `### Updating snapshots. Click [here](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) to see the status.`; - - await github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: body, - }); - - name: Setup Hugo - uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0 - with: - hugo-version: "0.147.8" - extended: true - - name: Install dependencies and Playwright browsers - run: cd tests && npm ci && npx playwright install --with-deps - - name: Run Playwright update snapshots - id: test-visual - run: make tests-update-screenshots - - uses: actions/upload-artifact@v4 - id: artifact-upload - with: - name: screenshots - path: tests/src/__screenshots__ - - name: Comment on PR with success - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 - with: - script: | - const body = `### Please download the artifacts [here](${{ steps.artifact-upload.outputs.artifact-url }}) and commit your updated screenshots.`; - - await github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: body, - }); \ No newline at end of file diff --git a/assets/css/v2/style.css b/assets/css/v2/style.css index e0008af0..2370558c 100644 --- a/assets/css/v2/style.css +++ b/assets/css/v2/style.css @@ -131,9 +131,7 @@ textarea:not([rows]) { :root { /* webfonts */ font-family: var(--font-family); - font-feature-settings: - "liga" on, - "calt" on; + font-feature-settings: "liga" on, "calt" on; /* fallback to slightly thinner font on browsers without variable 'wght' support */ font-weight: 350; @@ -143,13 +141,14 @@ textarea:not([rows]) { /* MARK: Variables */ - --font-family: - "Inter var", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", - Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; + --font-family: "Inter var", system-ui, -apple-system, BlinkMacSystemFont, + "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", + sans-serif; --color-brand: 56.6% 0.194 147.7; --color-brand-300: 0.84 0.0699 157.51; --color-brand-200: 0.91 0.0406 157.72; --color-brand-100: 0.98 0.0107 158.85; + --color-f5-brand: 0.5839 0.2253 20.56; --color-background: 1 0 0; --color-foreground: 0 0 0; --color-shadow: 0.86 0 0; @@ -262,10 +261,9 @@ textarea:not([rows]) { @supports (font-variation-settings: normal) { :root { - --font-family: - InterVariable, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", - Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", - sans-serif; + --font-family: InterVariable, system-ui, -apple-system, BlinkMacSystemFont, + "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", + "Helvetica Neue", sans-serif; } h1, @@ -501,13 +499,31 @@ ol li:last-child { margin: 0; } - .navbar-button { - padding: 0.5rem 0.5rem; + .header__f5sites__button { border: none; - border-radius: 0.25rem; + background-color: transparent; + border-radius: 0; text-align: center; text-decoration: none; cursor: pointer; + + .header__f5sites__logo { + pointer-events: none; + height: 2rem; + + svg { + height: 2rem; + stroke: currentColor; + color: black; + transition: color 0.2s ease; + } + } + + &:hover { + .header__f5sites__logo svg { + color: oklch(var(--color-f5-brand)); + } + } } ul { @@ -1218,9 +1234,7 @@ nav.sidebar.sidebar__mobile-open { border-radius: 5px 0 0 5px; color: oklch(0 0 0 / 0.75); text-decoration: none; - transition: - background-color 0.2s ease, - color 0.2s ease; + transition: background-color 0.2s ease, color 0.2s ease; &:hover { background-color: oklch(var(--color-brand) / 0.08); diff --git a/assets/js/site-dropdown.js b/assets/js/site-dropdown.js index 4d9c9ec3..b71e9c3c 100644 --- a/assets/js/site-dropdown.js +++ b/assets/js/site-dropdown.js @@ -1,17 +1,12 @@ document.addEventListener('DOMContentLoaded', () => { const dropdownContent = document.getElementById('dropdown-content'); const navbarButton = document.getElementById('navbar-sites-button'); - const chevronIcon = document.getElementById('navbar-sites-button-icon'); navbarButton.addEventListener('click', () => { - chevronIcon.classList.toggle('rotate-chevron'); - if (dropdownContent.style.display === 'block') { dropdownContent.style.display = 'none'; - navbarButton.classList.remove('remove-bottom-radius'); } else { dropdownContent.style.display = 'block'; - navbarButton.classList.add('remove-bottom-radius'); } }); @@ -20,14 +15,7 @@ document.addEventListener('DOMContentLoaded', () => { !event.target.matches('#navbar-sites-button') && !event.target.matches('#navbar-sites-button-icon') ) { - if ( - dropdownContent.style.display !== 'none' && - dropdownContent.style.display !== '' - ) { - chevronIcon.classList.toggle('rotate-chevron'); - } dropdownContent.style.display = 'none'; - navbarButton.classList.remove('remove-bottom-radius'); } }); }); diff --git a/layouts/404.html b/layouts/404.html index 4fdced6e..a50e27cf 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,7 +1,7 @@ {{ define "main"}} -
-
+
+

HTTP 404 - Page not found

diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 4046f384..28b399de 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -43,17 +43,17 @@ {{ end }}
-