diff --git a/.env.example b/.env.example index cb303ab..093a2de 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,2 @@ -LOCALHOST_URL=https://basic-wp.test +LOCALHOST_URL=http://domain.local BROWSERSYNC_PORT=5000 diff --git a/.github/workflows/todos.yml b/.github/workflows/todos.yml index 7e2aa27..f24b835 100644 --- a/.github/workflows/todos.yml +++ b/.github/workflows/todos.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@v4 - name: Sync TODOs - uses: Solo-Web-Works/TODO-Sync@v1 + uses: Solo-Web-Works/TODO-Sync@v2 with: github_token: ${{ secrets.GITHUB_TOKEN }} summary_file: TODO_SUMMARY.md diff --git a/README.md b/README.md index 671e70a..964fd14 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Basic-WP WordPress Theme Starter +# VDI WordPress Theme Starter v5 -Basic-WP is a minimal WordPress theme designed as a starting point for custom theme development. It focuses on modern development approaches with a lean architecture that avoids the overhead of theme frameworks. +VDI WordPress Theme Starter v5 is a minimal WordPress theme designed as a starting point for custom theme development. It focuses on modern development approaches with a lean architecture that avoids the overhead of theme frameworks. ## Key Features @@ -12,7 +12,7 @@ Basic-WP is a minimal WordPress theme designed as a starting point for custom th ## Project Structure ```plaintext -Basic-WP/ +VDI-Starter-v5/ ├── acf/ # ACF field group JSON definitions ├── bin/ # Build scripts ├── content/ # Sample page and post content for testing diff --git a/TODO_SUMMARY.md b/TODO_SUMMARY.md deleted file mode 100644 index cf68259..0000000 --- a/TODO_SUMMARY.md +++ /dev/null @@ -1,16 +0,0 @@ -# 📋 TODO Summary - -## to-research -- [ ] Rework break-out styles referencing [this guide](https://css-tip.com/full-bleed-layout/) (in `Theme_TODOs.md`, line 3) ([commit](https://github.com/keith/Basic-WP/commit/b99f7085c741c83e424bb0728168a3c1df3e9259)) -- [ ] Implement container queries. (in `Theme_TODOs.md`, line 4) ([commit](https://github.com/keith/Basic-WP/commit/b99f7085c741c83e424bb0728168a3c1df3e9259)) - -## tailwind -- [ ] Rework break-out styles referencing [this guide](https://css-tip.com/full-bleed-layout/) (in `Theme_TODOs.md`, line 3) ([commit](https://github.com/keith/Basic-WP/commit/b99f7085c741c83e424bb0728168a3c1df3e9259)) -- [ ] Implement container queries. (in `Theme_TODOs.md`, line 4) ([commit](https://github.com/keith/Basic-WP/commit/b99f7085c741c83e424bb0728168a3c1df3e9259)) - -## enhancement -- [ ] Implement container queries. (in `Theme_TODOs.md`, line 4) ([commit](https://github.com/keith/Basic-WP/commit/b99f7085c741c83e424bb0728168a3c1df3e9259)) - -## uncategorized -- [ ] Add documenation link here (in `styles/navigation/nav-main-default.css`, line 5) ([commit](https://github.com/keith/Basic-WP/commit/b99f7085c741c83e424bb0728168a3c1df3e9259)) - diff --git a/Theme_TODOs.md b/Theme_TODOs.md deleted file mode 100644 index 6d3d491..0000000 --- a/Theme_TODOs.md +++ /dev/null @@ -1,4 +0,0 @@ -# Theme TODOs - -TODO: Rework break-out styles referencing [this guide](https://css-tip.com/full-bleed-layout/) Label: to-research, tailwind -TODO: Implement container queries. Label: to-research, tailwind, enhancement diff --git a/static/js/modules/FocusStyling.js b/static/js/modules/FocusStyling.js deleted file mode 100644 index acc1cb7..0000000 --- a/static/js/modules/FocusStyling.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Add Focus Styling Back - * - - * On the first "Tab" key press, remove the "zero/hidden" styling of the outline for :focus states. - */ - -function AddFocusStylingBack() { - function addFocusStylingBack(event) { - if (event.key == "Tab") { document.body.classList.add('keyboard-navigation'); } - - document.removeEventListener("keydown", addFocusStylingBack); - } - - document.addEventListener("keydown", addFocusStylingBack); -} - -export default AddFocusStylingBack; diff --git a/static/js/theme.js b/static/js/theme.js index 20f8277..8f29f3c 100644 --- a/static/js/theme.js +++ b/static/js/theme.js @@ -4,7 +4,6 @@ import { registerButtonComponent } from './components/button.js'; import { registerBackToTopButton } from './components/backToTop.js'; -import AddFocusStylingBack from './modules/FocusStyling.js'; import GetHeaderHeight from './modules/GetHeaderHeight.js'; import Navigation from './modules/Navigation.js'; @@ -62,8 +61,7 @@ document.addEventListener('DOMContentLoaded', () => { navigation.desktopMenuDropdowns(); navigation.mobileMenuToggle(); - // Initialize Focus Styling and Header Height - AddFocusStylingBack(); + // Initialize Header Height GetHeaderHeight(); // Add Back to Top button to body diff --git a/style.css b/style.css index 177f2d8..594b8b5 100644 --- a/style.css +++ b/style.css @@ -1,6 +1,6 @@ /* - * Theme Name: VDI Basic WP - * Description: Basic custom theme for WordPress (based on work by Kevinleary.net) - * Version: 1.0 + * Theme Name: + * Description: Custom WordPress theme starter for VDI Projects + * Version: 5.0 * Author: Vincent Design Inc. */ diff --git a/tests/site-a11y.spec.js b/tests/site-a11y.spec.js index cd13663..0e9593c 100644 --- a/tests/site-a11y.spec.js +++ b/tests/site-a11y.spec.js @@ -1,13 +1,14 @@ const { test, expect } = require('@playwright/test'); const AxeBuilder = require('@axe-core/playwright').default; +const domain = 'http://domain.local/'; test.use({ viewport: { width: 1920, height: 1080 }, }); test.describe('site-test', () => { test('Homepage Test', async ({ page }, testInfo) => { - await page.goto('http://basic-wp.test/'); + await page.goto(domain); await page.screenshot({ path: 'test-results/homepage.png', fullPage: true }); @@ -23,144 +24,8 @@ test.describe('site-test', () => { expect(accessibilityScanResults.violations).toEqual([]); }); - test('Sample Page Test', async ({ page }, testInfo) => { - await page.goto('http://basic-wp.test/sample-page/'); - - await page.screenshot({ path: 'test-results/sample-page.png', fullPage: true }); - - const accessibilityScanResults = await new AxeBuilder({ page }) - .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22a', 'wcag22aa']) - .analyze(); - - await testInfo.attach('accessibility-scan-results', { - body: JSON.stringify(accessibilityScanResults, null, 2), - contentType: 'application/json' - }); - - expect(accessibilityScanResults.violations).toEqual([]); - }); - - test('Page With Sidebar Test', async ({ page }, testInfo) => { - await page.goto('http://basic-wp.test/page-with-sidebar/'); - - await page.screenshot({ path: 'test-results/page-with-sidebar.png', fullPage: true }); - - const accessibilityScanResults = await new AxeBuilder({ page }) - .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22a', 'wcag22aa']) - .analyze(); - - await testInfo.attach('accessibility-scan-results', { - body: JSON.stringify(accessibilityScanResults, null, 2), - contentType: 'application/json' - }); - - expect(accessibilityScanResults.violations).toEqual([]); - }); - - test('Content Filter Page Test', async ({ page }, testInfo) => { - await page.goto('http://basic-wp.test/content-filter/'); - - await page.screenshot({ path: 'test-results/content-filter.png', fullPage: true }); - - const accessibilityScanResults = await new AxeBuilder({ page }) - .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22a', 'wcag22aa']) - .analyze(); - - await testInfo.attach('accessibility-scan-results', { - body: JSON.stringify(accessibilityScanResults, null, 2), - contentType: 'application/json' - }); - - expect(accessibilityScanResults.violations).toEqual([]); - }); - - test('Accordion Block Page Test', async ({ page }, testInfo) => { - await page.goto('http://basic-wp.test/blocks/accordion-block/'); - - await page.screenshot({ path: 'test-results/accordion-block.png', fullPage: true }); - - const accessibilityScanResults = await new AxeBuilder({ page }) - .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22a', 'wcag22aa']) - .analyze(); - - await testInfo.attach('accessibility-scan-results', { - body: JSON.stringify(accessibilityScanResults, null, 2), - contentType: 'application/json' - }); - - expect(accessibilityScanResults.violations).toEqual([]); - }); - - test('Button Block Page Test', async ({ page }, testInfo) => { - await page.goto('http://basic-wp.test/blocks/buttons-block/'); - - await page.screenshot({ path: 'test-results/buttons-block.png', fullPage: true }); - - const accessibilityScanResults = await new AxeBuilder({ page }) - .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22a', 'wcag22aa']) - .analyze(); - - await testInfo.attach('accessibility-scan-results', { - body: JSON.stringify(accessibilityScanResults, null, 2), - contentType: 'application/json' - }); - - expect(accessibilityScanResults.violations).toEqual([]); - }); - - test('Grid Block Page Test', async ({ page }, testInfo) => { - await page.goto('http://basic-wp.test/blocks/grid-block/'); - - await page.screenshot({ path: 'test-results/grid-block.png', fullPage: true }); - - const accessibilityScanResults = await new AxeBuilder({ page }) - .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22a', 'wcag22aa']) - .analyze(); - - await testInfo.attach('accessibility-scan-results', { - body: JSON.stringify(accessibilityScanResults, null, 2), - contentType: 'application/json' - }); - - expect(accessibilityScanResults.violations).toEqual([]); - }); - - test('Media Text Block Page Test', async ({ page }, testInfo) => { - await page.goto('http://basic-wp.test/blocks/media-text-block/'); - - await page.screenshot({ path: 'test-results/media-text-block.png', fullPage: true }); - - const accessibilityScanResults = await new AxeBuilder({ page }) - .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22a', 'wcag22aa']) - .analyze(); - - await testInfo.attach('accessibility-scan-results', { - body: JSON.stringify(accessibilityScanResults, null, 2), - contentType: 'application/json' - }); - - expect(accessibilityScanResults.violations).toEqual([]); - }); - - test('Section Block Page Test', async ({ page }, testInfo) => { - await page.goto('http://basic-wp.test/blocks/section-block/'); - - await page.screenshot({ path: 'test-results/section-block.png', fullPage: true }); - - const accessibilityScanResults = await new AxeBuilder({ page }) - .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22a', 'wcag22aa']) - .analyze(); - - await testInfo.attach('accessibility-scan-results', { - body: JSON.stringify(accessibilityScanResults, null, 2), - contentType: 'application/json' - }); - - expect(accessibilityScanResults.violations).toEqual([]); - }); - test('Blog Index Page Test', async ({ page }, testInfo) => { - await page.goto('http://basic-wp.test/news/'); + await page.goto(`${domain}news/`); await page.screenshot({ path: 'test-results/blog-index.png', fullPage: true }); @@ -176,25 +41,8 @@ test.describe('site-test', () => { expect(accessibilityScanResults.violations).toEqual([]); }); - test('Single Blog Post Test', async ({ page }, testInfo) => { - await page.goto('http://basic-wp.test/vel-consectetur-vero-laudantium/'); - - await page.screenshot({ path: 'test-results/blog-post.png', fullPage: true }); - - const accessibilityScanResults = await new AxeBuilder({ page }) - .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22a', 'wcag22aa']) - .analyze(); - - await testInfo.attach('accessibility-scan-results', { - body: JSON.stringify(accessibilityScanResults, null, 2), - contentType: 'application/json' - }); - - expect(accessibilityScanResults.violations).toEqual([]); - }); - test('404 Page Test', async ({ page }, testInfo) => { - await page.goto('http://basic-wp.test/yaya/'); + await page.goto(`${domain}yaya/`); await page.screenshot({ path: 'test-results/404.png', fullPage: true });