2023-10-20 19:49:01 -07:00
{% macro render_username(user) %}
2023-12-23 16:28:41 -08:00
< span class = "render_username" >
{% if user.deleted %}
[deleted]
{% else %}
2024-01-07 22:41:32 -08:00
{% if user.avatar_id and not low_bandwidth %}
2023-12-23 16:28:41 -08:00
< a href = "/u/{{ user.link() }}" title = "{{ user.ap_id if user.ap_id != none else user.user_name }}" >
2023-12-23 19:20:18 -08:00
< img src = "{{ user.avatar_thumbnail() }}" alt = "Avatar" / > < / a >
2023-12-23 16:28:41 -08:00
{% endif %}
2023-12-31 17:49:15 -08:00
< a href = "/u/{{ user.link() }}" title = "{{ user.ap_id if user.ap_id != none else user.user_name }}" > {{ user.display_name() }}< / a >
2023-12-23 16:28:41 -08:00
{% if user.created_recently() %}
< span class = "fe fe-new-account" title = "New account" > < / span >
{% endif %}
2023-12-26 14:00:30 -08:00
{% if user.reputation < -10 % }
< span class = "fe fe-warning red" title = "Very low reputation. Beware." > < / span >
< span class = "fe fe-warning red" title = "Very low reputation. Beware!" > < / span >
{% elif user.reputation < 0 % }
< span class = "fe fe-warning orangered" title = "Low reputation." > < / span >
{% endif %}
2023-11-29 08:14:22 -08:00
{% endif %}
2023-12-23 16:28:41 -08:00
< / span >
2023-10-20 19:49:01 -07:00
{% endmacro %}
2023-07-27 21:22:12 -07:00
<!doctype html>
< html lang = "en" >
< head >
{% block head %}
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width, user-scalable=no, initial-scale=1, shrink-to-fit=no" >
< meta http-equiv = "Content-Language" content = "en" / >
2023-11-29 10:12:17 -08:00
< link rel = "preconnect" href = "https://cdn.jsdelivr.net" >
< link rel = "preconnect" href = "https://cdnjs.cloudflare.com" crossorigin >
2023-07-27 21:22:12 -07:00
< meta name = "msapplication-TileColor" content = "#007BBF" >
< meta name = "theme-color" content = "#007BBF" >
< meta name = "apple-mobile-web-app-status-bar-style" content = "black-translucent" / >
< meta name = "apple-mobile-web-app-capable" content = "yes" >
< meta name = "mobile-web-app-capable" content = "yes" >
< meta name = "HandheldFriendly" content = "True" >
< meta name = "MobileOptimized" content = "320" >
{% block styles %}
2023-08-22 02:24:11 -07:00
{{ bootstrap.load_css() }}
2023-07-27 21:22:12 -07:00
< link href = "{{ url_for('static', filename='structure.css', changed=getmtime('structure.css')) }}" type = "text/css" rel = "stylesheet" / >
< link href = "{{ url_for('static', filename='styles.css', changed=getmtime('styles.css')) }}" type = "text/css" rel = "stylesheet" / >
2023-12-25 13:49:08 -08:00
{% if markdown_editor %}
< link href = "{{ url_for('static', filename='js/markdown/downarea.css') }}" type = "text/css" rel = "stylesheet" / >
{% endif %}
2023-07-27 21:22:12 -07:00
{% endblock %}
2024-01-05 20:21:39 -08:00
< title > {% if title %}{{ title }}{% else %}{{ _('PieFed') }}{% endif %}< / title >
2023-10-28 01:33:40 -07:00
< link rel = "apple-touch-icon" sizes = "152x152" href = "/static/images/apple-touch-icon.png" >
< link rel = "icon" type = "image/png" sizes = "32x32" href = "/static/images/favicon-32x32.png" >
< link rel = "icon" type = "image/png" sizes = "16x16" href = "/static/images/favicon-16x16.png" >
2023-07-27 21:22:12 -07:00
< link rel = "manifest" href = "/static/site.webmanifest" >
2023-10-28 01:33:40 -07:00
< link rel = "shortcut icon" type = "image/png" href = "/static/images/favicon-32x32.png" >
< link href = '/static/images/favicon.ico' rel = 'icon' type = 'image/x-icon' >
2023-07-27 21:22:12 -07:00
< meta name = "msapplication-TileColor" content = "#da532c" >
< meta name = "msapplication-config" content = "/static/browserconfig.xml" >
< meta name = "theme-color" content = "#ffffff" >
2023-10-02 02:16:44 -07:00
{% if canonical %}
< link rel = "canonical" href = "{{ canonical }}" / >
{% endif %}
2023-10-23 00:18:46 -07:00
{% if description %}
< meta name = "description" content = "{{ description }}" / >
{% endif %}
{% if og_image %}
< meta property = "og:image" content = "{{ og_image }}" / >
{% endif %}
2023-12-11 21:28:49 -08:00
{% if rss_feed %}
< link rel = "alternate" type = "application/rss+xml" title = "{{ rss_feed_name }}" href = "{{ rss_feed }}" / >
{% endif %}
2023-07-27 21:22:12 -07:00
{% endblock %}
< / head >
2023-10-28 01:33:40 -07:00
< body class = "d-flex flex-column" style = "padding-top: 78px;" >
2023-07-27 21:22:12 -07:00
<!-- Page content -->
{% block navbar %}
< nav class = "navbar navbar-expand-lg navbar-light bg-light fixed-top" >
2023-08-29 03:01:06 -07:00
< div class = "container-lg" >
2024-01-07 22:41:32 -08:00
< a class = "navbar-brand" href = "/" > {% if not low_bandwidth %}< img src = "/static/images/logo2.png" alt = "Logo" width = "50" height = "50" / > {% endif %}{{ g.site.name }}< / a >
2024-01-06 13:18:16 -08:00
{% if current_user.is_authenticated %}
< a class = "nav-link d-lg-none" href = "/notifications" >
{% if current_user.unread_notifications %}
< span class = "fe fe-bell red" > < / span > < span class = "red" > {{ current_user.unread_notifications }}< / span >
{% else %}
< span class = "fe fe-bell" > < / span >
{% endif %}
< / a >
{% endif %}
2023-12-23 20:41:34 -08:00
< button id = "navbar-toggler" class = "navbar-toggler" type = "button" data-toggle = "collapse" data-target = "#navbarSupportedContent" aria-controls = "navbarSupportedContent" aria-expanded = "false" aria-label = "Toggle navigation" >
2023-07-27 21:22:12 -07:00
< span class = "navbar-toggler-icon" > < / span >
< / button >
< div class = "collapse navbar-collapse" id = "navbarSupportedContent" role = "navigation" >
< ul class = "nav navbar-nav ml-md-4" >
{% if current_user.is_anonymous %}
2023-08-22 02:24:11 -07:00
< li class = "nav-item" > < a class = "nav-link" href = "/" > {{ _('Home') }}< / a > < / li >
2023-08-29 03:01:06 -07:00
< li class = "nav-item" > < a class = "nav-link" href = "/communities" > {{ _('Communities') }}< / a > < / li >
2023-08-25 20:41:11 -07:00
< li class = "nav-item" > < a class = "nav-link" href = "/auth/login" > {{ _('Log in') }}< / a > < / li >
< li class = "nav-item" > < a class = "nav-link" href = "/auth/register" > {{ _('Register') }}< / a > < / li >
2024-01-04 19:14:55 -08:00
< li class = "nav-item" > < a class = "nav-link" href = "/donate" > {{ _('Donate') }}< / a > < / li >
2023-07-27 21:22:12 -07:00
{% else %}
2023-08-22 02:24:11 -07:00
< li class = "nav-item" > < a class = "nav-link" href = "/" > {{ _('Home') }}< / a > < / li >
2023-08-29 03:01:06 -07:00
< li class = "nav-item" > < a class = "nav-link" href = "/communities" > {{ _('Communities') }}< / a > < / li >
2023-11-30 02:21:37 -08:00
< li class = "nav-item" > < a class = "nav-link" href = "/u/{{ current_user.user_name }}" > {{ _('Account') }}< / a > < / li >
2024-01-04 19:14:55 -08:00
< li class = "nav-item" > < a class = "nav-link" href = "/donate" > {{ _('Donate') }}< / a > < / li >
2023-11-03 01:59:48 -07:00
{% if user_access('change instance settings', current_user.id) %}
< li class = "nav-item" > < a class = "nav-link" href = "/admin/" > {{ _('Admin') }}< / a > < / li >
{% endif %}
2023-08-25 20:41:11 -07:00
< li class = "nav-item" > < a class = "nav-link" href = "/auth/logout" > {{ _('Log out') }}< / a > < / li >
2024-01-06 13:18:16 -08:00
< li class = "nav-item d-none d-md-inline-block" >
2024-01-05 14:01:44 -08:00
< a class = "nav-link" href = "/notifications" >
{% if current_user.unread_notifications %}
< span class = "fe fe-bell red" > < / span > < span class = "red" > {{ current_user.unread_notifications }}< / span >
{% else %}
< span class = "fe fe-bell" > < / span >
{% endif %}
< / a >
< / li >
2023-07-27 21:22:12 -07:00
{% endif %}
< / ul >
< / div >
< / div >
< / nav >
{% endblock %}
{% block content %}
2023-12-21 17:05:39 -08:00
< div id = "outer_container" class = "container-lg flex-shrink-0" >
2023-07-27 21:22:12 -07:00
{% with messages = get_flashed_messages(with_categories=True) %}
{% if messages %}
{% for category, message in messages %}
< div class = "alert alert-{{ category }}" role = "alert" > {{ message }}< / div >
{% endfor %}
{% endif %}
{% endwith %}
{# application content needs to be provided in the app_content block #}
{% block app_content %}{% endblock %}
< / div >
< footer class = "footer mt-auto" >
2023-11-29 20:39:13 -08:00
< p id = "timeSpent" class = "text-center mt-4" title = "This is how long you have spent using PieFed during this month. We hope this use of your time aligns with your priorities and values." > < / p >
2024-01-07 22:41:32 -08:00
{% if not low_bandwidth %}
< p class = "text-center mt-4" > < a href = "https://liberapay.com/PieFed/donate" > < img alt = "Donate using Liberapay" src = "https://liberapay.com/assets/widgets/donate.svg" > < / a > < / p >
{% else %}
< p class = "text-center mt-4" > < a href = "https://liberapay.com/PieFed/donate" > Donate with Liberapay< / a > < / p >
{% endif %}
2024-01-04 17:54:45 -08:00
< p class = "text-center" > < a href = "https://patreon.com/PieFed" > Donate with Patreon< / a > < / p >
2024-01-04 19:14:55 -08:00
< p class = "text-center" > < a href = "https://codeberg.org/rimu/pyfedi" > PieFed is free and open source< / a > < / p >
< p class = "text-center" > < a href = "/privacy" > Privacy policy< / a > < / p >
2023-07-27 21:22:12 -07:00
< / footer >
{% endblock %}
{% block scripts %}
2024-01-07 22:41:32 -08:00
{% if not low_bandwidth %}
2023-10-02 02:16:44 -07:00
{{ str(moment.include_moment()).replace('< script > ' , ' < s c r i p t n o n c e = " ' + s e s s i o n [ ' n o n c e ' ] + ' " > ' ) | s a f e } }
{{ str(moment.lang(g.locale)).replace('< script > ' , ' < s c r i p t n o n c e = " ' + s e s s i o n [ ' n o n c e ' ] + ' " > ' ) | s a f e } }
2024-01-07 22:41:32 -08:00
{% endif %}
2023-07-27 21:22:12 -07:00
{% endblock %}
2024-01-07 22:41:32 -08:00
{% if not low_bandwidth %}
{{ bootstrap.load_js() }}
{% endif %}
2023-07-27 21:22:12 -07:00
< script type = "text/javascript" src = "{{ url_for('static', filename='js/htmx.min.js') }}" > < / script >
< script type = "text/javascript" src = "{{ url_for('static', filename='js/scripts.js', changed=getmtime('js/scripts.js')) }}" > < / script >
2024-01-07 22:41:32 -08:00
{% if markdown_editor and not low_bandwidth %}
2023-12-25 13:49:08 -08:00
< script type = "text/javascript" src = "{{ url_for('static', filename='js/markdown/downarea.js') }}" > < / script >
{% endif %}
2023-07-27 21:22:12 -07:00
{% block end_scripts %}
{% endblock %}
< / body >
< / html >