%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home2/rezakur1/www/portfolio/portfolio-rezakurnia/src/components/elements/
Upload File :
Create Path :
Current File : /home2/rezakur1/www/portfolio/portfolio-rezakurnia/src/components/elements/Navbar.astro

---
import BtnLink from "../shared/BtnLink.astro";
import Container from "../shared/Container.astro";
import Navitem from "../shared/Navitem.astro";

const navItems = [
  {
    href: "/",
    text: "Home",
    i18nKey: "nav.home",
  },
  {
    href: "/#about-us",
    text: "About us",
    i18nKey: "nav.about",
  },
  {
    href: "/#portfolio",
    text: "Portfolio",
    i18nKey: "nav.portfolio",
  },
  {
    href: "/#experience",
    text: "Work Experience",
    i18nKey: "nav.experience",
  },
  {
    href: "/#services",
    text: "Services",
    i18nKey: "nav.services",
  },
  {
    href: "/artikel",
    text: "Artikel",
    i18nKey: "nav.articles",
  },
];
---

<header
  class="sticky top-0 z-50 py-3 md:py-4 bg-body/80 backdrop-blur-xl border-b border-box-border">
  <Container>
    <nav
      class="w-full flex justify-between items-center gap-4 lg:gap-8 relative">
      <!-- logo -->
      <div class="min-w-max inline-flex relative">
        <a href="/" class="relative flex items-center gap-3">
          <div class="relative w-7 h-7 overflow-hidden flex rounded-xl">
            <span
              class="absolute w-4 h-4 -top-1 -right-1 bg-green-500 rounded-md rotate-45"
            ></span>
            <span
              class="absolute w-4 h-4 -bottom-1 -right-1 bg-[#FCDC58] rounded-md rotate-45"
            ></span>
            <span
              class="absolute w-4 h-4 -bottom-1 -left-1 bg-primary rounded-md rotate-45"
            ></span>
            <span
              class="absolute w-2 h-2 rounded-full bg-heading-1 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"
            ></span>
          </div>
          <div class="inline-flex text-lg font-semibold text-heading-1">
            Reza Kurnia
          </div>
        </a>
      </div>

      <div
        data-nav-overlay
        aria-hidden="true"
        class="fixed hidden inset-0 lg:!hidden bg-slate-900/30 dark:bg-slate-950/45 backdrop-blur-sm">
      </div>
      <div
        data-navbar
        class="flex h-0 overflow-hidden lg:!h-auto lg:scale-y-100 duration-300 ease-linear flex-col gap-y-6 gap-x-4 lg:gap-x-8 lg:flex-row w-full lg:justify-between lg:items-center absolute lg:relative top-full lg:top-0 bg-body/95 dark:bg-box-bg/95 backdrop-blur-xl border-0 shadow-lg shadow-box-shadow/50 lg:bg-transparent lg:dark:bg-transparent lg:backdrop-blur-none lg:shadow-none">
        <ul
          class="border-t border-box-border lg:border-t-0 px-6 lg:px-0 pt-6 lg:pt-0 flex flex-col lg:flex-row gap-y-4 lg:gap-y-0 gap-x-6 xl:gap-x-8 text-base lg:text-lg text-heading-2 w-full lg:justify-center lg:items-center">
          {
            navItems.map((item) => {
              return <Navitem {...item} />;
            })
          }
        </ul>

        <div
          class="lg:min-w-max flex items-center sm:w-max w-full pb-6 lg:pb-0 border-b border-box-bg lg:border-0 px-6 lg:px-0 lg:pl-4">
          <BtnLink
            text="Get Started"
            i18nKey="nav.getStarted"
            href="/#cta"
            className="flex justify-center w-full sm:w-max"
            variant="primary"
          />
        </div>
      </div>

      <div class="min-w-max flex items-center gap-x-3">
        <!-- <button
          data-switch-lang
          class="outline-none flex items-center justify-center relative text-heading-2 rounded-full px-3 py-1.5 border border-box-border text-xs font-semibold">
          <span data-current-lang>EN</span>
          <span class="sr-only" data-i18n="a11y.switchLanguage"
            >switch language</span
          >
        </button> -->

        <button
          data-switch-theme
          class="outline-none flex relative text-heading-2 rounded-full p-1.5 lg:p-2 border border-box-border">
          <svg
            xmlns="http://www.w3.org/2000/svg"
            fill="none"
            viewBox="0 0 24 24"
            stroke-width="1.5"
            stroke="currentColor"
            class="w-6 h-6 dark:flex hidden">
            <path
              stroke-linecap="round"
              stroke-linejoin="round"
              d="M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"
            ></path>
          </svg>
          <svg
            xmlns="http://www.w3.org/2000/svg"
            fill="none"
            viewBox="0 0 24 24"
            stroke-width="1.5"
            stroke="currentColor"
            class="w-6 h-6 dark:hidden">
            <path
              stroke-linecap="round"
              stroke-linejoin="round"
              d="M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"
            ></path>
          </svg>

          <span class="sr-only" data-i18n="a11y.switchTheme">switch theme</span>
        </button>

        <button
          data-toggle-nav
          data-open-nav="false"
          class="lg:hidden lg:invisible outline-none w-10 h-10 flex flex-col items-center justify-center relative rounded-xl border border-box-border bg-body/95 dark:bg-box-bg/95 backdrop-blur-xl shadow-sm shadow-box-shadow/50">
          <span
            id="line1"
            class="w-5 h-0.5 rounded-full bg-heading-2 transition-all duration-300 ease-linear"
          ></span>
          <span
            id="line2"
            class="w-5 origin-center mt-1 h-0.5 rounded-full bg-heading-2 transition-all duration-300 ease-linear"
          ></span>
          <span
            id="line3"
            class="w-5 mt-1 h-0.5 rounded-full bg-heading-2 transition-all duration-300 ease-linear"
          ></span>
          <span class="sr-only" data-i18n="a11y.toggleNav"
            >toggle navigation</span
          >
        </button>
      </div>
    </nav>
  </Container>
</header>

Zerion Mini Shell 1.0