diff --git a/app/Views/Components/navbar.twig b/app/Views/Components/navbar.twig new file mode 100644 index 0000000..d64e8af --- /dev/null +++ b/app/Views/Components/navbar.twig @@ -0,0 +1,18 @@ +{# SproutPHP Component: navbar.twig #} + diff --git a/app/Views/layouts/base.twig b/app/Views/layouts/base.twig index f7eecb4..d169885 100644 --- a/app/Views/layouts/base.twig +++ b/app/Views/layouts/base.twig @@ -13,20 +13,22 @@ -
{% block content %}{% endblock %} -
+
+ {% include 'components/navbar.twig' %} + {% block content %}{% endblock %} +
- {% if env('APP_ENV') == 'local' %} -
- ⚑ HTMX Active -
- πŸ“ƒ - HTMX Docs β†— -
- {% endif %} + {% if env('APP_ENV') == 'local' %} +
+ ⚑ HTMX Active +
+ πŸ“ƒ + HTMX Docs β†— +
+ {% endif %} - {% if app_debug %} - {{ debugbar|raw }} - {% endif %} - - + {% if app_debug %} + {{ debugbar|raw }} + {% endif %} + + diff --git a/core/Console/Commands/MakeComponent.php b/core/Console/Commands/MakeComponent.php index afb9a2a..fa72d11 100644 --- a/core/Console/Commands/MakeComponent.php +++ b/core/Console/Commands/MakeComponent.php @@ -7,7 +7,7 @@ class MakeComponent public static function handle($name) { $name = strtolower(trim($name)); - $dir = __DIR__ . '/../../../app/Views/Components/'; + $dir = __DIR__ . '/../../../app/Views/components/'; $file = "{$dir}/{$name}.twig"; if (!is_dir($dir)) { @@ -32,6 +32,6 @@ public static function handle($name) TWIG; file_put_contents($file, $template); - echo "βœ… Component created: app/Components/{$name}.twig\n"; + echo "βœ… Component created: app/Views/components/{$name}.twig\n"; } } diff --git a/core/Console/Commands/MakeView.php b/core/Console/Commands/MakeView.php index 802dd1c..efe78a1 100644 --- a/core/Console/Commands/MakeView.php +++ b/core/Console/Commands/MakeView.php @@ -25,7 +25,7 @@ public static function handle($name, $flags = []) {% extends 'layouts/base.twig' %} {% block content %} -

HTMX Demo Page

+

HTMX Demo Page for $name