Dev #12

Merged
LordSchmackes merged 2 commits from dev into main 2026-05-24 07:35:31 +00:00
2 changed files with 8 additions and 3 deletions
+1
View File
@@ -1,2 +1,3 @@
.idx/* .idx/*
.env .env
*.log
+6 -2
View File
@@ -1,6 +1,10 @@
<?php <?php
$pageTitle = $pageTitle ?? 'FlixCooks | Food Blog & Recipes'; $pageTitle = $pageTitle ?? 'FlixCooks | Food Blog & Recipes';
$description = $description ?? 'Seasonal recipes, tested tips, and approachable cooking for busy weeknights.'; $description = $description ?? 'Seasonal recipes, tested tips, and approachable cooking for busy weeknights.';
$assetVersion = static function (string $assetPath): string {
$absolutePath = dirname(__DIR__) . '/' . ltrim($assetPath, '/');
github-actions[bot] commented 2026-05-24 07:34:04 +00:00 (Migrated from github.com)
Review

Using dirname(__DIR__) assumes a fixed directory structure relative to the current file. If partials/head.php is moved or included from a different directory, this path calculation will break. Consider using a more robust method for determining the document root or asset base path, such as a global configuration variable or a framework helper if one is available.

Using `dirname(__DIR__)` assumes a fixed directory structure relative to the current file. If `partials/head.php` is moved or included from a different directory, this path calculation will break. Consider using a more robust method for determining the document root or asset base path, such as a global configuration variable or a framework helper if one is available.
return is_file($absolutePath) ? (string) filemtime($absolutePath) : '1';
github-actions[bot] commented 2026-05-24 07:34:04 +00:00 (Migrated from github.com)
Review

Returning a hardcoded '1' when the file doesn't exist might lead to incorrect caching behavior. If the asset is expected but not found, it could be better to throw an exception or return a specific error indicator to make the issue more apparent during development and prevent potential security issues if the default '1' is misinterpreted as a valid version.

Returning a hardcoded `'1'` when the file doesn't exist might lead to incorrect caching behavior. If the asset is expected but not found, it could be better to throw an exception or return a specific error indicator to make the issue more apparent during development and prevent potential security issues if the default '1' is misinterpreted as a valid version.
github-actions[bot] commented 2026-05-24 07:34:04 +00:00 (Migrated from github.com)
Review

This line introduces cache busting for the CSS file using a version parameter. This is a good practice to ensure users get the latest version of the stylesheet after updates. The use of e() suggests proper escaping, which is also good.

This line introduces cache busting for the CSS file using a version parameter. This is a good practice to ensure users get the latest version of the stylesheet after updates. The use of `e()` suggests proper escaping, which is also good.
};
github-actions[bot] commented 2026-05-24 07:34:04 +00:00 (Migrated from github.com)
Review

Similar to the CSS, this line implements cache busting for the JavaScript file. This is beneficial for ensuring that users download the most recent version of the script, preventing potential issues with outdated cached files.

Similar to the CSS, this line implements cache busting for the JavaScript file. This is beneficial for ensuring that users download the most recent version of the script, preventing potential issues with outdated cached files.
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
@@ -18,8 +22,8 @@ $description = $description ?? 'Seasonal recipes, tested tips, and approachable
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Manrope:wght@300;400;500;600;700;800&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Manrope:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<!-- Main stylesheet --> <!-- Main stylesheet -->
<link rel="stylesheet" href="/assets/style.css"> <link rel="stylesheet" href="/assets/style.css?v=<?php echo e($assetVersion('/assets/style.css')); ?>">
<script src="/assets/fc-local.js" defer></script> <script src="/assets/fc-local.js?v=<?php echo e($assetVersion('/assets/fc-local.js')); ?>" defer></script>
<!-- GSAP + ScrollTrigger (CDN) --> <!-- GSAP + ScrollTrigger (CDN) -->
<script src="https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/gsap.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/gsap.min.js"></script>