Launcher: blank home with added apps and widgets, swipe-down drawer
The home screen now starts empty under the clock. Long-press it to add apps (the drawer opens in a pick mode) or widgets, and long-press a slot to move or remove it. Swiping down opens the drawer with every app and a search; long-press there adds an app to home, swipe up closes it. Widgets are real AppWidgetHostViews layered over the WebView at the slots the page reports after each render, with Android's bind and configure screens on add and native long-press for their menu. ultra gains on_longpress(msg, arg) for this. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019EEjkJVV72Lu8ndDVWg5BT
This commit is contained in:
1 parent
f766453bba
commit
3ed5afbafc
9 files changed
+1032
-236
No files matched your search
+76
-41
@@ -1,66 +1,101 @@
|
||||
/* Home screen layout; the components come from ui.css. The page is transparent so the
|
||||
system wallpaper shows through the WebView. MainActivity sets --inset-top and
|
||||
--inset-bottom to the status and navigation bar heights. */
|
||||
--inset-bottom to the status and navigation bar (and keyboard) heights. */
|
||||
:root {
|
||||
--top: var(--inset-top, env(safe-area-inset-top, 0px));
|
||||
--bottom: var(--inset-bottom, env(safe-area-inset-bottom, 0px));
|
||||
--shadow-text: 0 1px 4px rgb(0 0 0 / .6);
|
||||
}
|
||||
html, body { background: transparent; }
|
||||
html.demo { background: linear-gradient(160deg, #1e293b, #4c1d95 55%, #0f172a) fixed; }
|
||||
body { margin: 0; min-height: 100vh; color: #fff; -webkit-tap-highlight-color: transparent;
|
||||
user-select: none; overscroll-behavior: none; }
|
||||
user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
|
||||
overscroll-behavior: none; }
|
||||
#app { max-width: 560px; margin: 0 auto; }
|
||||
|
||||
.home { min-height: 100vh; display: flex; flex-direction: column; box-sizing: border-box;
|
||||
padding: calc(var(--top) + 2.5rem) 16px calc(var(--bottom) + 7.5rem); }
|
||||
/* ---- home */
|
||||
.home { min-height: 100vh; box-sizing: border-box;
|
||||
padding: calc(var(--top) + 2.5rem) 16px calc(var(--bottom) + 2rem); }
|
||||
.pull { position: fixed; top: calc(var(--top) + .4rem); left: 50%; transform: translateX(-50%);
|
||||
width: 3rem; height: 1.25rem; padding: 0; border: 0; background: none; cursor: pointer; }
|
||||
.pull::before { content: ""; display: block; width: 2.25rem; height: .3rem; margin: auto;
|
||||
border-radius: 999px; background: rgb(255 255 255 / .45); }
|
||||
|
||||
.clock { text-align: center; text-shadow: 0 1px 8px rgb(0 0 0 / .45); margin-bottom: 1.5rem; }
|
||||
.clock { text-align: center; text-shadow: 0 1px 8px rgb(0 0 0 / .45); margin-bottom: 2rem; }
|
||||
.clock .time { font-size: 4rem; font-weight: 200; line-height: 1; letter-spacing: -.02em;
|
||||
font-variant-numeric: tabular-nums; }
|
||||
.clock .date { margin-top: .5rem; font-size: 1rem; opacity: .9; }
|
||||
|
||||
.search { margin-bottom: 1.25rem; }
|
||||
.search .input { height: 2.75rem; border-radius: 999px; padding: 0 1.25rem; font-size: 1rem;
|
||||
background: rgb(0 0 0 / .35); border-color: rgb(255 255 255 / .15); color: #fff;
|
||||
backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
|
||||
.search .input::placeholder { color: rgb(255 255 255 / .65); }
|
||||
.search .input::-webkit-search-cancel-button { filter: invert(1); }
|
||||
|
||||
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem .5rem;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
||||
@media (min-width: 480px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
|
||||
.slots, .apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem .5rem;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
||||
@media (min-width: 480px) { .slots, .apps { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
|
||||
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: .4rem;
|
||||
padding: .35rem .15rem; border-radius: calc(var(--radius) + 4px); cursor: pointer; }
|
||||
.tile:active { background: rgb(255 255 255 / .12); }
|
||||
.icon { width: 3.25rem; height: 3.25rem; object-fit: contain; pointer-events: none;
|
||||
filter: drop-shadow(0 2px 4px rgb(0 0 0 / .3)); }
|
||||
.name { max-width: 100%; font-size: .75rem; line-height: 1.2; text-align: center;
|
||||
text-shadow: 0 1px 4px rgb(0 0 0 / .6); overflow: hidden; text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
.editing .tile { animation: wiggle .3s ease-in-out infinite alternate; }
|
||||
.editing .tile.pinned { background: rgb(255 255 255 / .18); outline: 2px solid rgb(255 255 255 / .6); }
|
||||
.info { position: absolute; top: -.2rem; right: .15rem; width: 1.4rem; height: 1.4rem; padding: 0;
|
||||
border: 0; border-radius: 999px; background: #fff; color: #111; font: italic 600 .8rem/1 serif;
|
||||
box-shadow: 0 1px 3px rgb(0 0 0 / .4); }
|
||||
@keyframes wiggle { from { transform: rotate(-1.2deg); } to { transform: rotate(1.2deg); } }
|
||||
@media (prefers-reduced-motion: reduce) { .editing .tile { animation: none; } }
|
||||
text-shadow: var(--shadow-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
|
||||
.empty, .hint { text-align: center; opacity: .85; text-shadow: 0 1px 4px rgb(0 0 0 / .6); }
|
||||
.hint { font-size: .875rem; margin-top: 1.25rem; }
|
||||
/* A widget takes a whole row. On a phone the native widget view covers the slot;
|
||||
the label only shows while the slot is not live (or in a desktop browser). */
|
||||
.widget-slot { grid-column: 1 / -1; display: grid; place-items: center; box-sizing: border-box;
|
||||
border-radius: 1.25rem; background: rgb(255 255 255 / .1);
|
||||
border: 1px dashed rgb(255 255 255 / .3); }
|
||||
.widget-label { font-size: .875rem; opacity: .75; text-shadow: var(--shadow-text); }
|
||||
|
||||
.bar { position: fixed; left: 0; right: 0; bottom: 0; display: grid; gap: .5rem; justify-items: center;
|
||||
padding: .75rem 16px calc(var(--bottom) + .5rem);
|
||||
background: linear-gradient(to top, rgb(0 0 0 / .45), transparent); }
|
||||
.dock { display: flex; gap: 1rem; padding: .6rem 1rem; border-radius: 1.75rem;
|
||||
background: rgb(255 255 255 / .14); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
|
||||
.dock:empty { display: none; }
|
||||
.dock-app { padding: 0; border: 0; background: none; cursor: pointer; }
|
||||
.dock-app:active { transform: scale(.92); }
|
||||
.actions { display: flex; gap: .25rem; }
|
||||
.actions .btn.ghost { color: #fff; text-shadow: 0 1px 4px rgb(0 0 0 / .6); }
|
||||
.actions .btn.ghost:hover { background: rgb(255 255 255 / .12); color: #fff; }
|
||||
.hint, .empty { text-align: center; opacity: .85; text-shadow: var(--shadow-text); }
|
||||
.hint { margin-top: 30vh; padding: 0 2rem; font-size: .9rem; line-height: 1.5; }
|
||||
|
||||
#toast { position: fixed; left: 50%; bottom: calc(var(--bottom) + 9rem); transform: translate(-50%, 1rem);
|
||||
padding: .5rem 1rem; border-radius: 999px; background: rgb(0 0 0 / .8); color: #fff;
|
||||
font-size: .875rem; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
|
||||
#toast.show { opacity: 1; transform: translate(-50%, 0); }
|
||||
/* ---- drawer: slides down over the home screen */
|
||||
.drawer { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column;
|
||||
padding: calc(var(--top) + 1rem) 16px 0; background: rgb(10 10 14 / .72);
|
||||
backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
|
||||
animation: drop .22s cubic-bezier(.2, .8, .2, 1); }
|
||||
@keyframes drop { from { transform: translateY(-100%); } to { transform: none; } }
|
||||
.drawer-head { display: flex; gap: .5rem; align-items: center; margin-bottom: 1rem; }
|
||||
.drawer-head .input { flex: 1; height: 2.75rem; border-radius: 999px; padding: 0 1.25rem; font-size: 1rem;
|
||||
background: rgb(255 255 255 / .1); border-color: rgb(255 255 255 / .15); color: #fff; }
|
||||
.drawer-head .input::placeholder { color: rgb(255 255 255 / .6); }
|
||||
.drawer-head .input::-webkit-search-cancel-button { filter: invert(1); }
|
||||
.drawer-head .btn.ghost { color: #fff; }
|
||||
.drawer-head .btn.ghost:hover { background: rgb(255 255 255 / .12); color: #fff; }
|
||||
.drawer-note { margin: 0 0 1rem; font-size: .875rem; opacity: .8; text-align: center; }
|
||||
.drawer .apps { flex: 1; overflow-y: auto; align-content: start;
|
||||
padding-bottom: calc(var(--bottom) + 1.5rem); overscroll-behavior: contain; }
|
||||
.drawer .empty { flex: 1; }
|
||||
.picking .tile::after { content: ""; position: absolute; top: .1rem; right: .6rem; width: 1.25rem; height: 1.25rem;
|
||||
border-radius: 999px; border: 2px solid #fff; box-sizing: border-box;
|
||||
background: rgb(0 0 0 / .35); }
|
||||
.picking .tile.on::after { content: "✓"; display: grid; place-items: center; font-size: .75rem; font-weight: 700;
|
||||
background: #fff; color: #111; }
|
||||
|
||||
/* ---- sheets (long-press menus, widget picker) */
|
||||
.sheet-overlay { position: fixed; inset: 0; z-index: 20; background: rgb(0 0 0 / .45); animation: ui-fade .15s; }
|
||||
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 560px; margin: 0 auto;
|
||||
max-height: 70vh; overflow-y: auto; box-sizing: border-box;
|
||||
padding: .75rem 1rem calc(var(--bottom) + 1rem); border-radius: 1.25rem 1.25rem 0 0;
|
||||
background: var(--popover); color: var(--popover-foreground);
|
||||
animation: rise .2s cubic-bezier(.2, .8, .2, 1); }
|
||||
.sheet::before { content: ""; display: block; width: 2.25rem; height: .3rem; margin: 0 auto .75rem;
|
||||
border-radius: 999px; background: var(--border); }
|
||||
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }
|
||||
.sheet-title { margin: 0 .5rem .5rem; font-size: 1rem; font-weight: 600; }
|
||||
.sheet-item { display: block; width: 100%; padding: .85rem .5rem; border: 0; border-radius: var(--radius);
|
||||
background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
|
||||
.sheet-item:hover, .sheet-item:active { background: var(--accent); }
|
||||
.sheet .empty { text-shadow: none; color: var(--muted-foreground); }
|
||||
.widget-list { list-style: none; margin: 0; padding: 0; display: grid; }
|
||||
.widget-list li { display: flex; align-items: center; gap: .75rem; padding: .5rem; border-radius: var(--radius);
|
||||
cursor: pointer; }
|
||||
.widget-list li:hover, .widget-list li:active { background: var(--accent); }
|
||||
.widget-list .icon { width: 2.5rem; height: 2.5rem; filter: none; }
|
||||
|
||||
.notice, #toast { position: fixed; left: 50%; bottom: calc(var(--bottom) + 2rem); z-index: 30;
|
||||
transform: translateX(-50%); padding: .5rem 1rem; border-radius: 999px;
|
||||
background: rgb(0 0 0 / .8); color: #fff; font-size: .875rem; white-space: nowrap;
|
||||
pointer-events: none; animation: ui-fade .15s; }
|
||||
#toast { opacity: 0; transition: opacity .2s; animation: none; }
|
||||
#toast.show { opacity: 1; }
|
||||
|
||||
@media (prefers-reduced-motion: reduce) { .drawer, .sheet { animation: none; } }
|
||||
Reference in new issue
Block a user