You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
2.8 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. {% extends "bootstrap/base.html" %}
  2. {% block title %}Technical Incompetence - Home{% endblock %}
  3. {% block styles %}
  4. {{super()}}
  5. <link rel="icon" type="image/png" href="{{url_for('.static', filename='favicon.png')}}" />
  6. <link rel="stylesheet" href="{{url_for('.static', filename='style.css')}}">
  7. {% if countdown is defined %}
  8. <link rel="stylesheet" href="{{url_for('.static', filename='clock.css')}}">
  9. {% endif %}
  10. {% endblock %}
  11. {% block navbar %}
  12. <nav class="navbar navbar-expand-lg sticky-top navbar-dark bg-dark">
  13. <div class="navbar-brand">Technical Incompetence</div>
  14. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown"
  15. aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
  16. <span class="navbar-toggler-icon"></span>
  17. </button>
  18. <div class="collapse navbar-collapse" id="navbarNavDropdown">
  19. <ul class="navbar-nav">
  20. <li class="nav-item active">
  21. <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
  22. </li>
  23. <li class="nav-item">
  24. <a class="nav-link" href="/games">Games</a>
  25. </li>
  26. </ul>
  27. <form class="form-inline ml-auto">
  28. {% if account_url is defined and account_url != '' %}
  29. <a class="btn btn-primary" href="{{ account_url }}" role="button">My Account</a>
  30. {% endif %}
  31. </form>
  32. </div>
  33. </nav>
  34. {% endblock %}
  35. {% block content %}
  36. <div class="container" style="margin-top: 15px">
  37. {% if search['active'] == True %}
  38. <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
  39. <input type="text" class="form-control" id="search-box" placeholder="Search">
  40. </div>
  41. <br><br>
  42. {% endif %}
  43. {% if countdown is defined %}
  44. {% include "countdown.j2" %}
  45. {% endif %}
  46. <p>{{ description }}</p>
  47. <div class="row">
  48. {% for app in apps %}
  49. {% include "card.j2" %}
  50. {% endfor %}
  51. </div>
  52. </div>
  53. {% endblock %}
  54. {% block scripts %}
  55. {{ super () }}
  56. {% if countdown is defined %}
  57. <script>
  58. const deadline = '{{ countdown['timestamp'] }}';
  59. const tripName = '{{ countdown['name'] }}';
  60. </script>
  61. <script src="{{url_for('.static', filename='clock.js')}}"></script>
  62. {% endif %}
  63. <script>
  64. $("#search-box").keyup(function(event) {
  65. if (event.keyCode === 13) {
  66. window.location = '{{ search['search_url'] }}' + $('#search-box').val();
  67. }
  68. });
  69. $( ".card" ).hover(
  70. function() {
  71. $(this).addClass('shadow-lg').css('cursor', 'pointer');
  72. $(this).addClass('card-hover');
  73. }, function() {
  74. $(this).removeClass('shadow-lg');
  75. $(this).removeClass('card-hover');
  76. });
  77. function goToLink(link) {
  78. window.location = link;
  79. }
  80. </script>
  81. {% endblock %}