Skip to content

Commit 098e285

Browse files
committed
Polish Tray landing proof sections
1 parent ac127db commit 098e285

13 files changed

Lines changed: 567 additions & 137 deletions

File tree

public/demo/admin.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,10 @@ <h3 id="menuModalTitle">Menu manager</h3>
707707
let feedStudents = [];
708708
let auditEvents = [];
709709
let orderCounter = 2425;
710+
const bootCanteen = TD.getCanteen(currentTenantId);
711+
feedItems = bootCanteen.feedItems.slice();
712+
feedStudents = bootCanteen.studentRows.map(function (s) { return s.name; });
713+
orderCounter = bootCanteen.counterBase || orderCounter;
710714

711715
const $ = (q) => document.querySelector(q);
712716
const $$ = (q) => document.querySelectorAll(q);
@@ -846,7 +850,7 @@ <h3 id="menuModalTitle">Menu manager</h3>
846850
];
847851
function nextId(){ return ++orderCounter; }
848852
function prevId(n=1){ return orderCounter - n; }
849-
function pick(arr){ return arr[Math.floor(Math.random()*arr.length)]; }
853+
function pick(arr, fallback){ return arr && arr.length ? arr[Math.floor(Math.random()*arr.length)] : fallback; }
850854
function fmtT(d){ return String(d.getHours()).padStart(2,'0')+':'+String(d.getMinutes()).padStart(2,'0')+':'+String(d.getSeconds()).padStart(2,'0'); }
851855

852856
const ICON_LABELS = {order:'NEW',pay:'PAY',prep:'PREP',ready:'READY',handover:'DONE',menu:'MENU',reject:'WARN'};

public/demo/demo-canteens.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,25 @@
4545

