<commit_before>extends ../layout

block head

block content
  .ui.segment.container
    h1.ui.dividing.header Approval
    form#form.ui.form.mt-top2(method='POST')
      input(type="hidden", name="id", value=data.id)
      h3 Content submitted by #{data.author.name}
      .ui.two.column.stackable.grid.mt-top1
        .two.column.row
          .field.column
            label Media URL (should be .png, .jpg, .webm, youtube links)
            input(type='url', name='url', autocomplete='off' readonly value=data.url)
        .two.column.row
          .field.column
            label Caption
            input(type='text', name='caption', autocomplete='off', value=data.caption)
        .column
          a(href=data.url, target='_blank') Link
          if (data.is_image)
            img.ui.image(src=data.url, style="max-height: 20em")
          else
            if (data.is_webm)
              video(controls, allowFullScreen, mozallowfullscreen, webkitAllowFullScreen)
                source(src=data.url, type="video/webm")
            if (data.is_youtube)
              .ui.embed(data-source='youtube', data-id=data.youtube_id)
        .two.column.row
          .column
            button.ui.primary.button(type="submit", name="approve", value="on") Approve
            button.ui.red.button(type="submit", name="reject", value="on", style="margin-left: 2em") Reject
      .ui.error.message

block tail
  script.
    $(function () {
      $('#form').form({
        on: 'blur',
        fields: {
          caption: 'maxLength[128]'
        }
      })
    })<commit_msg>embed videos<commit_after>extends ../layout

block head

block content
  .ui.segment.container
    h1.ui.dividing.header Approval
    form#form.ui.form.mt-top2(method='POST')
      input(type="hidden", name="id", value=data.id)
      h3 Content submitted by #{data.author.name}
      .ui.two.column.stackable.grid.mt-top1
        .two.column.row
          .field.column
            label Media URL (should be .png, .jpg, .webm, youtube links)
            input(type='url', name='url', autocomplete='off' readonly value=data.url)
        .two.column.row
          .field.column
            label Caption
            input(type='text', name='caption', autocomplete='off', value=data.caption)
        .column
          a(href=data.url, target='_blank') Link
          if (data.is_image)
            img.ui.image(src=data.url, style="max-height: 20em")
          else
            if (data.is_webm)
              video(controls, allowFullScreen, mozallowfullscreen, webkitAllowFullScreen)
                source(src=data.url, type="video/webm")
            if (data.is_youtube)
              .ui.embed(data-source='youtube', data-id=data.youtube_id)
        .two.column.row
          .column
            button.ui.primary.button(type="submit", name="approve", value="on") Approve
            button.ui.red.button(type="submit", name="reject", value="on", style="margin-left: 2em") Reject
      .ui.error.message

block tail
  script.
    $(function () {
      $('.ui.embed').embed()
      $('#form').form({
        on: 'blur',
        fields: {
          caption: 'maxLength[128]'
        }
      })
    })
{'fraction_non_alphanumeric': 0.1461877756773787, 'fraction_numerical': 0.00630119722747322, 'mean_word_length': 2.131163708086785, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5915553', 'n_tokens_mistral': 998, 'n_tokens_neox': 973, 'n_words': 180}