Skamtech Drive


index.html
<!DOCTYPE html>
<html lang="id">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Snake Game - Logika Pemrograman</title>
  <style>
    body {
      background-color: #0f172a;
      color: #f8fafc;
      font-family: system-ui, -apple-system, sans-serif;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      height: 100vh;
      margin: 0;
      overflow: hidden; /* Mencegah scroll total pada halaman */
    }

    h1 {
      margin: 0 0 4px 0;
      font-size: 1.25rem;
      font-weight: 600;
    }

    #scoreBox {
      font-size: 1rem;
      font-weight: bold;
      color: #4ade80;
      margin-bottom: 8px;
    }

    canvas {
      border: 4px solid #334155;
      border-radius: 8px;
      background-color: #1e293b;
      box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    }

    /* Kontainer tombol dengan tinggi tetap agar tidak menggeser layout */
    .button-container {
      height: 40px; /* Tinggi konstan untuk tombol */
      margin-top: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    #restartBtn {
      padding: 6px 16px;
      font-size: 0.875rem;
      font-weight: bold;
      background-color: #ef4444;
      color: white;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      display: none; /* Disembunyikan di awal */
      transition: background-color 0.2s;
    }

    #restartBtn:hover {
      background-color: #dc2626;
    }
  </style>
</head>
<body>

  <h1>Snake Game</h1>
  <div id="scoreBox">Skor: 0</div>

  <!-- Canvas Game -->
  <canvas id="gameCanvas" width="400" height="400"></canvas>

  <!-- Kontainer Tombol di Bawah Canvas -->
  <div class="button-container">
    <button id="restartBtn">Main Lagi</style>
  </div>

  <script type="module" src="/src/main.ts"></script>
</body>
</html>

Advanced Search


Powered By GaMerZ File Explorer Version 2.0.0. Page Generated In 0.00032s.
Copyright © 2026 Lester Chan, All Rights Reserved.