town.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. {% extends "base_template.html" %}
  2. {% block head %}
  3. <!-- Latest compiled and minified CSS -->
  4. <!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous"> -->
  5. <!-- Optional theme -->
  6. <!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous"> -->
  7. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
  8. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
  9. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
  10. <!-- my css -->
  11. <link rel="stylesheet" type="text/css" href="/static/stops.css">
  12. {% endblock %}
  13. {% block body %}
  14. <div class="container">
  15. <br/>
  16. {% if town.visits %}
  17. <a name="{{town.id}}">
  18. <p class="day-links">Day {{town.day}} thru Day {{town.day + town.visits}} -- {{town.date_}} until {{town.final_date}}</p>
  19. </a>
  20. {% else %}
  21. <a name="{{town.id}}">
  22. <p class="day-links">Day {{town.day}} -- {{town.date_}}</p>
  23. </a>
  24. {% endif %}
  25. <div class="town">
  26. {% if town.visits %}
  27. <h1>{{town.city}}. x{{town.visits + 1}}</h1>
  28. {% else %}
  29. <h1>{{town.city}}.</h1>
  30. {% endif %}
  31. {% if town.photos %}
  32. {% if town.photos|length == 1 %}
  33. <img src="/static/photos/{{ town.photos[0].filename }}" class="townphoto solophoto">
  34. {% else %}
  35. <div id="{{town.id}}-carousel" class="carousel slide" data-ride="carousel" data-interval="false">
  36. <!-- Indicators -->
  37. <ol class="carousel-indicators">
  38. {% for i in range(town.photos|length) %}
  39. {% if i == 0 %}
  40. <li data-target="#{{town.id}}-carousel" data-slide-to="{{i}}" class="active"></li>
  41. {% else %}
  42. <li data-target="#{{town.id}}-carousel" data-slide-to="{{i}}"></li>
  43. {% endif %}
  44. {% endfor %}
  45. </ol>
  46. <div class="carousel-inner">
  47. {% for i in range(town.photos|length) %}
  48. {% if i == 0 %}
  49. <div class="item active">
  50. <img src="/static/photos/{{town.photos[i].filename }}" class="townphoto">
  51. {% if town.photos[i].comments %}
  52. <div class="carousel-caption d-none d-md-block">
  53. <p>{{ town.photos[i].comments }}</p>
  54. </div>
  55. {% endif %}
  56. </div>
  57. {% else %}
  58. <div class="item">
  59. <img src="/static/photos/{{town.photos[i].filename }}" class="townphoto" >
  60. {% if town.photos[i].comments %}
  61. <div class="carousel-caption d-none d-md-block">
  62. <p>{{ town.photos[i].comments }}</p>
  63. </div>
  64. {% endif %}
  65. </div>
  66. {% endif %}
  67. {% endfor %}
  68. </div>
  69. <a class="left carousel-control" href="#{{town.id}}-carousel" data-slide="prev">
  70. <span class="glyphicon glyphicon-chevron-left"></span>
  71. <span class="sr-only">Previous</span>
  72. </a>
  73. <a class="right carousel-control" href="#{{town.id}}-carousel" data-slide="next">
  74. <span class="glyphicon glyphicon-chevron-right"></span>
  75. <span class="sr-only">Next</span>
  76. </a>
  77. </div>
  78. {% endif %}
  79. {% endif %}
  80. {% set city_html = 'stops/' + town.id + '.html' %}
  81. {% include city_html ignore missing %}
  82. </div>
  83. </div>
  84. {% endblock %}