forked from MarseyWorld/MarseyWorld
Add uid data attributes to vote listing templates.
As a stopgap instead of providing proper API access to vote listings, expose the user ID of a voter as a data attribute in the DOM so automated consumers can easily scrape user IDs of voters, rather than having to make additional requests to turn a username into a user ID.master
parent
bce616d624
commit
5f09df467a
|
@ -29,7 +29,7 @@
|
|||
<td>
|
||||
<a style="color:#{{vote.user.name_color}};font-weight:bold" href="/@{{vote.user.username}}">
|
||||
<img loading="lazy" src="{{vote.user.profile_url}}" class="pp20">
|
||||
<span {% if vote.user.patron %}class="patron" style="background-color:#{{vote.user.name_color}}"{% endif %}>
|
||||
<span {% if vote.user.patron %}class="patron" style="background-color:#{{vote.user.name_color}}"{% endif %} data-user-id="{{vote.user.id}}">
|
||||
{{vote.user.username}}
|
||||
</span>
|
||||
</a>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<td>
|
||||
<a style="color:#{{vote.user.name_color}};font-weight:bold" href="/@{{vote.user.username}}">
|
||||
<img loading="lazy" src="{{vote.user.profile_url}}" class="pp20">
|
||||
<span {% if vote.user.patron %}class="patron" style="background-color:#{{vote.user.name_color}}"{% endif %}>
|
||||
<span {% if vote.user.patron %}class="patron" style="background-color:#{{vote.user.name_color}}"{% endif %} data-user-id="{{vote.user.id}}">
|
||||
{{vote.user.username}}
|
||||
</span>
|
||||
</a>
|
||||
|
@ -69,7 +69,7 @@
|
|||
<td>
|
||||
<a style="color:#{{vote.user.name_color}};font-weight:bold" href="/@{{vote.user.username}}">
|
||||
<img loading="lazy" src="{{vote.user.profile_url}}" class="pp20">
|
||||
<span {% if vote.user.patron %}class="patron" style="background-color:#{{vote.user.name_color}}"{% endif %}>
|
||||
<span {% if vote.user.patron %}class="patron" style="background-color:#{{vote.user.name_color}}"{% endif %} data-user-id="{{vote.user.id}}">
|
||||
{{vote.user.username}}
|
||||
</span>
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue