Skip to content

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

14.7 KB
Raw Blame
---
import { Picture } from "astro:assets";
import heroProductImage from "@/assets/edgeever-hero-product.png";
import { Icon } from "astro-icon/components";
import { Meteors } from "@/components/magicui/meteors";
import { getLocalizedPath, getSiteLocale, siteCopy } from "@/i18n";

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

<main class="relative grid gap-8 lg:gap-10 lg:grid-cols-2 place-items-center pt-4 pb-10 md:pt-10 md:pb-16 overflow-hidden max-w-full">
  <!-- Background Glow Orbs & Meteors Container (strictly overflow-hidden) -->
  <div class="absolute inset-0 overflow-hidden pointer-events-none z-0">
    <div class="absolute top-0 left-1/4 w-[280px] sm:w-[450px] h-[280px] sm:h-[450px] bg-brand/10 rounded-full blur-3xl animate-slow-spin"></div>
    <div class="absolute bottom-0 right-1/4 w-[240px] sm:w-[380px] h-[240px] sm:h-[380px] bg-emerald-400/10 rounded-full blur-3xl animate-float"></div>
    <Meteors number={16} client:load />
  </div>

  <div class="relative z-20 w-full max-w-full flex flex-col items-start min-w-0">
    {copy.badgeText && (
      <a
        href={`${getLocalizedPath(locale, "/")}#platforms`}
        class="animate-rise flex min-h-11 sm:min-h-0 items-center gap-2 max-w-full min-w-0 px-3 py-1.5 mb-5 md:mb-6 text-xs text-brand bg-brand/5 border border-brand-border/30 hover:border-brand/40 hover:bg-brand/10 rounded-full backdrop-blur-sm select-none hover:-translate-y-0.5 transition-all duration-300 group/badge cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40 focus-visible:ring-offset-2"
        style="animation-delay: 0ms;"
      >
        <span class="relative flex h-2 w-2 shrink-0">
          <span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-brand opacity-75"></span>
          <span class="relative inline-flex rounded-full h-2 w-2 bg-brand"></span>
        </span>
        <span class="text-slate-600 font-medium group-hover/badge:text-brand transition-colors text-[11px] sm:text-xs truncate min-w-0 flex-1">{copy.badgeText}</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 h-3 text-slate-400 group-hover/badge:text-brand transition-all duration-300 transform group-hover/badge: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>
    )}

    <h1 class="animate-rise text-3xl sm:text-4xl md:text-5xl xl:text-6xl font-extrabold text-slate-900 leading-[1.18] tracking-tight max-w-full" style="animation-delay: 80ms;">
      <span class="text-gradient">EdgeEver</span>
      <div class="mt-2.5 sm:mt-3 flex flex-wrap items-center gap-2 max-w-full">
        <span class="inline-block px-2.5 py-1 bg-emerald-600 text-white rounded-lg text-base sm:text-lg md:text-xl font-bold -rotate-1 shadow-md animate-pop">
          {copy.popHighlight}
        </span>
      </div>
      <span class="hero-slogan block mt-3 sm:mt-4 max-w-xl text-base sm:text-lg md:text-xl font-normal leading-relaxed text-slate-600">{copy.slogan}</span>
    </h1>

    <!-- Primary Action Buttons -->
    <div class="animate-rise mt-6 sm:mt-8 flex flex-col sm:flex-row items-stretch sm:items-center gap-3 w-full sm:w-auto max-w-full z-20" style="animation-delay: 160ms;">
      <a
        href="https://demo.edgeever.org"
        target="_blank"
        class="group inline-flex h-11 gap-2 items-center justify-center px-6 text-white bg-brand border border-transparent shadow-[0_12px_30px_-14px_rgb(var(--edgeever-brand-rgb)/0.8)] hover:bg-brand-hover hover:shadow-brand/40 transition-all duration-300 hover:-translate-y-0.5 rounded-full font-semibold text-sm w-full sm:w-auto text-center"
        rel="noopener">
        <Icon class="w-4 h-4 shrink-0" name="bx:bx-show" />
        <span>{copy.demo}</span>
      </a>
      <a
        href="https://github.com/tianma-if/edgeever"
        target="_blank"
        rel="noopener"
        aria-label="EdgeEver on GitHub"
        class="group inline-flex h-11 gap-2.5 items-center justify-center px-5 border border-slate-200/90 hover:border-brand/40 bg-white/90 hover:bg-brand-soft/60 backdrop-blur-sm text-slate-800 transition-all duration-300 rounded-full font-semibold text-sm hover:-translate-y-0.5 shadow-2xs hover:shadow-sm w-full sm:w-auto text-center"
      >
        <span class="inline-flex items-center gap-1.5">
          <Icon class="text-slate-800 w-4 h-4 shrink-0 transition-transform duration-200 group-hover:scale-110" name="bx:bxl-github" />
          <span>GitHub</span>
        </span>
        <span class="h-3.5 w-px bg-slate-200 group-hover:bg-brand/25 transition-colors" aria-hidden="true"></span>
        <span class="inline-flex items-center gap-2 text-xs font-medium text-slate-600 tabular-nums">
          <span class="inline-flex items-center gap-1 group-hover:text-slate-900 transition-colors">
            <Icon name="bx:bxs-star" class="w-3.5 h-3.5 text-slate-400 group-hover:text-amber-500 transition-colors" />
            <span data-github-stars>--</span>
          </span>
          <span class="text-slate-300 select-none" aria-hidden="true">·</span>
          <span class="inline-flex items-center gap-1 group-hover:text-slate-900 transition-colors">
            <Icon name="bx:git-repo-forked" class="w-3.5 h-3.5 text-slate-400 group-hover:text-brand transition-colors" />
            <span data-github-forks>--</span>
          </span>
        </span>
      </a>
      <a
        rel="noopener"
        href={getLocalizedPath(locale, "/blog/ai-agent-deploy-cloudflare")}
        class="inline-flex h-11 gap-2 items-center justify-center px-5 bg-brand/5 border border-brand/20 hover:border-brand/40 text-brand-text hover:bg-brand/10 transition-all duration-300 rounded-full font-semibold text-sm hover:-translate-y-0.5 w-full sm:w-auto text-center"
      >
        <Icon class="w-4 h-4 shrink-0" name="simple-icons:cloudflare" />
        <span>{copy.agentInstall}</span>
      </a>
    </div>

    <!-- Multi-Platform Client Badges -->
    <div class="animate-rise mt-6 w-full max-w-full z-30 relative" style="animation-delay: 240ms;">
      <div class="pt-4 border-t border-slate-200/60 flex flex-wrap items-center gap-2">
        <span class="text-[11px] font-semibold text-slate-500 mr-1 select-none">
          {copy.getApps}
        </span>
        <a
          href="https://github.com/tianma-if/edgeever/releases"
          target="_blank"
          rel="noopener"
          class="inline-flex min-h-11 sm:min-h-0 items-center gap-1.5 px-2.5 py-1 rounded-lg bg-slate-100/90 hover:bg-emerald-50 hover:text-emerald-700 hover:border-emerald-300 border border-slate-200/80 text-[11px] font-medium text-slate-700 transition-all shadow-2xs"
        >
          <Icon name="bx:bxl-apple" class="w-3.5 h-3.5" />
          <span>macOS</span>
        </a>
        <a
          href="https://github.com/tianma-if/edgeever/releases/latest"
          target="_blank"
          rel="noopener"
          class="inline-flex min-h-11 sm:min-h-0 items-center gap-1.5 px-2.5 py-1 rounded-lg bg-slate-100/90 hover:bg-emerald-50 hover:text-emerald-700 hover:border-emerald-300 border border-slate-200/80 text-[11px] font-medium text-slate-700 transition-all shadow-2xs"
        >
          <Icon name="bx:bxl-windows" class="w-3.5 h-3.5" />
          <span>{copy.windows}</span>
        </a>
        <a
          href="https://github.com/tianma-if/edgeever/releases/latest"
          target="_blank"
          rel="noopener"
          class="inline-flex min-h-11 sm:min-h-0 items-center gap-1.5 px-2.5 py-1 rounded-lg bg-slate-100/90 hover:bg-emerald-50 hover:text-emerald-700 hover:border-emerald-300 border border-slate-200/80 text-[11px] font-medium text-slate-700 transition-all shadow-2xs"
        >
          <Icon name="simple-icons:linux" class="w-3.5 h-3.5" />
          <span>{copy.linux}</span>
        </a>
        <a
          href={locale === "ja" ? "https://apps.apple.com/jp/app/edgeever/id6792625631" : locale === "pl" ? "https://apps.apple.com/pl/app/edgeever/id6792625631" : "https://apps.apple.com/us/app/edgeever/id6792625631"}
          target="_blank"
          rel="noopener"
          class="inline-flex min-h-11 sm:min-h-0 items-center gap-1.5 px-2.5 py-1 rounded-lg bg-slate-100/90 hover:bg-emerald-50 hover:text-emerald-700 hover:border-emerald-300 border border-slate-200/80 text-[11px] font-medium text-slate-700 transition-all shadow-2xs"
        >
          <Icon name="bx:bx-mobile" class="w-3.5 h-3.5" />
          <span>iOS</span>
        </a>
        <a
          href={locale === "ja" ? "https://play.google.com/store/apps/details?id=org.edgeever.mobile&hl=ja" : locale === "pl" ? "https://play.google.com/store/apps/details?id=org.edgeever.mobile&hl=pl" : "https://play.google.com/store/apps/details?id=org.edgeever.mobile"}
          target="_blank"
          rel="noopener"
          class="inline-flex min-h-11 sm:min-h-0 items-center gap-1.5 px-2.5 py-1 rounded-lg bg-slate-100/90 hover:bg-emerald-50 hover:text-emerald-700 hover:border-emerald-300 border border-slate-200/80 text-[11px] font-medium text-slate-700 transition-all shadow-2xs"
        >
          <Icon name="bx:bxl-android" class="w-3.5 h-3.5" />
          <span>Android</span>
        </a>
        <a
          href="https://chromewebstore.google.com/detail/edgeever-web-clipper/gjadpfmanienmlofajibkfkkpfdkclgo"
          target="_blank"
          rel="noopener"
          class="inline-flex min-h-11 sm:min-h-0 items-center gap-1.5 px-2.5 py-1 rounded-lg bg-slate-100/90 hover:bg-emerald-50 hover:text-emerald-700 hover:border-emerald-300 border border-slate-200/80 text-[11px] font-medium text-slate-700 transition-all shadow-2xs"
        >
          <Icon name="bx:bx-extension" class="w-3.5 h-3.5" />
          <span>{copy.clipper}</span>
        </a>
      </div>
    </div>
  </div>

  <!-- macOS Browser Window Mockup (Pireel style) -->
  <div class="animate-rise w-full max-w-full relative z-10 flex justify-center lg:justify-end mt-4 lg:mt-0" style="animation-delay: 320ms;">
    <div class="relative w-full max-w-full sm:max-w-xl animate-float pointer-events-none select-none">
      <!-- Glow Underlay -->
      <div class="absolute -inset-1 bg-gradient-to-r from-emerald-500/20 via-brand/10 to-teal-500/20 rounded-2xl blur-xl opacity-70"></div>
      
      <!-- macOS Window Container -->
      <div class="relative rounded-2xl border border-slate-200/80 bg-white shadow-xl sm:shadow-2xl overflow-hidden max-w-full">
        <!-- macOS Top Header Bar -->
        <div class="flex items-center justify-between border-b border-slate-100 bg-slate-50/90 px-3.5 py-2 backdrop-blur-sm">
          <div class="flex items-center gap-1.5">
            <span class="h-2.5 w-2.5 sm:h-3 sm:w-3 rounded-full bg-[#ff5f57] inline-block"></span>
            <span class="h-2.5 w-2.5 sm:h-3 sm:w-3 rounded-full bg-[#febc2e] inline-block"></span>
            <span class="h-2.5 w-2.5 sm:h-3 sm:w-3 rounded-full bg-[#28c840] inline-block"></span>
          </div>
          <div class="flex items-center gap-1 rounded-full bg-slate-200/60 px-2.5 py-0.5 text-center font-mono text-[10px] sm:text-[11px] text-slate-500 font-medium">
            <svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="text-slate-400 mr-1"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>
            demo.edgeever.org
          </div>
          <div class="w-8 sm:w-10"></div>
        </div>

        <!-- Product Image Preview -->
        <div class="relative bg-slate-900/5 overflow-hidden">
          <Picture
            src={heroProductImage}
            alt={copy.imageAlt}
            widths={[480, 720, 960, 1200]}
            sizes="(max-width: 1024px) 100vw, 640px"
            loading="eager"
            format="avif"
            class="w-full object-cover rounded-b-xl pointer-events-none select-none"
          />
        </div>
      </div>
    </div>
  </div>
