implement activity RSS feed

This commit is contained in:
ghost 2023-10-13 23:06:20 +03:00
parent 60a5593446
commit 35b84546ff
58 changed files with 834 additions and 162 deletions

View file

@ -218,16 +218,18 @@
</tbody>
</table>
</div>
<a name="activity"></a>
<div class="padding-x-24-px padding-t-16-px padding-b-8-px text-center">
<h2>{{ 'Recent activity' | trans }}</h2>
<sub>
<a class="text-color-night margin-x-4-px" href="{{ path('rss_activity_user', { userId : user.id }) }}" title="RSS">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2zm0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2zm.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/>
</svg>
</a>
</sub>
</div>
{% if user.activities %}
<a name="activity"></a>
{#
<div class="padding-x-24-px padding-y-8-px margin-y-16-px">
<h2>{{ 'Last activity' | trans }}</h2>
<sup>
<a href="#">RSS</a>
</sup>
</div>
#}
{% for activity in user.activities %}
<div class="padding-x-24-px padding-y-16-px margin-y-8-px border-radius-3-px background-color-night">
{{ render(controller(

View file

@ -38,15 +38,24 @@
{% for locale in locales %}
{% if locale == user.locale %}
<option value="{{ locale }}" selected="selected">
{{ locale|locale_name(locale)|u.title }}
{{ locale | locale_name(locale) | u.title }}
</option>
{% else %}
<option value="{{ locale }}">
{{ locale|locale_name(locale)|u.title }}
{{ locale | locale_name(locale) | u.title }}
</option>
{% endif %}
{% endfor %}
</select>
<div class="margin-x-8-px display-inline-block">
<a href="https://crowdin.com/project/yggtracker" target="_blank">
<small>{{ 'Join translation' | trans }}</small>
<svg xmlns="http://www.w3.org/2000/svg" width="11" height="11" fill="currentColor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z"/>
<path fill-rule="evenodd" d="M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z"/>
</svg>
</a>
</div>
</td>
</tr>
<tr>
@ -56,7 +65,7 @@
</tr>
<tr>
<td class="padding-t-16-px">
{{ 'Languages' | trans }}
{{ 'Content' | trans }}
</td>
<td class="padding-t-16-px">
{% for locale in locales %}