veto

Simple Sinatra voting website.
git clone git://git.knutsen.co/veto
Log | Files | Refs | README | LICENSE

index.erb (2236B)


<!DOCTYPE html>
<html>
  <head>
    <title>Veto Vote — Create a Poll</title>
    <%= head_tags %>
  </head>
  <body>
    <div class="container">
      <div class="row">
        <h1>Create a poll</h1>
      </div>

      <form id="create" action="/new" method="POST">
        <div class="row">
          <div class="six columns">
            Poll Title
          </div>
          <div class="six columns in">
            <input type="text" name="title" id="title" autocomplete="off" placeholder="Name of your poll">
          </div>
        </div>

        <div class="row">
          <div class="three columns">
            Poll UID
          </div>
          <div class="three columns right">
            <span class="url"><span>
          </div>
          <div class="six columns in">
            <input type="text" name="code" id="code" autocomplete="off" placeholder="">
          </div>
        </div>

        <div class="row">
          <div class="twelve columns" style="margin-bottom: 1em">
            <input type="checkbox" checked id="other" name="other">
            <label for="other" style="cursor: pointer; user-select: none;">
              Allow for respondents to write in alternative votes?
            </label>
          </div>
        </div>

        <div class="row voting-options">
          <div class="twelve columns">
            <span id="word-primary">Primary </span>Voting Options:
            <ul id="options">
              <div class="option">
                <input type="text" autocomplete="off" name="addition" id="addition" placeholder="...">
                <input type="button" class="add-option" value="Add option">
              </div>
            </ul>
          </div>
        </div>


        <br />
        <input id="submit-poll" type="submit" name="submit" value="Make Poll">
      </form>
    </div>

    <style>
      .github {
        position: fixed;
        bottom: 20px;
        right: 20px;
      }
    </style>
    <a class="github" href="https://github.com/Demonstrandum/Veto">
      <img src="https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/github.svg" alt="GitHub" />
    </a>

    <script src="/main.js"></script>
    <script src="/new.js"></script>
  </body>
</html>