🎨 Integrated Arsha template as v1 landing page

This commit is contained in:
essae 2025-05-10 14:02:02 -04:00
parent a258493698
commit c309fa1eee
503 changed files with 91226 additions and 115 deletions

View File

@ -4,10 +4,10 @@
// Purpose: Handles landing page rendering for Arsha one-pager // Purpose: Handles landing page rendering for Arsha one-pager
// Project: Wizdom Networks Website // Project: Wizdom Networks Website
namespace WizdomNetworks\WizdomWeb\Controllers; namespace WizdomNetworks\WizeWeb\Controllers;
use WizdomNetworks\WizdomWeb\Utils\View; use WizdomNetworks\WizeWeb\Core\View;
use WizdomNetworks\WizdomWeb\Utils\Logger; use WizdomNetworks\WizeWeb\Utils\Logger;
class LandingController class LandingController
{ {

View File

@ -57,10 +57,18 @@ class Router
Logger::error("Controller not found: $controllerName"); Logger::error("Controller not found: $controllerName");
throw new \Exception("Controller $controllerName not found."); throw new \Exception("Controller $controllerName not found.");
} }
} catch (\Throwable $e) { } //catch (\Throwable $e) {
ErrorHandler::exception($e); //ErrorHandler::exception($e);
Logger::error("Router dispatch error: " . $e->getMessage()); //Logger::error("Router dispatch error: " . $e->getMessage());
echo "500 Internal Server Error"; //echo "500 Internal Server Error";
catch (\Throwable $e) {
echo "<pre>";
echo "Exception: " . $e->getMessage() . "\n";
echo "File: " . $e->getFile() . "\n";
echo "Line: " . $e->getLine() . "\n";
echo "Trace:\n" . $e->getTraceAsString();
echo "</pre>";
exit;
} }
} else { } else {
Logger::error("Route not found: $path"); Logger::error("Route not found: $path");

View File

@ -1,5 +1,15 @@
<?php <?php
// ============================================
// File: View.php
// Version: 1.1
// Path: app/Core/View.php
// Purpose: Handles dynamic view rendering with optional layout wrapping
// Project: Wizdom Networks Website
// Usage: View::render('pages/landing', $data, 'arsha')
// ============================================
namespace WizdomNetworks\WizeWeb\Core; namespace WizdomNetworks\WizeWeb\Core;
use WizdomNetworks\WizeWeb\Utils\Logger; use WizdomNetworks\WizeWeb\Utils\Logger;
@ -13,34 +23,49 @@ use WizdomNetworks\WizeWeb\Utils\ErrorHandler;
class View class View
{ {
/** /**
* Renders a view file and passes data to it. * Renders a view file and optionally wraps it in a layout.
* *
* @param string $view The name of the view file (relative to /resources/views/). * @param string $view The name of the view file (relative to /resources/views/).
* @param array $data Associative array of variables to pass to the view. * @param array $data Associative array of variables to pass to the view.
* @throws \Exception If the view file is not found. * @param string|null $layout The layout to use (relative to /resources/views/layouts/). Default is null (no layout).
* @throws \Exception If the view or layout file is not found.
*/ */
public static function render(string $view, array $data = []): void public static function render(string $view, array $data = [], ?string $layout = null): void
{ {
Logger::debug("Rendering view: $view"); Logger::debug("Rendering view: $view");
// Extract data to make variables available in the view // Extract data to make variables available in the view
extract($data); extract($data);
// Build the full path to the view file
Logger::debug("[DEBUG] Attempting to load view: " . $view . " | Expected path: " . __DIR__ . "/../../resources/views/" . str_replace('.', '/', $view) . ".php");
$viewPath = realpath(__DIR__ . "/../../resources/views/" . str_replace('.', '/', $view) . ".php"); $viewPath = realpath(__DIR__ . "/../../resources/views/" . str_replace('.', '/', $view) . ".php");
// Debugging: Log resolved path
Logger::debug("Resolved view path: $viewPath"); Logger::debug("Resolved view path: $viewPath");
// Validate and include the view file // If using layout, resolve layout path
if ($viewPath && file_exists($viewPath)) { if ($layout) {
include $viewPath; $layoutPath = realpath(__DIR__ . "/../../resources/views/layouts/" . $layout . ".php");
Logger::debug("Successfully rendered view: $view"); Logger::debug("Resolved layout path: $layoutPath");
} else {
if (!$layoutPath || !file_exists($layoutPath)) {
Logger::error("Layout file not found: $layout");
throw new \Exception("Layout file not found: $layout");
}
}
if (!$viewPath || !file_exists($viewPath)) {
Logger::error("View file not found: $view | Resolved path: $viewPath"); Logger::error("View file not found: $view | Resolved path: $viewPath");
throw new \Exception("View file not found: $view"); throw new \Exception("View file not found: $view");
} }
// If using a layout, buffer content then inject into layout
if ($layout) {
ob_start();
include $viewPath;
$content = ob_get_clean();
include $layoutPath;
Logger::debug("Successfully rendered view: $view into layout: $layout");
} else {
include $viewPath;
Logger::debug("Successfully rendered view: $view (no layout)");
}
} }
} }

2
public/app.log Normal file
View File

@ -0,0 +1,2 @@
[2025-05-08 00:33:46] [INFO]: Bootstrapping application
[2025-05-08 00:33:46] [ERROR]: Route not found: index.php

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,38 @@
/* Bootstrap Optimization for Mobile & Desktop Consistency */
/* Main Styling: main.css */
/* Ensure proper grid scaling */
.container {
max-width: 1200px;
margin: auto;
}
/* Navigation Fixes */
.navbar {
padding: 0.5rem 1rem;
}
/* Adjust button sizes for better touchscreen usability */
.btn {
padding: 0.75rem 1.5rem;
font-size: 1rem;
}
/* Improve form inputs on mobile */
.form-control {
padding: 0.75rem;
font-size: 1rem;
}
/* Ensure text scaling remains readable */
body {
font-size: 1rem;
}
@media (max-width: 768px) {
.container {
padding: 0 15px;
}
.navbar-nav {
text-align: center;
}
}

View File

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 137 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 423 KiB

After

Width:  |  Height:  |  Size: 423 KiB

View File

Before

Width:  |  Height:  |  Size: 291 KiB

After

Width:  |  Height:  |  Size: 291 KiB

View File

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 150 KiB

View File

Before

Width:  |  Height:  |  Size: 297 KiB

After

Width:  |  Height:  |  Size: 297 KiB

View File

Before

Width:  |  Height:  |  Size: 798 KiB

After

Width:  |  Height:  |  Size: 798 KiB

View File

Before

Width:  |  Height:  |  Size: 942 KiB

After

Width:  |  Height:  |  Size: 942 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 KiB

View File

Before

Width:  |  Height:  |  Size: 286 KiB

After

Width:  |  Height:  |  Size: 286 KiB

View File

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 140 KiB

View File

Before

Width:  |  Height:  |  Size: 173 KiB

After

Width:  |  Height:  |  Size: 173 KiB

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

View File

Before

Width:  |  Height:  |  Size: 238 KiB

After

Width:  |  Height:  |  Size: 238 KiB

View File

Before

Width:  |  Height:  |  Size: 315 KiB

After

Width:  |  Height:  |  Size: 315 KiB

View File

Before

Width:  |  Height:  |  Size: 426 KiB

After

Width:  |  Height:  |  Size: 426 KiB

View File

Before

Width:  |  Height:  |  Size: 614 KiB

After

Width:  |  Height:  |  Size: 614 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

Before

Width:  |  Height:  |  Size: 943 KiB

After

Width:  |  Height:  |  Size: 943 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 MiB

After

Width:  |  Height:  |  Size: 3.5 MiB

View File

Before

Width:  |  Height:  |  Size: 596 KiB

After

Width:  |  Height:  |  Size: 596 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

View File

Before

Width:  |  Height:  |  Size: 292 KiB

After

Width:  |  Height:  |  Size: 292 KiB

Some files were not shown because too many files have changed in this diff Show More