{% from 'components/links.html' import fancy_link %} {% from 'components/fancy_image.html' import background_image %} {% from 'components/image_link.html' import image_link %} {% macro user_header(request, props) %} {% set artist_icon = g.freesites.kemono.user.icon(props.service, props.id) %} {% set artist_banner = g.freesites.kemono.user.banner(props.service, props.id) %} {% set paysite_icons = { 'patreon': '/static/patreon.svg', 'fanbox': '/static/fanbox.svg', 'gumroad': '/static/gumroad.svg', 'subscribestar': '/static/subscribestar.png', 'dlsite': '/static/dlsite.png', 'fantia': '/static/fantia.png', } %}
{{ background_image( artist_banner, is_lazy=false, class_name='user-header__background' ) }} {{ image_link( url=request.path, src=artist_icon, is_lazy=false, is_noop=false, class_name='user-header__avatar' ) }}

{% if props.currentPage == 'dms' %} {{ fancy_link( url= g.freesites.kemono.user.profile(props.service, props.id), text= 'Posts', is_noop= false, class_name= 'user-header__posts' ) }} {% elif props.currentPage == 'posts' and props.dm_count != 0 %} {{ fancy_link( url= request.path ~ "/dms", text= "DMs", is_noop= false, class_name= 'user-header__dms' ) }} {% endif %} {# hiding the icon until the introduction of SVG icons #} {# #} Upload file
{% endmacro %}