index.html 3.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. {{range .Songs }}
  31. <div class="row">
  32. <small style="width: 70px">Week {{ .Week }}</small>
  33. <form class="form-inline" method="post" action="/update">
  34. <label class="sr-only" for="artist">Artist</label>
  35. <input class="form-control mb-2 mr-sm-2" name="artist" placeholder="Enter Artist" value="{{ .Artist }}">
  36. <label class="sr-only" for="title">Track title</label>
  37. <input class="form-control mb-2 mr-sm-2" name="title" placeholder="Enter Track title" value="{{ .Title }}">
  38. <label class="sr-only" for="url">Track URL</label>
  39. <input class="form-control mb-2 mr-sm-2" name="url" placeholder="Enter Track title" value="{{ .URL }}">
  40. <div class="form-check mb-2 mr-sm-2">
  41. <input class="form-check-input" style="width: 100px" type="checkbox" name="synced" {{ if .Sync }} checked {{ else }} disabled {{ end }}>
  42. <label class="form-check-label" for="synced">Track is synced</label>
  43. </div>
  44. <input type="hidden" name="week" value="{{ .Week }}">
  45. <button type="submit" class="btn btn-primary mb-2">Update track</button>
  46. </form>
  47. </div>
  48. {{end}}
  49. {{else}}
  50. <form class="form-signin" method="post" action="/login">
  51. <h2 class="form-signin-heading">Please sign in</h2>
  52. <label for="username" class="sr-only">Email address</label>
  53. <input type="text" name="username" class="form-control" placeholder="Username" required autofocus>
  54. <label for="password" class="sr-only">Password</label>
  55. <input type="password" name="password" class="form-control" placeholder="Password" required>
  56. <div class="checkbox">
  57. <label>
  58. <input type="checkbox" name="remember-me" value="remember-me"> Remember me
  59. </label>
  60. </div>
  61. <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
  62. </form>
  63. {{end}}
  64. <hr>
  65. <footer>
  66. <p>&copy; Lamperi 2018</p>
  67. </footer>
  68. </div> <!-- /container -->
  69. <!-- Bootstrap core JavaScript
  70. ================================================== -->
  71. <!-- Placed at the end of the document so the pages load faster -->
  72. <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>
  73. <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
  74. <script src="js/vendor/bootstrap.min.js"></script>
  75. </body>
  76. </html>