Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

13.7 KB
Raw Blame
---
import { Icon } from "astro-icon/components";
import { getLocalizedPath, getSiteLocale, siteCopy } from "@/i18n";

const locale = getSiteLocale(Astro.url.pathname);
const bento = siteCopy[locale].bento;
---

<section id="features" class="mt-12 md:mt-24 relative overflow-hidden scroll-mt-6" aria-labelledby="bento-features">
  <!-- Subtle Glow background -->
  <div class="absolute top-1/3 left-1/2 -translate-x-1/2 w-[700px] h-[400px] bg-emerald-500/5 rounded-full blur-3xl -z-10 pointer-events-none"></div>

  <!-- Header -->
  <div class="max-w-3xl mb-8 md:mb-14 text-center mx-auto px-4">
    <span class="inline-block px-3.5 py-1 text-xs font-bold tracking-widest text-emerald-600 bg-emerald-50 rounded-full border border-emerald-200/60 uppercase">
      {bento.eyebrow}
    </span>
    <h2 class="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-extrabold text-slate-900 tracking-tight mt-3" id="bento-features">
      {bento.heading}
    </h2>
    <p class="text-slate-600 mt-3 sm:mt-4 text-xs sm:text-sm md:text-base leading-relaxed max-w-2xl mx-auto">
      {bento.subheading}
    </p>
    <div class="mt-5 flex justify-center">
      <a
        href={getLocalizedPath(locale, "/guides/best-practices")}
        class="group inline-flex items-center gap-2 px-4 py-2 rounded-full text-xs sm:text-sm font-semibold text-emerald-800 bg-emerald-50/90 hover:bg-emerald-100/90 border border-emerald-200/80 hover:border-emerald-300 shadow-2xs transition-all hover:-translate-y-0.5"
      >
        <Icon name="bx:bx-images" class="w-4 h-4 text-emerald-600 shrink-0" />
        <span>{bento.showcaseCta}</span>
        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" class="w-3.5 h-3.5 text-emerald-600 transition-transform group-hover:translate-x-0.5 shrink-0">
          <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />
        </svg>
      </a>
    </div>
  </div>

  <!-- Bento Grid Container -->
  <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6 max-w-6xl mx-auto px-4">
    
    <!-- CARD 1: Classic Three-Pane Layout (Large Span 2 Cols on LG) -->
    <div class="group relative overflow-hidden rounded-2xl sm:rounded-3xl border border-slate-200/90 bg-white p-5 sm:p-6 md:p-8 shadow-sm transition-all duration-300 hover:shadow-xl hover:border-emerald-500/40 lg:col-span-2 flex flex-col justify-between">
      <div class="mb-4 sm:mb-6 z-10">
        <div class="flex flex-wrap items-center gap-2 mb-2.5">
          <span class="px-2.5 py-0.5 text-[10px] sm:text-[11px] font-bold text-emerald-700 bg-emerald-100/70 rounded-md">
            {bento.card1.badge}
          </span>
          <span class="text-slate-400 text-[11px] sm:text-xs font-mono">{bento.card1.subBadge}</span>
        </div>
        <h3 class="text-lg sm:text-xl md:text-2xl font-bold text-slate-900 tracking-tight">
          {bento.card1.title}
        </h3>
        <p class="text-slate-600 text-xs sm:text-sm mt-2 leading-relaxed max-w-xl">
          {bento.card1.desc}
        </p>
      </div>

      <!-- Micro UI Mockup: Three-Pane Preview (Responsive Layout for Mobile) -->
      <div class="relative w-full rounded-xl border border-slate-200/80 bg-slate-50/80 p-2 sm:p-2.5 shadow-inner mt-2 sm:mt-4 overflow-hidden group-hover:border-emerald-300 transition-colors">
        <div class="grid grid-cols-12 gap-1.5 sm:gap-2 h-44 md:h-52 text-[10px] sm:text-[11px] font-sans">
          <!-- Left Notebook Tree -->
          <div class="hidden sm:flex col-span-3 bg-white rounded-lg border border-slate-200/60 p-2 sm:p-2.5 flex-col gap-1.5 shadow-2xs overflow-hidden">
            <div class="flex items-center gap-1.5 text-slate-400 font-bold text-[9px] sm:text-[10px] uppercase mb-0.5">
              <Icon name="bx:bx-folder" class="w-3.5 h-3.5 text-emerald-600" />
              <span class="truncate">{bento.card1.treeTitle}</span>
            </div>
            <div class="bg-emerald-50 text-emerald-800 font-semibold px-2 py-1 rounded text-[10px] sm:text-[10.5px] truncate flex items-center gap-1">
              <span class="w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0"></span> {bento.card1.folder1}
            </div>
            <div class="text-slate-600 px-2 py-1 rounded hover:bg-slate-100 truncate">{bento.card1.folder2}</div>
            <div class="text-slate-600 px-2 py-1 rounded hover:bg-slate-100 truncate">{bento.card1.folder3}</div>
          </div>

          <!-- Middle Note List -->
          <div class="col-span-5 sm:col-span-4 bg-white rounded-lg border border-slate-200/60 p-2 flex flex-col gap-1.5 shadow-2xs overflow-hidden">
            <div class="text-slate-400 font-bold text-[9px] sm:text-[10px] uppercase px-1 mb-0.5">{bento.card1.listTitle}</div>
            <div class="border-l-2 border-emerald-500 bg-slate-50 p-1.5 sm:p-2 rounded-r flex flex-col gap-0.5">
              <div class="font-bold text-slate-800 text-[10px] sm:text-[11px] truncate">{bento.card1.note1Title}</div>
              <div class="text-[9px] sm:text-[9.5px] text-slate-500 line-clamp-1">{bento.card1.note1Sub}</div>
            </div>
            <div class="p-1.5 sm:p-2 rounded hover:bg-slate-50 flex flex-col gap-0.5 opacity-80">
              <div class="font-medium text-slate-700 text-[10px] sm:text-[10.5px] truncate">{bento.card1.note2Title}</div>
              <div class="text-[9px] sm:text-[9.5px] text-slate-400 line-clamp-1">{bento.card1.note2Sub}</div>
            </div>
          </div>

          <!-- Right TipTap Editor Preview -->
          <div class="col-span-7 sm:col-span-5 bg-white rounded-lg border border-slate-200/60 p-2 sm:p-3 flex flex-col gap-1.5 sm:gap-2 shadow-2xs overflow-hidden">
            <div class="text-slate-900 font-bold text-[11px] sm:text-xs border-b border-slate-100 pb-1 flex items-center justify-between">
              <span class="truncate">{bento.card1.editorTitle}</span>
              <span class="text-[8.5px] sm:text-[9px] bg-emerald-100 text-emerald-800 px-1 py-0.5 rounded font-mono shrink-0">TipTap</span>
            </div>
            <p class="text-[9.5px] sm:text-[10px] text-slate-600 leading-relaxed line-clamp-3 sm:line-clamp-none">
              {bento.card1.editorBody}
            </p>
            <div class="flex items-center gap-1 text-[8.5px] sm:text-[9px] text-slate-400 mt-auto font-mono">
              <Icon name="bx:bx-check-shield" class="w-3 h-3 text-emerald-500 shrink-0" />
              <span class="truncate">{bento.card1.editorSaveTag}</span>
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- CARD 2: AI Agent & MCP Synergy (Col Span 1 on LG) -->
    <div class="group relative overflow-hidden rounded-2xl sm:rounded-3xl border border-slate-200/90 bg-white p-5 sm:p-6 md:p-8 shadow-sm transition-all duration-300 hover:shadow-xl hover:border-emerald-500/40 flex flex-col justify-between">
      <div class="z-10">
        <div class="flex items-center gap-2 mb-2.5">
          <span class="px-2.5 py-0.5 text-[10px] sm:text-[11px] font-bold text-emerald-700 bg-emerald-100/70 rounded-md">
            {bento.card2.badge}
          </span>
          <span class="text-slate-400 text-[11px] sm:text-xs font-mono">{bento.card2.subBadge}</span>
        </div>
        <h3 class="text-lg sm:text-xl font-bold text-slate-900 tracking-tight">
          {bento.card2.title}
        </h3>
        <p class="text-slate-600 text-xs sm:text-sm mt-2 leading-relaxed">
          {bento.card2.desc}
        </p>
      </div>

      <!-- Micro UI Mockup: AI Prompt Bubble -->
      <div class="relative w-full rounded-xl border border-slate-200/80 bg-slate-900 p-3 sm:p-3.5 text-white font-mono text-[10px] sm:text-[11px] mt-4 sm:mt-6 flex flex-col gap-2 shadow-md">
        <div class="flex items-center justify-between text-[9.5px] sm:text-[10px] text-slate-400 border-b border-slate-800 pb-1.5">
          <span class="flex items-center gap-1.5 text-emerald-400 font-semibold truncate">
            <span class="w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse shrink-0"></span> {bento.card2.mockupStatus}
          </span>
          <span class="shrink-0 text-[9px] sm:text-[10px]">Codex / Antigravity / Claude Code</span>
        </div>
        <div class="bg-slate-800/80 p-2 rounded text-slate-300 text-[10px] sm:text-[10.5px] truncate">
          <span class="text-emerald-400 font-bold">&gt;</span> {bento.card2.mockupCmd}
        </div>
        <div class="bg-emerald-950/60 border border-emerald-800/50 p-2 rounded text-emerald-300 text-[9.5px] sm:text-[10px] leading-relaxed">
          {bento.card2.mockupResult}
        </div>
      </div>
    </div>

    <!-- CARD 3: Serverless Zero Cost (Col Span 1 on LG) -->
    <div class="group relative overflow-hidden rounded-2xl sm:rounded-3xl border border-slate-200/90 bg-white p-5 sm:p-6 md:p-8 shadow-sm transition-all duration-300 hover:shadow-xl hover:border-emerald-500/40 flex flex-col justify-between">
      <div class="z-10">
        <div class="flex items-center gap-2 mb-2.5">
          <span class="px-2.5 py-0.5 text-[10px] sm:text-[11px] font-bold text-emerald-700 bg-emerald-100/70 rounded-md">
            {bento.card3.badge}
          </span>
          <span class="text-slate-400 text-[11px] sm:text-xs font-mono">{bento.card3.subBadge}</span>
        </div>
        <h3 class="text-lg sm:text-xl font-bold text-slate-900 tracking-tight">
          {bento.card3.title}
        </h3>
        <p class="text-slate-600 text-xs sm:text-sm mt-2 leading-relaxed">
          {bento.card3.desc}
        </p>
      </div>

      <!-- Micro UI Mockup: 0 Cost Metrics Badge -->
      <div class="relative w-full rounded-xl border border-emerald-100 bg-emerald-50/60 p-3.5 sm:p-4 mt-4 sm:mt-6 flex items-center justify-between">
        <div>
          <div class="text-xl sm:text-2xl md:text-3xl font-extrabold text-emerald-800">{bento.card3.price} <span class="text-xs font-medium text-emerald-600">{bento.card3.unit}</span></div>
          <div class="text-[10.5px] sm:text-[11px] font-medium text-emerald-700 mt-0.5">{bento.card3.sub}</div>
        </div>
        <div class="text-right">
          <div class="text-base sm:text-lg font-bold text-slate-800">{bento.card3.metric}</div>
          <div class="text-[9.5px] sm:text-[10px] text-slate-500">{bento.card3.metricSub}</div>
        </div>
      </div>
    </div>

    <!-- CARD 4: Rich Text Copy for Creators (Col Span 1 on LG) -->
    <div class="group relative overflow-hidden rounded-2xl sm:rounded-3xl border border-slate-200/90 bg-white p-5 sm:p-6 md:p-8 shadow-sm transition-all duration-300 hover:shadow-xl hover:border-emerald-500/40 flex flex-col justify-between">
      <div class="z-10">
        <div class="flex items-center gap-2 mb-2.5">
          <span class="px-2.5 py-0.5 text-[10px] sm:text-[11px] font-bold text-emerald-700 bg-emerald-100/70 rounded-md">
            {bento.card4.badge}
          </span>
          <span class="text-slate-400 text-[11px] sm:text-xs font-mono truncate">{bento.card4.subBadge}</span>
        </div>
        <h3 class="text-lg sm:text-xl font-bold text-slate-900 tracking-tight">
          {bento.card4.title}
        </h3>
        <p class="text-slate-600 text-xs sm:text-sm mt-2 leading-relaxed">
          {bento.card4.desc}
        </p>
      </div>

      <!-- Micro UI Mockup: Markdown to Inline CSS Rich Copy -->
      <div class="relative w-full rounded-xl border border-slate-200 bg-slate-50 p-2.5 sm:p-3 mt-4 sm:mt-6 flex flex-col gap-2">
        <div class="flex items-center justify-between text-[9.5px] sm:text-[10px] text-slate-500 font-mono border-b border-slate-200 pb-1">
          <span class="truncate">{bento.card4.srcTag}</span>
          <span class="text-emerald-600 font-bold flex items-center gap-1 shrink-0">
            <Icon name="bx:bx-copy" class="w-3 h-3" /> {bento.card4.actionBtn}
          </span>
        </div>
        <div class="bg-white p-2 sm:p-2.5 rounded border border-slate-200 text-[10.5px] sm:text-[11px] text-slate-800 leading-snug">
          <span class="font-bold text-emerald-800 truncate block">{bento.card4.previewTitle}</span>
          <p class="text-slate-600 text-[9.5px] sm:text-[10px] mt-1">{bento.card4.previewBody}</p>
        </div>
      </div>
    </div>

    <!-- CARD 5: Open Data & ZIP Backup (Col Span 1 on LG) -->
    <div class="group relative overflow-hidden rounded-2xl sm:rounded-3xl border border-slate-200/90 bg-white p-5 sm:p-6 md:p-8 shadow-sm transition-all duration-300 hover:shadow-xl hover:border-emerald-500/40 flex flex-col justify-between">
      <div class="z-10">
        <div class="flex items-center gap-2 mb-2.5">
          <span class="px-2.5 py-0.5 text-[10px] sm:text-[11px] font-bold text-emerald-700 bg-emerald-100/70 rounded-md">
            {bento.card5.badge}
          </span>
          <span class="text-slate-400 text-[11px] sm:text-xs font-mono">{bento.card5.subBadge}</span>
        </div>
        <h3 class="text-lg sm:text-xl font-bold text-slate-900 tracking-tight">
          {bento.card5.title}
        </h3>
        <p class="text-slate-600 text-xs sm:text-sm mt-2 leading-relaxed">
          {bento.card5.desc}
        </p>
      </div>

      <!-- Micro UI Mockup: Lossless ZIP Archive -->
      <div class="relative w-full rounded-xl border border-slate-200 bg-slate-50 p-2.5 sm:p-3 mt-4 sm:mt-6 flex items-center gap-2.5 sm:gap-3">
        <div class="h-9 w-9 sm:h-10 sm:w-10 shrink-0 grid place-items-center rounded-lg bg-emerald-600 text-white shadow-sm">
          <Icon name="bx:bx-archive-in" class="w-4 h-4 sm:w-5 sm:h-5" />
        </div>
        <div class="overflow-hidden text-[10.5px] sm:text-[11px]">
          <div class="font-bold text-slate-800 truncate">{bento.card5.archiveTitle}</div>
          <div class="text-[9.5px] sm:text-[10px] text-slate-500 truncate">{bento.card5.archiveSub}</div>
        </div>
      </div>
    </div>

  </div>
</section>