Compare commits
No commits in common. "ai-dev" and "master" have entirely different histories.
18
.htaccess
@ -2,11 +2,17 @@ DirectoryIndex index.php index.html
|
|||||||
Options -Indexes
|
Options -Indexes
|
||||||
Options -MultiViews
|
Options -MultiViews
|
||||||
|
|
||||||
<IfModule mod_rewrite.c>
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteBase /
|
|
||||||
RewriteRule ^index\.php$ - [L]
|
# 0) Serve existing files/directories as-is
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -d
|
||||||
|
RewriteRule ^ - [L]
|
||||||
|
|
||||||
|
# 1) Internal map: /page or /page/ -> /page.php (if such PHP file exists)
|
||||||
|
RewriteCond %{REQUEST_FILENAME}.php -f
|
||||||
|
RewriteRule ^(.+?)/?$ $1.php [L]
|
||||||
|
|
||||||
|
# 2) Optional: strip trailing slash for non-directories (keeps .php links working)
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteRule . /index.php [L]
|
RewriteRule ^(.+)/$ $1 [R=301,L]
|
||||||
</IfModule>
|
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
WordPress Admin Credentials:
|
|
||||||
URL: http://localhost/wp-admin
|
|
||||||
Username: admin
|
|
||||||
Password: p3NXTFnfcpV3kgnh
|
|
||||||
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 49 KiB |
@ -1,63 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* Plugin Name: Flatlogic URL Preserver
|
|
||||||
* Description: Automatically attaches fl_project to all links on the page.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
|
||||||
|
|
||||||
// Function to fetch the ID once per request
|
|
||||||
function fl_get_env_project_id() {
|
|
||||||
static $cached_id = null;
|
|
||||||
if ($cached_id !== null) return $cached_id;
|
|
||||||
|
|
||||||
$cached_id = getenv('PROJECT_ID');
|
|
||||||
|
|
||||||
if (!$cached_id) {
|
|
||||||
$envPath = ABSPATH . '../.env';
|
|
||||||
if (file_exists($envPath)) {
|
|
||||||
$lines = file($envPath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
|
||||||
foreach ($lines as $line) {
|
|
||||||
if (strpos(trim($line), 'PROJECT_ID=') === 0) {
|
|
||||||
$cached_id = trim(str_replace('PROJECT_ID=', '', $line), "\"' ");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $cached_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The core function to modify the URL
|
|
||||||
function fl_append_project_param( $url ) {
|
|
||||||
$pid = fl_get_env_project_id();
|
|
||||||
if ( ! $pid || empty( $url ) || strpos( $url, '#' ) === 0 ) {
|
|
||||||
return $url;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only append if it's an internal link
|
|
||||||
if ( strpos( $url, home_url() ) === 0 || ( strpos( $url, '/' ) === 0 && strpos( $url, '//' ) !== 0 ) ) {
|
|
||||||
return add_query_arg( 'fl_project', $pid, $url );
|
|
||||||
}
|
|
||||||
|
|
||||||
return $url;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply to all link filters
|
|
||||||
$filters = [
|
|
||||||
'post_link', 'page_link', 'post_type_link',
|
|
||||||
'term_link', 'attachment_link',
|
|
||||||
'author_link', 'category_link', 'tag_link'
|
|
||||||
];
|
|
||||||
|
|
||||||
foreach ( $filters as $f ) {
|
|
||||||
add_filter( $f, 'fl_append_project_param' );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Special case: Navigation Menus
|
|
||||||
add_filter( 'nav_menu_link_attributes', function( $atts ) {
|
|
||||||
if ( isset( $atts['href'] ) ) {
|
|
||||||
$atts['href'] = fl_append_project_param( $atts['href'] );
|
|
||||||
}
|
|
||||||
return $atts;
|
|
||||||
}, 10, 1 );
|
|
||||||
@ -7,56 +7,39 @@
|
|||||||
"defaultDuotone": false,
|
"defaultDuotone": false,
|
||||||
"defaultGradients": false,
|
"defaultGradients": false,
|
||||||
"defaultPalette": false,
|
"defaultPalette": false,
|
||||||
"gradients": [
|
|
||||||
{
|
|
||||||
"name": "Warm Canvas",
|
|
||||||
"slug": "warm-canvas",
|
|
||||||
"gradient": "linear-gradient(135deg, #F7F3EE 0%, #F3EEE6 45%, #FAF6F0 100%)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Sunset Wash",
|
|
||||||
"slug": "sunset-wash",
|
|
||||||
"gradient": "linear-gradient(135deg, #FFF1E5 0%, #FAD9C2 40%, #F7F3EE 100%)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Harbor Mist",
|
|
||||||
"slug": "harbor-mist",
|
|
||||||
"gradient": "linear-gradient(135deg, #E8F0F4 0%, #DDE8EF 45%, #F7F3EE 100%)"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"palette": [
|
"palette": [
|
||||||
{
|
{
|
||||||
"color": "#F7F3EE",
|
"color": "#FFFFFF",
|
||||||
"name": "Base",
|
"name": "Base",
|
||||||
"slug": "base"
|
"slug": "base"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "#1D1B16",
|
"color": "#111111",
|
||||||
"name": "Contrast",
|
"name": "Contrast",
|
||||||
"slug": "contrast"
|
"slug": "contrast"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "#D97757",
|
"color": "#FFEE58",
|
||||||
"name": "Accent 1",
|
"name": "Accent 1",
|
||||||
"slug": "accent-1"
|
"slug": "accent-1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "#3A6EA5",
|
"color": "#F6CFF4",
|
||||||
"name": "Accent 2",
|
"name": "Accent 2",
|
||||||
"slug": "accent-2"
|
"slug": "accent-2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "#2F855A",
|
"color": "#503AA8",
|
||||||
"name": "Accent 3",
|
"name": "Accent 3",
|
||||||
"slug": "accent-3"
|
"slug": "accent-3"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "#8A8F98",
|
"color": "#686868",
|
||||||
"name": "Accent 4",
|
"name": "Accent 4",
|
||||||
"slug": "accent-4"
|
"slug": "accent-4"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "#FFF7EA",
|
"color": "#FBFAF3",
|
||||||
"name": "Accent 5",
|
"name": "Accent 5",
|
||||||
"slug": "accent-5"
|
"slug": "accent-5"
|
||||||
},
|
},
|
||||||
@ -68,22 +51,8 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"layout": {
|
"layout": {
|
||||||
"contentSize": "700px",
|
"contentSize": "645px",
|
||||||
"wideSize": "1400px"
|
"wideSize": "1340px"
|
||||||
},
|
|
||||||
"shadow": {
|
|
||||||
"presets": [
|
|
||||||
{
|
|
||||||
"name": "Soft",
|
|
||||||
"slug": "soft",
|
|
||||||
"shadow": "0 12px 30px rgba(29, 27, 22, 0.12)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Lifted",
|
|
||||||
"slug": "lifted",
|
|
||||||
"shadow": "0 18px 40px rgba(29, 27, 22, 0.18)"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"spacing": {
|
"spacing": {
|
||||||
"defaultSpacingSizes": false,
|
"defaultSpacingSizes": false,
|
||||||
@ -182,52 +151,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"fontFamilies": [
|
"fontFamilies": [
|
||||||
{
|
|
||||||
"name": "Fira Sans",
|
|
||||||
"slug": "fira-sans",
|
|
||||||
"fontFamily": "\"Fira Sans\", sans-serif",
|
|
||||||
"fontFace": [
|
|
||||||
{
|
|
||||||
"src": [
|
|
||||||
"file:./assets/fonts/fira-sans/FiraSans-Regular.woff2"
|
|
||||||
],
|
|
||||||
"fontWeight": "400",
|
|
||||||
"fontStyle": "normal",
|
|
||||||
"fontFamily": "\"Fira Sans\""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": [
|
|
||||||
"file:./assets/fonts/fira-sans/FiraSans-SemiBold.woff2"
|
|
||||||
],
|
|
||||||
"fontWeight": "600",
|
|
||||||
"fontStyle": "normal",
|
|
||||||
"fontFamily": "\"Fira Sans\""
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Literata",
|
|
||||||
"slug": "literata",
|
|
||||||
"fontFamily": "\"Literata\", serif",
|
|
||||||
"fontFace": [
|
|
||||||
{
|
|
||||||
"src": [
|
|
||||||
"file:./assets/fonts/literata/Literata72pt-Regular.woff2"
|
|
||||||
],
|
|
||||||
"fontWeight": "400",
|
|
||||||
"fontStyle": "normal",
|
|
||||||
"fontFamily": "\"Literata\""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": [
|
|
||||||
"file:./assets/fonts/literata/Literata72pt-SemiBold.woff2"
|
|
||||||
],
|
|
||||||
"fontWeight": "600",
|
|
||||||
"fontStyle": "normal",
|
|
||||||
"fontFamily": "\"Literata\""
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Manrope",
|
"name": "Manrope",
|
||||||
"slug": "manrope",
|
"slug": "manrope",
|
||||||
@ -264,22 +187,22 @@
|
|||||||
},
|
},
|
||||||
"styles": {
|
"styles": {
|
||||||
"color": {
|
"color": {
|
||||||
"background": "var:preset|gradient|warm-canvas",
|
"background": "var:preset|color|base",
|
||||||
"text": "var:preset|color|contrast"
|
"text": "var:preset|color|contrast"
|
||||||
},
|
},
|
||||||
"spacing": {
|
"spacing": {
|
||||||
"blockGap": "1.4rem",
|
"blockGap": "1.2rem",
|
||||||
"padding": {
|
"padding": {
|
||||||
"left": "var:preset|spacing|50",
|
"left": "var:preset|spacing|50",
|
||||||
"right": "var:preset|spacing|50"
|
"right": "var:preset|spacing|50"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typography": {
|
"typography": {
|
||||||
"fontFamily": "var:preset|font-family|fira-sans",
|
"fontFamily": "var:preset|font-family|manrope",
|
||||||
"fontSize": "var:preset|font-size|large",
|
"fontSize": "var:preset|font-size|large",
|
||||||
"fontWeight": "400",
|
"fontWeight": "300",
|
||||||
"letterSpacing": "-0.15px",
|
"letterSpacing": "-0.1px",
|
||||||
"lineHeight": "1.55"
|
"lineHeight": "1.4"
|
||||||
},
|
},
|
||||||
"blocks": {
|
"blocks": {
|
||||||
"core/avatar": {
|
"core/avatar": {
|
||||||
@ -288,17 +211,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"core/button": {
|
"core/button": {
|
||||||
"border": {
|
|
||||||
"radius": "999px"
|
|
||||||
},
|
|
||||||
"shadow": "var:preset|shadow|soft",
|
|
||||||
"variations": {
|
"variations": {
|
||||||
"outline": {
|
"outline": {
|
||||||
"border": {
|
"border": {
|
||||||
"color": "currentColor",
|
"color": "currentColor",
|
||||||
"width": "1px"
|
"width": "1px"
|
||||||
},
|
},
|
||||||
"css": ".wp-block-button__link:not(.has-background):hover {background-color:color-mix(in srgb, var(--wp--preset--color--contrast) 8%, transparent);}",
|
"css": ".wp-block-button__link:not(.has-background):hover {background-color:color-mix(in srgb, var(--wp--preset--color--contrast) 5%, transparent);}",
|
||||||
"spacing": {
|
"spacing": {
|
||||||
"padding": {
|
"padding": {
|
||||||
"bottom": "calc(1rem - 1px)",
|
"bottom": "calc(1rem - 1px)",
|
||||||
@ -526,8 +445,7 @@
|
|||||||
},
|
},
|
||||||
"typography": {
|
"typography": {
|
||||||
"fontSize": "var:preset|font-size|large",
|
"fontSize": "var:preset|font-size|large",
|
||||||
"fontWeight": "400",
|
"fontWeight": "300"
|
||||||
"lineHeight": "1.5"
|
|
||||||
},
|
},
|
||||||
"elements": {
|
"elements": {
|
||||||
"cite": {
|
"cite": {
|
||||||
@ -562,8 +480,8 @@
|
|||||||
"core/pullquote": {
|
"core/pullquote": {
|
||||||
"typography": {
|
"typography": {
|
||||||
"fontSize": "var:preset|font-size|xx-large",
|
"fontSize": "var:preset|font-size|xx-large",
|
||||||
"fontWeight": "400",
|
"fontWeight": "300",
|
||||||
"lineHeight": "1.15"
|
"lineHeight": "1.2"
|
||||||
},
|
},
|
||||||
"elements": {
|
"elements": {
|
||||||
"cite": {
|
"cite": {
|
||||||
@ -588,7 +506,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"core/search": {
|
"core/search": {
|
||||||
"css": "& .wp-block-search__input{border-radius:3.125rem;padding-left:1.5625rem;padding-right:1.5625rem;border-color:var(--wp--preset--color--accent-6);box-shadow:0 8px 20px rgba(29, 27, 22, 0.08);} & .wp-block-search__input:focus{border-color:var(--wp--preset--color--accent-2);}",
|
"css": "& .wp-block-search__input{border-radius:3.125rem;padding-left:1.5625rem;padding-right:1.5625rem;border-color:var(--wp--preset--color--accent-6);}",
|
||||||
"typography": {
|
"typography": {
|
||||||
"fontSize": "var:preset|font-size|medium",
|
"fontSize": "var:preset|font-size|medium",
|
||||||
"lineHeight": "1.6"
|
"lineHeight": "1.6"
|
||||||
@ -678,7 +596,7 @@
|
|||||||
"elements": {
|
"elements": {
|
||||||
"button": {
|
"button": {
|
||||||
"color": {
|
"color": {
|
||||||
"background": "var:preset|color|accent-2",
|
"background": "var:preset|color|contrast",
|
||||||
"text": "var:preset|color|base"
|
"text": "var:preset|color|base"
|
||||||
},
|
},
|
||||||
":focus": {
|
":focus": {
|
||||||
@ -689,7 +607,7 @@
|
|||||||
},
|
},
|
||||||
":hover": {
|
":hover": {
|
||||||
"color": {
|
"color": {
|
||||||
"background": "color-mix(in srgb, var(--wp--preset--color--accent-2) 85%, #000000)",
|
"background": "color-mix(in srgb, var(--wp--preset--color--contrast) 85%, transparent)",
|
||||||
"text": "var:preset|color|base"
|
"text": "var:preset|color|base"
|
||||||
},
|
},
|
||||||
"border": {
|
"border": {
|
||||||
@ -705,9 +623,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typography": {
|
"typography": {
|
||||||
"fontSize": "var:preset|font-size|medium",
|
"fontSize": "var:preset|font-size|medium"
|
||||||
"fontWeight": "600",
|
|
||||||
"letterSpacing": "0.2px"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"caption": {
|
"caption": {
|
||||||
@ -718,26 +634,22 @@
|
|||||||
},
|
},
|
||||||
"h1": {
|
"h1": {
|
||||||
"typography": {
|
"typography": {
|
||||||
"fontSize": "var:preset|font-size|xx-large",
|
"fontSize": "var:preset|font-size|xx-large"
|
||||||
"fontFamily": "var:preset|font-family|literata"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"h2": {
|
"h2": {
|
||||||
"typography": {
|
"typography": {
|
||||||
"fontSize": "var:preset|font-size|x-large",
|
"fontSize": "var:preset|font-size|x-large"
|
||||||
"fontFamily": "var:preset|font-family|literata"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"h3": {
|
"h3": {
|
||||||
"typography": {
|
"typography": {
|
||||||
"fontSize": "var:preset|font-size|large",
|
"fontSize": "var:preset|font-size|large"
|
||||||
"fontFamily": "var:preset|font-family|literata"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"h4": {
|
"h4": {
|
||||||
"typography": {
|
"typography": {
|
||||||
"fontSize": "var:preset|font-size|medium",
|
"fontSize": "var:preset|font-size|medium"
|
||||||
"fontFamily": "var:preset|font-family|literata"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"h5": {
|
"h5": {
|
||||||
@ -756,19 +668,18 @@
|
|||||||
},
|
},
|
||||||
"heading": {
|
"heading": {
|
||||||
"typography": {
|
"typography": {
|
||||||
"fontFamily": "var:preset|font-family|literata",
|
"fontWeight": "400",
|
||||||
"fontWeight": "500",
|
"lineHeight": "1.125",
|
||||||
"lineHeight": "1.18",
|
"letterSpacing": "-0.1px"
|
||||||
"letterSpacing": "-0.2px"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"link": {
|
"link": {
|
||||||
"color": {
|
"color": {
|
||||||
"text": "var:preset|color|accent-2"
|
"text": "currentColor"
|
||||||
},
|
},
|
||||||
":hover": {
|
":hover": {
|
||||||
"typography": {
|
"typography": {
|
||||||
"textDecoration": "underline"
|
"textDecoration": "none"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 50 KiB |