Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

tapestry.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <!DOCTYPE html>
  2. <html>
  3. <!-- all measurements in vw, i.e., fraction of the width of the display on which the HTML will be opened-->
  4. {% set tapestry_width = 100 %}
  5. {% set fontsize2image_container_width = 1 / 30 %}
  6. {% set image_container_width = (98 / ncols) / (1 + 1.2 * fontsize2image_container_width) %}
  7. {% set fontsize = [image_container_width * fontsize2image_container_width, 0.75]|max %}
  8. {% set image_width = image_container_width / (1 - colorbar2width) %}
  9. {% set image_height = image_width / aspect_ratio %}
  10. <!-- 2vw for margin, border and padding -->
  11. {% set tapestry_height = (image_height + 1.4 * fontsize) * nrows + 2 %}
  12. <style>
  13. * {
  14. margin:0;
  15. padding: 0;
  16. font-size: {{ fontsize }}vw;
  17. }
  18. .thumbnail {grid-area: thumbnail;}
  19. .textbelow {grid-area: textbelow;}
  20. .textrighttop {grid-area: textrighttop;}
  21. .textrightbottom {grid-area: textrightbottom;}
  22. .textrighttop > p, .textrightbottom > p, .textbelow > p{
  23. font-weight: bold;
  24. }
  25. .textrighttop > p {
  26. writing-mode: vertical-rl;
  27. transform: rotate(180deg);
  28. }
  29. .textrightbottom > p {
  30. position: relative;
  31. top: {{ (image_height / 2) - 2 * fontsize }}vw;
  32. /* Safari */
  33. -webkit-transform: rotate(-90deg);
  34. /* Firefox */
  35. -moz-transform: rotate(-90deg);
  36. /* IE */
  37. -ms-transform: rotate(-90deg);
  38. /* Opera */
  39. -o-transform: rotate(-90deg);
  40. white-space: nowrap;
  41. }
  42. div > img {
  43. width: {{ image_width }}vw;
  44. height:{{ image_height }}vw;
  45. margin-left: auto;
  46. margin-right: auto;
  47. display: block;
  48. overflow: hidden;}
  49. .grid-container{
  50. display: grid;
  51. grid-template-columns: {{ image_container_width }}vw {{ 1.2 * fontsize }}vw;
  52. grid-template-rows: {{ image_height / 2 }}vw {{ image_height / 2 }}vw {{ 1.4 * fontsize }}vw;
  53. grid-template-areas:
  54. 'thumbnail textrighttop'
  55. 'thumbnail textrightbottom'
  56. 'textbelow textbelow';
  57. }
  58. .grid-container > div, .tapestry-container{
  59. background-color: {{ bg_color }};
  60. }
  61. .grid-container > div > p{
  62. color: {{ fg_color }};
  63. }
  64. .tapestry-container{
  65. width: {{ tapestry_width }}vw;
  66. height: {{ tapestry_height}}vw;
  67. margin: 0.5vw;
  68. padding: 0.5vw;
  69. border: 0.5vw;
  70. }
  71. table{
  72. overflow: hidden;
  73. }
  74. /* Tooltip container */
  75. .tooltip {
  76. position: relative;
  77. display: inline-block;
  78. border: {{ 0.1 * fontsize }}vw dotted {{ fg_color }};
  79. padding: {{ 0.1 * fontsize}}vw;
  80. }
  81. .tooltip > p{
  82. font-weight: bold;
  83. }
  84. /* Tooltip text */
  85. .tooltip .tooltiptext {
  86. visibility: hidden;
  87. width: {{ image_container_width }}vw;
  88. background-color: {{ bg_color }};
  89. color: {{ fg_color }};
  90. text-align: center;
  91. padding: {{ image_container_width * 0.05 }}vw 0;
  92. /* Position the tooltip text - see examples below! */
  93. position: absolute;
  94. z-index: 2;
  95. bottom: 100%;
  96. left: 0%;
  97. }
  98. /* Show the tooltip text when you mouse over the tooltip container */
  99. .tooltip:hover .tooltiptext {
  100. visibility: visible;
  101. }
  102. </style>
  103. <body>
  104. <div class="tapestry-container">
  105. <table>
  106. {% for patches_row in patches_collection:%}
  107. <tr>
  108. {% for patch in patches_row: %}
  109. <td>
  110. <div class="grid-container">
  111. <div class="thumbnail"><img src="{{ patch.image_relative_path }}"
  112. alt="{{ patch.image_relative_path }}"></div>
  113. <div class="textrightbottom"><p>{{ patch.text_right_bottom }}</p></div>
  114. <div class="textrighttop"><p>{{ patch.text_right_top }}</p></div>
  115. <div class="textbelow">
  116. <div class="tooltip">
  117. <p>{{ patch.text_below }}</p>
  118. <span class="tooltiptext">
  119. <b>Animal:</b> {{ patch.animal }}<br><br>
  120. <b>Flags changed from previous row:</b><br>{{ patch.flag_changes }}
  121. </span>
  122. </div>
  123. {% if patch.movie_file is not none: %}
  124. <a href="{{patch.movie_file}}">(movie)</a>
  125. {% endif %}
  126. </div>
  127. </div>
  128. </td>
  129. {% endfor %}
  130. </tr>
  131. {% endfor %}
  132. </table>
  133. </div>
  134. {% if all_data_limits is not none: %}
  135. <p>
  136. Minimum of lower data limit over all overviews: <b>{{ all_data_limits[0] }}</b><br><br>
  137. Maximum of upper data limit over all overviews: <b>{{ all_data_limits[1] }}</b>
  138. </p>
  139. {% endif %}
  140. </body>
  141. </html>