site_main_article_detail.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <html>
  2. <head>
  3. <title>Hello</title>
  4. <link href="{{ url_for('static', path='/style.css') }}" rel="stylesheet">
  5. </head>
  6. <body>
  7. <a href="{{ url_for('index') }}">Homepage</a>
  8. <h1>{{ focused["site_name"] }}</h1>
  9. {% macro article(a) -%}
  10. <a href="{{ url_for('site_main_article_snapshot', id=a['site_id'], snapshot_id=a['featured_article_snapshot_id']) }}">
  11. [{{ a["site_name"] }}] {{ a["title"] }}
  12. </a>
  13. {%- endmacro %}
  14. <div id="article_browser">
  15. <div class="up">
  16. <ul>
  17. {% for a in simultaneous_up %}
  18. <li>{{ article(a) }}</li>
  19. {% endfor %}
  20. </ul>
  21. </div>
  22. <div class="focused">
  23. <a href="{{ focused['url_article'] }}"><h2>{{ focused["title"] }} <img src="{{ url_for('static', path='/external-link.svg') }}" height="30px"></h2></a>
  24. <time datetime="{{ focused['timestamp_virtual'] }}">{{ absolute_datetime(focused["timestamp_virtual"]) }}</time>
  25. <div class="similar">
  26. <h3>Articles similaires</h3>
  27. <ul>
  28. {% for s, distance in similar %}
  29. {% if s["is_main"] %}
  30. <li>{{ article(s) }} [{{ distance | round(3) }}]</li>
  31. {% endif %}
  32. {% endfor %}
  33. </ul>
  34. </div>
  35. </div>
  36. {% if after %}
  37. <div class="after">
  38. {{ article(after) }}
  39. <time class="absolute" datetime="{{ after['timestamp_virtual'] }}">{{ absolute_datetime(after["timestamp_virtual"]) }}</time>
  40. (<time class="relative">{{ duration(focused["timestamp_virtual"], after["timestamp_virtual"]) }}</time>)
  41. </div>
  42. {% endif %}
  43. {% if before %}
  44. <div class="before">
  45. {{ article(before) }}
  46. <time datetime="{{ before['timestamp_virtual'] }}">{{ absolute_datetime(before["timestamp_virtual"]) }}</time>
  47. (<time class="relative">{{ duration(focused["timestamp_virtual"], before["timestamp_virtual"]) }}</time>)
  48. </div>
  49. {% endif %}
  50. <div class="down">
  51. <ul>
  52. {% for a in simultaneous_down %}
  53. <li>{{ article(a) }}</li>
  54. {% endfor %}
  55. </ul>
  56. </div>
  57. </div>
  58. </body>
  59. </html>