4646
function getSpecials(canteenId) {
4747
try {
48-
return JSON.parse(localStorage.getItem(specialsKey(canteenId)) || "[]");
48+
var list = JSON.parse(localStorage.getItem(specialsKey(canteenId)) || "[]");
49+
if (!Array.isArray(list)) return [];
50+
var now = Date.now();
51+
return list.map(function (s, i) {
52+
var addedAt = Number(s && s.addedAt);
53+
if (!addedAt || now - addedAt > 90 * 60 * 1000 || addedAt > now) {
54+
addedAt = now - (6 + i * 8) * 60 * 1000;
55+
}
56+
return {
57+
id: String((s && s.id) || ("sp-" + i)),
58+
name: String((s && s.name) || "Chef special"),
59+
desc: String((s && s.desc) || "Fresh counter special"),
60+
price: Number((s && s.price) || 120),
61+
prep: Number((s && s.prep) || 6),
62+
diet: (s && s.diet) === "nonveg" ? "nonveg" : "veg",
63+
icon: String((s && s.icon) || ((s && s.name) ? s.name.charAt(0) : "S")).slice(0, 2).toUpperCase(),
64+
addedAt: addedAt,
65+
};
66+
});
4967
} catch (_) {
5068
return [];
5169
}

public/demo/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,11 +745,11 @@ <h4>Product</h4>
745745
</div>
746746
<div>
747747
<h4>Resources</h4>
748-
<div class="links"><a href="https://github.com/thribhuvan003/Tray#readme" target="_blank" rel="noopener">Spec sheet</a><a href="https://github.com/thribhuvan003/Tray/tree/main/supabase/migrations" target="_blank" rel="noopener">Schema</a><a href="https://github.com/thribhuvan003/Tray/tree/main/src/app/api" target="_blank" rel="noopener">API · v1</a><a href="https://github.com/thribhuvan003/Tray/commits/production-ui-fidelity" target="_blank" rel="noopener">Changelog</a></div>
748+
<div class="links"><a href="https://github.com/thribhuvan003/trayy#readme" target="_blank" rel="noopener">Spec sheet</a><a href="https://github.com/thribhuvan003/trayy/tree/main/supabase/migrations" target="_blank" rel="noopener">Schema</a><a href="https://github.com/thribhuvan003/trayy/tree/main/src/app/api" target="_blank" rel="noopener">API · v1</a><a href="https://github.com/thribhuvan003/trayy/commits/main" target="_blank" rel="noopener">Changelog</a></div>
749749
</div>
750750
<div>
751751
<h4>Contact</h4>
752-
<div class="links"><a href="mailto:thribhuvan003@gmail.com">hello@tray.dev</a><a href="https://github.com/thribhuvan003/Tray" target="_blank" rel="noopener">github.com/thribhuvan003/Tray</a><a href="https://github.com/thribhuvan003" target="_blank" rel="noopener">@thribhuvan003</a></div>
752+
<div class="links"><a href="mailto:thribhuvan003@gmail.com">thribhuvan003@gmail.com</a><a href="https://github.com/thribhuvan003/trayy" target="_blank" rel="noopener">github.com/thribhuvan003/trayy</a><a href="https://github.com/thribhuvan003" target="_blank" rel="noopener">@thribhuvan003</a></div>
753753
</div>
754754
</div>
755755
<div class="footer-mark">tra<span class="it">y</span></div>

src/app/get-started/page.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ export default async function GetStartedPage({
3838
},
3939
}
4040
);
41-
const { data: { session: _gsSession } } = await supabase.auth.getSession();
41+
const { data: { session: _gsSession } } = await Promise.race([
42+
supabase.auth.getSession(),
43+
new Promise<Awaited<ReturnType<typeof supabase.auth.getSession>>>((resolve) =>
44+
setTimeout(() => resolve({ data: { session: null }, error: null }), 1200),
45+
),
46+
]);
4247
if (_gsSession?.user) isSignedIn = true;
4348
} catch {
4449
// Show wizard anyway

src/app/globals.css

Lines changed: 146 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -577,18 +577,19 @@ select option {
577577
════════════════════════════════════════════════════════════════════ */
578578

579579
:root {
580-
--tray-bg: #f4f0e6;
581-
--tray-surface: #ebe6da;
582-
--tray-surface-strong: #faf8f3;
583-
--tray-ink: #12151a;
584-
--tray-muted: #5c636b;
585-
--tray-accent: #1a5c45;
586-
--tray-clay: #9a4e28;
587-
--tray-green: #1a5c45;
588-
--tray-border: rgba(18, 21, 26, 0.1);
589-
--tray-border-strong: rgba(18, 21, 26, 0.18);
590-
--tray-cream: #faf8f3;
591-
--tray-shadow: rgba(18, 21, 26, 0.06);
580+
--tray-bg: #eef2ed;
581+
--tray-surface: #dde6df;
582+
--tray-surface-strong: #fbfcf8;
583+
--tray-ink: #101419;
584+
--tray-muted: #56626a;
585+
--tray-accent: #155f47;
586+
--tray-clay: #c14822;
587+
--tray-blue: #244ed8;
588+
--tray-green: #155f47;
589+
--tray-border: rgba(16, 20, 25, 0.11);
590+
--tray-border-strong: rgba(16, 20, 25, 0.22);
591+
--tray-cream: #fbfcf8;
592+
--tray-shadow: rgba(16, 20, 25, 0.08);
592593

593594
--font-display-cond: var(--font-dm-serif), Georgia, serif;
594595
--font-editorial: var(--font-dm-serif), Georgia, serif;
@@ -604,7 +605,7 @@ select option {
604605
--font-hero-display: var(--font-clash), system-ui, sans-serif;
605606
--font-hero-accent: var(--font-clash), system-ui, sans-serif;
606607
--font-hero-ui: var(--font-switzer), system-ui, sans-serif;
607-
--font-hero-mono: var(--font-space-mono), ui-monospace, monospace;
608+
--font-hero-mono: var(--font-dm-mono), ui-monospace, monospace;
608609
--font-hero-punch: var(--font-clash), system-ui, sans-serif;
609610
--font-editorial: var(--font-hero-display);
610611
--font-ui: var(--font-hero-ui);
@@ -770,18 +771,146 @@ select option {
770771
.tray-page {
771772
min-height: 100svh;
772773
background:
773-
linear-gradient(180deg, rgba(26, 92, 69, 0.04) 0%, transparent 18rem),
774+
linear-gradient(180deg, rgba(36, 78, 216, 0.07) 0%, transparent 19rem),
775+
linear-gradient(120deg, transparent 0%, rgba(21, 95, 71, 0.08) 48%, transparent 78%),
774776
repeating-linear-gradient(
775777
90deg,
776-
rgba(18, 21, 26, 0.018) 0,
777-
rgba(18, 21, 26, 0.018) 1px,
778+
rgba(16, 20, 25, 0.026) 0,
779+
rgba(16, 20, 25, 0.026) 1px,
778780
transparent 1px,
779-
transparent 72px
781+
transparent 80px
780782
),
781783
var(--tray-bg);
782784
color: var(--tray-ink);
783785
}
784786

787+
.tl-section-bridge {
788+
position: relative;
789+
height: 28px;
790+
margin: -14px auto;
791+
max-width: 80rem;
792+
pointer-events: none;
793+
}
794+
.tl-section-bridge::before {
795+
content: "";
796+
position: absolute;
797+
left: 1.25rem;
798+
right: 1.25rem;
799+
top: 50%;
800+
height: 1px;
801+
background:
802+
linear-gradient(90deg, transparent, var(--tray-border-strong) 16%, var(--tray-clay) 50%, var(--tray-border-strong) 84%, transparent);
803+
}
804+
.tl-section-bridge::after {
805+
content: "";
806+
position: absolute;
807+
left: 50%;
808+
top: 50%;
809+
width: 9px;
810+
height: 9px;
811+
border: 1px solid var(--tray-clay);
812+
background: var(--tray-bg);
813+
transform: translate(-50%, -50%) rotate(45deg);
814+
}
815+
816+
/* Section-specific type direction: each band gets a distinct voice while
817+
retaining the same spacing/grid system. */
818+
.tl-hero {
819+
--font-editorial: var(--font-clash), system-ui, sans-serif;
820+
--font-ui: var(--font-switzer), system-ui, sans-serif;
821+
--font-code: var(--font-dm-mono), ui-monospace, monospace;
822+
}
823+
.tl-hero h1 {
824+
letter-spacing: -0.035em;
825+
}
826+
.tl-hero [style*="tabular-nums"],
827+
.tl-hero .font-code {
828+
font-variant-numeric: tabular-nums;
829+
}
830+
831+
.tl-metrics {
832+
--font-editorial: var(--font-newsreader), ui-serif, Georgia;
833+
--font-ui: var(--font-hanken), system-ui, sans-serif;
834+
--font-code: var(--font-space-mono), ui-monospace, monospace;
835+
}
836+
.tl-metrics .font-cormorant {
837+
font-family: var(--font-newsreader), ui-serif, Georgia !important;
838+
}
839+
.tl-metrics .font-bricolage {
840+
font-family: var(--font-hanken), system-ui, sans-serif !important;
841+
}
842+
.tl-metrics p {
843+
font-variant-numeric: tabular-nums;
844+
}
845+
846+
.tl-trust {
847+
--font-editorial: var(--font-unbounded), system-ui, sans-serif;
848+
--font-ui: var(--font-jakarta), system-ui, sans-serif;
849+
--font-code: var(--font-dm-mono), ui-monospace, monospace;
850+
}
851+
.tl-trust .font-cormorant {
852+
font-family: var(--font-unbounded), system-ui, sans-serif !important;
853+
}
854+
.tl-trust .font-bricolage {
855+
font-family: var(--font-jakarta), system-ui, sans-serif !important;
856+
}
857+
.tl-trust h2 {
858+
letter-spacing: -0.045em;
859+
}
860+
861+
.tl-sync {
862+
--font-editorial: var(--font-krona-one), system-ui, sans-serif;
863+
--font-ui: var(--font-switzer), system-ui, sans-serif;
864+
--font-code: var(--font-jetbrains), ui-monospace, monospace;
865+
}
866+
.tl-sync h2 {
867+
letter-spacing: -0.015em;
868+
}
869+
870+
.tl-kitchen-proof {
871+
--font-editorial: var(--font-newsreader), ui-serif, Georgia;
872+
--font-ui: var(--font-hanken), system-ui, sans-serif;
873+
--font-code: var(--font-dm-mono), ui-monospace, monospace;
874+
}
875+
.tl-built-with {
876+
--font-editorial: var(--font-unbounded), system-ui, sans-serif;
877+
--font-ui: var(--font-jakarta), system-ui, sans-serif;
878+
--font-code: var(--font-jetbrains), ui-monospace, monospace;
879+
background:
880+
radial-gradient(circle at 12% 20%, rgba(193, 72, 34, 0.08), transparent 26rem),
881+
linear-gradient(180deg, var(--tray-cream) 0%, var(--tray-bg) 100%);
882+
}
883+
884+
.tl-closing {
885+
--font-editorial: var(--font-barlow), system-ui, sans-serif;
886+
--font-ui: var(--font-hanken), system-ui, sans-serif;
887+
--font-code: var(--font-space-mono), ui-monospace, monospace;
888+
}
889+
.tl-closing h2 {
890+
text-transform: uppercase;
891+
letter-spacing: 0;
892+
}
893+
894+
.tray-landing :is(h1, h2, h3, p, a, button, span) {
895+
text-wrap: pretty;
896+
}
897+
.tray-landing :is(.font-code, .tl-nav-link) {
898+
font-variant-numeric: tabular-nums;
899+
}
900+
901+
@media (max-width: 640px) {
902+
.tray-landing {
903+
--section-y: 2.75rem;
904+
}
905+
.tl-section-bridge {
906+
height: 20px;
907+
margin: -10px auto;
908+
}
909+
.tl-hero h1 {
910+
letter-spacing: -0.028em;
911+
}
912+
}
913+
785914
/* ── Utility classes ─────────────────────────────────────────────── */
786915
.font-editorial { font-family: var(--font-editorial); }
787916
.font-cond { font-family: var(--font-display-cond); }

src/components/landing/landing-page.tsx

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Link from "next/link";
55
import type { ResolvedTenant } from "@/lib/tenant";
66
import { LandingIntro } from "@/components/landing/LandingIntro";
77
import { LandingMotion } from "@/components/landing/landing-motion";
8+
import { BuiltWithSection } from "@/components/landing/sections/BuiltWithSection";
89
import { CampusModelSection } from "@/components/landing/sections/CampusModelSection";
910
import { ClosingSection } from "@/components/landing/sections/ClosingSection";
1011
import { CampusTicker } from "@/components/landing/sections/MetricsAndTicker";
@@ -152,19 +153,29 @@ export function LandingPage({ tenant }: { tenant: ResolvedTenant | null }) {
152153

153154
<main id="main">
154155
<TrayHero />
156+
<div className="tl-section-bridge" aria-hidden />
155157
<SectionFx variant="rise">
156158
<CampusTicker />
157159
</SectionFx>
160+
<div className="tl-section-bridge" aria-hidden />
158161
<SectionFx variant="blur-rise">
159162
<PiranhaPortalsSection />
160163
</SectionFx>
164+
<div className="tl-section-bridge" aria-hidden />
161165
<CampusModelSection campusName={campusName} />
166+
<div className="tl-section-bridge" aria-hidden />
162167
<SectionFx variant="slide-left">
163168
<TrustSection />
164169
</SectionFx>
170+
<div className="tl-section-bridge" aria-hidden />
165171
<SectionFx variant="slide-right">
166172
<SyncSection />
167173
</SectionFx>
174+
<div className="tl-section-bridge" aria-hidden />
175+
<SectionFx variant="blur-rise">
176+
<BuiltWithSection />
177+
</SectionFx>
178+
<div className="tl-section-bridge" aria-hidden />
168179
<SectionFx variant="blur-rise">
169180
<ClosingSection />
170181
</SectionFx>
@@ -212,9 +223,9 @@ export function LandingPage({ tenant }: { tenant: ResolvedTenant | null }) {
212223
<p className="font-code mb-5 text-[0.85rem] font-bold uppercase tracking-[0.22em] text-[var(--tray-muted)]">Product</p>
213224
<ul className="flex flex-col gap-3 text-[1.05rem]">
214225
{[
215-
["Student view", "/login?role=student"],
216-
["Kitchen view", "/login?role=kitchen"],
217-
["Admin view", "/login?role=owner"],
226+
["Student view", "/demo/student.html"],
227+
["Kitchen view", "/demo/kitchen.html"],
228+
["Admin view", "/demo/admin.html"],
218229
["Get started", "/get-started"],
219230
].map(([label, href]) => (
220231
<li key={label}>
@@ -231,9 +242,9 @@ export function LandingPage({ tenant }: { tenant: ResolvedTenant | null }) {
231242
<p className="font-code mb-5 text-[0.85rem] font-bold uppercase tracking-[0.22em] text-[var(--tray-muted)]">Resources</p>
232243
<ul className="flex flex-col gap-3 text-[1.05rem]">
233244
{[
234-
["README", "https://github.com/thribhuvan003/Tray/blob/main/README.md"],
235-
["Architecture", "https://github.com/thribhuvan003/Tray/tree/main/docs/adr"],
236-
["Security", "https://github.com/thribhuvan003/Tray/blob/main/SECURITY.md"],
245+
["README", "https://github.com/thribhuvan003/trayy/blob/main/README.md"],
246+
["Architecture", "https://github.com/thribhuvan003/trayy/tree/main/docs/adr"],
247+
["Security", "https://github.com/thribhuvan003/trayy/blob/main/SECURITY.md"],
237248
].map(([label, href]) => (
238249
<li key={label}>
239250
<a href={href} target="_blank" rel="noreferrer" className="tl-footer-link-item opacity-75 font-semibold">

0 commit comments

Comments
 (0)