diff --git a/assets/vendor/slider/admin/assets/dist/css/editor-block.css b/assets/vendor/slider/admin/assets/dist/css/editor-block.css deleted file mode 100644 index 8bc036c4..00000000 --- a/assets/vendor/slider/admin/assets/dist/css/editor-block.css +++ /dev/null @@ -1 +0,0 @@ -.components-placeholder.ms-loader{position:absolute;width:100%;height:100%;z-index:3;top:0;left:0;background:rgba(243,243,244,.83);min-height:50px}.wp-block-metaslider-slider iframe{transition:height .6s;width:100%}.ms-preview{position:relative}.ms-preview__trigger{position:absolute;top:0;right:0;bottom:0;left:0}.components-base-control.ms-loading .is-active.spinner{margin-top:-2px;float:none;margin-left:0}.ms-plugin-link{display:block;padding:15px;border-top:1px solid #e2e4e7;border-bottom:1px solid #e2e4e7;margin-left:-16px;margin-right:-16px;margin-top:17px}.ms-edit-current-slideshow{position:relative;float:right;margin-top:-11px;font-size:.95em}.ms-edit-current-slideshow::before{content:"\f474";font-family:dashicons;position:absolute;left:-19px;transform:rotate(90deg);color:#ccc;font-size:1.2em}.wp-block-metaslider-slider.placeholder-loading+.wp-block-metaslider-slider{display:none}.wp-block-metaslider-slider{transition:height .3s} diff --git a/package.json b/package.json index 51ef1b00..5e69bab1 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,10 @@ "scripts": { "organize": "node scripts/organize-content.mjs", "render:layout": "node scripts/render-shared-layout.mjs", + "clean:wp": "node scripts/clean-wordpress-residue.mjs", "extract:content": "node scripts/extract-content.mjs", "extract:theme": "node scripts/extract-theme-css.mjs", - "prepare:source": "npm run organize && npm run render:layout", + "prepare:source": "npm run organize && npm run clean:wp && npm run render:layout", "dev": "npm run prepare:source && astro dev --host 0.0.0.0", "build": "npm run prepare:source && astro build && node scripts/copy-static-assets.mjs", "preview": "astro preview --host 0.0.0.0", diff --git a/scripts/clean-wordpress-residue.mjs b/scripts/clean-wordpress-residue.mjs new file mode 100644 index 00000000..94acd15d --- /dev/null +++ b/scripts/clean-wordpress-residue.mjs @@ -0,0 +1,39 @@ +import fs from "node:fs"; +import path from "node:path"; + +const repoRoot = process.cwd(); +const websiteRoot = path.join(repoRoot, "website"); + +function walkHtml(dir) { + return fs.readdirSync(dir, { withFileTypes: true }).flatMap((entry) => { + const fullPath = path.join(dir, entry.name); + if (entry.isDirectory()) { + return walkHtml(fullPath); + } + return entry.isFile() && entry.name.endsWith(".html") ? [fullPath] : []; + }); +} + +function removeWordPressResidue(html) { + return html + .replace(/\n?\s*/g, "\n") + .replace( + /\n?\s* - -
@@ -155,10 +144,6 @@ The following are just a few of the logos and links to these organizations’ 'use strict'; body.className = body.className.replace( /\btribe-no-js\b/, 'tribe-js' ); } )( document.body ); - - - - - +