</main>

<style>
  .hero-slogan {
    font-family:
      "Inter Variable",
      Inter,
      "Hiragino Sans",
      "Hiragino Kaku Gothic ProN",
      "Yu Gothic",
      "PingFang SC",
      "Hiragino Sans GB",
      "Microsoft YaHei",
      ui-sans-serif,
      system-ui,
      sans-serif;
  }
</style>

<script is:inline>
  (function () {
    function formatCount(count) {
      if (typeof count !== "number") return String(count);
      try {
        return new Intl.NumberFormat("en", {
          notation: "compact",
          maximumFractionDigits: 1,
        }).format(count).toLowerCase();
      } catch (e) {
        if (count >= 1000) {
          return (Math.round(count / 100) / 10).toFixed(1).replace(/\.0$/, "") + "k";
        }
        return count.toLocaleString();
      }
    }

    async function fetchGitHubStats() {
      var starEls = document.querySelectorAll("[data-github-stars]");
      var forkEls = document.querySelectorAll("[data-github-forks]");
      if (!starEls.length && !forkEls.length) return;

      // 1. Direct real-time fetch from GitHub API (always fresh, no cache)
      try {
        var res = await fetch("https://api.github.com/repos/tianma-if/edgeever", {
          headers: { Accept: "application/vnd.github.v3+json" },
          cache: "no-store",
        });
        if (res.ok) {
          var data = await res.json();
          if (typeof data.stargazers_count === "number") {
            starEls.forEach(function (el) { el.textContent = formatCount(data.stargazers_count); });
          }
          if (typeof data.forks_count === "number") {
            forkEls.forEach(function (el) { el.textContent = formatCount(data.forks_count); });
          }
          return;
        }
      } catch (e) {
        // Fall back to Shields live JSON endpoint if GitHub API is unavailable/rate-limited
      }

      // 2. Fallback: Shields.io live JSON API (same data source as Readme badges)
      try {
        var responses = await Promise.all([
          fetch("https://img.shields.io/github/stars/tianma-if/edgeever.json", { cache: "no-store" }),
          fetch("https://img.shields.io/github/forks/tianma-if/edgeever.json", { cache: "no-store" }),
        ]);
        if (responses[0].ok) {
          var sData = await responses[0].json();
          var sVal = sData.value || sData.message;
          if (sVal) starEls.forEach(function (el) { el.textContent = sVal; });
        }
        if (responses[1].ok) {
          var fData = await responses[1].json();
          var fVal = fData.value || fData.message;
          if (fVal) forkEls.forEach(function (el) { el.textContent = fVal; });
        }
      } catch (e) {
        // Ignore fallback errors
      }
    }

    fetchGitHubStats();
    document.addEventListener("astro:page-load", fetchGitHubStats);
  })();
</script>