site_main_article_detail.html 1.8 KB

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