site_main_article_detail.html 1.8 KB

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