site_main_article_detail.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. <div class="similar">
  25. <h3>Articles similaires</h3>
  26. <ul>
  27. {% for s, distance in similar %}
  28. {% if s["is_main"] %}
  29. <li>{{ article(s) }} [{{ distance | round(3) }}]</li>
  30. {% endif %}
  31. {% endfor %}
  32. </ul>
  33. </div>
  34. </div>
  35. {% if after %}
  36. <div class="after">
  37. {{ article(after) }} @ {{ after["timestamp_virtual"] }}
  38. </div>
  39. {% endif %}
  40. {% if before %}
  41. <div class="before">
  42. {{ article(before) }} @ {{ before["timestamp_virtual"] }}
  43. </div>
  44. {% endif %}
  45. <div class="down">
  46. <ul>
  47. {% for a in simultaneous_down %}
  48. <li>{{ article(a) }}</li>
  49. {% endfor %}
  50. </ul>
  51. </div>
  52. </div>
  53. </body>
  54. </html>