diff --git a/static/app.js b/static/app.js index 6d481b2..2da58d0 100644 --- a/static/app.js +++ b/static/app.js @@ -32,8 +32,9 @@ safely(() => tg.ready()); safely(() => tg.expand()); safely(() => tg.enableClosingConfirmation?.()); - if (tg.isVersionAtLeast?.("6.1")) safely(() => tg.setHeaderColor("secondary_bg_color")); - if (tg.isVersionAtLeast?.("7.10")) safely(() => tg.setBottomBarColor("secondary_bg_color")); + if (tg.isVersionAtLeast?.("6.1")) safely(() => tg.setBackgroundColor("#111111")); + if (tg.isVersionAtLeast?.("6.9")) safely(() => tg.setHeaderColor("#111111")); + if (tg.isVersionAtLeast?.("7.10")) safely(() => tg.setBottomBarColor("#111111")); } function showToast(message) { diff --git a/static/background.jpg b/static/background.jpg new file mode 100644 index 0000000..a6c05be Binary files /dev/null and b/static/background.jpg differ diff --git a/static/index.html b/static/index.html index 0e5f7cc..a6bfc79 100644 --- a/static/index.html +++ b/static/index.html @@ -3,12 +3,12 @@ - - + + Пожитки - + - +
diff --git a/static/styles.css b/static/styles.css index c62b2cb..40eacc0 100644 --- a/static/styles.css +++ b/static/styles.css @@ -1,14 +1,15 @@ :root { - --bg: var(--tg-theme-bg-color, #f1f0ea); - --surface: var(--tg-theme-secondary-bg-color, #ffffff); - --text: var(--tg-theme-text-color, #17201c); - --muted: var(--tg-theme-hint-color, #707a74); - --accent: var(--tg-theme-button-color, #216a4b); - --accent-text: var(--tg-theme-button-text-color, #ffffff); - --link: var(--tg-theme-link-color, #216a4b); - --danger: var(--tg-theme-destructive-text-color, #bd4a3e); - --line: color-mix(in srgb, var(--text) 12%, transparent); - --shadow: 0 16px 50px color-mix(in srgb, var(--text) 9%, transparent); + --bg: #111111; + --surface: rgba(0, 0, 0, .1); + --surface-active: rgba(0, 0, 0, .28); + --text: #ffffff; + --muted: rgba(255, 255, 255, .68); + --accent: #f0d28a; + --accent-text: #17130b; + --link: #ffffff; + --danger: #ff9188; + --line: rgba(255, 255, 255, .18); + --shadow: 0 18px 55px rgba(0, 0, 0, .2); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); @@ -19,25 +20,43 @@ html, body { margin: 0; min-height: 100%; background: var(--bg); } body { + position: relative; + isolation: isolate; min-height: 100vh; min-height: 100dvh; padding: max(14px, env(safe-area-inset-top)) 18px calc(96px + env(safe-area-inset-bottom)); - background-image: - radial-gradient(circle at 90% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 32%), - linear-gradient(180deg, color-mix(in srgb, var(--surface) 35%, transparent), transparent 28%); + background: transparent; +} + +body::before, +body::after { + position: fixed; + inset: 0; + z-index: -2; + content: ""; + pointer-events: none; +} + +body::before { + background: #111 url("./background.jpg") center center / cover no-repeat; +} + +body::after { + z-index: -1; + background: rgba(0, 0, 0, .16); } button, input, select { font: inherit; color: inherit; } button { cursor: pointer; } .shell { width: min(100%, 560px); margin: 0 auto; } -.topbar { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px 26px; } +.topbar { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px 26px; text-shadow: 0 2px 14px rgba(0, 0, 0, .55); } .eyebrow { margin: 0 0 3px; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 750; color: var(--muted); } h1, h2, p { margin-top: 0; } h1 { margin-bottom: 0; font-size: 30px; line-height: 1; letter-spacing: -.04em; } h2 { margin: 0; font-size: 23px; letter-spacing: -.025em; } -.user-chip { display: flex; align-items: center; gap: 8px; max-width: 48%; padding: 5px 11px 5px 5px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 72%, transparent); font-size: 12px; font-weight: 650; white-space: nowrap; overflow: hidden; } -.mini-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: var(--accent); color: var(--accent-text); } +.user-chip { display: flex; align-items: center; gap: 8px; max-width: 48%; padding: 5px 11px 5px 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12px; font-weight: 650; white-space: nowrap; overflow: hidden; } +.mini-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: rgba(0, 0, 0, .28); color: var(--text); } .view { display: none; animation: reveal .25s ease; } .view.active { display: block; } @@ -47,10 +66,9 @@ h2 { margin: 0; font-size: 23px; letter-spacing: -.025em; } min-height: 210px; padding: 27px; border-radius: 29px; - color: #f5f7f3; - background: - linear-gradient(135deg, rgba(255,255,255,.11), transparent 45%), - linear-gradient(145deg, color-mix(in srgb, var(--accent) 82%, #132e24), color-mix(in srgb, var(--accent) 50%, #0c1914)); + border: 1px solid var(--line); + color: var(--text); + background: var(--surface); box-shadow: var(--shadow); } .hero-card p { margin-bottom: 15px; opacity: .72; font-size: 13px; } @@ -97,9 +115,9 @@ h2 { margin: 0; font-size: 23px; letter-spacing: -.025em; } .add-heading { margin: 5px 3px 24px; } .transaction-form { display: grid; gap: 18px; } -.segmented, .board-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 15px; background: color-mix(in srgb, var(--text) 7%, transparent); } +.segmented, .board-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 15px; background: var(--surface); } .segment, .board-switch button { padding: 11px 10px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; } -.segment.active, .board-switch button.active { color: var(--text); background: var(--surface); box-shadow: 0 3px 12px color-mix(in srgb, var(--text) 8%, transparent); } +.segment.active, .board-switch button.active { color: var(--text); background: var(--surface-active); box-shadow: 0 3px 12px rgba(0, 0, 0, .16); } .transaction-form label { display: grid; gap: 8px; font-size: 12px; font-weight: 700; } .transaction-form label > span { margin-left: 4px; } .transaction-form em { color: var(--muted); font-size: 10px; font-style: normal; font-weight: 500; } @@ -108,7 +126,7 @@ h2 { margin: 0; font-size: 23px; letter-spacing: -.025em; } .amount-field > div { position: relative; } .amount-field input { height: 78px; padding-right: 54px; font-size: 35px; font-weight: 750; letter-spacing: -.04em; } .amount-field b { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 24px; } -.primary-button { min-height: 54px; margin-top: 3px; border: 0; border-radius: 16px; background: var(--accent); color: var(--accent-text); font-weight: 750; box-shadow: 0 10px 25px color-mix(in srgb, var(--accent) 28%, transparent); } +.primary-button { min-height: 54px; margin-top: 3px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 16px; background: var(--surface-active); color: var(--text); font-weight: 750; box-shadow: var(--shadow); } .secondary-button { min-height: 44px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--accent); font-weight: 700; } .form-hint { margin: -8px 15px 0; color: var(--muted); font-size: 10px; line-height: 1.45; text-align: center; } .hidden { display: none !important; } @@ -133,14 +151,34 @@ h2 { margin: 0; font-size: 23px; letter-spacing: -.025em; } .leader-percent.negative { color: var(--danger); } .friend-hint { margin: 13px 18px; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; } -.bottom-nav { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 8px max(15px, calc((100vw - 560px) / 2)) max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(18px); } +.bottom-nav { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 8px max(15px, calc((100vw - 560px) / 2)) max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); } .bottom-nav button { display: grid; place-items: center; gap: 2px; padding: 3px; border: 0; background: transparent; color: var(--muted); font-size: 9px; font-weight: 650; } .bottom-nav button > span { font-size: 22px; line-height: 30px; } .bottom-nav button.active { color: var(--accent); } .bottom-nav .add-mark { display: grid; place-items: center; width: 42px; height: 32px; border-radius: 12px; background: var(--accent); color: var(--accent-text); } -.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); max-width: calc(100% - 36px); padding: 11px 16px; border-radius: 12px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); opacity: 0; pointer-events: none; transition: .2s ease; font-size: 12px; box-shadow: var(--shadow); } +.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); max-width: calc(100% - 36px); padding: 11px 16px; border: 1px solid var(--line); border-radius: 12px; transform: translate(-50%, 20px); background: rgba(0, 0, 0, .62); color: var(--text); opacity: 0; pointer-events: none; transition: .2s ease; font-size: 12px; box-shadow: var(--shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); } .toast.show { opacity: 1; transform: translate(-50%, 0); } +.hero-card, +.user-chip, +.metric, +.category-list, +.transaction-list, +.segmented, +.board-switch, +.transaction-form input, +.transaction-form select, +.secondary-button, +.icon-button, +.leader-filter select, +.leaderboard-list { + backdrop-filter: blur(18px); + -webkit-backdrop-filter: blur(18px); +} + +input::placeholder { color: rgba(255, 255, 255, .48); } +select option { color: #ffffff; background: #252525; } + @media (min-width: 600px) { body { padding-top: 28px; } .bottom-nav { left: 50%; bottom: 14px; width: 540px; border: 1px solid var(--line); border-radius: 22px; transform: translateX(-50%); padding: 8px 22px; box-shadow: var(--shadow); }