index.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. declare(strict_types=1);
  3. $databaseStatus = 'Unavailable';
  4. try {
  5. $database = new PDO(
  6. 'mysql:host=localhost;dbname=desktop_support;charset=utf8mb4',
  7. 'desktop_support',
  8. 'development_only',
  9. [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]
  10. );
  11. $databaseStatus = 'Connected';
  12. } catch (PDOException $exception) {
  13. $databaseStatus = 'Unavailable';
  14. }
  15. ?>
  16. <!doctype html>
  17. <html lang="en">
  18. <head>
  19. <meta charset="utf-8">
  20. <meta name="viewport" content="width=device-width, initial-scale=1">
  21. <title>Desktop Support Portfolio</title>
  22. <style>
  23. :root { color-scheme: dark; font-family: system-ui, sans-serif; }
  24. body { margin: 0; background: #0b1220; color: #e5edf7; }
  25. main { width: min(720px, calc(100% - 2rem)); margin: 12vh auto; }
  26. .card { padding: 2rem; border: 1px solid #26364d; border-radius: 18px; background: #111c2e; box-shadow: 0 24px 70px #0006; }
  27. h1 { margin-top: 0; font-size: clamp(2rem, 8vw, 4rem); line-height: 1; }
  28. p { color: #b8c6d9; line-height: 1.65; }
  29. dl { display: grid; grid-template-columns: max-content 1fr; gap: .75rem 1.25rem; margin: 2rem 0 0; }
  30. dt { color: #7dd3fc; } dd { margin: 0; }
  31. .ok { color: #86efac; }
  32. </style>
  33. </head>
  34. <body>
  35. <main>
  36. <section class="card">
  37. <h1>Desktop support,<br>done right.</h1>
  38. <p>Your Debian 13 LAMP development environment is ready. Replace this page with your experience, certifications, projects, and contact information.</p>
  39. <dl>
  40. <dt>PHP</dt><dd><?= htmlspecialchars(PHP_VERSION, ENT_QUOTES) ?></dd>
  41. <dt>MariaDB</dt><dd class="<?= $databaseStatus === 'Connected' ? 'ok' : '' ?>"><?= htmlspecialchars($databaseStatus, ENT_QUOTES) ?></dd>
  42. <dt>Apache</dt><dd class="ok">Running</dd>
  43. </dl>
  44. </section>
  45. </main>
  46. </body>
  47. </html>