Update terminology from "growing" to "colonizing", expand greeting variety, and add decorative background patterns
Change colonization stage label from "Growing" to "Colonizing" for accuracy. Add varied time-of-day, weekend/weekday, and mushroom-themed greetings with consistent daily selection. Remove redundant font-weight declarations from font-face rules. Replace inline SVG with image file in onboarding. Improve mobile TopBar layout to show greeting. Add subtle oyster mushroom background patterns
This commit is contained in:
1 parent
b4278523f2
commit
70faef0b74
7 files changed
+154
-24
No files matched your search
@@ -7,7 +7,6 @@
|
||||
@font-face {
|
||||
font-family: 'DM Serif Display';
|
||||
src: url('/fonts/DMSerifDisplay-Regular.woff2') format('woff2');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
@@ -15,7 +14,6 @@
|
||||
@font-face {
|
||||
font-family: 'DM Serif Display';
|
||||
src: url('/fonts/DMSerifDisplay-Italic.woff2') format('woff2');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@@ -785,7 +785,7 @@
|
||||
<div class="lc-meta">
|
||||
<span class="lc-count">{occupiedCol}<span class="lc-total">/{totalCol}</span></span>
|
||||
<span class="lc-sep">·</span>
|
||||
<span class="lc-desc">{occupiedCol === 1 ? 'bag' : 'bags'} growing</span>
|
||||
<span class="lc-desc">{occupiedCol === 1 ? 'bag' : 'bags'} colonizing</span>
|
||||
</div>
|
||||
<div class="lc-poem font-serif italic">Like a forest floor, underground.</div>
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -152,7 +152,7 @@ export type WsDiff = {
|
||||
// Friendly stage names for display
|
||||
export const STAGE_LABELS: Record<BagVision['stage'], string> = {
|
||||
inoculation: 'Inoculated',
|
||||
colonization: 'Growing',
|
||||
colonization: 'Colonizing',
|
||||
pinning: 'Pinning',
|
||||
fruiting: 'Fruiting',
|
||||
harvest: 'Ready',
|
||||
|
||||
+100
-9
@@ -1,13 +1,86 @@
|
||||
<script lang="ts">
|
||||
import { cultivar } from '../store.svelte';
|
||||
|
||||
// Format a friendly greeting based on local time of day
|
||||
const hour = new Date().getHours();
|
||||
const greeting =
|
||||
hour < 5 ? 'Good evening'
|
||||
: hour < 12 ? 'Good morning'
|
||||
: hour < 18 ? 'Good afternoon'
|
||||
: 'Good evening';
|
||||
// Format a friendly greeting based on local time of day and weekday
|
||||
const now = new Date();
|
||||
const hour = now.getHours();
|
||||
const day = now.getDay();
|
||||
const isWeekend = day === 0 || day === 6;
|
||||
const isWeekday = !isWeekend;
|
||||
|
||||
const morningGreetings = [
|
||||
'Good morning',
|
||||
'Rise and shine',
|
||||
'Morning',
|
||||
];
|
||||
|
||||
const afternoonGreetings = [
|
||||
'Good afternoon',
|
||||
'Afternoon',
|
||||
];
|
||||
|
||||
const eveningGreetings = [
|
||||
'Good evening',
|
||||
'Evening',
|
||||
];
|
||||
|
||||
const nightGreetings = [
|
||||
'Good evening',
|
||||
'Late night',
|
||||
'Still up?', ];
|
||||
|
||||
// Weekend-specific greetings
|
||||
const weekendGreetings = [
|
||||
'Happy weekend',
|
||||
'Weekend vibes',
|
||||
'Enjoy your weekend',
|
||||
];
|
||||
|
||||
// Weekday-specific greetings
|
||||
const weekdayGreetings = [
|
||||
'Have a great day',
|
||||
'Keep growing',
|
||||
'Another day',
|
||||
];
|
||||
|
||||
// Mushroom-themed greetings
|
||||
const mushroomGreetings = [
|
||||
'What a fungi',
|
||||
'Morel to the story',
|
||||
'Spore-tacular day',
|
||||
'Fun-guy',
|
||||
'Shroom-tacular',
|
||||
'In spore-tacular shape',
|
||||
'Cap-tivating',
|
||||
'Truffle shuffle',
|
||||
'Hyphae happenin',
|
||||
'Portobello vibes',
|
||||
];
|
||||
|
||||
let greetings: string[];
|
||||
if (hour < 5) {
|
||||
greetings = nightGreetings;
|
||||
} else if (hour < 12) {
|
||||
greetings = morningGreetings;
|
||||
} else if (hour < 18) {
|
||||
greetings = afternoonGreetings;
|
||||
} else {
|
||||
greetings = eveningGreetings;
|
||||
}
|
||||
|
||||
// Add day-specific greetings
|
||||
if (isWeekend) {
|
||||
greetings = [...greetings, ...weekendGreetings];
|
||||
} else {
|
||||
greetings = [...greetings, ...weekdayGreetings];
|
||||
}
|
||||
|
||||
// Mix in mushroom-themed greetings
|
||||
greetings = [...greetings, ...mushroomGreetings];
|
||||
|
||||
// Pick a greeting based on the day to keep it consistent throughout the day
|
||||
const greetingIndex = (hour + day) % greetings.length;
|
||||
const greeting = greetings[greetingIndex];
|
||||
|
||||
// Display cultivar owner name if we had one — for now, friendly generic
|
||||
const date = new Date().toLocaleDateString([], { weekday: 'long', month: 'long', day: 'numeric' });
|
||||
@@ -137,9 +210,27 @@
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.meta { display: none; }
|
||||
.topbar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 12px 14px 10px;
|
||||
}
|
||||
.meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
min-width: 0;
|
||||
}
|
||||
.meta-greet {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.meta-date { display: none; }
|
||||
.meta-sep { display: none; }
|
||||
.live-label { display: none; }
|
||||
.live { padding: 4px 8px; }
|
||||
.topbar { padding: 12px 14px 10px; grid-template-columns: auto 1fr; }
|
||||
}
|
||||
</style>
|
||||
@@ -84,11 +84,7 @@
|
||||
{#if step === 'welcome'}
|
||||
<div class="ob-step" style="animation: fade-in 0.4s both">
|
||||
<div class="ob-monogram">
|
||||
<svg width="56" height="56" viewBox="0 0 56 56" fill="none" aria-hidden="true">
|
||||
<circle cx="28" cy="28" r="27" fill="none" stroke="var(--ink)" stroke-width="1.5"/>
|
||||
<text x="14" y="38" font-family="DM Serif Display, Georgia, serif" font-size="26" fill="var(--ink)" font-weight="400">g</text>
|
||||
<text x="31" y="38" font-family="DM Serif Display, Georgia, serif" font-size="26" fill="var(--forest)" font-weight="400">5</text>
|
||||
</svg>
|
||||
<img src="/img/g5.svg" width="56" height="56" alt="g5 monogram" />
|
||||
</div>
|
||||
<h1 class="ob-headline font-serif">Welcome to your <span class="italic">Cultivar.</span></h1>
|
||||
<p class="ob-body text-muted">Let's connect your chamber to your home.</p>
|
||||
@@ -313,6 +309,7 @@
|
||||
.ob-cta:hover:not(:disabled) {
|
||||
background: var(--color-charcoal);
|
||||
border-color: var(--color-text-muted);
|
||||
color: var(--color-bg);
|
||||
}
|
||||
|
||||
.ob-cta:disabled { opacity: 0.4; cursor: not-allowed; }
|
||||
|
||||
@@ -666,7 +666,7 @@
|
||||
</div>
|
||||
<div class="rhythm-foot">
|
||||
<span class="rhythm-foot-line font-serif italic">
|
||||
Cultivar is handling humidification, CO₂ & O₂ exchange, and light intensity and timing.
|
||||
Cultivar is handling humidity, CO₂ exchange, and light.
|
||||
</span>
|
||||
</div>
|
||||
</aside>
|
||||
@@ -725,7 +725,7 @@
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding: 0 28px 40px;
|
||||
padding: 0 28px 28px 28px;
|
||||
}
|
||||
|
||||
/* ── Section skeleton ───────────────────────────────────── */
|
||||
@@ -734,7 +734,29 @@
|
||||
border-top: 1px solid var(--line-soft);
|
||||
}
|
||||
.section:first-of-type { border-top: none; padding-top: 26px; }
|
||||
.section-hero { padding-top: 20px; }
|
||||
.section-hero {
|
||||
position: relative;
|
||||
padding-top: 20px;
|
||||
}
|
||||
.section-hero::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
margin-left: -28px;
|
||||
margin-right: -28px;
|
||||
background-image: url('/img/illustration_oysters.webp');
|
||||
background-size: 100%;
|
||||
background-position: center;
|
||||
background-repeat: repeat;
|
||||
opacity: 0.07;
|
||||
pointer-events: none;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.section-hero::before {
|
||||
margin-left: -18px;
|
||||
margin-right: -18px;
|
||||
}
|
||||
}
|
||||
|
||||
.sec-head {
|
||||
display: flex;
|
||||
@@ -781,7 +803,7 @@
|
||||
width: auto;
|
||||
height: 65%;
|
||||
object-fit: contain;
|
||||
opacity: 0.75;
|
||||
opacity: 0.95;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@@ -790,7 +812,7 @@
|
||||
line-height: 1.03;
|
||||
letter-spacing: -0.018em;
|
||||
color: var(--ink);
|
||||
font-weight: var(--fw-display);
|
||||
font-weight: var(--fw-title);
|
||||
margin-top: 2px;
|
||||
}
|
||||
/* Let "All growing nicely." flow on one line; wrap to two only
|
||||
@@ -799,7 +821,7 @@
|
||||
.hh-italic {
|
||||
display: inline;
|
||||
color: var(--forest);
|
||||
font-weight: var(--fw-display);
|
||||
font-weight: var(--fw-title);
|
||||
margin-left: 0em;
|
||||
}
|
||||
.hh-italic.tone-warn { color: var(--attention); }
|
||||
@@ -998,6 +1020,7 @@
|
||||
|
||||
/* ── Footer ── */
|
||||
.foot {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
@@ -1009,6 +1032,27 @@
|
||||
border-top: 1px solid var(--line-soft);
|
||||
margin-top: 20px;
|
||||
}
|
||||
.foot::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
margin-left: -28px;
|
||||
margin-right: -28px;
|
||||
margin-bottom: -28px;
|
||||
background-image: url('/img/illustration_oysters.webp');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 900px;
|
||||
background-position: center;
|
||||
opacity: 0.13;
|
||||
z-index: 10;
|
||||
pointer-events: none;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.foot::before {
|
||||
margin-left: -18px;
|
||||
margin-right: -18px;
|
||||
}
|
||||
}
|
||||
.foot-mark { font-size: 13px; color: var(--ink-2); }
|
||||
.foot-sep { opacity: 0.4; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user