Gitfed
Thomas-PEYROT/japanese-webtranslate / popup / popup.html
<!DOCTYPE html>
<html lang="fr">
<head>
  <meta charset="utf-8">
  <style>
    body {
      font-family: system-ui, sans-serif;
      font-size: 14px;
      width: 240px;
      margin: 0;
      padding: 12px;
    }
    .row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .label { font-weight: 600; }
    .domain {
      color: #4a90d9;
      font-size: 13px;
      margin-bottom: 8px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .hint {
      margin-top: 8px;
      color: #666;
      font-size: 12px;
      line-height: 1.4;
    }
    /* Switch */
    .switch {
      position: relative;
      width: 40px;
      height: 22px;
      flex-shrink: 0;
    }
    .switch input { opacity: 0; width: 0; height: 0; }
    .slider {
      position: absolute;
      inset: 0;
      background: #ccc;
      border-radius: 22px;
      cursor: pointer;
      transition: background 0.15s;
    }
    .slider::before {
      content: "";
      position: absolute;
      width: 16px;
      height: 16px;
      left: 3px;
      top: 3px;
      background: #fff;
      border-radius: 50%;
      transition: transform 0.15s;
    }
    .switch input:checked + .slider { background: #4a90d9; }
    .switch input:checked + .slider::before { transform: translateX(18px); }
  </style>
</head>
<body>
  <div class="domain" id="domain"></div>
  <div class="row">
    <span class="label">Furigana + traductions</span>
    <label class="switch">
      <input type="checkbox" id="toggle">
      <span class="slider"></span>
    </label>
  </div>
  <p class="hint" id="status">Chargement…</p>
  <script src="popup.js"></script>
</body>
</html>