34 lines
1.8 KiB
Django/Jinja
34 lines
1.8 KiB
Django/Jinja
{% set settings = current_user.settings or {} %}
|
|
{% set reply_method = settings.get('reply-method') %}
|
|
|
|
{% if reply_method == 'micropub' and current_user.micropub_endpoint %}
|
|
<form class="micropub-form" action="{{ url_for('api.publish') }}" method="POST">
|
|
<input type="hidden" name="target" value="{{ entry.permalink }}"/>
|
|
<div>
|
|
<textarea class="content" name="content"></textarea>
|
|
<button type="submit" name="action" value="reply"><i class="fa fa-reply"></i></button>
|
|
<button type="submit" name="action" value="repost"><i class="fa fa-retweet"></i></button>
|
|
<button type="submit" name="action" value="like"><i class="fa fa-star"></i></button>
|
|
</div>
|
|
<div class="syndication-toggles">
|
|
{% for target in current_user.get_setting('syndicate-to', []) %}
|
|
<div class="syndication-toggle">
|
|
<input id="sc-{{entry.id}}-{{loop.index}}" type="checkbox" name="syndicate-to[]" value="{{ target }}"{% if entry is syndicated_to(target) %} checked{% endif %} />
|
|
<label for="sc-{{entry.id}}-{{loop.index}}"><img src="{{ target | favicon_for_url }}" alt="{{ target }}" /> {{ target | prettify_url }}</label>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</form>
|
|
<div class="micropub-response">
|
|
</div>
|
|
{% elif reply_method == 'indie-config' %}
|
|
{% for action in settings.get('indie-config-actions', []) %}
|
|
<indie-action with="{{ entry.permalink }}" do="{{ action }}">
|
|
<a class="reply-link" href="#">{{ action | capitalize }}</a>
|
|
</indie-action>
|
|
{% endfor %}
|
|
{% elif reply_method == 'action-urls' %}
|
|
{% for action, url in settings.get('action-urls', []) %}
|
|
<a class="reply-link" href="{{ url | replace('{url}', entry.permalink) }}" target="_blank">{{ action | capitalize }}</a>
|
|
{% endfor %}
|
|
{% endif %}
|