You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
4.2 KiB

4 years ago
4 years ago
4 years ago
  1. {% extends "bootstrap/base.html" %}
  2. {% block title %}Read TI Later{% endblock %}
  3. {% block styles %}
  4. {{super()}}
  5. <link rel="stylesheet" href="{{url_for('.static', filename='style.css')}}">
  6. {% endblock %}
  7. {% block navbar %}
  8. <div id="navbar" class="navbar navbar-expand-lg sticky-top navbar-dark bg-dark">
  9. <div class="navbar-brand">Read TI Later</div>
  10. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown"
  11. aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
  12. <span class="navbar-toggler-icon"></span>
  13. </button>
  14. <div class="collapse navbar-collapse" id="navbarNavDropdown">
  15. <ul class="navbar-nav">
  16. {% if request.path == url_for('index') %}
  17. <li class="nav-item active">
  18. {% else %}
  19. <li class="nav-item">
  20. {% endif %}
  21. <a class="nav-link" href="{{ url_for('index') }}">My List</a>
  22. </li>
  23. {% if request.path == url_for('archived') %}
  24. <li class="nav-item active">
  25. {% else %}
  26. <li class="nav-item">
  27. {% endif %}
  28. <a class="nav-link" href="{{ url_for('archived') }}">Archived</a>
  29. </li>
  30. </ul>
  31. <form class="form-inline ml-auto">
  32. <a class="btn btn-primary" href="/save" role="button" style="margin-right: 20px;">Save</a>
  33. <a class="btn btn-primary" href="/logout" role="button">Logout</a>
  34. </form>
  35. </div>
  36. </div>
  37. {% endblock %}
  38. {% block content %}
  39. <div class="wrapper">
  40. <!-- Sidebar -->
  41. <div id="sidebar">
  42. <ul class="list-unstyled components">
  43. {% if request.path == url_for('index') %}
  44. <li class="nav-item active">
  45. {% else %}
  46. <li class="nav-item">
  47. {% endif %}
  48. <a href="{{ url_for('index') }}">
  49. <svg
  50. width="24"
  51. height="24"
  52. fill="none"
  53. stroke="currentColor"
  54. stroke-width="2"
  55. stroke-linecap="round"
  56. stroke-linejoin="round"
  57. style="height: 1rem; vertical-align: middle; margin-bottom: 4px;">
  58. <use xlink:href="{{url_for('.static', filename='feather-sprite.svg')}}#home"/>
  59. </svg>My List
  60. </a>
  61. </li>
  62. {% if request.path == url_for('archived') %}
  63. <li class="nav-item active">
  64. {% else %}
  65. <li class="nav-item">
  66. {% endif %}
  67. <a href="{{ url_for('archived') }}"><svg
  68. width="24"
  69. height="24"
  70. fill="none"
  71. stroke="currentColor"
  72. stroke-width="2"
  73. stroke-linecap="round"
  74. stroke-linejoin="round"
  75. style="height: 1rem; vertical-align: middle; margin-bottom: 4px;">
  76. <use xlink:href="{{url_for('.static', filename='feather-sprite.svg')}}#archive"/>
  77. </svg>Archived</a>
  78. </li>
  79. </ul>
  80. </div>
  81. <!-- Page Content -->
  82. <div id="content">
  83. <form>
  84. <div class="row justify-content-center">
  85. <div class="col-lg-12">
  86. {% for article in articles|reverse %}
  87. <div style="color: black; padding: 10px; margin-bottom: 10px" class="card" id="article">
  88. <a href="/article/{{article[0]}}">{{ article[2] }}</a>
  89. <a href="{{ article[1] }}" target="_blank" style="color: darkgray">{{ article[4] }}</a>
  90. <br>
  91. <span>
  92. <a href="/archive/{{article[0]}}" class='text-success'>Archive</a>
  93. &nbsp;&nbsp;&nbsp;&nbsp;
  94. <a href="/delete/{{article[0]}}" class='text-danger'>Delete</a>
  95. </span>
  96. </div>
  97. {% endfor %}
  98. </div>
  99. </div>
  100. </form>
  101. </div>
  102. </div>
  103. {% endblock %}
  104. {% block scripts %}
  105. {{ super() }}
  106. {% endblock %}