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.

71 lines
2.1 KiB

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="stylesheet" href="{{url_for('.static', filename='style.css')}}">
  6. {% if countdown is defined %}
  7. <link rel="stylesheet" href="{{url_for('.static', filename='clock.css')}}">
  8. {% endif %}
  9. {% endblock %}
  10. {% block navbar %}
  11. <nav class="navbar navbar-expand-lg sticky-top navbar-dark bg-dark">
  12. <div class="navbar-brand">Technical Incompetence</div>
  13. <form class="form-inline ml-auto">
  14. {% if account_url is defined and account_url != '' %}
  15. <a class="btn btn-primary" href="{{ account_url }}" role="button">My Account</a>
  16. {% endif %}
  17. </form>
  18. </nav>
  19. {% endblock %}
  20. {% block content %}
  21. <div class="container" style="margin-top: 15px">
  22. {% if search['active'] == True %}
  23. <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
  24. <input type="text" class="form-control" id="search-box" placeholder="Search">
  25. </div>
  26. <br><br>
  27. {% endif %}
  28. {% if countdown is defined %}
  29. {% include "countdown.j2" %}
  30. {% endif %}
  31. <p>{{ description }}</p>
  32. <div class="row">
  33. {% for app in apps %}
  34. {% include "card.j2" %}
  35. {% endfor %}
  36. </div>
  37. </div>
  38. {% endblock %}
  39. {% block scripts %}
  40. {{ super () }}
  41. {% if countdown is defined %}
  42. <script>
  43. const deadline = '{{ countdown['timestamp'] }}';
  44. const tripName = '{{ countdown['name'] }}';
  45. </script>
  46. <script src="{{url_for('.static', filename='clock.js')}}"></script>
  47. {% endif %}
  48. <script>
  49. $("#search-box").keyup(function(event) {
  50. if (event.keyCode === 13) {
  51. window.location = '{{ search['search_url'] }}' + $('#search-box').val();
  52. }
  53. });
  54. $( ".card" ).hover(
  55. function() {
  56. $(this).addClass('shadow-lg').css('cursor', 'pointer');
  57. $(this).addClass('card-hover');
  58. }, function() {
  59. $(this).removeClass('shadow-lg');
  60. $(this).removeClass('card-hover');
  61. });
  62. function goToLink(link) {
  63. window.location = link;
  64. }
  65. </script>
  66. {% endblock %}