add more icons

This commit is contained in:
2026-04-25 21:36:21 +03:00
parent 29f2318cba
commit b53556871f
5 changed files with 29 additions and 5 deletions

View File

@@ -9,3 +9,15 @@
{%- macro icn_error(width=48) -%}
<svg height="{{width}}" viewBox="0 0 32 32" width="{{width}}" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="elg1" gradientTransform="matrix(.921875 0 0 .9225 1.249998 1.239999)" gradientUnits="userSpaceOnUse" x1="16" x2="16" y1="0" y2="32"><stop offset=".15427744" stop-color="#de4747"/><stop offset="1" stop-color="#b52222"/></linearGradient><linearGradient id="elg2" gradientUnits="userSpaceOnUse" x1="15.99999832" x2="15.99999832" y1=".126983" y2="31.87301564"><stop offset="0" stop-color="#f09797"/><stop offset=".73127526" stop-color="#d24141"/></linearGradient><filter id="ef1" color-interpolation-filters="sRGB" height="1.09976" width="1" x="0" y="0"><feFlood flood-opacity=".14902" in="SourceGraphic" result="flood"/><feGaussianBlur in="SourceGraphic" result="blur" stdDeviation="0"/><feOffset dx="0" dy="1.5" in="blur" result="offset"/><feComposite in="flood" in2="offset" operator="in" result="comp1"/><feComposite in="SourceGraphic" in2="comp1" operator="over" result="comp2"/></filter><g><circle cx="16" cy="16" fill="#590e0e" fill-opacity=".500866" r="16"/><circle cx="16" cy="16" fill="url(#elg2)" r="15.625" stroke="#7d4d4d" stroke-linecap="round" stroke-linejoin="round" stroke-width=".25"/><ellipse cx="16" cy="16" fill="url(#elg1)" rx="14.75" ry="14.76"/><g fill="#fff"><path d="m8 10 2-2 6 6 6-6 2 2-6 6 6 6-2 2-6-6-6 6-2-2 6-6z" filter="url(#ef1)"/><path d="m29.494141 10.042735a14.75 14.76 0 0 0 -13.494141-8.8027352 14.75 14.76 0 0 0 -13.49414 8.8027352c2.987994-2.3171382 8.240661-4.0429692 13.49414-4.0429692s10.506146 1.725831 13.494141 4.0429692z" fill-opacity=".216645" stroke-linecap="round" stroke-linejoin="round"/></g></g></svg>
{%- endmacro -%}
{%- macro icn_bookmark(width=16) -%}
<svg height="{{width}}" viewBox="0 0 16 16" width="{{width}}" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="blg1" gradientUnits="userSpaceOnUse" x1="8" x2="8" y1="2" y2="14"><stop offset="0" stop-color="#cdcdcd"/><stop offset=".5" stop-color="#e6e6e6"/><stop offset="1" stop-color="#cdcdcd"/></linearGradient><g><path d="m3 1h10c.554 0 1 .446 1 1v9.5l-3.5 3.5h-7.5c-.554 0-1-.446-1-1v-12c0-.554.446-1 1-1z" fill="#515151" stroke-linecap="round" stroke-linejoin="round"/><path d="m3.5 2h9c.277 0 .5.223.5.5v8.5l-3 3h-6.5c-.277 0-.5-.223-.5-.5v-11c0-.277.223-.5.5-.5z" fill="url(#blg1)" stroke-linecap="round" stroke-linejoin="round"/><path d="m4 1v7.0000002l1-1.0000002 1 1.0000002v-7.0000002z" fill="#ff522f"/><path d="m10 13.5 2.5-2.5h-3c1 1 .5 2.5.5 2.5z" fill="#515151"/></g></svg>
{%- endmacro -%}
{%- macro icn_locked(width=16) -%}
<svg height="{{width}}" viewBox="0 0 16 16" width="{{width}}" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>Locked</title><linearGradient id="llg1"><stop offset="0" stop-color="#cc8e17" stop-opacity=".546079"/><stop offset=".34962881" stop-color="#cc7e17" stop-opacity=".202344"/><stop offset=".65078419" stop-color="#cc7e17" stop-opacity=".204745"/><stop offset="1" stop-color="#cc8e17" stop-opacity=".545098"/></linearGradient><linearGradient id="llg2"><stop offset="0" stop-color="#fff" stop-opacity=".748929"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></linearGradient><linearGradient id="llg3"><stop offset="0" stop-color="#ecaa39"/><stop offset="1" stop-color="#ecaa39" stop-opacity="0"/></linearGradient><linearGradient id="llg4" gradientUnits="userSpaceOnUse" x1="3" x2="13" xlink:href="#llg1" y1="12.5" y2="12.5"/><linearGradient id="llg5" gradientUnits="userSpaceOnUse" x1="11.5" x2="11.5" xlink:href="#llg2" y1="7" y2="14"/><linearGradient id="llg6" gradientUnits="userSpaceOnUse" x1="4.5" x2="4.5" xlink:href="#llg2" y1="7" y2="14"/><linearGradient id="llg7" gradientUnits="userSpaceOnUse" x1="3.5" x2="3.5" xlink:href="#llg3" y1="14" y2="7"/><linearGradient id="llg8" gradientUnits="userSpaceOnUse" x1="12.5" x2="12.5" xlink:href="#llg3" y1="14" y2="7"/><radialGradient id="lrg1" cx="8" cy="6.928571" gradientTransform="matrix(0 1.2000001 -.9999999 -.00000004 14.928571 -1.600001)" gradientUnits="userSpaceOnUse" r="5"><stop offset="0" stop-color="#ffeabe"/><stop offset="1" stop-color="#dab270"/></radialGradient><linearGradient id="llg9" gradientUnits="userSpaceOnUse" x1="3" x2="13" xlink:href="#llg1" y1="10.5" y2="10.5"/><linearGradient id="llg10" gradientUnits="userSpaceOnUse" x1="3" x2="13" xlink:href="#llg1" y1="8.5" y2="8.5"/><linearGradient id="llg11" gradientUnits="userSpaceOnUse" x1="8" x2="8" y1="7" y2="7.5"><stop offset="0" stop-color="#eee" stop-opacity=".75476"/><stop offset="1" stop-color="#eee" stop-opacity="0"/></linearGradient><rect fill="#876c3d" height="9" ry="1.5" stroke-linecap="round" stroke-linejoin="round" stroke-width=".250001" width="12" x="2" y="6"/><rect fill="url(#lrg1)" height="7" ry=".5" stroke-linecap="round" stroke-linejoin="round" stroke-width=".25" width="10" x="3" y="7"/><path d="m8 1c-4 0-4 4-4 4v1h1v-1s0-3 3-3 3 3 3 3v1h1v-1s0-4-4-4zm0 2c-2 0-2 2-2 2v1h1v-1s0-1 1-1 1 1 1 1v1h1v-1s0-2-2-2z" fill="#515151"/><path d="m5 6v-1s0-3 3-3 3 3 3 3v1h-1v-1s0-2-2-2-2 2-2 2v1z" fill="#eee"/><path d="m3 12h10v1h-10z" fill="url(#llg4)"/><rect fill="url(#llg5)" height="7" rx=".5" ry="1" width="1" x="11" y="7"/><rect fill="url(#llg6)" height="7" rx=".5" ry="1" width="1" x="4" y="7"/><rect fill="url(#llg7)" height="7" rx=".5" width="1" x="3" y="7"/><rect fill="url(#llg8)" height="7" rx=".5" width="1" x="12" y="7"/><path d="m3 10h10v1h-10z" fill="url(#llg9)"/><path d="m3 8h10v1h-10z" fill="url(#llg10)"/><rect fill="url(#llg11)" height="1" rx=".5" width="10" x="3" y="7"/></svg>
{%- endmacro -%}
{%- macro icn_stickied(width=16) -%}
<svg height="{{width}}" viewBox="0 0 16 16" width="{{width}}" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>Stickied</title><linearGradient id="slg1" gradientUnits="userSpaceOnUse" x1="8" x2="8" y1="2" y2="14"><stop offset="0" stop-color="#f0dd85"/><stop offset=".5" stop-color="#f7ecaf"/><stop offset="1" stop-color="#f0dd85"/></linearGradient><g><path d="m3 2h10c.554 0 1 .446 1 1v7.5l-3.5 3.5h-7.5c-.554 0-1-.446-1-1v-10c0-.554.446-1 1-1z" fill="#6e632e" stroke-linecap="round" stroke-linejoin="round"/><path d="m3.5 3h9c.277 0 .5.223.5.5v6.5l-3 3h-6.5c-.277 0-.5-.223-.5-.5v-9c0-.277.223-.5.5-.5z" fill="url(#slg1)" stroke-linecap="round" stroke-linejoin="round"/><path d="m10 12.5 2.5-2.5h-3c1 1 .5 2.5.5 2.5z" fill="#6e632e"/><ellipse cx="6.5" cy="9.50974" fill-opacity=".355175" rx="2.5" ry="1.49026"/><g transform="matrix(.70710678 .70710678 -.70710678 .70710678 11.449748 -6.763456)"><path d="m7.5 10.5v2.5l.5 1 .5-1v-2.5z" fill="#cfcfcf"/><path d="m7 10.5h.5v2.5l.5 1 .5-1v-2.5h.5v2.5l-1 2-1-2z" fill="#727272"/><ellipse cx="8" cy="9.5" fill="#9a2424" rx="3" ry="1.5"/><path d="m6 9 .5-4h3l.5 4c0 .5-1 1-2 1s-2-.5-2-1z" fill="#c82e2e"/><ellipse cx="8" cy="5" fill="#9a2424" rx="2" ry="1"/><g fill="#d23d3d"><path d="m6 5s.5.5 2 .5 2-.5 2-.5c0 1-2 1-2 1s-2 0-2-1z"/><path d="m5 9.5s.5 1 3 1 3-1 3-1c0 1.5-3 1.5-3 1.5s-3 0-3-1.5z"/></g></g></g></svg>
{%- endmacro -%}

