diff --git a/home.html b/home.html index 83340536..06984516 100644 --- a/home.html +++ b/home.html @@ -10,14 +10,11 @@ --acid: #d6ff3d; --blue: #4b7bec; --sia: #b39ddb; --srv: #4fd1a5; --warm: #ffc75f; --rose: #f6768a; } * { box-sizing: border-box; } html, body { margin: 0; padding: 0; min-height: 100vh; font-family: system-ui, sans-serif; color: var(--ink); } - body { - display: flex; flex-direction: column; - background: radial-gradient(1200px 600px at 50% -10%, var(--bg1), var(--bg2)); - } + body { background: radial-gradient(1200px 600px at 50% -10%, var(--bg1), var(--bg2)); } - /* Hero (identity + search). Centered at the top of the page, same shape - as the pre-desktop home — this is what the user sees most often. */ - .hero { text-align: center; padding: 5vh 1rem 0; } + /* Hero (identity + search). Centered at the top of the page — the user's + most-used thing on this screen. The slot/card desktop lives beneath. */ + .hero { text-align: center; padding: 5vh 1rem 0; max-width: 760px; margin: 0 auto; } .hero .mark { display: inline-block; width: 64px; height: 64px; line-height: 1; } .hero .mark svg { width: 100%; height: 100%; display: block; } .hero h1 { font-size: 2.4rem; margin: .3rem 0 .2rem; letter-spacing: .5px; font-weight: 600; } @@ -25,96 +22,68 @@ .hero .tag { color: var(--mut); margin: 0 0 1.4rem; } .hero form { display: flex; gap: 8px; justify-content: center; max-width: 620px; margin: 0 auto; padding: 0 1rem; } .hero form input { flex: 1; padding: 13px 18px; border-radius: 999px; border: 1px solid var(--line2); - background: rgba(20,26,36,.72); color: var(--ink); font-size: 15px; outline: none; - backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); } + background: rgba(20,26,36,.72); color: var(--ink); font-size: 15px; outline: none; + backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); } .hero form input:focus { border-color: var(--blue); } .hero form button { padding: 13px 20px; border-radius: 999px; border: none; background: var(--blue); color: #fff; font-size: 15px; cursor: pointer; } .hero .hint { color: var(--dim); font-size: 12.5px; margin-top: .8rem; } - .corner { position: absolute; top: 18px; right: 18px; z-index: 10; } - .corner button { background: rgba(20,26,36,.6); border: 1px solid var(--line2); color: var(--mut); - border-radius: 8px; padding: 8px 14px; font-size: 12.5px; cursor: pointer; backdrop-filter: blur(6px); } - .corner button:hover { background: var(--card-hi); color: var(--ink); } - .corner button.on { border-color: var(--acid); color: var(--acid); background: rgb(from var(--acid) r g b / .08); } + /* Two-column desktop under the hero: narrow LEFT column of stackable icon + slots, wider RIGHT column with a 3-column grid of Silent Mode cards. */ + .homepage { display: grid; grid-template-columns: minmax(96px, 110px) minmax(380px, 1fr); + gap: 36px; max-width: 1180px; margin: 2.4rem auto 0; padding: 0 32px 48px; align-items: start; } + @media (max-width: 760px) { .homepage { grid-template-columns: 1fr; gap: 20px; padding: 0 14px 32px; } } - /* Edit toolbar (shown only while editing) */ - .editbar { display: none; margin: 1.6rem auto .4rem; gap: 14px; align-items: center; padding: 10px 16px; - background: rgba(20,26,36,.9); border: 1px solid var(--line2); border-radius: 14px; - backdrop-filter: blur(10px); box-shadow: 0 10px 30px #0008; width: fit-content; max-width: calc(100vw - 48px); flex-wrap: wrap; } - body.editing .editbar { display: flex; } - .editbar .group { display: flex; align-items: center; gap: 8px; } - .editbar .label { font-size: 11px; color: var(--mut); letter-spacing: .08em; text-transform: uppercase; } - .editbar .sz { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; overflow: hidden; } - .editbar .sz button { background: transparent; border: 0; color: var(--mut); padding: 6px 10px; font-size: 12px; cursor: pointer; } - .editbar .sz button.on { background: var(--acid); color: #0b0e14; font-weight: 600; } - .editbar .bg { display: inline-flex; gap: 6px; } - .editbar .bg button { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line2); cursor: pointer; padding: 0; } - .editbar .bg button.on { outline: 2px solid var(--acid); outline-offset: 1px; } - .editbar input[type=color] { width: 30px; height: 22px; border: 1px solid var(--line2); border-radius: 6px; background: transparent; padding: 0; cursor: pointer; } - .editbar .filebtn { font-size: 11.5px; color: var(--mut); border: 1px dashed var(--line2); border-radius: 6px; padding: 4px 10px; cursor: pointer; } - .editbar .filebtn:hover { color: var(--acid); border-color: var(--acid); } - .editbar .add { background: var(--acid); color: #0b0e14; font-weight: 600; border: none; border-radius: 8px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; } - .editbar .reset { background: transparent; border: 1px solid var(--line2); color: var(--mut); border-radius: 8px; padding: 6px 12px; font-size: 12px; cursor: pointer; } - .editbar .reset:hover { color: var(--rose); border-color: var(--rose); } + /* LEFT COLUMN — vertical stack of slots + an "add" button underneath */ + .left-column { display: flex; flex-direction: column; align-items: center; gap: 14px; } + .slots-list { display: flex; flex-direction: column; gap: 14px; align-items: center; width: 100%; } - /* Two-column canvas under the hero: narrow LEFT for icon tiles, - wider RIGHT for Silent Mode cards. Not full width — centered with - breathing room on both sides. Collapses to one column under 820px. */ - .desktop { position: relative; width: 100%; max-width: 1180px; margin: 2.2rem auto 3rem; padding: 0 2rem; - display: grid; grid-template-columns: minmax(180px, 220px) minmax(380px, 760px); - gap: 44px; align-items: start; justify-content: center; } - .column { min-width: 0; } - .section-hdr { display: flex; align-items: baseline; gap: 10px; margin: 4px 4px 14px; - font-size: 11px; color: var(--mut); letter-spacing: .14em; text-transform: uppercase; font-weight: 600; } - .section-hdr .acid { color: var(--acid); } - .section-hdr .count { color: var(--dim); font-weight: 400; letter-spacing: .08em; font-size: 10.5px; } - .section-hdr .rule { flex: 1; height: 1px; background: linear-gradient(to right, var(--line2), transparent); } - body.dragging-any .section-grid, body.dragging-any .cards-grid { outline: 1px dashed var(--line2); outline-offset: 4px; border-radius: 14px; } - body.dragging-any .section-grid.drop-target, body.dragging-any .cards-grid.drop-target { outline-color: var(--acid); background: rgb(from var(--acid) r g b / .04); } - @media (max-width: 820px) { .desktop { grid-template-columns: 1fr; gap: 20px; padding: 0 1rem; } } - - /* LEFT column — OS-desktop style: icons live at absolute x,y positions - inside the column area so the user can drag them anywhere. The grid - is a faint 20px snap grid that appears while dragging. Minimum height - keeps the area tall enough that the first drag has somewhere to go. */ - .section-grid { position: relative; padding: 8px 4px; min-height: 420px; border-radius: 10px; } - .section-grid::before { - content: ""; position: absolute; inset: 0; opacity: 0; - background-image: linear-gradient(to right, rgba(255,255,255,.04) 1px, transparent 1px), - linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px); - background-size: 20px 20px; pointer-events: none; transition: opacity .15s; - border-radius: 10px; - } - body.dragging-any .section-grid::before { opacity: 1; } - .section-grid .icon { position: absolute; } - - .icon { display: flex; flex-direction: column; align-items: center; position: relative; + .slot { position: relative; display: flex; flex-direction: column; align-items: center; cursor: pointer; user-select: none; text-decoration: none; color: inherit; transition: transform .12s ease; } - .icon:hover { transform: translateY(-2px); } - .icon .tile { display: flex; align-items: center; justify-content: center; - border-radius: 18px; background: var(--iconBg, #0b0e14); + .slot:hover { transform: translateY(-2px); } + .slot .tile { display: flex; align-items: center; justify-content: center; + border-radius: 16px; background: var(--iconBg, #0b0e14); color: var(--iconFg, #e7eaf1); font-weight: 700; letter-spacing: -.02em; box-shadow: 0 6px 18px #0007, inset 0 0 0 1px rgba(255,255,255,.08); overflow: hidden; } - .icon .tile svg, .icon .tile img { width: 72%; height: 72%; display: block; } - .icon .label { margin-top: 7px; font-size: 12.5px; line-height: 1.2; color: #fff; - text-shadow: 0 1px 3px #000c, 0 0 10px #000a; max-width: 100%; + .slot .tile svg, .slot .tile img { width: 72%; height: 72%; display: block; } + .slot .label { margin-top: 6px; font-size: 11.5px; line-height: 1.2; color: #fff; + text-shadow: 0 1px 3px #000c, 0 0 10px #000a; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 6px; border-radius: 4px; } - body.light .icon .label { color: #0b0e14; text-shadow: 0 1px 2px #fffb, 0 0 10px #fffc; } - .icon.size-small .tile { width: 56px; height: 56px; font-size: 22px; border-radius: 14px; } - .icon.size-medium .tile { width: 72px; height: 72px; font-size: 28px; border-radius: 16px; } - .icon.size-large .tile { width: 96px; height: 96px; font-size: 36px; border-radius: 20px; } - .icon .label { max-width: 100px; } - .icon.size-small .label { max-width: 72px; font-size: 11px; margin-top: 5px; } + body.light .slot .label { color: #0b0e14; text-shadow: 0 1px 2px #fffb, 0 0 10px #fffc; } + .slot.size-small .tile { width: 56px; height: 56px; font-size: 22px; border-radius: 12px; } + .slot.size-medium .tile { width: 72px; height: 72px; font-size: 28px; border-radius: 14px; } + .slot.size-large .tile { width: 88px; height: 88px; font-size: 34px; border-radius: 18px; } + .slot.size-small .label { font-size: 10.5px; max-width: 72px; } + .slot.dragging { opacity: .6; } + .slot.drag-above::before, .slot.drag-below::after { + content: ""; position: absolute; left: 50%; transform: translateX(-50%); + width: 60%; height: 2px; background: var(--acid); border-radius: 2px; + box-shadow: 0 0 8px var(--acid); + } + .slot.drag-above::before { top: -8px; } + .slot.drag-below::after { bottom: -8px; } - /* Silent Mode CARDS — icon + title + sub + badge, one per row */ - .cards-grid { display: flex; flex-direction: column; gap: 10px; padding: 10px 0; min-height: 140px; } - .card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; + .slot-add { display: flex; align-items: center; justify-content: center; + width: 56px; height: 56px; border-radius: 12px; border: 2px dashed var(--line2); + background: transparent; color: var(--mut); font-size: 22px; cursor: pointer; + transition: color .12s, border-color .12s, background .12s; } + .slot-add:hover { color: var(--acid); border-color: var(--acid); background: rgb(from var(--acid) r g b / .04); } + + /* RIGHT COLUMN — just the 3-column grid of Silent Mode cards; search + lives in the hero above. */ + .right-column { display: flex; flex-direction: column; gap: 22px; min-width: 0; } + .cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-content: start; } + @media (max-width: 980px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } } + @media (max-width: 560px) { .cards-grid { grid-template-columns: 1fr; } } + + .card { display: flex; flex-direction: column; align-items: center; justify-content: center; + gap: 10px; padding: 20px 14px; min-height: 128px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; - text-decoration: none; color: inherit; cursor: pointer; - transition: transform .12s, background .12s, border-color .12s; position: relative; } + text-decoration: none; color: inherit; cursor: pointer; position: relative; + transition: transform .12s, background .12s, border-color .12s; } .card:hover { background: var(--card-hi); border-color: rgba(75,123,236,.4); transform: translateY(-1px); } .card .card-ico { flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--iconBg, transparent); @@ -122,39 +91,42 @@ color: var(--iconFg, #e7eaf1); font-weight: 700; font-size: 20px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); } .card .card-ico svg, .card .card-ico img { width: 100%; height: 100%; display: block; } - .card .card-body { flex: 1; min-width: 0; } - .card .card-title { font-size: 15px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + .card .card-title { font-size: 14px; font-weight: 600; color: var(--ink); text-align: center; + overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; } .card .card-title .tld { color: var(--acid); font-weight: 700; letter-spacing: .3px; text-shadow: 0 0 8px rgb(from var(--acid) r g b / .35); } - .card .card-sub { color: var(--mut); font-size: 13px; margin-top: 3px; line-height: 1.4; - overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; } - .card:hover .card-sub { color: var(--ink); } - .card .card-badge { flex: none; font-size: 10.5px; padding: 2px 9px; border-radius: 999px; - letter-spacing: .02em; background: rgb(from var(--acid) r g b / .12); color: var(--acid); } + .card.dragging { opacity: .6; } + .card.drag-before::before, .card.drag-after::after { + content: ""; position: absolute; top: 10%; bottom: 10%; width: 3px; + background: var(--acid); border-radius: 2px; box-shadow: 0 0 8px var(--acid); + } + .card.drag-before::before { left: -8px; } + .card.drag-after::after { right: -8px; } + .card-add { display: flex; align-items: center; justify-content: center; min-height: 128px; + border: 2px dashed var(--line2); border-radius: 14px; background: transparent; + color: var(--mut); font-size: 13.5px; cursor: pointer; + transition: color .12s, border-color .12s, background .12s; } + .card-add:hover { color: var(--acid); border-color: var(--acid); background: rgb(from var(--acid) r g b / .04); } - .ctrls { position: absolute; top: -8px; right: -8px; display: none; gap: 2px; z-index: 2; } - .ctrls button { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line2); - background: rgba(0,0,0,.65); color: #fff; font-size: 11px; cursor: pointer; padding: 0; line-height: 1; } - .ctrls button.rm:hover { background: var(--rose); border-color: var(--rose); } - .ctrls button.ed:hover { background: var(--blue); border-color: var(--blue); } - body.editing .icon .ctrls, body.editing .card .ctrls { display: flex; } - body.editing .icon, body.editing .card { cursor: grab; } - body.editing .icon.dragging, body.editing .card.dragging { opacity: .85; cursor: grabbing; } + /* Context menus. One for the background (edit actions), one for images + (copy / edit / remove). Positioned at the pointer by JS. */ + .ctx-menu { position: fixed; display: none; z-index: 1000; min-width: 200px; + background: rgba(20,26,36,.96); border: 1px solid var(--line2); border-radius: 10px; + padding: 6px; box-shadow: 0 16px 40px #000a; backdrop-filter: blur(10px); } + .ctx-menu.on { display: block; } + .ctx-menu button, .ctx-menu .submenu-trigger { + display: flex; align-items: center; justify-content: space-between; gap: 10px; + width: 100%; text-align: left; background: transparent; border: 0; + color: var(--ink); padding: 8px 12px; border-radius: 6px; cursor: pointer; + font: inherit; font-size: 13px; } + .ctx-menu button:hover, .ctx-menu .submenu-trigger:hover { background: var(--card-hi); } + .ctx-menu button.danger { color: var(--rose); } + .ctx-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; } + .ctx-menu .caret { color: var(--dim); font-size: 11px; } + .ctx-menu .value { color: var(--mut); font-size: 12px; } - .add-slot { display: none; align-items: center; justify-content: center; - border: 2px dashed var(--line2); border-radius: 14px; - color: var(--mut); font-size: 13.5px; cursor: pointer; } - /* Left-column + slot is positioned at the bottom of the free-drag area */ - .column.left .add-slot { position: absolute; left: 10px; bottom: 10px; - width: 60px; height: 60px; border-radius: 14px; font-size: 11px; } - .column.right .add-slot { width: 100%; padding: 12px; border-radius: 14px; } - .add-slot:hover { border-color: var(--acid); color: var(--acid); background: rgb(from var(--acid) r g b / .04); } - body.editing .add-slot { display: inline-flex; } - .column.right .add-slot { display: none; } - body.editing .column.right .add-slot { display: flex; } - - /* Add/Edit modal */ - .modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 100; + /* Background chooser modal (opened from the context menu) */ + .modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1100; align-items: center; justify-content: center; padding: 1rem; backdrop-filter: blur(4px); } .modal-bg.on { display: flex; } .modal { background: var(--card); border: 1px solid var(--line2); border-radius: 14px; @@ -171,21 +143,31 @@ .modal button:hover { background: var(--card-hi); color: var(--ink); } .modal button.primary { background: var(--blue); color: #fff; border-color: var(--blue); } + .bg-preset-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 6px; } + .bg-preset-row button { height: 44px; border-radius: 8px; border: 1px solid var(--line2); cursor: pointer; padding: 0; } + .bg-preset-row button.on { outline: 2px solid var(--acid); outline-offset: 1px; } + .bg-color-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; } + .bg-color-row input[type=color] { width: 44px; height: 32px; border: 1px solid var(--line2); border-radius: 6px; background: transparent; padding: 0; cursor: pointer; } + .bg-file { font-size: 12.5px; color: var(--mut); border: 1px dashed var(--line2); border-radius: 6px; padding: 6px 12px; cursor: pointer; } + .bg-file:hover { color: var(--acid); border-color: var(--acid); } + + .toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px); + background: rgba(20,26,36,.96); color: var(--ink); padding: 10px 18px; border-radius: 10px; + border: 1px solid var(--line2); font-size: 13px; opacity: 0; pointer-events: none; + transition: opacity .18s, transform .18s; z-index: 1200; } + .toast.on { opacity: 1; transform: translateX(-50%) translateY(0); } + @media (prefers-color-scheme: light) { :root { --bg1: #dce6f2; --bg2: #eef0f4; --card: #ffffff; --card-hi: #f4f7fb; --line: rgba(0,0,0,.10); --line2: rgba(0,0,0,.14); --ink: #1a1f28; --mut: #4a5262; --dim: #8a93a2; --acid: #0AC18E; } - .icon .label { color: #0b0e14; text-shadow: 0 1px 2px #fffb, 0 0 10px #fffc; } - .modal { background: #ffffff; } + .slot .label { color: #0b0e14; text-shadow: 0 1px 2px #fffb, 0 0 10px #fffc; } + .modal, .ctx-menu { background: #ffffff; } }
-