changed the location of the travel summary to left
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
<style>
|
||||
.footer {
|
||||
height: 36px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -17,8 +17,9 @@
|
||||
font-weight: 300;
|
||||
color: var(--text-sub);
|
||||
border-top: 1px solid var(--border);
|
||||
background: var(--bg-raised);
|
||||
background: var(--bg);
|
||||
flex-shrink: 0;
|
||||
letter-spacing: 0.02em;
|
||||
letter-spacing: 0.06em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
</script>
|
||||
|
||||
<nav class="topbar">
|
||||
<span class="logo">🗺 MapJournal</span>
|
||||
<span class="logo">Map Journal</span>
|
||||
<div class="nav-links">
|
||||
<button class="nav-btn" class:active={screen === 'worldmap'} onclick={() => onNavigate('worldmap')}>Map</button>
|
||||
<button class="nav-btn" class:active={screen === 'timeline'} onclick={() => onNavigate('timeline')}>Journal</button>
|
||||
@@ -15,19 +15,20 @@
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 24px;
|
||||
padding: 0 32px;
|
||||
height: 52px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
background: var(--bg-raised);
|
||||
background: var(--bg);
|
||||
flex-shrink: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-family: var(--heading);
|
||||
font-size: 15px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: var(--text-h);
|
||||
letter-spacing: -0.4px;
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
|
||||
.nav-links {
|
||||
@@ -36,8 +37,9 @@
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background: var(--accent-bg);
|
||||
border-radius: 10px;
|
||||
background: var(--bg-subtle);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
@@ -45,18 +47,19 @@
|
||||
font-family: var(--sans);
|
||||
font-size: 13px;
|
||||
font-weight: 300;
|
||||
padding: 5px 16px;
|
||||
border-radius: 8px;
|
||||
padding: 4px 18px;
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
background: none;
|
||||
color: var(--text);
|
||||
cursor: pointer;
|
||||
transition: background 0.15s, color 0.15s;
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
.nav-btn:hover { color: var(--accent); }
|
||||
.nav-btn:hover { color: var(--text-h); }
|
||||
.nav-btn.active {
|
||||
background: var(--bg-raised);
|
||||
color: var(--accent-dark);
|
||||
box-shadow: 0 1px 4px rgba(99,102,241,0.15);
|
||||
background: var(--bg);
|
||||
color: var(--text-h);
|
||||
box-shadow: 0 1px 4px rgba(0,0,0,0.08);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -71,9 +71,9 @@
|
||||
|
||||
<style>
|
||||
.detail-page {
|
||||
max-width: 680px;
|
||||
max-width: 720px;
|
||||
margin: 0 auto;
|
||||
padding: 32px 24px 80px;
|
||||
padding: 48px 40px 100px;
|
||||
font-family: var(--sans, system-ui, sans-serif);
|
||||
}
|
||||
|
||||
@@ -115,8 +115,8 @@
|
||||
border-radius: 20px;
|
||||
}
|
||||
.loc-badge { background: var(--accent-bg); color: var(--accent); }
|
||||
.trip-badge--solo { background: rgba(245,158,11,0.12); color: #b45309; }
|
||||
.trip-badge--friends { background: rgba(59,130,246,0.12); color: #1d4ed8; }
|
||||
.trip-badge--solo { background: rgba(245,158,11,0.1); color: #92400e; }
|
||||
.trip-badge--friends { background: var(--accent-bg); color: var(--accent); }
|
||||
|
||||
.detail-title {
|
||||
font-size: 28px;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
let mainPhoto = $derived(entry.photos[0] ?? null);
|
||||
let mainPhoto = $derived(entry.photos[0] ?? null);
|
||||
let thumbPhotos = $derived(entry.photos.slice(1, 4));
|
||||
let extraCount = $derived(entry.photos.length > 4 ? entry.photos.length - 4 : 0);
|
||||
</script>
|
||||
@@ -20,20 +20,18 @@
|
||||
onclick={onClick}
|
||||
onkeydown={(e) => e.key === 'Enter' && onClick()}>
|
||||
|
||||
<!-- Photo grid -->
|
||||
<div class="photo-grid" class:has-thumbs={thumbPhotos.length > 0}>
|
||||
<div class="photo-main">
|
||||
{#if mainPhoto}
|
||||
<img src={mainPhoto} alt="photo 1" loading="lazy" />
|
||||
<img src={mainPhoto} alt="" loading="lazy" />
|
||||
{:else}
|
||||
<div class="photo-placeholder"></div>
|
||||
{/if}
|
||||
|
||||
<!-- Overlay -->
|
||||
<div class="overlay">
|
||||
<div class="overlay-top">
|
||||
<span class="trip-badge trip-badge--{entry.tripType}">
|
||||
{entry.tripType === 'solo' ? 'Solo' : 'With Friends'}
|
||||
{entry.tripType === 'solo' ? 'Solo' : 'Friends'}
|
||||
</span>
|
||||
</div>
|
||||
<div class="overlay-bottom">
|
||||
@@ -48,7 +46,7 @@
|
||||
<div class="photo-thumbs">
|
||||
{#each thumbPhotos as photo, i}
|
||||
<div class="photo-thumb">
|
||||
<img src={photo} alt="photo {i + 2}" loading="lazy" />
|
||||
<img src={photo} alt="" loading="lazy" />
|
||||
{#if i === 2 && extraCount > 0}
|
||||
<div class="extra-overlay">+{extraCount}</div>
|
||||
{/if}
|
||||
@@ -64,50 +62,76 @@
|
||||
<style>
|
||||
.v-item {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
gap: 14px;
|
||||
align-items: flex-start;
|
||||
padding-bottom: 20px;
|
||||
padding-bottom: 24px;
|
||||
position: relative;
|
||||
}
|
||||
.v-item:last-child { padding-bottom: 0; }
|
||||
.v-item:not(:last-child)::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
top: 30px;
|
||||
bottom: 0;
|
||||
width: 1px;
|
||||
background: var(--border);
|
||||
}
|
||||
|
||||
.v-dot {
|
||||
flex-shrink: 0;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
margin-top: 22px;
|
||||
background: var(--bg);
|
||||
border: 1.5px solid var(--accent);
|
||||
margin-top: 20px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* Card */
|
||||
/* ── Card ── */
|
||||
.entry-card {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
border-radius: 16px;
|
||||
border-radius: 14px;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
border: 1px solid var(--border);
|
||||
box-shadow: var(--shadow);
|
||||
background: var(--bg-raised);
|
||||
transition: box-shadow 0.2s, transform 0.15s;
|
||||
box-shadow: 0 2px 12px rgba(99,102,241,0.08);
|
||||
}
|
||||
.entry-card:hover {
|
||||
box-shadow: var(--shadow);
|
||||
box-shadow: 0 8px 32px rgba(0,0,0,0.12);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
/* Photo grid */
|
||||
/* ── Photo grid — fluid, breakpoint via container width ── */
|
||||
.photo-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
height: 220px;
|
||||
background: #111;
|
||||
/* height adapts: taller when single photo */
|
||||
height: 200px;
|
||||
background: var(--bg-subtle);
|
||||
}
|
||||
.photo-grid.has-thumbs {
|
||||
grid-template-columns: 2fr 1fr;
|
||||
gap: 2px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
/* Main photo + overlay */
|
||||
/* Collapse to single column on narrow cards (< 340px) */
|
||||
@container card (max-width: 340px) {
|
||||
.photo-grid.has-thumbs {
|
||||
grid-template-columns: 1fr;
|
||||
height: 180px;
|
||||
}
|
||||
.photo-thumbs { display: none; }
|
||||
}
|
||||
|
||||
.entry-card { container-type: inline-size; container-name: card; }
|
||||
|
||||
/* ── Main photo ── */
|
||||
.photo-main {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
@@ -122,68 +146,61 @@
|
||||
}
|
||||
.photo-placeholder { background: var(--accent-bg); }
|
||||
|
||||
/* ── Overlay gradient ── */
|
||||
.overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding: 14px;
|
||||
padding: 12px;
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
rgba(0,0,0,0.28) 0%,
|
||||
rgba(0,0,0,0.22) 0%,
|
||||
transparent 35%,
|
||||
transparent 50%,
|
||||
rgba(0,0,0,0.65) 100%
|
||||
rgba(0,0,0,0.6) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.overlay-top {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.overlay-bottom {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
.overlay-top { display: flex; justify-content: flex-end; }
|
||||
.overlay-bottom { display: flex; flex-direction: column; gap: 2px; }
|
||||
|
||||
.city {
|
||||
font-size: 12px;
|
||||
font-weight: 300;
|
||||
color: rgba(255,255,255,0.75);
|
||||
color: rgba(255,255,255,0.8);
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.country {
|
||||
font-size: 22px;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
color: #fff;
|
||||
letter-spacing: -0.5px;
|
||||
letter-spacing: -0.3px;
|
||||
line-height: 1.1;
|
||||
text-shadow: 0 1px 8px rgba(0,0,0,0.4);
|
||||
text-shadow: 0 1px 6px rgba(0,0,0,0.35);
|
||||
}
|
||||
|
||||
.meta {
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
font-weight: 300;
|
||||
color: rgba(255,255,255,0.7);
|
||||
margin-top: 4px;
|
||||
margin-top: 3px;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
/* Badges */
|
||||
/* ── Trip badge ── */
|
||||
.trip-badge {
|
||||
font-size: 11px;
|
||||
font-weight: 400;
|
||||
padding: 3px 10px;
|
||||
font-weight: 300;
|
||||
padding: 2px 9px;
|
||||
border-radius: 20px;
|
||||
backdrop-filter: blur(6px);
|
||||
backdrop-filter: blur(8px);
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
.trip-badge--solo { background: rgba(245,158,11,0.75); color: #fff; }
|
||||
.trip-badge--friends { background: rgba(99,102,241,0.75); color: #fff; }
|
||||
.trip-badge--solo { background: rgba(245,158,11,0.7); color: #fff; }
|
||||
.trip-badge--friends { background: rgba(124,58,237,0.7); color: #fff; }
|
||||
|
||||
/* Thumbs */
|
||||
/* ── Thumbs ── */
|
||||
.photo-thumbs {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -205,11 +222,11 @@
|
||||
.extra-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: rgba(0,0,0,0.5);
|
||||
background: rgba(0,0,0,0.45);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 16px;
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@@ -1,22 +1,17 @@
|
||||
<script>
|
||||
const sortOptions = [
|
||||
{ value: 'date-desc', label: 'Newest First' },
|
||||
{ value: 'date-asc', label: 'Oldest First' },
|
||||
{ value: 'date-desc', label: 'Newest first' },
|
||||
{ value: 'date-asc', label: 'Oldest first' },
|
||||
{ value: 'country-asc', label: 'Country A → Z' },
|
||||
{ value: 'country-desc', label: 'Country Z → A' },
|
||||
];
|
||||
|
||||
/** @type {{ sortKey: string, onSort: (key: string) => void }} */
|
||||
let { sortKey, onSort } = $props();
|
||||
</script>
|
||||
|
||||
<header class="toolbar">
|
||||
<div class="title-block">
|
||||
<p class="eyebrow">Travel Journal</p>
|
||||
<h1 class="page-title">My Journey</h1>
|
||||
</div>
|
||||
<h1 class="page-title">My Journey</h1>
|
||||
<div class="sort-control">
|
||||
<label for="sort-select">Sort</label>
|
||||
<select id="sort-select" onchange={(e) => onSort(e.currentTarget.value)}>
|
||||
{#each sortOptions as opt}
|
||||
<option value={opt.value} selected={opt.value === sortKey}>{opt.label}</option>
|
||||
@@ -30,48 +25,38 @@
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
margin-bottom: 48px;
|
||||
gap: 16px;
|
||||
margin-bottom: 32px;
|
||||
padding-bottom: 24px;
|
||||
border-bottom: 1px solid var(--border, #e5e4e7);
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
font-size: 11px;
|
||||
letter-spacing: 3px;
|
||||
text-transform: uppercase;
|
||||
color: var(--accent);
|
||||
margin: 0 0 6px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 32px;
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 400;
|
||||
color: var(--text-h, #08060d);
|
||||
color: var(--text-h);
|
||||
letter-spacing: -0.5px;
|
||||
margin: 0;
|
||||
letter-spacing: -0.8px;
|
||||
}
|
||||
|
||||
.sort-control { display: flex; align-items: center; gap: 8px; }
|
||||
.sort-control label { font-size: 13px; color: var(--text, #6b6375); }
|
||||
|
||||
select {
|
||||
font-size: 13px;
|
||||
padding: 7px 28px 7px 10px;
|
||||
border: 1px solid var(--border, #e5e4e7);
|
||||
border-radius: 8px;
|
||||
background: var(--bg, #fff);
|
||||
color: var(--text-h, #08060d);
|
||||
font-family: var(--sans);
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 300;
|
||||
letter-spacing: 0.06em;
|
||||
text-transform: uppercase;
|
||||
padding: 6px 28px 6px 12px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
background: var(--bg-subtle);
|
||||
color: var(--text);
|
||||
cursor: pointer;
|
||||
appearance: none;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6375' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2352525b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right 10px center;
|
||||
transition: border-color 0.15s, color 0.15s;
|
||||
}
|
||||
select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.page-title { font-size: 26px; }
|
||||
}
|
||||
select:hover { border-color: var(--border-bright); color: var(--text-h); }
|
||||
select:focus { outline: 1px solid var(--accent-border); outline-offset: 2px; }
|
||||
</style>
|
||||
|
||||
@@ -37,37 +37,37 @@
|
||||
<div class="journal-page">
|
||||
|
||||
{#if selected}
|
||||
<!-- Detail view: full width, scrollable -->
|
||||
<div class="detail-scroll">
|
||||
<JournalDetail entry={selected} onBack={() => (selected = null)} />
|
||||
</div>
|
||||
{:else}
|
||||
<!-- Two-column layout -->
|
||||
<aside class="left-panel">
|
||||
<JournalSummary entries={sortedEntries} />
|
||||
</aside>
|
||||
|
||||
<div class="right-panel">
|
||||
<TimelineToolbar {sortKey} onSort={(k) => (sortKey = k)} />
|
||||
<div class="right-inner">
|
||||
<TimelineToolbar {sortKey} onSort={(k) => (sortKey = k)} />
|
||||
|
||||
{#if sortedEntries.length === 0}
|
||||
<p class="empty">No journal entries yet.</p>
|
||||
{:else}
|
||||
<ol class="v-list">
|
||||
{#each sortedEntries as entry, i (entry.id)}
|
||||
{#if i === 0 || getYear(entry.date) !== getYear(sortedEntries[i - 1].date)}
|
||||
<li class="year-marker" aria-hidden="true">
|
||||
<span class="year-label">{getYear(entry.date)}</span>
|
||||
</li>
|
||||
{/if}
|
||||
<TimelineCard {entry} onClick={() => (selected = entry)} />
|
||||
{/each}
|
||||
</ol>
|
||||
{/if}
|
||||
{#if sortedEntries.length === 0}
|
||||
<p class="empty">No journal entries yet.</p>
|
||||
{:else}
|
||||
<ol class="v-list">
|
||||
{#each sortedEntries as entry, i (entry.id)}
|
||||
{#if i === 0 || getYear(entry.date) !== getYear(sortedEntries[i - 1].date)}
|
||||
<li class="year-marker" aria-hidden="true">
|
||||
<span class="year-label">{getYear(entry.date)}</span>
|
||||
</li>
|
||||
{/if}
|
||||
<TimelineCard {entry} onClick={() => (selected = entry)} />
|
||||
{/each}
|
||||
</ol>
|
||||
{/if}
|
||||
|
||||
<footer class="page-footer">
|
||||
{sortedEntries.length} {sortedEntries.length === 1 ? 'entry' : 'entries'}
|
||||
</footer>
|
||||
<footer class="page-footer">
|
||||
{sortedEntries.length} {sortedEntries.length === 1 ? 'entry' : 'entries'}
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -83,28 +83,49 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ── Left: summary panel ── */
|
||||
/* ── Left panel ── */
|
||||
.left-panel {
|
||||
width: 280px;
|
||||
width: 260px;
|
||||
flex-shrink: 0;
|
||||
overflow-y: auto;
|
||||
border-right: 1px solid var(--border);
|
||||
background: var(--bg);
|
||||
padding: 32px 20px;
|
||||
background: var(--bg-raised);
|
||||
padding: 40px 28px;
|
||||
}
|
||||
|
||||
/* ── Right: timeline ── */
|
||||
/* ── Right panel ── */
|
||||
.right-panel {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow-y: auto;
|
||||
padding: 32px 32px 64px;
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
/* Inner container with max-width + generous side padding */
|
||||
.right-inner {
|
||||
max-width: 640px;
|
||||
margin: 0 auto;
|
||||
padding: 40px 48px 80px;
|
||||
}
|
||||
|
||||
/* ── Responsive: narrow viewport ── */
|
||||
@media (max-width: 700px) {
|
||||
.journal-page { flex-direction: column; overflow-y: auto; overflow-x: hidden; }
|
||||
.left-panel {
|
||||
width: 100%;
|
||||
border-right: none;
|
||||
border-bottom: 1px solid var(--border);
|
||||
padding: 24px 20px;
|
||||
}
|
||||
.right-panel { overflow-y: unset; }
|
||||
.right-inner { padding: 24px 20px 60px; }
|
||||
}
|
||||
|
||||
/* ── Detail view ── */
|
||||
.detail-scroll {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
/* ── Timeline list ── */
|
||||
@@ -112,44 +133,34 @@
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
}
|
||||
.v-list::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
top: 6px;
|
||||
bottom: 6px;
|
||||
width: 2px;
|
||||
background: var(--border);
|
||||
border-radius: 1px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
/* Year marker */
|
||||
.year-marker {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-bottom: 20px;
|
||||
padding: 32px 0 16px;
|
||||
}
|
||||
.year-label {
|
||||
font-size: var(--text-2xl);
|
||||
font-size: 11px;
|
||||
font-weight: 400;
|
||||
color: var(--accent);
|
||||
letter-spacing: -1px;
|
||||
line-height: 1;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding-left: 24px;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
color: var(--text-sub);
|
||||
}
|
||||
|
||||
.page-footer {
|
||||
margin-top: 40px;
|
||||
margin-top: 56px;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
color: var(--text);
|
||||
font-size: 11px;
|
||||
font-weight: 300;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
color: var(--text-sub);
|
||||
padding-top: 24px;
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.empty { text-align: center; color: var(--text); padding: 80px 0; }
|
||||
.empty { text-align: center; color: var(--text-sub); padding: 80px 0; }
|
||||
</style>
|
||||
|
||||
@@ -99,12 +99,12 @@
|
||||
<text x={seg.lx} y={seg.ly} text-anchor="middle" dominant-baseline="middle" class="donut-label" style="font-size: {seg.angle < 20 ? 12 : 15}px">{seg.cont}</text>
|
||||
</g>
|
||||
{/each}
|
||||
<circle cx="90" cy="90" r="30" fill="#f8fafc" />
|
||||
<circle cx="90" cy="90" r="30" fill="var(--bg-raised)" />
|
||||
</svg>
|
||||
{:else}
|
||||
<svg viewBox="0 0 180 180" class="donut-svg">
|
||||
<circle cx="90" cy="90" r="65" fill="#e2e8f0" />
|
||||
<circle cx="90" cy="90" r="30" fill="#f8fafc" />
|
||||
<circle cx="90" cy="90" r="65" fill="var(--border)" />
|
||||
<circle cx="90" cy="90" r="30" fill="var(--bg-raised)" />
|
||||
</svg>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user