Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions frontend/src/components/portal/BuilderResourcesPromo.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<script>
import { push } from 'svelte-spa-router';
</script>

<section class="overflow-hidden rounded-[8px] border border-[#f1dfca] bg-white shadow-[0_12px_30px_rgba(115,75,32,0.08)]">
<div class="grid grid-cols-1 gap-4 p-4 sm:p-5 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center">
<div class="flex min-w-0 items-start gap-3">
<div class="flex h-10 w-10 shrink-0 items-center justify-center rounded-[8px] bg-[#ee8521]/12 text-[#ee8521]">
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="1.7">
<path stroke-linecap="round" stroke-linejoin="round" d="M4.75 6.75A2 2 0 016.75 4.75h10.5a2 2 0 012 2v10.5a2 2 0 01-2 2H6.75a2 2 0 01-2-2V6.75z" />
<path stroke-linecap="round" stroke-linejoin="round" d="M8 9h8M8 12h5M8 15h7" />
</svg>
</div>

<div class="min-w-0">
<div class="flex flex-wrap items-center gap-2">
<h2 class="text-[18px] font-semibold leading-[23px] text-black" style="letter-spacing: 0.2px;">Builder Resources</h2>
<span class="rounded-full bg-[#fff2e4] px-2 py-0.5 text-[11px] font-semibold uppercase text-[#a85e16]" style="letter-spacing: 0.7px;">Agent-first</span>
</div>
<p class="mt-1 max-w-[760px] text-[13px] leading-[19px] text-[#666]">
Skills, starters, GenTV sessions, network links, tools, and raw docs for building GenLayer projects with coding agents.
</p>
<div class="mt-3 flex flex-wrap gap-1.5">
{#each ['Skills', 'Open-source starters', 'GenTV', 'Tools'] as item}
<span class="rounded-full border border-[#f0dfcb] bg-[#fffaf4] px-2.5 py-1 text-[12px] font-medium leading-[15px] text-[#625548]">{item}</span>
{/each}
</div>
</div>
</div>

<button
type="button"
onclick={() => push('/builders/resources')}
class="inline-flex h-10 w-fit items-center justify-center gap-2 rounded-[20px] bg-[#101010] px-4 text-[14px] font-medium text-white transition hover:bg-black lg:justify-self-end"
>
Open resources
<img src="/assets/icons/arrow-right-line.svg" alt="" class="h-4 w-4 brightness-0 invert" />
</button>
</div>
</section>
90 changes: 80 additions & 10 deletions frontend/src/components/portal/gen-tv/StreamCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
target="_blank"
rel="noopener noreferrer"
aria-label={`Open ${stream.title}${dateTime ? `, ${dateTime}` : ''}`}
class="group w-full rounded-[8px] overflow-hidden relative cursor-pointer bg-[#111] block shadow-sm ring-1 ring-black/5 transition duration-300 hover:-translate-y-0.5 hover:shadow-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black"
class="stream-card group w-full rounded-[8px] overflow-hidden relative cursor-pointer bg-[#111] block shadow-sm ring-1 ring-black/5 transition duration-300 hover:-translate-y-0.5 hover:shadow-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black"
>
<div class="relative w-full aspect-[16/9]">
<div class="absolute inset-0 bg-gradient-to-br from-[#202020] via-[#111] to-black"></div>
Expand Down Expand Up @@ -118,37 +118,37 @@
</div>
</div>

<div class="absolute bottom-0 left-0 right-0 p-3.5 sm:p-5 space-y-1.5 transition duration-200 {showDefaultInfo ? 'opacity-100 translate-y-0 group-hover:opacity-0 group-hover:translate-y-2 group-focus-visible:opacity-0 group-focus-visible:translate-y-2' : 'opacity-0 translate-y-2'}">
<h3 class="text-white text-[18px] sm:text-[22px] font-display font-medium leading-[1.05] line-clamp-2">
<div class="stream-card-preview absolute bottom-0 left-0 right-0 p-3.5 sm:p-5 space-y-1.5 transition duration-200 {showDefaultInfo ? 'opacity-100 translate-y-0 group-hover:opacity-0 group-hover:translate-y-2 group-focus-visible:opacity-0 group-focus-visible:translate-y-2' : 'opacity-0 translate-y-2'}">
<h3 class="stream-card-title text-white font-display font-medium line-clamp-2">
{stream.title}
</h3>
{#if dateTime}
<p class="text-white/80 text-[12px] sm:text-[14px] font-medium">
<p class="stream-card-date text-white/80 font-medium">
{dateTime}
</p>
{/if}
</div>

<div class="absolute inset-0 p-3.5 sm:p-5 flex items-end bg-black/30 backdrop-blur-[14px] opacity-0 translate-y-3 transition duration-200 group-hover:opacity-100 group-hover:translate-y-0 group-focus-visible:opacity-100 group-focus-visible:translate-y-0">
<div class="space-y-3 drop-shadow-[0_2px_10px_rgba(0,0,0,0.65)]">
<div class="stream-card-hover absolute inset-0 p-3.5 sm:p-5 flex items-end bg-black/30 backdrop-blur-[14px] opacity-0 translate-y-3 transition duration-200 group-hover:opacity-100 group-hover:translate-y-0 group-focus-visible:opacity-100 group-focus-visible:translate-y-0">
<div class="stream-card-copy space-y-3 drop-shadow-[0_2px_10px_rgba(0,0,0,0.65)]">
<div class="space-y-1">
<h3 class="text-white text-[18px] sm:text-[22px] font-display font-medium leading-[1.05] line-clamp-2">
<h3 class="stream-card-title text-white font-display font-medium line-clamp-2">
{stream.title}
</h3>
{#if dateTime}
<p class="text-white/70 text-[12px] sm:text-[14px] font-medium">
<p class="stream-card-date text-white/70 font-medium">
{dateTime}{duration ? ` · ${duration}` : ''}
</p>
{/if}
</div>

{#if description}
<p class="text-white/85 text-[13px] sm:text-[15px] leading-snug line-clamp-3 max-w-[58ch]">
<p class="stream-card-description text-white/85 leading-snug line-clamp-3 max-w-[58ch]">
{description}
</p>
{/if}

<div class="flex items-center gap-2 text-[11px] font-semibold uppercase text-white/72">
<div class="stream-card-meta flex items-center gap-2 font-semibold uppercase text-white/72">
<span>{categoryLabel}</span>
{#if host}
<span class="opacity-50">·</span>
Expand All @@ -159,3 +159,73 @@
</div>
</div>
</a>

<style>
.stream-card {
container-type: inline-size;
}

.stream-card-title {
font-size: 22px;
line-height: 1.05;
}

.stream-card-date {
font-size: 14px;
line-height: 1.25;
}

.stream-card-description {
font-size: 15px;
}

.stream-card-meta {
font-size: 11px;
}

@container (max-width: 340px) {
.stream-card-preview,
.stream-card-hover {
padding: 12px;
}

.stream-card-title {
font-size: 16px;
line-height: 1.08;
}

.stream-card-date {
font-size: 11px;
}

.stream-card-description {
font-size: 12px;
line-height: 1.28;
-webkit-line-clamp: 2;
}

.stream-card-copy > :not([hidden]) ~ :not([hidden]) {
margin-top: 8px;
}

.stream-card-meta {
font-size: 10px;
}
}

@container (max-width: 260px) {
.stream-card-preview,
.stream-card-hover {
padding: 10px;
}

.stream-card-title {
font-size: 14px;
}

.stream-card-description,
.stream-card-meta {
display: none;
}
}
</style>
Loading