extends templates/base.pug

block js
  script(type='application/javascript' defer src='/static/openpgp.min.js' charset='utf-8')
  script(type='application/javascript' defer src='/static/doip.min.js' charset='utf-8')
  script(type='application/javascript' defer src='/static/kx-claim.js' charset='utf-8')
  script(type='application/javascript' defer src='/static/scripts.js' charset='utf-8')

block content
  .demo.narrow
    kx-claim.kx-item(data-claim= demoData data-skip="true")
      details
        summary
          .info
            p.subtitle= demoData.matches[0].serviceprovider.name
            p.title= demoData.matches[0].profile.display
          .icons
            .verificationStatus(data-value='running' aria-hidden='true')
              .inProgress
        .content
          .subsection
            img(src='/static/img/link.png' alt='')
            div
              if (demoData.matches[0].profile.uri)
                p Profile link: 
                  a(rel='me' href=demoData.matches[0].profile.uri)= demoData.matches[0].profile.uri
              else
                p Profile link: not accessible from browser
              if (demoData.matches[0].proof.uri)
                p Proof link: 
                  a(rel='me' href=demoData.matches[0].proof.uri)= demoData.matches[0].proof.uri
              else
                p Proof link: not accessible from browser
                
  .narrow
    #search.form-wrapper.card
      h2 Generate a profile
      form(action="post")
        label(for="query") Query for fingerprint or email identifier
        input#query(type="search" name="query" required placeholder="3637202523e7c1309ab79e99ef2dc5827b445f4b, test@doip.rocks")

        fieldset(aria-role="radiogroup").radio-wrapper
          legend Protocol
          input#protocol-hkp(type="radio" name="protocol" value="hkp" checked="true")
          label(for="protocol-hkp" tabindex="0") HKP
          input#protocol-wkd(type="radio" name="protocol" value="wkd")
          label(for="protocol-wkd" tabindex="0") WKD
          input#protocol-sig(type="radio" name="protocol" value="sig")
          label(for="protocol-sig" tabindex="0") Signature
        input(type="submit" value="Generate profile")

  if highlights.length > 0
    h2 Highlights
    .hcards.hcards--highlights
      each hl in highlights
        .card.card--small-profile
          h3.name= hl.name
          p
            span.fingerprint= hl.fingerprint
            br
            span.details= hl.description
          .spacer
          p
            a(href=`/${hl.fingerprint}`).button.full-width View profile
      - var n = 0
      while n < 3-highlights.length
        .card.card--small-profile-dummy
        - n++

  h2 About Keyoxide
  .hcards.hcards--features.hcards--max-3
    .card
      h3 Online identity
      p Establish an identity by verifiably linking your online accounts. 
        a(href='/about#basic') Read&nbsp;more
    .card
      h3 Decentralized
      p No central server or database. Control how your data is stored and accessed. 
        a(href='/about#decentralized') Read&nbsp;more
    .card
      h3 Privacy
      p No data is collected. Your data is yours and yours only. 
        a(href='/privacy') Read&nbsp;more
    .card
      h3 Cryptography
      p Your online identity verifiably signed with widely-used OpenPGP. 
        a(href='/about#cryptography') Read&nbsp;more
    .card
      h3 Open Source
      p All Keyoxide projects are licensed under AGPL-3.0-or-later. 
        a(href='/about#open-source') Read&nbsp;more
    .card
      h3 Transparent funding
      p Funded by donations. Keyoxide stands against VC and surveillance capitalism. 
        a(href='/about#funding-and-the-flow-of-money') Read&nbsp;more

  h2 Fund the project
  .narrow
    .card
      p
        | The development of Keyoxide and the Decentralized OpenPGP Identity Proofs ecosystem is entirely funded by donations.
      p
        | The Keyoxide project was awarded a NGI Zero grant from the 
        a(href='https://nlnet.nl/') NLnet Foundation
        | .
      p
        | We rely on your support to keep working on secure online identity and fight Big&nbsp;Tech's grasp on the internet.
      p
        a.button.button--liberapay(href='https://liberapay.com/Keyoxide/')
          i(class='fa fa-liberapay' aria-hidden='true')
          |  Donate via Liberapay