Newer
Older
pj25dx-d / time.html
<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8">
  <title>撮影時間選択 - 酒田図鑑</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <style>
    body {
      margin: 0;
      display: flex;
      justify-content: center;
      background: #eee;
      font-family: Roboto, sans-serif;
    }

    .screen {
      width: 393px;
      height: 852px;
      position: relative;
      background: linear-gradient(37deg, #9FE7FF 0%, #6072F8 100%);
      overflow: hidden;
    }

    .header {
      position: absolute;
      top: 0;
      left: 0;
      width: 393px;
      height: 78px;
      background: black;
    }

    .back-button {
      position: absolute;
      left: 39px;
      top: 16px;
      width: 26px;
      height: 46px;
      background: white;
    }

    .title {
      position: absolute;
      top: 145px;
      left: 32px;
      width: 322px;
      height: 80px;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      font-size: 32px;
      font-weight: 500;
      color: black;
    }

    .content-box {
      position: absolute;
      top: 250px;
      left: 9px;
      width: 375px;
      height: 352px;
      background: white;
      border: 3px solid black;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    input[type="time"] {
      width: 260px;
      height: 60px;
      font-size: 22px;
      padding: 5px;
      border: 2px solid black;
    }

    .confirm-box {
      position: absolute;
      top: 686px;
      left: 12px;
      width: 369px;
      height: 62px;
      background: white;
      border: 3px solid black;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }

    .confirm-box:active {
      background: #ddd;
    }

    .confirm-text {
      font-size: 20px;
      font-weight: 400;
      color: black;
    }
  </style>
</head>

<body>

  <div class="screen">

    <!-- Header -->
    <div class="header"></div>
    <div class="back-button"></div>

    <!-- Title -->
    <div class="title">撮影時間を選択</div>

    <!-- Time Picker -->
    <div class="content-box">
      <input type="time" id="time">
    </div>

    <!-- Confirm Button -->
    <div class="confirm-box" onclick="confirmTime()">
      <div class="confirm-text">確定</div>
    </div>

  </div>

  <script>
    function confirmTime() {
      const time = document.getElementById("time").value;

      if (!time) {
        alert("時間を選択してください");
        return;
      }

      alert("選択した時間:" + time);
    }
  </script>

</body>
</html>