diff --git a/CHANGELOG.md b/CHANGELOG.md index b046f76..a0a0c8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.7.1] - 2026-03-16 + +### Added +- Plumbing Styles block (`elayne/plumbing-styles`) — utility block that loads plumbing vertical CSS helpers on any page it is inserted into +- Plumbing Styles block registered in admin settings page with enable/disable support + ## [2.7.0] - 2026-02-15 ### Added diff --git a/blocks/plumbing-styles/build/block.json b/blocks/plumbing-styles/build/block.json new file mode 100644 index 0000000..de96ad8 --- /dev/null +++ b/blocks/plumbing-styles/build/block.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "elayne/plumbing-styles", + "version": "1.0.0", + "title": "Plumbing Styles", + "category": "theme", + "icon": "admin-appearance", + "description": "Loads plumbing vertical CSS utilities. Insert once per plumbing page. No frontend output.", + "keywords": [ + "plumbing", + "styles", + "utilities", + "css" + ], + "supports": { + "html": false, + "anchor": false, + "inserter": true, + "multiple": false, + "reusable": false + }, + "textdomain": "elayne-blocks", + "editorScript": "file:./index.js", + "editorStyle": "file:./index.css", + "style": "file:./style-index.css" +} \ No newline at end of file diff --git a/blocks/plumbing-styles/build/index-rtl.css b/blocks/plumbing-styles/build/index-rtl.css new file mode 100644 index 0000000..6516d06 --- /dev/null +++ b/blocks/plumbing-styles/build/index-rtl.css @@ -0,0 +1 @@ +.elayne-plumbing-styles-indicator{align-items:center;background:rgba(230,126,34,.12);border:1px dashed rgba(230,126,34,.5);border-radius:999px;color:#cf6d17;display:inline-flex;font-size:11px;font-weight:600;gap:6px;letter-spacing:.04em;padding:4px 12px;pointer-events:none;text-transform:uppercase;-webkit-user-select:none;-moz-user-select:none;user-select:none}.elayne-plumbing-styles-indicator__icon{font-size:13px;line-height:1}.elayne-plumbing-styles-indicator__label{line-height:1} diff --git a/blocks/plumbing-styles/build/index.asset.php b/blocks/plumbing-styles/build/index.asset.php new file mode 100644 index 0000000..143d2bf --- /dev/null +++ b/blocks/plumbing-styles/build/index.asset.php @@ -0,0 +1 @@ + array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => 'f509b5b692d5987b80a0'); diff --git a/blocks/plumbing-styles/build/index.css b/blocks/plumbing-styles/build/index.css new file mode 100644 index 0000000..6516d06 --- /dev/null +++ b/blocks/plumbing-styles/build/index.css @@ -0,0 +1 @@ +.elayne-plumbing-styles-indicator{align-items:center;background:rgba(230,126,34,.12);border:1px dashed rgba(230,126,34,.5);border-radius:999px;color:#cf6d17;display:inline-flex;font-size:11px;font-weight:600;gap:6px;letter-spacing:.04em;padding:4px 12px;pointer-events:none;text-transform:uppercase;-webkit-user-select:none;-moz-user-select:none;user-select:none}.elayne-plumbing-styles-indicator__icon{font-size:13px;line-height:1}.elayne-plumbing-styles-indicator__label{line-height:1} diff --git a/blocks/plumbing-styles/build/index.js b/blocks/plumbing-styles/build/index.js new file mode 100644 index 0000000..8ddb1bd --- /dev/null +++ b/blocks/plumbing-styles/build/index.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,n={650(){const e=window.wp.blocks,n=window.wp.i18n,s=window.wp.blockEditor,l=window.ReactJSXRuntime,r=JSON.parse('{"UU":"elayne/plumbing-styles"}');(0,e.registerBlockType)(r.UU,{edit:function(){const e=(0,s.useBlockProps)({className:"elayne-plumbing-styles-indicator"});return(0,l.jsxs)("div",{...e,children:[(0,l.jsx)("span",{className:"elayne-plumbing-styles-indicator__icon",children:"🔧"}),(0,l.jsx)("span",{className:"elayne-plumbing-styles-indicator__label",children:(0,n.__)("Plumbing CSS","elayne-blocks")})]})},save:function(){return(0,l.jsx)("span",{"aria-hidden":"true",className:"wp-block-elayne-plumbing-styles",style:{display:"none"}})}})}},s={};function l(e){var r=s[e];if(void 0!==r)return r.exports;var i=s[e]={exports:{}};return n[e](i,i.exports,l),i.exports}l.m=n,e=[],l.O=(n,s,r,i)=>{if(!s){var a=1/0;for(p=0;p=i)&&Object.keys(l.O).every(e=>l.O[e](s[t]))?s.splice(t--,1):(o=!1,i0&&e[p-1][2]>i;p--)e[p]=e[p-1];e[p]=[s,r,i]},l.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={57:0,350:0};l.O.j=n=>0===e[n];var n=(n,s)=>{var r,i,[a,o,t]=s,c=0;if(a.some(n=>0!==e[n])){for(r in o)l.o(o,r)&&(l.m[r]=o[r]);if(t)var p=t(l)}for(n&&n(s);cl(650));r=l.O(r)})(); \ No newline at end of file diff --git a/blocks/plumbing-styles/build/style-index-rtl.css b/blocks/plumbing-styles/build/style-index-rtl.css new file mode 100644 index 0000000..1d3a1a4 --- /dev/null +++ b/blocks/plumbing-styles/build/style-index-rtl.css @@ -0,0 +1 @@ +.plumbing-section-label{background:rgba(230,126,34,.1);border:1px solid rgba(230,126,34,.2);border-radius:999px;color:#e67e22;display:inline-block;font-size:.75rem;font-weight:700;letter-spacing:.1em;margin-bottom:.75rem;padding:.3rem .9rem;text-transform:uppercase}.plumbing-stat-block strong{color:#e67e22;display:block;font-size:1.6rem;font-stretch:75%;font-weight:900;line-height:1;margin-bottom:.25rem}.plumbing-stat-block span{color:#8fa3bf;display:block;font-size:.72rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase}.plumbing-stats-divider{align-self:center;background:hsla(0,0%,100%,.1);display:block;height:36px;width:1px}.plumbing-check-icon{align-items:center;background:rgba(230,126,34,.15);border:1px solid rgba(230,126,34,.3);border-radius:50%;color:#e67e22;display:flex;height:30px;justify-content:center;min-width:30px;width:30px}.plumbing-why-item{align-items:flex-start;display:flex;gap:1rem}.plumbing-t-featured{background:rgba(230,126,34,.05)!important;border-color:rgba(230,126,34,.35)!important}.plumbing-avatar{background:linear-gradient(-135deg,#1e88e5,#e67e22);border-radius:50%;color:#fff;font-size:.78rem;font-weight:700;height:42px;min-width:42px;width:42px}.plumbing-avatar,.plumbing-contact-icon{align-items:center;display:flex;justify-content:center}.plumbing-contact-icon{background:rgba(144,202,249,.1);border:1px solid rgba(144,202,249,.2);border-radius:10px;color:#90caf9;height:38px;min-width:38px;width:38px}.plumbing-always-on{color:#e67e22!important;font-weight:600!important}@keyframes plumbing-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.1)}}.plumbing-emergency-icon{animation:plumbing-pulse 2s ease-in-out infinite;display:inline-block}.plumbing-hero-section{overflow:visible!important;position:relative}.plumbing-hero-section:after{background:#0b1628;bottom:0;clip-path:polygon(0 100%,100% 0,100% 100%);content:"";height:80px;right:0;pointer-events:none;position:absolute;left:0;z-index:2}.plumbing-top-bar a{color:#fff!important}.plumbing-topbar-phone{background:hsla(0,0%,100%,.2)}.plumbing-topbar-phone:hover{background:hsla(0,0%,100%,.35)}.plumbing-header-cta{transition:background .2s ease,transform .2s ease,box-shadow .2s ease}.plumbing-header-cta:hover{background:#cf6d17!important;box-shadow:0 4px 16px rgba(230,126,34,.4);transform:translateY(-1px)} diff --git a/blocks/plumbing-styles/build/style-index.css b/blocks/plumbing-styles/build/style-index.css new file mode 100644 index 0000000..431195e --- /dev/null +++ b/blocks/plumbing-styles/build/style-index.css @@ -0,0 +1 @@ +.plumbing-section-label{background:rgba(230,126,34,.1);border:1px solid rgba(230,126,34,.2);border-radius:999px;color:#e67e22;display:inline-block;font-size:.75rem;font-weight:700;letter-spacing:.1em;margin-bottom:.75rem;padding:.3rem .9rem;text-transform:uppercase}.plumbing-stat-block strong{color:#e67e22;display:block;font-size:1.6rem;font-stretch:75%;font-weight:900;line-height:1;margin-bottom:.25rem}.plumbing-stat-block span{color:#8fa3bf;display:block;font-size:.72rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase}.plumbing-stats-divider{align-self:center;background:hsla(0,0%,100%,.1);display:block;height:36px;width:1px}.plumbing-check-icon{align-items:center;background:rgba(230,126,34,.15);border:1px solid rgba(230,126,34,.3);border-radius:50%;color:#e67e22;display:flex;height:30px;justify-content:center;min-width:30px;width:30px}.plumbing-why-item{align-items:flex-start;display:flex;gap:1rem}.plumbing-t-featured{background:rgba(230,126,34,.05)!important;border-color:rgba(230,126,34,.35)!important}.plumbing-avatar{background:linear-gradient(135deg,#1e88e5,#e67e22);border-radius:50%;color:#fff;font-size:.78rem;font-weight:700;height:42px;min-width:42px;width:42px}.plumbing-avatar,.plumbing-contact-icon{align-items:center;display:flex;justify-content:center}.plumbing-contact-icon{background:rgba(144,202,249,.1);border:1px solid rgba(144,202,249,.2);border-radius:10px;color:#90caf9;height:38px;min-width:38px;width:38px}.plumbing-always-on{color:#e67e22!important;font-weight:600!important}@keyframes plumbing-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.1)}}.plumbing-emergency-icon{animation:plumbing-pulse 2s ease-in-out infinite;display:inline-block}.plumbing-hero-section{overflow:visible!important;position:relative}.plumbing-hero-section:after{background:#0b1628;bottom:0;clip-path:polygon(0 100%,100% 0,100% 100%);content:"";height:80px;left:0;pointer-events:none;position:absolute;right:0;z-index:2}.plumbing-top-bar a{color:#fff!important}.plumbing-topbar-phone{background:hsla(0,0%,100%,.2)}.plumbing-topbar-phone:hover{background:hsla(0,0%,100%,.35)}.plumbing-header-cta{transition:background .2s ease,transform .2s ease,box-shadow .2s ease}.plumbing-header-cta:hover{background:#cf6d17!important;box-shadow:0 4px 16px rgba(230,126,34,.4);transform:translateY(-1px)} diff --git a/blocks/plumbing-styles/package.json b/blocks/plumbing-styles/package.json new file mode 100644 index 0000000..1ce4979 --- /dev/null +++ b/blocks/plumbing-styles/package.json @@ -0,0 +1,22 @@ +{ + "name": "plumbing-styles", + "version": "1.0.0", + "description": "CSS utility block for the Elayne plumbing vertical. Loads plumbing-specific styles without using the wp_global_styles database snapshot.", + "author": "Imagewize", + "license": "GPL-2.0-or-later", + "main": "build/index.js", + "scripts": { + "build": "wp-scripts build", + "format": "wp-scripts format", + "lint:css": "wp-scripts lint-style", + "lint:js": "wp-scripts lint-js", + "packages-update": "wp-scripts packages-update", + "start": "wp-scripts start" + }, + "devDependencies": { + "@wordpress/scripts": "^30.27.0" + }, + "overrides": { + "webpack-dev-server": "^5.2.2" + } +} diff --git a/blocks/plumbing-styles/src/block.json b/blocks/plumbing-styles/src/block.json new file mode 100644 index 0000000..d1ed197 --- /dev/null +++ b/blocks/plumbing-styles/src/block.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "elayne/plumbing-styles", + "version": "1.0.0", + "title": "Plumbing Styles", + "category": "theme", + "icon": "admin-appearance", + "description": "Loads plumbing vertical CSS utilities. Insert once per plumbing page. No frontend output.", + "keywords": [ "plumbing", "styles", "utilities", "css" ], + "supports": { + "html": false, + "anchor": false, + "inserter": true, + "multiple": false, + "reusable": false + }, + "textdomain": "elayne-blocks", + "editorScript": "file:./index.js", + "editorStyle": "file:./index.css", + "style": "file:./style-index.css" +} diff --git a/blocks/plumbing-styles/src/edit.js b/blocks/plumbing-styles/src/edit.js new file mode 100644 index 0000000..b280ec1 --- /dev/null +++ b/blocks/plumbing-styles/src/edit.js @@ -0,0 +1,23 @@ +/** + * WordPress dependencies + */ +import { __ } from '@wordpress/i18n'; +import { useBlockProps } from '@wordpress/block-editor'; + +/** + * Edit component — visible in editor only, renders nothing on frontend. + */ +export default function Edit() { + const blockProps = useBlockProps( { + className: 'elayne-plumbing-styles-indicator', + } ); + + return ( +
+ 🔧 + + { __( 'Plumbing CSS', 'elayne-blocks' ) } + +
+ ); +} diff --git a/blocks/plumbing-styles/src/editor.scss b/blocks/plumbing-styles/src/editor.scss new file mode 100644 index 0000000..155ec5c --- /dev/null +++ b/blocks/plumbing-styles/src/editor.scss @@ -0,0 +1,29 @@ +/** + * Editor-only styles for the Plumbing Styles indicator block. + */ + +.elayne-plumbing-styles-indicator { + display: inline-flex; + align-items: center; + gap: 6px; + padding: 4px 12px; + background: rgba( 230, 126, 34, 0.12 ); + border: 1px dashed rgba( 230, 126, 34, 0.5 ); + border-radius: 999px; + font-size: 11px; + font-weight: 600; + color: #cf6d17; + letter-spacing: 0.04em; + text-transform: uppercase; + pointer-events: none; + user-select: none; + + &__icon { + font-size: 13px; + line-height: 1; + } + + &__label { + line-height: 1; + } +} diff --git a/blocks/plumbing-styles/src/index.js b/blocks/plumbing-styles/src/index.js new file mode 100644 index 0000000..f403e27 --- /dev/null +++ b/blocks/plumbing-styles/src/index.js @@ -0,0 +1,21 @@ +/** + * WordPress dependencies + */ +import { registerBlockType } from '@wordpress/blocks'; + +/** + * Internal dependencies + */ +import Edit from './edit'; +import save from './save'; +import metadata from './block.json'; +import './style.scss'; +import './editor.scss'; + +/** + * Register block + */ +registerBlockType( metadata.name, { + edit: Edit, + save, +} ); diff --git a/blocks/plumbing-styles/src/save.js b/blocks/plumbing-styles/src/save.js new file mode 100644 index 0000000..b4c9ab7 --- /dev/null +++ b/blocks/plumbing-styles/src/save.js @@ -0,0 +1,13 @@ +/** + * Save component — outputs a hidden span so the block has a DOM presence, + * which guarantees WordPress enqueues style-index.css on the frontend. + */ +export default function save() { + return ( +