{{ define "main" }}
  <main class="landing">
    <section class="hero maxw">
      <div class="hero-copy">
        <h1>The streaming companion for power users</h1>
        <p>
          strimertül is a free and open source tool to add to your Twitch
          streams for creating powerful overlays and power-up the viewer
          interaction!
        </p>
        <div id="download">
          <div id="download-template">
            {{ $releases := where .Site.RegularPages "Section" "releases" }}
            {{ $stable := where $releases "Params.prerelease" false }}
            {{ $latest := index $stable 0 }}
            {{ with $latest }}
              <h2>
                Latest stable release:
                <a href="{{ .RelPermalink }}"
                  ><span data-field="name">{{ .Title }}</span> (<time
                    date="{{ .Date | time.Format "2006-01-02" }}"
                    >{{ .Date | time.Format "2006-01-02" }}</time
                  >)</a
                >
              </h2>
              {{ with .Params.downloads }}
                <div class="download-list">
                  <b>Downloads:</b>

                  {{ range . }}
                    <a class="download-link" href="{{ .url }}">{{ .target }}</a>
                  {{ end }}
                </div>
              {{ end }}
            {{ end }}
            <p>or browse <a href="/releases/">all releases</a></p>
          </div>
        </div>
      </div>
    </section>
    <section class="features">
      <article>
        <div class="maxw">
          <div class="flex">
            <div>
              <header>One API for everything</header>
              <p>
                Build overlays and tooling with easy access to Twitch alerts,
                chat messages and more through a single websocket interface. The
                API strives for simplicity with a
                <a
                  href="https://git.sr.ht/~ashkeel/kilovolt/tree/main/item/PROTOCOL.md"
                  >documented protocol</a
                >, but there are also officially supported bindings for popular
                languages such as
                <a href="https://git.sr.ht/~ashkeel/kilovolt-client-ts"
                  >Typescript</a
                >,
                <a href="https://git.sr.ht/~ashkeel/kilovolt-client-go">Go</a>
                and
                <a href="https://git.sr.ht/~ashkeel/kilovolt-client-python"
                  >Python</a
                >.
              </p>
            </div>
            {{ $image := resources.Get "landing/websocket.svg" }}
            <img
              class="landing-point"
              src="{{ $image.RelPermalink }}"
              style="width: 200px; padding-left: 20px"
            />
          </div>
        </div>
      </article>
      <article>
        <div class="maxw">
          <div class="flex">
            {{ $image := resources.Get "landing/rewards.png" }}
            <img class="landing-point" src="{{ $image.RelPermalink }}" />
            <div>
              <header>No Twitch Affiliate?</header>
              <p>
                The built-in loyalty system lets regular viewers accrue points,
                claim rewards and contribute towards community goals.
              </p>
            </div>
          </div>
        </div>
      </article>
      <article>
        <div class="maxw">
          <div class="flex">
            <div class="flex-copy">
              <header>Keep total control of your tech</header>
              <p>
                Strimertül runs completely in your computer and has no remote
                components.
              </p>
            </div>
            {{ $image := resources.Get "landing/downloads.png" }}
            <img class="landing-point" src="{{ $image.RelPermalink }}" />
          </div>
        </div>
      </article>
      <article>
        <div class="maxw">
          <div class="flex">
            {{ $image := resources.Get "landing/AGPLv3_Logo.svg" }}
            <img class="landing-point" src="{{ $image.RelPermalink }}" />
            <div>
              <header>Free and won't turn evil</header>
              <p>
                strimertül is free and open source under the
                <a
                  href="https://git.sr.ht/~ashkeel/strimertul/tree/master/item/LICENSE"
                  >AGPLv3</a
                >, a strong
                <a href="https://en.wikipedia.org/wiki/Copyleft"
                  >copyleft license</a
                >, meaning we couldn't close it down even if we wanted!
              </p>
            </div>
          </div>
        </div>
      </article>
    </section>
  </main>
{{ end }}