View File

@@ -1,4 +1,4 @@
{%- from 'common/icons.html' import icn_info, icn_warn, icn_error -%}
{%- from 'common/icons.html' import icn_info, icn_warn, icn_error, icn_bookmark -%}
{% macro timestamp(unix_ts) -%}
<span class="timestamp" data-utc="{{ unix_ts }}">{{ unix_ts | ts_datetime('%Y-%m-%d %H:%M')}} <abbr title="Server Time">ST</abbr></span>
@@ -154,7 +154,7 @@
{%- if can_delete -%}
<a class="linkbutton critical" href="{{url_for('posts.delete', post_id=post.id)}}">Delete</a>
{%- endif -%}
<button disabled title="This feature requires JavaScript to be enabled.">Bookmark&hellip;</button>
<button disabled title="This feature requires JavaScript to be enabled.">{{icn_bookmark(24)}}Bookmark&hellip;</button>
</span>
{%- endif -%}
</div>

View File

@@ -1,4 +1,5 @@
{%- from 'common/macros.html' import subheader, timestamp, pager, babycode_editor_component -%}
{%- from 'common/icons.html' import icn_bookmark -%}
{%- from 'common/macros.html' import full_post with context -%}
{%- extends 'base.html' -%}
{%- block title -%}{{thread.title}}{%- endblock -%}
@@ -24,7 +25,7 @@
<a class="linkbutton" href="{{url_for('threads.edit', thread_id=thread.id)}}">Edit</a>
{%- endif -%}
<button>Subscribe</button>
<button disabled title="This feature requires JavaScript to be enabled.">Bookmark&hellip;</button>
<button disabled title="This feature requires JavaScript to be enabled.">{{icn_bookmark(24)}}Bookmark&hellip;</button>
{%- endif -%}
<a href="{{url_for('threads.feed', thread_id=thread.id)}}" class="linkbutton rss">Subscribe via RSS</a>
</fieldset>

