Add an Android home-screen launcher built with ultra
examples/launcher is the home screen as an ultra app: clock, app search (Enter opens the first match), icon grid and a pinned dock kept in localStorage. android/ is a dependency-free Java shell that serves it to a transparent WebView over the wallpaper, answers apps.json and icon PNGs from LauncherApps, and bridges launch/app info/settings/wallpaper. CI builds the APK and publishes it as the launcher-latest release. 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
7c6a68b26e
commit
9443761b4a
24 files changed
+2068
No files matched your search
@@ -0,0 +1,66 @@
|
||||
/* 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. */
|
||||
:root {
|
||||
--top: var(--inset-top, env(safe-area-inset-top, 0px));
|
||||
--bottom: var(--inset-bottom, env(safe-area-inset-bottom, 0px));
|
||||
}
|
||||
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; }
|
||||
#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); }
|
||||
|
||||
.clock { text-align: center; text-shadow: 0 1px 8px rgb(0 0 0 / .45); margin-bottom: 1.5rem; }
|
||||
.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)); } }
|
||||
.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; } }
|
||||
|
||||
.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; }
|
||||
|
||||
.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; }
|
||||
|
||||
#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); }
|
||||
Reference in new issue
Block a user