diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-16 23:12:40 +1000 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-16 23:12:40 +1000 |
| commit | 0ad1c03997d43e2473039c3991e74bdd0ad9b5c1 (patch) | |
| tree | 9a809e39a5d06aa1dec7eee7400b97e712a01ffd /templates | |
| parent | 47ddd2f8b24b115a26403d7d7a1d8bdcb0da6c5d (diff) | |
Optional "flag style" and "flag alt" modifiers
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/post_reply.html | 4 | ||||
| -rw-r--r-- | templates/post_thread.html | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/templates/post_reply.html b/templates/post_reply.html index 3ae60b0d..635709bc 100644 --- a/templates/post_reply.html +++ b/templates/post_reply.html @@ -29,7 +29,9 @@ [<a style="margin:0;" href="?/IP/{{ post.ip }}">{{ post.ip }}</a>] {% endif %} {% if config.display_flags and post.modifiers.flag %} - <img class="flag" style="width:{{ config.flag_width }}px;height:{{ config.flag_height }}px" src="{{ config.uri_flags|sprintf(post.modifiers.flag) }}"> + <img class="flag" src="{{ config.uri_flags|sprintf(post.modifiers.flag) }}" + style="{% if post.modifiers['flag style'] %}{{ post.modifiers['flag style'] }}{% else %}{{ config.flag_style }}{% endif %}" + {% if post.modifiers['flag alt'] %}title="{{ post.modifiers['flag alt'] | e('html_attr') }}"{% endif %}> {% endif %} <time datetime="{{ post.time|date('%Y-%m-%dT%H:%M:%S') }}{{ timezone() }}">{{ post.time|date(config.post_date) }}</time> </label> diff --git a/templates/post_thread.html b/templates/post_thread.html index f4ca7e72..4630eb40 100644 --- a/templates/post_thread.html +++ b/templates/post_thread.html @@ -83,7 +83,9 @@ [<a style="margin:0;" href="?/IP/{{ post.ip }}">{{ post.ip }}</a>] {% endif %} {% if config.display_flags and post.modifiers.flag %} - <img class="flag" style="width:{{ config.flag_width }}px;height:{{ config.flag_height }}px" src="{{ config.uri_flags|sprintf(post.modifiers.flag) }}"> + <img class="flag" src="{{ config.uri_flags|sprintf(post.modifiers.flag) }}" + style="{% if post.modifiers['flag style'] %}{{ post.modifiers['flag style'] }}{% else %}{{ config.flag_style }}{% endif %}" + {% if post.modifiers['flag alt'] %}title="{{ post.modifiers['flag alt'] | e('html_attr') }}"{% endif %}> {% endif %} <time datetime="{{ post.time|date('%Y-%m-%dT%H:%M:%S') }}{{ timezone() }}">{{ post.time|date(config.post_date) }}</time> </label> |
