🐞 fix: Clean up code for production use
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
LOCALHOST_URL=https://basic-wp.test
|
LOCALHOST_URL=http://domain.local
|
||||||
BROWSERSYNC_PORT=5000
|
BROWSERSYNC_PORT=5000
|
||||||
|
|||||||
2
.github/workflows/todos.yml
vendored
2
.github/workflows/todos.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Sync TODOs
|
- name: Sync TODOs
|
||||||
uses: Solo-Web-Works/TODO-Sync@v1
|
uses: Solo-Web-Works/TODO-Sync@v2
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
summary_file: TODO_SUMMARY.md
|
summary_file: TODO_SUMMARY.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
|
## Key Features
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ Basic-WP is a minimal WordPress theme designed as a starting point for custom th
|
|||||||
## Project Structure
|
## Project Structure
|
||||||
|
|
||||||
```plaintext
|
```plaintext
|
||||||
Basic-WP/
|
VDI-Starter-v5/
|
||||||
├── acf/ # ACF field group JSON definitions
|
├── acf/ # ACF field group JSON definitions
|
||||||
├── bin/ # Build scripts
|
├── bin/ # Build scripts
|
||||||
├── content/ # Sample page and post content for testing
|
├── content/ # Sample page and post content for testing
|
||||||
|
|||||||
@@ -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))
|
|
||||||
|
|
||||||
@@ -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
|
|
||||||
@@ -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;
|
|
||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
import { registerButtonComponent } from './components/button.js';
|
import { registerButtonComponent } from './components/button.js';
|
||||||
import { registerBackToTopButton } from './components/backToTop.js';
|
import { registerBackToTopButton } from './components/backToTop.js';
|
||||||
import AddFocusStylingBack from './modules/FocusStyling.js';
|
|
||||||
import GetHeaderHeight from './modules/GetHeaderHeight.js';
|
import GetHeaderHeight from './modules/GetHeaderHeight.js';
|
||||||
import Navigation from './modules/Navigation.js';
|
import Navigation from './modules/Navigation.js';
|
||||||
|
|
||||||
@@ -62,8 +61,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
navigation.desktopMenuDropdowns();
|
navigation.desktopMenuDropdowns();
|
||||||
navigation.mobileMenuToggle();
|
navigation.mobileMenuToggle();
|
||||||
|
|
||||||
// Initialize Focus Styling and Header Height
|
// Initialize Header Height
|
||||||
AddFocusStylingBack();
|
|
||||||
GetHeaderHeight();
|
GetHeaderHeight();
|
||||||
|
|
||||||
// Add Back to Top button to body
|
// Add Back to Top button to body
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Theme Name: VDI Basic WP
|
* Theme Name:
|
||||||
* Description: Basic custom theme for WordPress (based on work by Kevinleary.net)
|
* Description: Custom WordPress theme starter for VDI Projects
|
||||||
* Version: 1.0
|
* Version: 5.0
|
||||||
* Author: Vincent Design Inc.
|
* Author: Vincent Design Inc.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
const { test, expect } = require('@playwright/test');
|
const { test, expect } = require('@playwright/test');
|
||||||
const AxeBuilder = require('@axe-core/playwright').default;
|
const AxeBuilder = require('@axe-core/playwright').default;
|
||||||
|
|
||||||
|
const domain = 'http://domain.local/';
|
||||||
test.use({
|
test.use({
|
||||||
viewport: { width: 1920, height: 1080 },
|
viewport: { width: 1920, height: 1080 },
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe('site-test', () => {
|
test.describe('site-test', () => {
|
||||||
test('Homepage Test', async ({ page }, testInfo) => {
|
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 });
|
await page.screenshot({ path: 'test-results/homepage.png', fullPage: true });
|
||||||
|
|
||||||
@@ -23,144 +24,8 @@ test.describe('site-test', () => {
|
|||||||
expect(accessibilityScanResults.violations).toEqual([]);
|
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) => {
|
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 });
|
await page.screenshot({ path: 'test-results/blog-index.png', fullPage: true });
|
||||||
|
|
||||||
@@ -176,25 +41,8 @@ test.describe('site-test', () => {
|
|||||||
expect(accessibilityScanResults.violations).toEqual([]);
|
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) => {
|
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 });
|
await page.screenshot({ path: 'test-results/404.png', fullPage: true });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user