forked from retoor/devplacepy
feat: add reactions, bookmarks, polls modules with session remember config
Add three new feature modules (reactions, bookmarks, polls) with corresponding database tables, indexes, and router registrations. Introduce `SESSION_MAX_AGE_REMEMBER` config for extended session duration, add `get_unread_messages` template global, and include operational defaults for rate limiting and session settings in `site_settings`.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
{% if _poll %}
|
||||
<div class="poll" data-poll-uid="{{ _poll.uid }}">
|
||||
<div class="poll-question">{{ _poll.question }}</div>
|
||||
<div class="poll-options" role="group" aria-label="Poll options">
|
||||
{% for opt in _poll.options %}
|
||||
<button type="button" class="poll-option{% if _poll.my_choice == opt.uid %} chosen{% endif %}" data-option-uid="{{ opt.uid }}" aria-pressed="{% if _poll.my_choice == opt.uid %}true{% else %}false{% endif %}"{% if not user %} disabled{% endif %}>
|
||||
<span class="poll-option-bar" style="width: {{ opt.pct }}%;"></span>
|
||||
<span class="poll-option-label">{{ opt.label }}</span>
|
||||
<span class="poll-option-meta">
|
||||
<span class="poll-option-check"{% if _poll.my_choice != opt.uid %} hidden{% endif %}>✓</span>
|
||||
<span class="poll-option-pct">{{ opt.pct }}%</span>
|
||||
</span>
|
||||
</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="poll-total">{{ _poll.total }} vote{% if _poll.total != 1 %}s{% endif %}{% if not user %} · Log in to vote{% endif %}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user