View File

@@ -1,4 +1,5 @@
{% from 'common/macros.html' import timestamp, subheader, pager %}
{% from 'common/icons.html' import icn_locked, icn_stickied %}
{%- extends 'base.html' -%}
{%- block title -%}browsing topic {{topic.name}}{%- endblock -%}
{%- block content -%}
@@ -48,7 +49,14 @@
{%- for thread in threads -%}
<div class="topic-info plank">
<div class="title-container">
<span class="info thread-title-counter"><a href="{{url_for('threads.thread_by_id', thread_id=thread.id)}}">{{thread.title}}</a></span>
<span class="info thread-title-counter"><a href="{{url_for('threads.thread_by_id', thread_id=thread.id)}}">{{thread.title}}</a>
</span>
{%- if thread.is_locked -%}
{{icn_locked(24)}}
{%- endif -%}
{%- if thread.is_stickied -%}
{{icn_stickied(24)}}
{%- endif -%}
<ul class="horizontal"></ul>
{%- if thread.posts_count / 10 > 1 -%}
{{pager(0, (((thread.posts_count / 10) | round(0, 'ceil') )| int), 'flex-last', url=url_for('threads.thread_by_id', thread_id=thread.id))}}

View File

@@ -1,5 +1,5 @@
{% from 'common/macros.html' import timestamp, subheader %}
{% from 'common/icons.html' import icn_info, icn_warn, icn_error %}
{% from 'common/icons.html' import icn_locked %}
{%- extends 'base.html' -%}
{%- block content -%}
{%- call() subheader('All topics') -%}
@@ -15,6 +15,9 @@
<div class="topic-info plank">
<div class="title-container">
<a class="info" href="{{url_for('topics.topic_by_id', topic_id=topic.id)}}">{{topic.name}}</a>
{%- if topic.is_locked -%}
{{icn_locked(24)}}
{%- endif -%}
</div>
<div>{{topic.description}}</div>
<ul class="horizontal">