index.html 4.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  6. <meta name="description" content="">
  7. <meta name="author" content="">
  8. <link rel="icon" href="favicon.ico">
  9. <title>LevyraatiBot</title>
  10. <!-- Bootstrap core CSS -->
  11. <link href="css/bootstrap.min.css" rel="stylesheet">
  12. <!-- Custom styles for this template -->
  13. <link href="css/jumbotron.css" rel="stylesheet">
  14. </head>
  15. <body>
  16. <!-- Main jumbotron for a primary marketing message or call to action -->
  17. <div class="jumbotron">
  18. <div class="container">
  19. {{if .Username}}
  20. <h1 class="display-3">Hello {{ .Username }}!</h1>
  21. <p>Please fill in the songs for year 2018.</p>
  22. {{else}}
  23. <h1 class="display-3">Please log in</h1>
  24. <p>Login to fill in the songs for year 2018.</p>
  25. {{end}}
  26. </div>
  27. </div>
  28. <div class="container">
  29. {{if .Username }}
  30. {{if .Spotify}}
  31. <p>You are logged to Spotify as <strong>{{ .Spotify }}</strong></p>
  32. {{else}}
  33. <a href="/spotify"><button style="margin-bottom: 1em">Login with Spotify</button></a>
  34. {{end}}
  35. {{range .Songs }}
  36. <div class="row">
  37. <small style="width: 70px">{{ .RoundName }}</small>
  38. <form class="form-inline" method="post" action="/update">
  39. <label class="sr-only" for="artist">Artist</label>
  40. <input class="form-control mb-2 mr-sm-2" name="artist" placeholder="Enter Artist" value="{{ .Artist }}">
  41. <label class="sr-only" for="title">Track title</label>
  42. <input class="form-control mb-2 mr-sm-2" name="title" placeholder="Enter Track title" value="{{ .Title }}">
  43. <label class="sr-only" for="url">Track URL</label>
  44. <input class="form-control mb-2 mr-sm-2" name="url" placeholder="Enter Track title" value="{{ .URL }}">
  45. <div class="form-check mb-2 mr-sm-2">
  46. <input class="form-check-input" style="width: 100px" type="checkbox" name="synced" {{ if .Sync }} checked {{ else }} disabled {{ end }}>
  47. <label class="form-check-label" for="synced">Track is synced</label>
  48. </div>
  49. <input type="hidden" name="round" value="{{ .RoundID }}">
  50. <button type="submit" class="btn btn-primary mb-2">Update track</button>
  51. </form>
  52. </div>
  53. {{end}}
  54. {{else}}
  55. <form class="form-signin" method="post" action="/login">
  56. <h2 class="form-signin-heading">Please sign in</h2>
  57. <label for="username" class="sr-only">Email address</label>
  58. <input type="text" name="username" class="form-control" placeholder="Username" required autofocus>
  59. <label for="password" class="sr-only">Password</label>
  60. <input type="password" name="password" class="form-control" placeholder="Password" required>
  61. <div class="checkbox">
  62. <label>
  63. <input type="checkbox" name="remember-me" value="remember-me"> Remember me
  64. </label>
  65. </div>
  66. <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
  67. </form>
  68. {{end}}
  69. <hr>
  70. <footer>
  71. <p>&copy; Lamperi 2018</p>
  72. </footer>
  73. </div> <!-- /container -->
  74. <!-- Bootstrap core JavaScript
  75. ================================================== -->
  76. <!-- Placed at the end of the document so the pages load faster -->
  77. <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>
  78. <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
  79. <script src="js/vendor/bootstrap.min.js"></script>
  80. </body>
  81. </html>