| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 | <!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="favicon.ico">
    <title>LevyraatiBot</title>
    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="css/jumbotron.css" rel="stylesheet">
  </head>
  <body>
    <!-- Main jumbotron for a primary marketing message or call to action -->
    <div class="jumbotron">
      <div class="container">
        {{if .Username}}
        <h1 class="display-3">Hello {{ .Username }}!</h1>
        <p>Please fill in the songs for year 2018.</p>
        {{else}}
        <h1 class="display-3">Please log in</h1>
        <p>Login to fill in the songs for year 2018.</p>
        {{end}}
      </div>
    </div>
    <div class="container">
        {{if .Username }}
        {{if .Spotify}}
        <p>You are logged to Spotify as <strong>{{ .Spotify }}</strong> (Login expires {{ .SpotifyExpiry }})</p>
        {{else}}
        <a href="/spotify"><button style="margin-bottom: 1em">Login with Spotify</button></a>
        {{end}}
        {{range .Songs }}
        <div class="row">
            <small style="width: 70px">{{ .RoundName }}</small>
            <form class="form-inline" method="post" action="/update">
                <label class="sr-only" for="artist">Artist</label>
                <input class="form-control mb-2 mr-sm-2" name="artist" placeholder="Enter Artist"  value="{{ .Artist }}">
                
                <label class="sr-only" for="title">Track title</label>
                <input class="form-control mb-2 mr-sm-2" name="title" placeholder="Enter Track title"  value="{{ .Title }}">
                
                <label class="sr-only" for="url">Track URL</label>
                <input class="form-control mb-2 mr-sm-2" name="url" placeholder="Enter Track title" value="{{ .URL }}">
                
                <div class="form-check mb-2 mr-sm-2">
                    <input class="form-check-input" style="width: 100px" type="checkbox" name="synced" {{ if .Sync }} checked {{ else }} disabled {{ end }}>
                    <label class="form-check-label" for="synced">Track is synced</label>
                </div>
                
                <input type="hidden" name="round" value="{{ .RoundID }}">
                <button type="submit" class="btn btn-primary mb-2">Update track</button>
            </form>
            
        </div>
        {{end}}
        {{else}}
        <form class="form-signin" method="post" action="/login">
            <h2 class="form-signin-heading">Please sign in</h2>
            <label for="username" class="sr-only">Email address</label>
            <input type="text" name="username" class="form-control" placeholder="Username" required autofocus>
            <label for="password" class="sr-only">Password</label>
            <input type="password" name="password" class="form-control" placeholder="Password" required>
            <div class="checkbox">
                <label>
                    <input type="checkbox" name="remember-me" value="remember-me"> Remember me
                </label>
            </div>
            <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
        </form>
    {{end}}
      <hr>
      <footer>
        <p>© Lamperi 2018</p>
      </footer>
    </div> <!-- /container -->
    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
    <script src="js/vendor/bootstrap.min.js"></script>
  </body>
</html>
 |