46
46
47
47
48
48
{% for entry in entries %}
49
- < div class ="mb-4 ">
49
+ < div class ="mb-4 " id =" entry-{{ loop.index }} " >
50
50
51
51
< ul class ="list-inline " style ="margin-bottom: 0.125rem ">
52
52
@@ -95,19 +95,37 @@ <h2 class="h5 mb-1" style="font-size: 1.125rem">
95
95
</ p >
96
96
{% endif %}
97
97
98
- < form class ="my-2 ">
99
- {# TODO: aria stuff #}
98
+ < form action =" {{ url_for('.mark_as') }} " method =" post " class ="my-2 ">
99
+ {#- TODO: aria stuff #}
100
100
101
- < button type ="submit " class ="btn btn-outline-secondary btn-sm " style ="width: 4rem ">
101
+ < button type ="submit " name ="read "
102
+ value ="{{ 'false' if entry.read else 'true' }} "
103
+ class ="btn btn-outline-secondary btn-sm{% if entry.read %} active{% endif %} "
104
+ {% if entry.read -%}
105
+ aria-pressed ="true "
106
+ {% endif -%}
107
+ style ="width: 4rem ">
102
108
< i class ="bi bi-check-lg "> </ i >
103
109
</ button >
104
110
105
111
< div class ="btn-group " role ="group " aria-label ="importance ">
106
- < button type ="submit " class ="btn btn-outline-secondary btn-sm " style ="width: 2rem ">
107
- < i class ="bi bi-star "> </ i >
112
+ < button type ="submit " name ="important "
113
+ value ="{{ 'none' if entry.important is true else 'true' }} "
114
+ class ="btn btn-outline-secondary btn-sm {% if entry.important is true %} active{% endif %} "
115
+ {% if entry.important is true -%}
116
+ aria-pressed ="true "
117
+ {% endif -%}
118
+ style ="width: 2rem ">
119
+ < i class ="bi {{ 'bi-star-fill' if entry.important is true else 'bi-star' }} "> </ i >
108
120
</ button >
109
121
110
- < button type ="submit " class ="btn btn-outline-secondary btn-sm " style ="width: 2rem ">
122
+ < button type ="submit " name ="important "
123
+ value ="{{ 'none' if entry.important is false else 'false' }} "
124
+ class ="btn btn-outline-secondary btn-sm {% if entry.important is false %} active{% endif %} "
125
+ {% if entry.important is false -%}
126
+ aria-pressed ="true "
127
+ {% endif -%}
128
+ style ="width: 2rem ">
111
129
< i class ="bi bi-arrow-down "> </ i >
112
130
</ button >
113
131
</ div >
@@ -122,6 +140,13 @@ <h2 class="h5 mb-1" style="font-size: 1.125rem">
122
140
</ a >
123
141
{%- endfor %}
124
142
143
+ < input type ="hidden " name ="feed-url " value ="{{ entry.feed_url }} ">
144
+ < input type ="hidden " name ="entry-id " value ="{{ entry.id }} ">
145
+
146
+ {% set next = loop.index if not loop.last else loop.index - 1 -%}
147
+ < input type ="hidden " name ="next "
148
+ value ="{{ url_for('.entries', **request.args) }}#entry-{{ next }} ">
149
+
125
150
</ form >
126
151
127
152
</ div >
0 commit comments