Add homepage and make bridges look nice
This commit is contained in:
@@ -1,93 +1,121 @@
|
||||
<script lang="ts">
|
||||
export let feature: {
|
||||
routeName: string;
|
||||
routeId: string;
|
||||
};
|
||||
export let feature: {
|
||||
routeName: string;
|
||||
routeId: string;
|
||||
};
|
||||
</script>
|
||||
|
||||
<div class="link-wrapper">
|
||||
<a href="/map/{feature.routeId}" class="wide-button">
|
||||
<div class="accent-bar"></div>
|
||||
<div class="content">
|
||||
<span class="sub-text">Continue to next map</span>
|
||||
<span class="main-text">{feature.routeName}</span>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<svg viewBox="0 0 24 24" width="20" height="20">
|
||||
<path d="M5 12h14M12 5l7 7-7 7" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
</a>
|
||||
<a href="/map/{feature.routeId}" class="wide-button">
|
||||
<div class="content">
|
||||
<div class="header-row">
|
||||
<span class="sub-text">Go to</span>
|
||||
<span class="route-id-chip">{feature.routeId}</span>
|
||||
</div>
|
||||
<span class="main-text">{feature.routeName}</span>
|
||||
</div>
|
||||
|
||||
<div class="icon-circle">
|
||||
<svg viewBox="0 0 24 24" width="20" height="20">
|
||||
<path
|
||||
d="M5 12h14M12 5l7 7-7 7"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="3"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.link-wrapper {
|
||||
position: relative;
|
||||
z-index: 100;
|
||||
padding: 12px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.link-wrapper {
|
||||
padding: 16px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.wide-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #ffffff;
|
||||
border: 2px solid #e2e8f0;
|
||||
border-radius: 12px;
|
||||
text-decoration: none;
|
||||
overflow: hidden;
|
||||
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.wide-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #ffffff;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 16px;
|
||||
text-decoration: none;
|
||||
padding: 12px 16px;
|
||||
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.accent-bar {
|
||||
width: 6px;
|
||||
align-self: stretch;
|
||||
background: #475569;
|
||||
}
|
||||
.content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
padding: 12px 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
.header-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.sub-text {
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: #94a3b8;
|
||||
}
|
||||
.sub-text {
|
||||
font-size: 0.65rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.main-text {
|
||||
font-size: 16px;
|
||||
font-weight: 800;
|
||||
color: #1e293b;
|
||||
}
|
||||
.route-id-chip {
|
||||
font-size: 0.6rem;
|
||||
font-weight: 800;
|
||||
background: #f1f5f9;
|
||||
color: #475569;
|
||||
padding: 2px 6px;
|
||||
border-radius: 6px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.icon {
|
||||
padding-right: 20px;
|
||||
color: #cbd5e1;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
.main-text {
|
||||
font-size: 1rem;
|
||||
font-weight: 800;
|
||||
color: #0f172a;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.icon-circle {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f8fafc;
|
||||
border-radius: 50%;
|
||||
color: #94a3b8;
|
||||
transition: all 0.3s ease;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
.wide-button:hover {
|
||||
border-color: #94a3b8;
|
||||
background: #f8fafc;
|
||||
}
|
||||
.wide-button:hover {
|
||||
border-color: #cbd5e1;
|
||||
background: #fdfdfd;
|
||||
box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
|
||||
}
|
||||
|
||||
.wide-button:hover .icon {
|
||||
color: #475569;
|
||||
transform: translateX(4px);
|
||||
}
|
||||
.wide-button:hover .icon-circle {
|
||||
background: #4f46e5;
|
||||
color: #ffffff;
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
.wide-button:active {
|
||||
transform: scale(0.98);
|
||||
background: #f1f5f9;
|
||||
}
|
||||
</style>
|
||||
.wide-button:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user