|
1 | 1 | {% comment %} views {% endcomment %} |
2 | 2 | <button disabled |
3 | | - class="like_unlike border-[1px] rounded-2xl shadow-sm mb-3 cursor-pointer relative transform-[0] font-bold text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4 " |
| 3 | + class="like_unlike border-[1px] rounded-2xl shadow-sm mb-3 cursor-pointer relative transform-[0] font-medium text-[#3e3446] bg-white border-black-2 text-[1.3rem] leading-4 p-4 " |
4 | 4 | type="button"> |
5 | | - <span id="likes" class="flex items-end"> |
6 | | - {{ object.views }} |
| 5 | + <span id="likes" class="flex flex-row gap-2 items-center"> |
| 6 | + {{ object.views }} |
| 7 | + <span>Views</span> |
7 | 8 | <svg xmlns="http://www.w3.org/2000/svg" |
8 | 9 | viewBox="0 0 562 352" |
9 | 10 | height="16px" |
|
14 | 15 | </button> |
15 | 16 | {% comment %} likes {% endcomment %} |
16 | 17 | {% if request.user.is_authenticated %} |
17 | | - <button name="{{ object.pk }}" |
18 | | - data-tooltip-target="tooltip-bottom-{{ object.pk }}-like" |
19 | | - data-tooltip-placement="bottom" |
20 | | - type="submit" |
21 | | - id="like_unlike" |
22 | | - class="like_unlike rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-bold text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4 " |
23 | | - type="button"> |
24 | | - <span id="likes" class="flex items-end"> |
25 | | - {{ likes }} |
| 18 | + <button name="{{ object.pk }}" {% comment %} {{device}} is passed by _like_dislike_share.html {% endcomment %} data-tooltip-target="tooltip-bottom-{{ device }}-like" data-tooltip-placement="bottom" type="submit" id="like_unlike" class="like_unlike rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-medium text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4 " type="button"> |
| 19 | + <span id="likes" class="flex flex-row gap-2 items-center"> |
| 20 | + {{ likes }} |
| 21 | + <span>Likes</span> |
26 | 22 | {% if isLiked %} |
27 | 23 | {% include "./_tooltip3.html" with text="Unlike" sno=object.pk widget="like" %} |
28 | 24 | <svg xmlns="http://www.w3.org/2000/svg" |
|
45 | 41 | </span> |
46 | 42 | </button> |
47 | 43 | {% else %} |
48 | | - <button data-tooltip-target="tooltip-bottom-{{ object.pk }}-like" |
| 44 | + <button data-tooltip-target="tooltip-bottom-{{ device }}-like" |
49 | 45 | data-tooltip-placement="bottom" |
50 | 46 | onclick="window.location.href='/accounts/login'" |
51 | | - class="like_unlike rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-bold text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4 " |
| 47 | + class="like_unlike rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-medium text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4 " |
52 | 48 | type="button"> |
53 | 49 | <span id="likes" class="flex items-end"> |
54 | 50 | {{ likes }} |
|
66 | 62 | {% comment %} dislike {% endcomment %} |
67 | 63 | {% if request.user.is_authenticated %} |
68 | 64 | <button name="{{ object.pk }}" |
69 | | - data-tooltip-target="tooltip-bottom-{{ object.pk }}-dislike" |
| 65 | + data-tooltip-target="tooltip-bottom-{{ device }}-dislike" |
70 | 66 | data-tooltip-placement="bottom" |
71 | 67 | type="submit" |
72 | 68 | id="dislike-btn" |
73 | | - class="dislike rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-bold text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4" |
| 69 | + class="dislike rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-medium text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4" |
74 | 70 | type="button"> |
75 | | - <span id="dislikes" class="flex items-end"> |
76 | | - {{ dislikes }} |
| 71 | + <span id="dislikes" class="flex flex-row gap-2 items-center"> |
| 72 | + {{ dislikes }} |
| 73 | + <span>Dislikes</span> |
77 | 74 | {% if dislikes %} |
78 | 75 | {% include "./_tooltip3.html" with text="Undo Dislike" sno=object.pk widget="dislike" %} |
79 | 76 | <svg xmlns="http://www.w3.org/2000/svg" |
|
96 | 93 | </span> |
97 | 94 | </button> |
98 | 95 | {% else %} |
99 | | - <button data-tooltip-target="tooltip-bottom-{{ object.pk }}-dislike" |
| 96 | + <button data-tooltip-target="tooltip-bottom-{{ device }}-dislike" |
100 | 97 | data-tooltip-placement="bottom" |
101 | 98 | onclick="window.location.href='/accounts/login'" |
102 | | - class="dislike rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-bold text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4 "> |
| 99 | + class="dislike rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-medium text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4 "> |
103 | 100 | <span id="dislikes" class="flex items-end"> |
104 | 101 | {{ dislikes }} |
105 | 102 | {% include "./_tooltip3.html" with text="Login to Dislike" sno=object.pk widget="dislike" %} |
|
116 | 113 | {% comment %} report {% endcomment %} |
117 | 114 | {% if request.user.is_authenticated %} |
118 | 115 | <button name="{{ object.pk }}" |
119 | | - data-tooltip-target="tooltip-bottom-{{ object.pk }}-flags" |
| 116 | + data-tooltip-target="tooltip-bottom-{{ device }}-flags" |
120 | 117 | data-tooltip-placement="bottom" |
121 | 118 | id="flag-unflag" |
122 | | - class="flag-unflag rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-bold text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4 " |
| 119 | + class="flag-unflag rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-medium text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4 " |
123 | 120 | type="button"> |
124 | | - <span id="flags" class="flex items-end"> |
125 | | - {{ flags }} |
| 121 | + <span id="flags" class="flex flex-row gap-2 items-center"> |
| 122 | + {{ flags }} |
| 123 | + <span>Flag</span> |
126 | 124 | {% if isFlagged %} |
127 | 125 | {% include "./_tooltip3.html" with text="Undo Report" sno=object.pk widget="flags" %} |
128 | 126 | <svg xmlns="http://www.w3.org/2000/svg" |
|
145 | 143 | </span> |
146 | 144 | </button> |
147 | 145 | {% else %} |
148 | | - <button data-tooltip-target="tooltip-bottom-{{ object.pk }}-flags" |
| 146 | + <button data-tooltip-target="tooltip-bottom-{{ device }}-flags" |
149 | 147 | data-tooltip-placement="bottom" |
150 | 148 | onclick="window.location.href='/accounts/login'" |
151 | | - class="like_unlike rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-bold text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4 " |
| 149 | + class="like_unlike rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-medium text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4 " |
152 | 150 | type="button"> |
153 | 151 | <span id="flags" class="flex items-end"> |
154 | 152 | {{ flags }} |
|
166 | 164 | {% comment %} bookmark {% endcomment %} |
167 | 165 | {% if request.user.is_authenticated %} |
168 | 166 | <button name="{{ object.pk }}" |
169 | | - data-tooltip-target="tooltip-bottom-{{ object.pk }}-bookmark" |
| 167 | + data-tooltip-target="tooltip-bottom-{{ device }}-bookmark" |
170 | 168 | data-tooltip-placement="bottom" |
171 | | - class="bookmark rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-bold text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4 " |
| 169 | + class="bookmark rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-medium text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4 " |
172 | 170 | type="button"> |
173 | | - <span id="bookmark" class="flex items-end"> |
| 171 | + <span id="bookmark" class="flex flex-row gap-2 items-center"> |
174 | 172 | {% if bookmarked %} |
175 | 173 | {% include "./_tooltip3.html" with text="Undo Bookmark" sno=object.pk widget="bookmark" %} |
| 174 | + <span>Bookmark</span> |
176 | 175 | <svg xmlns="http://www.w3.org/2000/svg" |
177 | 176 | viewBox="0 0 448 512" |
178 | 177 | height="16px" |
|
182 | 181 | </svg> |
183 | 182 | {% else %} |
184 | 183 | {% include "./_tooltip3.html" with text="Bookmark" sno=object.pk widget="bookmark" %} |
| 184 | + <span>Bookmark</span> |
185 | 185 | <svg xmlns="http://www.w3.org/2000/svg" |
186 | 186 | viewBox="0 0 384 512" |
187 | 187 | height="16px" |
|
193 | 193 | </span> |
194 | 194 | </button> |
195 | 195 | {% else %} |
196 | | - <button data-tooltip-target="tooltip-bottom-{{ object.pk }}-bookmark" |
| 196 | + <button data-tooltip-target="tooltip-bottom-{{ device }}-bookmark" |
197 | 197 | data-tooltip-placement="bottom" |
198 | 198 | onclick="window.location.href='/accounts/login'" |
199 | | - class="like_unlike rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-bold text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4 " |
| 199 | + class="like_unlike rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-medium text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4 " |
200 | 200 | type="button"> |
201 | 201 | <span id="bookmark" class="flex items-end"> |
202 | 202 | {{ bookmark }} |
|
212 | 212 | </button> |
213 | 213 | {% endif %} |
214 | 214 | {% comment %} notification {% endcomment %} |
215 | | -<button data-tooltip-target="tooltip-bottom-{{ object.pk }}-notification" |
| 215 | +<button data-tooltip-target="tooltip-bottom-{{ device }}-notification" |
216 | 216 | data-tooltip-placement="bottom" |
217 | | - class="relative inline-block shadow-sm rounded-xl transform-[0] font-bold text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4" |
| 217 | + class="relative inline-block shadow-sm rounded-xl transform-[0] font-medium text-[#3e3446] bg-white border-black-2 text-[#0.875rem] leading-4 p-4" |
218 | 218 | onclick="{% if user.is_authenticated %}subscribe_domain(){% else %}window.location.href=`{% url 'account_login' %}`{% endif %}" |
219 | 219 | id="subscribe_domain_btn"> |
220 | 220 | {% if user.is_authenticated and subscribed_to_domain %} |
221 | 221 | {% include "./_tooltip3.html" with text="Unsubscribe" sno=object.pk widget="notification" %} |
222 | | - <svg viewBox="0 0 16 16" fill="currentColor" height="16px" width="16px"> |
223 | | - <path d="M10.533 14.07h3.466a.76.76 0 0 0 .58-.28.74.74 0 0 0 .19-.57l-.57-6.55a.13.13 0 0 0 0-.06A6.42 6.42 0 0 0 8 0a6.42 6.42 0 0 0-6.18 6.65v.06l-.57 6.55a.74.74 0 0 0 .19.57.76.76 0 0 0 .56.24h3.468A2.64 2.64 0 0 0 8 16a2.64 2.64 0 0 0 2.533-1.93Zm-1.654 0H7.121a1.13 1.13 0 0 0 1.758 0Zm4.32-1.5H2.8l.5-5.79v-.13A4.92 4.92 0 0 1 8 1.54a4.92 4.92 0 0 1 4.7 5.11v.19l.5 5.73Z"> |
224 | | - </path> |
225 | | - </svg> |
| 222 | + <div class="flex flex-row gap-2 items-center"> |
| 223 | + <span>Unsubscribe</span> |
| 224 | + <svg viewBox="0 0 16 16" fill="currentColor" height="16px" width="16px"> |
| 225 | + <path d="M10.533 14.07h3.466a.76.76 0 0 0 .58-.28.74.74 0 0 0 .19-.57l-.57-6.55a.13.13 0 0 0 0-.06A6.42 6.42 0 0 0 8 0a6.42 6.42 0 0 0-6.18 6.65v.06l-.57 6.55a.74.74 0 0 0 .19.57.76.76 0 0 0 .56.24h3.468A2.64 2.64 0 0 0 8 16a2.64 2.64 0 0 0 2.533-1.93Zm-1.654 0H7.121a1.13 1.13 0 0 0 1.758 0Zm4.32-1.5H2.8l.5-5.79v-.13A4.92 4.92 0 0 1 8 1.54a4.92 4.92 0 0 1 4.7 5.11v.19l.5 5.73Z"> |
| 226 | + </path> |
| 227 | + <path d="M.801 16.5a.798.798 0 0 1-.563-.234.786.786 0 0 1 0-1.127L14.635.733a.798.798 0 0 1 1.127 0 .787.787 0 0 1 0 1.127L1.365 16.266A.84.84 0 0 1 .8 16.5Z"> |
| 228 | + </path> |
| 229 | + </svg> |
| 230 | + </div> |
226 | 231 | {% else %} |
227 | 232 | {% include "./_tooltip3.html" with text="Subscribe" sno=object.pk widget="notification" %} |
228 | | - <svg viewBox="0 0 16 16" fill="currentColor" height="16px" width="16px"> |
229 | | - <path d="M10.533 14.07h3.466a.76.76 0 0 0 .58-.28.74.74 0 0 0 .19-.57l-.57-6.55a.13.13 0 0 0 0-.06A6.42 6.42 0 0 0 8 0a6.42 6.42 0 0 0-6.18 6.65v.06l-.57 6.55a.74.74 0 0 0 .19.57.76.76 0 0 0 .56.24h3.468A2.64 2.64 0 0 0 8 16a2.64 2.64 0 0 0 2.533-1.93Zm-1.654 0H7.121a1.13 1.13 0 0 0 1.758 0Zm4.32-1.5H2.8l.5-5.79v-.13A4.92 4.92 0 0 1 8 1.54a4.92 4.92 0 0 1 4.7 5.11v.19l.5 5.73Z"> |
230 | | - </path> |
231 | | - <path d="M.801 16.5a.798.798 0 0 1-.563-.234.786.786 0 0 1 0-1.127L14.635.733a.798.798 0 0 1 1.127 0 .787.787 0 0 1 0 1.127L1.365 16.266A.84.84 0 0 1 .8 16.5Z"> |
232 | | - </path> |
233 | | - </svg> |
| 233 | + <div class="flex flex-row gap-2 items-center"> |
| 234 | + <span>Sububscribe</span> |
| 235 | + <svg viewBox="0 0 16 16" fill="currentColor" height="16px" width="16px"> |
| 236 | + <path d="M10.533 14.07h3.466a.76.76 0 0 0 .58-.28.74.74 0 0 0 .19-.57l-.57-6.55a.13.13 0 0 0 0-.06A6.42 6.42 0 0 0 8 0a6.42 6.42 0 0 0-6.18 6.65v.06l-.57 6.55a.74.74 0 0 0 .19.57.76.76 0 0 0 .56.24h3.468A2.64 2.64 0 0 0 8 16a2.64 2.64 0 0 0 2.533-1.93Zm-1.654 0H7.121a1.13 1.13 0 0 0 1.758 0Zm4.32-1.5H2.8l.5-5.79v-.13A4.92 4.92 0 0 1 8 1.54a4.92 4.92 0 0 1 4.7 5.11v.19l.5 5.73Z"> |
| 237 | + </path> |
| 238 | + </svg> |
| 239 | + </div> |
234 | 240 | {% endif %} |
235 | 241 | </button> |
| 242 | +{% comment %} resolve {% endcomment %} |
| 243 | +{% if request.user.is_superuser or request.user == object.user %} |
| 244 | + <button type="button" |
| 245 | + onclick="resolveIssue()" |
| 246 | + class="rounded-2xl h-auto border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-medium text-white bg-gradient-to-r from-purple-500 via-purple-600 to-purple-700 hover:bg-gradient-to-br focus:outline-none border-black-2 text-[#0.875rem] leading-4 p-4 "> |
| 247 | + {% if status == "open" %} |
| 248 | + Resolve |
| 249 | + {% else %} |
| 250 | + Open Issue |
| 251 | + {% endif %} |
| 252 | + </button> |
| 253 | +{% endif %} |
0 commit comments