wp-performance / press-wind Goto Github PK
View Code? Open in Web Editor NEWStarter theme WordPress with Tailwind CSS and Vite JS
Home Page: https://presswind-doc.wp-performance.com/
License: MIT License
Starter theme WordPress with Tailwind CSS and Vite JS
Home Page: https://presswind-doc.wp-performance.com/
License: MIT License
Using apply is only method to keep in sync blocks right now? @ipatate
As developing on this FSE builder we find that block will lost all capabilities of updating from theme
Is there some approach that you recommend to use?
100% compatible with Gutenberg ? How come if there is no editor.js file and 0 to support Gutenberg.
Tried the theme, but but got an error in the console, looks like the main.js file path compiled wrong and looks like this:
https://localhost:3000/wp-contentthemespress-wind/main.js?ver=1691594594
On my local i'm using Laravel Homestead to develop my websites.
Is it possible to watch the website you working on, on your mobile device?
I can't get this to work. Is there any workaround for this?
We are facing an issue with the plugin file. "npm run build" successfully and also not getting any error with "npm run dev" but showing me the below error in a log file.
[Fri Mar 22 06:17:31.549343 2024] [proxy_fcgi:error] [pid 787:tid 133436110992960] [client 115.246.21.250:0] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function PressWind\version() in /home/webbycrown/webapps/webbycrown-solutions/website/web/app/plugins/presswind-plugin-main/vendor/wp-performance/presswind-assets/src/PWVite.php:242\nStack trace:\n#0 /home/webbycrown/webapps/webbycrown-solutions/website/web/app/plugins/presswind-plugin-main/vendor/wp-performance/presswind-assets/src/PWVite.php(142): PressWind\PWVite->set_script_prod()\n#1 /home/webbycrown/webapps/webbycrown-solutions/website/web/app/plugins/presswind-plugin-main/vendor/wp-performance/presswind-assets/src/PWVite.php(56): PressWind\PWVite->set_script()\n#2 /home/webbycrown/webapps/webbycrown-solutions/website/web/app/plugins/presswind-plugin-main/vendor/wp-performance/presswind-assets/src/PWVite.php(75): PressWind\PWVite->__construct()\n#3 /home/webbycrown/webapps/webbycrown-solutions/website/web/app/themes/webbycrown/functions.php(207): PressWind\PWVite::init()\n#4 /home/webbycrown/webapps/webbycrown-solutions/website/web/w...', referer:
dirname(FILE) return path with antislash when used on PC.
Has this been tested with Local?
In wp-config, I have define('WP_ENV', 'development');
However, when successfully running npm run dev
, then clicking on the link, I get a 404: https://localhost:3000/wp-content/themes/press-wind/ can't be found
in the browser.
BTW, npm run build
seems to work fine. Regardless, setting define('WP_ENV', 'production');
or define('WP_ENV', 'development');
in wp-config results with assets being hashed.
Salut ๐
First of all, thanks for your work!
(have been struggling this weekend to find a valid Vite 5 WP theme / assets handling and after 3 or 4 others, i found yours)
I tried to load assets as you recommended:
Vite dev server is localhost:5173
and my Docker WP instance is localhost:8888
If you have any idea what's wrong, i'm all ears ๐
EDIT : i saw in your video, that you have HMR without using Vite Dev Server url... how is it possible? ๐ค
As you can see, the JS is blocked but not the CSS somehow ๐ค
My WP setup:
.wp-env.json
(@wordpress/env) which i can access at localhost:8888
localhost:8888/wp-login.php
)/src
and my build assets are generated in /dist
Here is my vite.config.js
:
// vite.config.js
import { defineConfig } from 'vite';
import { resolve } from 'path';
export default defineConfig({
build: {
minify: true,
manifest: true,
emptyOutDir: true,
sourcemap: true,
outDir: `dist/`,
rollupOptions: {
// overwrite default .html entry
input: resolve(__dirname, 'src/index.js'),
},
},
server: {
strictPort: true,
cors: true,
port: 5173,
hmr: {
protocol: 'ws',
port: 5173,
clientPort: 8888,
},
proxy: {
'/': {
target: 'http://localhost:8888',
changeOrigin: true,
secure: false,
},
},
watch: { usePolling: true, ignored: '/node_modules' },
},
});
This link to theme documentation returns "This site can't be reached" : https://presswind-doc.wp-performance.com/
Hello, first great job for this theme.
I have only one big issue with font weight in chrome browser.
With the theme.json conf below, font-weight 700 or 300 works on Firefox but not on Chrome.
To make it work on chrome i add a duplicate load of font file in my css (see fonts.css)
So i include fonts.css in styles.css and editor.css
It's ok like that on front with chrome, but still not work in the admin gutemberg...
Have you got an idea ? i search and test for so long :)
The WP is in multisite mode.
Thks !
theme.json :
{
"$schema": "https://schemas.wp.org/wp/6.0/theme.json",
"version": 2,
"customTemplates": [],
"settings": {
"appearanceTools": true,
"color": {
"duotone": [
{
"colors": [
"#000000",
"#ffffff"
],
"slug": "foreground-and-background",
"name": "Foreground and background"
},
{
"colors": [
"#000000",
"#fbb911"
],
"slug": "foreground-and-secondary",
"name": "Foreground and secondary"
},
{
"colors": [
"#5ec1cb",
"#ffffff"
],
"slug": "primary-and-background",
"name": "Primary and background"
},
{
"colors": [
"#5ec1cb",
"#fbb911"
],
"slug": "primary-and-secondary",
"name": "Primary and secondary"
}
],
"gradients": [
{
"slug": "vertical-secondary-to-background",
"gradient": "linear-gradient(to bottom,var(--wp--preset--color--secondary) 0%,var(--wp--preset--color--background) 100%)",
"name": "Vertical secondary to background"
},
{
"slug": "diagonal-primary-to-foreground",
"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--primary) 0%,var(--wp--preset--color--foreground) 100%)",
"name": "Diagonal primary to foreground"
},
{
"slug": "diagonal-secondary-to-background",
"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--secondary) 50%,var(--wp--preset--color--background) 50%)",
"name": "Diagonal secondary to background"
},
{
"slug": "diagonal-background-to-secondary",
"gradient": "linear-gradient(to bottom right,var(--wp--preset--color--background) 50%,var(--wp--preset--color--secondary) 50%)",
"name": "Diagonal background to secondary"
}
],
"palette": [
{
"slug": "foreground",
"color": "#000000",
"name": "Foreground"
},
{
"slug": "background",
"color": "#ffffff",
"name": "Background"
},
{
"slug": "gray-text",
"color": "#717070",
"name": "Gray Text"
},
{
"slug": "gray-light",
"color": "#ededed",
"name": "Gray Light"
},
{
"slug": "primary",
"color": "#5ec1cb",
"name": "Primary"
},
{
"slug": "secondary",
"color": "#fbb911",
"name": "Secondary"
}
]
},
"custom": {
"spacing": {
"small": {
"top": "6px",
"right": "20px",
"bottom": "6px",
"left": "20px"
},
"medium": "clamp(1.50rem, 1.56vw, 1.875rem)",
"large": "clamp(3.25rem, 4.375vw, 5.25rem)",
"outer": "var(--wp--custom--spacing--small, 1.25rem)"
},
"typography": {
"font-size": {
"title": "clamp(2.75rem, 7.6vw, 4.375rem)",
"subtitle": "clamp(2.25rem, 5.4vw, 3.125rem)",
"thirdtitle": "clamp(1.2rem, 3.2vw, 1.875rem)",
"fourtitle": "clamp(0.8rem, 2.6vw, 1.5rem)"
},
"line-height": {
"tiny": 1.15,
"small": 1.2,
"medium": 1.4,
"normal": 1.6
}
}
},
"spacing": {
"units": [
"%",
"px",
"em",
"rem",
"vh",
"vw"
]
},
"typography": {
"dropCap": false,
"fontFamilies": [
{
"fontFamily": "\"PlayfairDisplay\", serif",
"name": "PlayfairDisplay",
"slug": "PlayfairDisplay",
"fontFace": [
{
"fontFamily": "PlayfairDisplay",
"fontWeight": "400",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/playfair-display-v30-latin-regular.woff",
"file:./assets/fonts/playfair-display-v30-latin-regular.woff2"
]
},
{
"fontFamily": "PlayfairDisplay",
"fontWeight": "700",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/playfair-display-v30-latin-700.woff",
"file:./assets/fonts/playfair-display-v30-latin-700.woff2"
]
},
{
"fontFamily": "PlayfairDisplay",
"fontWeight": "900",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/playfair-display-v30-latin-900.woff",
"file:./assets/fonts/playfair-display-v30-latin-900.woff2"
]
}
]
},
{
"fontFamily": "\"Montserrat\", sans-serif",
"name": "Montserrat",
"slug": "Montserrat",
"fontFace": [
{
"fontFamily": "Montserrat",
"fontWeight": "300",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/montserrat-v25-latin-300.woff2",
"file:./assets/fonts/montserrat-v25-latin-300.woff"
]
},
{
"fontFamily": "Montserrat",
"fontWeight": "400",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/montserrat-v25-latin-regular.woff2",
"file:./assets/fonts/montserrat-v25-latin-regular.woff"
]
},
{
"fontFamily": "Montserrat",
"fontWeight": "700",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/montserrat-v25-latin-700.woff2",
"file:./assets/fonts/montserrat-v25-latin-700.woff"
]
}
]
},
{
"fontFamily": "\"MontserratAlternates\", sans-serif",
"name": "MontserratAlternates",
"slug": "MontserratAlternates",
"fontFace": [
{
"fontFamily": "MontserratAlternates",
"fontWeight": "400",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/montserrat-alternates-v17-latin-regular.woff",
"file:./assets/fonts/montserrat-alternates-v17-latin-regular.woff2"
]
},
{
"fontFamily": "MontserratAlternates",
"fontWeight": "600",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/montserrat-alternates-v17-latin-600.woff",
"file:./assets/fonts/montserrat-alternates-v17-latin-600.woff2"
]
},
{
"fontFamily": "MontserratAlternates",
"fontWeight": "900",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [
"file:./assets/fonts/montserrat-alternates-v17-latin-900.woff",
"file:./assets/fonts/montserrat-alternates-v17-latin-900.woff2"
]
}
]
}
],
"fontSizes": [
{
"size": "0.94rem",
"slug": "small"
},
{
"size": "1rem",
"slug": "medium"
},
{
"size": "1.75rem",
"slug": "large"
},
{
"size": "clamp(1.75rem, 3vw, 2.25rem)",
"slug": "x-large"
}
]
},
"layout": {
"contentSize": "960px",
"wideSize": "1200px"
}
},
"styles": {
"blocks": {
"core/post-title": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"fontWeight": "900",
"lineHeight": "var(--wp--custom--typography--line-height--tiny)",
"fontSize": "var(--wp--custom--typography--font-size--title)"
}
},
"core/paragraph": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat)",
"fontWeight": "400"
},
"color": {
"text": "var(--wp--preset--color--gray-text)"
}
},
"core/columns": {
"spacing": {
"margin": {
"top": "var(--wp--custom--spacing--large)",
"bottom": "var(--wp--custom--spacing--large)"
}
}
},
"core/cover": {
"spacing": {
"margin": {
"top": "var(--wp--custom--spacing--large)",
"bottom": "var(--wp--custom--spacing--large)"
}
}
},
"core/media-text": {
"spacing": {
"margin": {
"top": "var(--wp--custom--spacing--large)",
"bottom": "var(--wp--custom--spacing--large)"
}
}
},
"core/post-comments": {
"spacing": {
"padding": {
"top": "var(--wp--custom--spacing--small)"
}
}
},
"core/pullquote": {
"border": {
"width": "1px 0"
}
},
"core/query-title": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"fontWeight": "600",
"lineHeight": "var(--wp--custom--typography--line-height--small)",
"fontSize": "var(--wp--custom--typography--font-size--title)"
}
},
"core/quote": {
"border": {
"width": "1px"
}
},
"core/site-title": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"lineHeight": "var(--wp--custom--typography--line-height--normal)",
"fontSize": "var(--wp--preset--font-size--medium)",
"fontStyle": "normal",
"fontWeight": "normal"
}
}
},
"color": {
"background": "var(--wp--preset--color--background)",
"text": "var(--wp--preset--color--foreground)"
},
"elements": {
"h1": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"fontWeight": "900",
"lineHeight": "var(--wp--custom--typography--line-height--tiny)",
"fontSize": "var(--wp--custom--typography--font-size--title)"
}
},
"h2": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"fontWeight": "600",
"lineHeight": "var(--wp--custom--typography--line-height--small)",
"fontSize": "var(--wp--custom--typography--font-size--subtitle)"
},
"color": {
"text": "var(--wp--preset--color--primary)"
}
},
"h3": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"fontWeight": "600",
"lineHeight": "var(--wp--custom--typography--line-height--tiny)",
"fontSize": "var(--wp--custom--typography--font-size--thirdtitle)"
}
},
"h4": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"fontWeight": "600",
"lineHeight": "var(--wp--custom--typography--line-height--tiny)",
"fontSize": "var(--wp--preset--font-size--medium)"
}
},
"h5": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"fontWeight": "700",
"lineHeight": "var(--wp--custom--typography--line-height--normal)",
"fontSize": "var(--wp--preset--font-size--medium)"
}
},
"h6": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
"fontWeight": "400",
"lineHeight": "var(--wp--custom--typography--line-height--normal)",
"fontSize": "var(--wp--preset--font-size--medium)"
}
},
"link": {
"color": {
"text": "var(--wp--preset--color--primary)"
}
},
"button": {
"border": {
"radius": "24px",
"color": "var(--wp--preset--color--primary)",
"width": "2px",
"style": "solid"
},
"color": {
"background": "var(--wp--preset--color--background)",
"text": "var(--wp--preset--color--foreground)"
},
"typography": {
"fontSize": "var(--wp--preset--font-size--small)",
"fontWeight": "700",
"textTransform": "uppercase"
},
"spacing": {
"padding": {
"top": "var(--wp--custom--spacing--small--top)",
"bottom": "var(--wp--custom--spacing--small--bottom)",
"left": "var(--wp--custom--spacing--small--left)",
"right": "var(--wp--custom--spacing--small--right)"
}
},
":hover": {
"color": {
"background": "var(--wp--preset--color--primary)",
"text": "var(--wp--preset--color--foreground)"
}
}
}
},
"spacing": {
"blockGap": "1.5rem"
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--montserrat)",
"lineHeight": "var(--wp--custom--typography--line-height--normal)",
"fontSize": "var(--wp--preset--font-size--medium)",
"fontStyle": "normal",
"fontWeight": "400"
}
},
"templateParts": []
}
fonts.css :
/* montserrat-300 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: "Montserrat";
font-style: normal;
font-weight: 300;
src: url("../fonts/montserrat-v25-latin-300.woff2") format("woff2"),
/* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/montserrat-v25-latin-300.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* montserrat-regular - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: "Montserrat";
font-style: normal;
font-weight: 400;
src: url("../fonts/montserrat-v25-latin-regular.woff2") format("woff2"),
/* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/montserrat-v25-latin-regular.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* montserrat-700 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: "Montserrat";
font-style: normal;
font-weight: 700;
src: url("../fonts/montserrat-v25-latin-700.woff2") format("woff2"),
/* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/montserrat-v25-latin-700.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* playfair-display-regular - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: "Playfair Display";
font-style: normal;
font-weight: 400;
src: url("../fonts/playfair-display-v30-latin-regular.woff2") format("woff2"),
/* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/playfair-display-v30-latin-regular.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* playfair-display-700 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: "Playfair Display";
font-style: normal;
font-weight: 700;
src: url("../fonts/playfair-display-v30-latin-700.woff2") format("woff2"),
/* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/playfair-display-v30-latin-700.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* playfair-display-900 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: "Playfair Display";
font-style: normal;
font-weight: 900;
src: url("../fonts/playfair-display-v30-latin-900.woff2") format("woff2"),
/* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/playfair-display-v30-latin-900.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* montserrat-alternates-regular - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: "Montserrat Alternates";
font-style: normal;
font-weight: 400;
src: url("../fonts/montserrat-alternates-v17-latin-regular.woff2") format("woff2"),
/* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/montserrat-alternates-v17-latin-regular.woff")
format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* montserrat-alternates-600 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: "Montserrat Alternates";
font-style: normal;
font-weight: 600;
src: url("../fonts/montserrat-alternates-v17-latin-600.woff2") format("woff2"),
/* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/montserrat-alternates-v17-latin-600.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.