extends ../layouts/main
block content

  form(method="POST", action="/admin/settings").uk-form
    fieldset
      legend Site Information
      .uk-margin
        label(for="name").uk-form-label Site name
        input(id="name", name="name", type="text", maxlength="200", placeholder="Enter site name", value= site.name).uk-input
      .uk-margin
        label(for="description").uk-form-label Site description
        input(id="description", name="description", type="text", maxlength="500", placeholder="Enter site description", value= site.description).uk-input
      .uk-margin
        label(for="company").uk-form-label Company name
        input(id="company", name="company", type="text", maxlength="200", placeholder="Enter company name", value= site.company).uk-input

    fieldset
      legend Network Settings
      p #{site.name} is capable of accepting Core Connect requests from other nodes, issuing them OAuth2 credentials, and offering their services to your node's members. These options control how the system will process these requests when received.
      .uk-margin
        label(for="network-policy").uk-form-label Constellation Policy
        select(id="network-policy", name="networkPolicy").uk-select
          option(value="open", selected= (site.networkPolicy === 'open')) Open (Auto-Accept)
          option(value="controlled", selected= (site.networkPolicy === 'controlled')) Controlled (Approval Required)
          option(value="closed", selected= (site.networkPolicy === 'closed')) Closed (Auto-Reject)

    fieldset
      legend Featured Embed
      textarea(id="featured-embed", name="featuredEmbed", rows="4").uk-textarea.uk-resize-vertical= site.featuredEmbed

    fieldset
      legend Shing.tv Widget Key
      div(uk-grid).uk-grid-small
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="shing-channel-slug").uk-form-label Shing.tv Channel Slug
          input(id="shing-channel-slug", name="shingChannelSlug", type="text", placeholder="Enter Shing.tv channel slug", value= site.shingChannelSlug).uk-input
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="shing-widget-key").uk-form-label Shing.tv Widget Key
          input(id="shing-widget-key", name="shingWidgetKey", type="text", placeholder="Enter Shing.tv widget key", value= site.shingWidgetKey).uk-input

    fieldset
      legend Gab links
      div(uk-grid).uk-grid-small
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="gab-url").uk-form-label Gab Social Profile
          input(id="gab-url", name="gabUrl", type="url", placeholder="Enter Gab profile URL", value= site.gabUrl).uk-input
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="gabtv-url").uk-form-label Gab TV Channel
          input(id="gabtv-url", name="gabtvUrl", type="url", placeholder="Enter Gab TV URL", value= site.gabtvUrl).uk-input
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="shing-url").uk-form-label Shing URL
          input(id="shing-url", name="shingUrl", type="url", placeholder="Enter Shing URL", value= site.shingUrl).uk-input

    fieldset
      legend Social links
      div(uk-grid).uk-grid-small
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="telegram-url").uk-form-label Telegram URL
          input(id="telegram-url", name="telegramUrl", type="url", placeholder="Enter Telegram URL", value= site.telegramUrl).uk-input
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="twitter-url").uk-form-label Twitter URL
          input(id="twitter-url", name="twitterUrl", type="url", placeholder="Enter Twitter URL", value= site.twitterUrl).uk-input
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="facebook-url").uk-form-label Facebook URL
          input(id="facebook-url", name="facebookUrl", type="url", placeholder="Enter Facebook URL", value= site.facebookUrl).uk-input
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="instagram-url").uk-form-label Instagram URL
          input(id="instagram-url", name="instagramUrl", type="url", placeholder="Enter Instagram URL", value= site.instagramUrl).uk-input
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="discord-url").uk-form-label Discord URL
          input(id="discord-url", name="discordUrl", type="url", placeholder="Enter Discord URL", value= site.discordUrl).uk-input

    fieldset
      legend Media Links
      div(uk-grid).uk-grid-small
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="bitchute-url").uk-form-label BitChute URL
          input(id="bitchute-url", name="bitchuteUrl", type="url", placeholder="Enter BitChute URL", value= site.bitchuteUrl).uk-input
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="odysee-url").uk-form-label Odysee URL
          input(id="odysee-url", name="odyseeUrl", type="url", placeholder="Enter Odysee channel URL", value= site.odyseeUrl).uk-input
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="rumble-url").uk-form-label Rumble URL
          input(id="rumble-url", name="rumbleUrl", type="url", placeholder="Enter Rumble channel URL", value= site.rumbleUrl).uk-input
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="twitch-url").uk-form-label Twitch URL
          input(id="twitch-url", name="twitchUrl", type="url", placeholder="Enter Twitch channel URL", value= site.twitchUrl).uk-input
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="youtube-url").uk-form-label YouTube URL
          input(id="youtube-url", name="youtubeUrl", type="url", placeholder="Enter YouTube channel URL", value= site.youtubeUrl).uk-input
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="dlive-url").uk-form-label DLive URL
          input(id="dlive-url", name="dliveUrl", type="url", placeholder="Enter DLive channel URL", value= site.dliveUrl).uk-input
        div(class="uk-width-1-1 uk-width-1-2@m uk-width-1-3@xl")
          label(for="spreaker-url").uk-form-label Spreaker URL
          input(id="spreaker-url", name="spreakerUrl", type="url", placeholder="Enter Spreaker URL", value= site.spreakerUrl).uk-input
    
    button(type="submit").uk-button.dtp-button-primary Save Settings