<!DOCTYPE html>
<html class="theme--default text-lg sm:text-xl font-light print:text-base">
  <meta charset="UTF-8" />
  <head>
    <title>{{.Metadata.Name}} / {{.Metadata.DisplayName}} is on nostr</title>
    <meta
      name="description"
      content="{{.Npub}} is {{.Metadata.Name}} / {{.Metadata.DisplayName}} public key on nostr"
    />
    <meta property="og:title" content="{{.Title}}" />
    <meta property="og:site_name" content="{{.Npub}}" />
    {{ if not (eq "" .Metadata.Picture) }}
    <meta property="og:image" content="{{.Metadata.Picture}}" />
    <meta property="twitter:image" content="{{.Proxy}}{{.Metadata.Picture}}" />
    {{end}} {{ if not (eq "" .Metadata.About) }}
    <meta property="og:description" content="{{.Metadata.About}}" />
    {{end}}
    <meta property="twitter:card" content="summary" />

    <link rel="canonical" href="https://njump.me/{{.Npub}}" />
    <link
      rel="sitemap"
      type="application/xml"
      title="Sitemap for {{.Npub}}"
      href="/{{.Npub}}.Xml"
    />

    {{template "head_common" .HeadCommonPartial}}
  </head>

  <body
    class="mb-16 print:text-black text-gray-600 dark:text-neutral-50 bg-white dark:bg-neutral-800"
  >
    {{template "top" .}}

    <div class="sm:flex sm:justify-center sm:items-center mx-auto px-4 sm:px-0">
      <div
        class="w-full sm:flex sm:w-9/12 sm:px-4 justify-between overflow-visible gap-10 lg:gap-48vw max-w-screen-2xl print:w-full"
      >
        <header
          class="flex sm:block items-center sm:items-start relative sm:sticky self-start basis-1/4 sm:mt-8 top-auto sm:top-8"
        >
          <div
            class="text-left basis-[64%] overflow-hidden hidden items-center"
            _="on load or scroll from window or resize from window get #profile_name then measure its top, height then if top is less than height / -2 or height is 0 remove .hidden otherwise add .hidden"
          >
            <div class="mb-3 sm:text-center">
              <div class="text-2xl">{{.Metadata.Name}}</div>
              {{if not (eq .Metadata.Name .Metadata.DisplayName)}}
              <div class="text-base text-stone-400">
                {{.Metadata.DisplayName}}
              </div>
              {{end}}
            </div>
          </div>
          <div
            class="max-w-[40%] sm:max-w-full imgclip overflow-hidden basis-2/5 sm:basis-auto"
          >
            <img class="block w-full h-auto" src="{{.Metadata.Picture}}" />
          </div>
        </header>

        <div class="break-words w-full sm:w-1/2 print:w-full">
          <header class="leading-5 mb-6 hidden sm:flex sm:items-center">
            <h1>
              <div id="profile_name" class="text-2xl">{{.Metadata.Name}}</div>
              {{if not (eq .Metadata.Name .Metadata.DisplayName)}}
              <div class="text-xl text-stone-400">
                {{.Metadata.DisplayName}}
              </div>
              {{end}}
            </h1>
          </header>
          <div
            class="h-1.5 mb-6 -ml-4 sm:-ml-2.5 bg-zinc-100 dark:bg-zinc-700 w-1/2"
          ></div>
          <div class="leading-5 mb-6">
            <a
              class="border-b-2 pb-0.5 border-b-gray-300 hover:text-strongpink"
              href="{{.NormalizedAuthorWebsiteURL}}"
              >{{.Metadata.Website}}</a
            >
          </div>
          <div
            class="leading-5 mb-6 prose dark:prose-invert sm:prose-a:text-justify prose-headings:font-light"
          >
            {{.RenderedAuthorAboutText}}
          </div>
          <div
            class="h-1.5 mb-6 -ml-4 sm:-ml-2.5 bg-zinc-100 dark:bg-zinc-700 w-1/3"
          ></div>
          <div class="leading-5 mb-6">
            <div class="text-sm text-strongpink">Public Key</div>
            {{.Npub}}
          </div>
          <div class="leading-5 mb-6">
            <div class="text-sm text-strongpink">NIP-05 Address</div>
            {{.Metadata.NIP05}}
          </div>
          <div class="leading-5 mb-6">
            <div class="text-sm text-strongpink">NIP-57 Address</div>
            {{.Metadata.LUD16}}
          </div>
          <div class="leading-5 mb-6">
            <div class="text-sm text-strongpink">Profile Code</div>
            {{.Nprofile}}
          </div>

          {{ if not (eq 0 (len .AuthorRelays)) }}
          <div class="leading-5 mb-6">
            <div class="text-sm text-strongpink">Publishing to</div>
            {{range $index, $element := .AuthorRelays}}
            <a
              href="/r/{{$element}}"
              class="inline-block max-w-full border mr-1 mt-2 px-2 py-0.5 rounded-lg border-slate-300 hover:text-white hover:bg-strongpink hover:border hover:border-solid hover:border-strongpink"
              >{{$element}}</a
            >
            {{end}}
          </div>
          {{ end }}

          <!---->

          {{template "details" .DetailsPartial}}

          <!---->

          {{if not (eq 0 (len .LastNotes))}}
          <div
            class="h-1.5 mb-6 -ml-4 sm:-ml-2.5 bg-zinc-100 dark:bg-zinc-700 w-1/3"
          ></div>
          <nav class="leading-5 mb-6">
            <h2 class="text-strongpink text-2xl">Last Notes</h2>
            {{range $i, $ee := .LastNotes}}
            <a
              class="block no-underline my-8 hover:pl-4 hover:-ml-6 hover:border-solid hover:border-l-05rem hover:border-l-gray-100 dark:hover:border-l-zinc-700"
              href="/{{$ee.Nevent}}"
            >
              <div
                class="flex flex-row flex-wrap -ml-2.5 mb-1.5 pl-2.5 pb-1 border-solid border-b-4 border-b-gray-100 dark:border-b-neutral-800"
              >
                <div class="text-sm text-strongpink">{{$ee.CreatedAtStr}}</div>
                {{if $ee.IsReply}}
                <div class="text-sm ml-2 text-gray-300 dark:text-gray-400">
                  - reply
                </div>
                {{end}}
              </div>
              <div
                class="basis-full max-h-40 overflow-hidden mt-0.5 hover:text-strongpink"
                _="on load if my scrollHeight > my offsetHeight add .gradient"
              >
                {{$ee.Preview}}
              </div>
            </a>
            {{end}}
          </nav>
          {{end}}

          <div
            class="h-1.5 mb-6 -ml-4 sm:-ml-2.5 bg-zinc-100 dark:bg-zinc-700 w-1/3"
          ></div>
        </div>

        {{template "clients" .ClientsPartial}}
      </div>
    </div>

    {{template "footer" .}}
  </body>
</html>
