index.html 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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> (Login expires {{ .SpotifyExpiry }})</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"><a href="/round/{{ .RoundID }}">{{ .RoundName }}</a></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 URL" 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" checked> Remember me
  64. </label>
  65. </div>
  66. <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
  67. </form>
  68. <hr/>
  69. <a href="/spotify"><button class="btn btn-lg btn-primary btn-block" style="margin-bottom: 1em">Sign in with Spotify</button></a>
  70. {{end}}
  71. <hr>
  72. <footer>
  73. <p>&copy; Lamperi 2018-2019</p>
  74. </footer>
  75. </div> <!-- /container -->
  76. <!-- Bootstrap core JavaScript
  77. ================================================== -->
  78. <!-- Placed at the end of the document so the pages load faster -->
  79. <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>
  80. <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
  81. <script src="js/vendor/bootstrap.min.js"></script>
  82. </body>
  83. </html>