2024-05-30 02:54:25 -07:00
{% macro render_username(user) -%}
2023-12-23 16:28:41 -08:00
< span class = "render_username" >
2024-05-30 02:54:25 -07:00
{% if user.deleted -%}
2023-12-23 16:28:41 -08:00
[deleted]
2024-05-30 02:54:25 -07:00
{% else -%}
{% 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 }}" >
2024-02-26 00:26:19 -08:00
< img src = "{{ user.avatar_thumbnail() }}" alt = "" loading = "lazy" / > < / a >
2024-05-30 02:54:25 -07: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 >
2024-05-30 02:54:25 -07:00
{% if user.created_recently() -%}
2023-12-23 16:28:41 -08:00
< span class = "fe fe-new-account" title = "New account" > < / span >
2024-05-30 02:54:25 -07:00
{% endif -%}
{% if user.bot -%}
2024-03-20 03:45:26 -07:00
< span class = "fe fe-bot-account" title = "Bot account" > < / span >
2024-05-30 02:54:25 -07:00
{% endif -%}
{% if user.reputation < -10 - % }
2023-12-26 14:00:30 -08:00
< span class = "fe fe-warning red" title = "Very low reputation. Beware." > < / span >
< span class = "fe fe-warning red" title = "Very low reputation. Beware!" > < / span >
2024-05-30 02:54:25 -07:00
{% elif user.reputation < 0 - % }
2023-12-26 14:00:30 -08:00
< span class = "fe fe-warning orangered" title = "Low reputation." > < / span >
2024-05-30 02:54:25 -07:00
{% endif -%}
{% endif -%}
2023-12-23 16:28:41 -08:00
< / span >
2024-05-30 02:54:25 -07:00
{% endmacro -%}
2023-07-27 21:22:12 -07:00
<!doctype html>
< html lang = "en" >
< head >
2024-05-30 02:54:25 -07:00
{% block head -%}
2023-07-27 21:22:12 -07:00
< 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" >
2024-05-30 02:54:25 -07:00
{% block styles -%}
2024-02-11 16:47:23 -08:00
< link href = "{{ url_for('static', filename='bootstrap.css') }}" type = "text/css" rel = "stylesheet" / >
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" / >
2024-02-15 17:07:03 -08:00
< link href = "{{ url_for('static', filename='themes/high_contrast/styles.css') }}" type = "text/css" rel = "alternate stylesheet" title = "High contrast" / >
2024-05-30 02:54:25 -07:00
{% if not low_bandwidth -%}
2023-12-25 13:49:08 -08:00
< link href = "{{ url_for('static', filename='js/markdown/downarea.css') }}" type = "text/css" rel = "stylesheet" / >
2024-03-16 20:09:50 -07:00
< link href = "{{ url_for('static', filename='js/lightbox/baguetteBox.css') }}" type = "text/css" rel = "stylesheet" / >
2024-05-30 02:54:25 -07:00
{% endif -%}
{% if theme() and file_exists('app/templates/themes/' + theme() + '/styles.css') -%}
2024-02-06 20:31:12 -08:00
< link href = "{{ url_for('static', filename='themes/' + theme() + '/styles.css') }}" type = "text/css" rel = "stylesheet" / >
2024-05-30 02:54:25 -07:00
{% endif -%}
{% endblock -%}
2024-01-05 20:21:39 -08:00
< title > {% if title %}{{ title }}{% else %}{{ _('PieFed') }}{% endif %}< / title >
2024-06-14 03:03:47 -07:00
< link rel = "apple-touch-icon" sizes = "152x152" href = "{{ g.site.logo_152 if g.site.logo_152 else '/static/images/apple-touch-icon.png' }}" >
< link rel = "icon" type = "image/png" sizes = "32x32" href = "{{ g.site.logo_32 if g.site.logo_32 else '/static/images/favicon-32x32.png' }}" >
< link rel = "icon" type = "image/png" sizes = "16x16" href = "{{ g.site.logo_16 if g.site.logo_16 else '/static/images/favicon-16x16.png' }}" >
2024-02-27 20:42:49 -08:00
< link rel = "manifest" href = "/static/manifest.json" >
2024-06-14 03:03:47 -07:00
< link rel = "shortcut icon" type = "image/png" href = "{{ g.site.logo_32 if g.site.logo_32 else '/static/images/favicon-32x32.png' }}" >
< link href = "{{ g.site.logo_16 if g.site.logo_16 else '/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" >
2024-05-30 02:54:25 -07:00
{% if canonical -%}
2023-10-02 02:16:44 -07:00
< link rel = "canonical" href = "{{ canonical }}" / >
2024-05-30 02:54:25 -07:00
{% endif -%}
{% if description -%}
2023-10-23 00:18:46 -07:00
< meta name = "description" content = "{{ description }}" / >
2024-05-30 02:54:25 -07:00
{% endif -%}
{% if og_image -%}
2023-10-23 00:18:46 -07:00
< meta property = "og:image" content = "{{ og_image }}" / >
2024-05-30 02:54:25 -07:00
{% endif -%}
{% if rss_feed -%}
2023-12-11 21:28:49 -08:00
< link rel = "alternate" type = "application/rss+xml" title = "{{ rss_feed_name }}" href = "{{ rss_feed }}" / >
2024-05-30 02:54:25 -07:00
{% endif -%}
{% if noindex -%}
2024-03-12 00:58:47 -07:00
< meta name = "robots" content = "noindex" >
2024-05-30 02:54:25 -07:00
{% endif -%}
2024-01-13 01:09:02 -08:00
< script nonce = "{{ session['nonce']}}" >
const getStoredTheme = () => localStorage.getItem('theme')
const setStoredTheme = theme => localStorage.setItem('theme', theme)
const getPreferredTheme = () => {
const storedTheme = getStoredTheme()
if (storedTheme) {
return storedTheme
}
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
}
const setTheme = theme => {
if (theme === 'auto' & & window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.setAttribute('data-bs-theme', 'dark')
} else {
document.documentElement.setAttribute('data-bs-theme', theme)
}
}
setTheme(getPreferredTheme());
< / script >
2024-05-30 02:54:25 -07:00
{% if preconnect and not low_bandwidth -%}
2024-04-23 15:29:14 -07:00
< link rel = "preconnect" href = '{{ preconnect }}' >
2024-05-30 02:54:25 -07:00
{% endif -%}
{% endblock -%}
2023-07-27 21:22:12 -07:00
< / head >
2024-01-12 13:45:39 -08:00
< body class = "d-flex flex-column{{ ' low_bandwidth' if low_bandwidth }}" >
2024-01-22 22:17:05 -08:00
< a href = "#outer_container" class = "skip-link" role = "navigation" aria-label = "Skip main navigation" tabindex = "" > Skip to main content< / a >
2024-02-04 11:39:08 -08:00
< a href = "#side_pane" class = "skip-link" role = "navigation" aria-label = "Go to side pane" tabindex = "" > Go to side pane< / a >
2023-07-27 21:22:12 -07:00
<!-- Page content -->
2024-05-30 02:54:25 -07:00
{% block navbar -%}
2024-02-22 21:41:15 -08:00
< div class = "navbar navbar-expand-lg sticky-md-top" >
2024-01-22 22:17:05 -08:00
< div class = "{{ 'container-lg' if post_layout != 'masonry_wide' else 'container-fluid' }}" role = "banner" >
2024-06-14 03:03:47 -07:00
< a class = "navbar-brand" href = "/" > {% if not low_bandwidth %}< img src = "{{ g.site.logo if g.site.logo else '/static/images/logo2.png' }}" alt = "Logo" width = "50" height = "50" / > {% endif %}{{ g.site.name }}< / a >
2024-05-30 02:54:25 -07:00
{% if current_user.is_authenticated -%}
2024-01-17 19:15:43 -08:00
< a class = "nav-link d-lg-none" href = "/notifications" aria-label = "{{ _('Notifications') }}" >
2024-05-30 02:54:25 -07:00
{% if current_user.unread_notifications -%}
2024-01-06 13:18:16 -08:00
< span class = "fe fe-bell red" > < / span > < span class = "red" > {{ current_user.unread_notifications }}< / span >
2024-05-30 02:54:25 -07:00
{% else -%}
2024-01-06 13:18:16 -08:00
< span class = "fe fe-bell" > < / span >
2024-05-30 02:54:25 -07:00
{% endif -%}
2024-01-06 13:18:16 -08:00
< / a >
2024-05-30 02:54:25 -07:00
{% endif -%}
2024-01-06 13:18:16 -08:00
2024-02-29 01:17:01 -08:00
< button id = "navbar-toggler" class = "navbar-toggler" type = "button" data-toggle = "collapse" data-target = "#navbarSupportedContent" aria-controls = "navbarSupportedContent" aria-expanded = "true" aria-label = "Toggle navigation" >
2023-07-27 21:22:12 -07:00
< span class = "navbar-toggler-icon" > < / span >
< / button >
2024-02-29 01:05:20 -08:00
< div class = "collapse navbar-collapse" id = "navbarSupportedContent" role = "navigation" >
2023-07-27 21:22:12 -07:00
< ul class = "nav navbar-nav ml-md-4" >
{% if current_user.is_anonymous %}
2024-01-11 20:15:08 -08:00
< li class = "nav-item dropdown{% if active_parent == 'home' %} active{% endif %}" >
2024-01-22 22:17:05 -08:00
< a class = "nav-link dropdown-toggle" data-bs-toggle = "dropdown" href = "/home" aria-haspopup = "true" aria-expanded = "false" > {{ _('Home') }}< / a >
2024-01-11 20:15:08 -08:00
< ul class = "dropdown-menu" >
< li > < a class = "dropdown-item{% if active_child == 'popular' %} active{% endif %}" href = "/home" > < span class = "fe fe-home" > < / span > {{ _('Home') }}< / a > < / li >
< li > < a class = "dropdown-item{% if active_child == 'popular' %} active{% endif %}" href = "/popular" > < span class = "fe fe-popular" > < / span > {{ _('Popular') }}< / a > < / li >
< li > < a class = "dropdown-item{% if active_child == 'all_posts' %} active{% endif %}" href = "/all" > < span class = "fe fe-all" > < / span > {{ _('All posts') }}< / a > < / li >
< / ul >
< li class = "nav-item dropdown{% if active_parent == 'communities' %} active{% endif %}" >
2024-01-27 21:11:32 -08:00
< a class = "nav-link dropdown-toggle" data-bs-toggle = "dropdown" href = "/topics" aria-haspopup = "true" aria-expanded = "false" > {{ _('Topics') }}< / a >
2024-01-11 20:15:08 -08:00
< ul class = "dropdown-menu" >
2024-05-30 02:54:25 -07:00
{% if menu_topics %}
{% for topic_menu_item in menu_topics -%}
< li > < a class = "dropdown-item{% if topic and topic.id == topic_menu_item.id%} active{% endif %}" href = "/topic/{{ topic_menu_item.path() }}" > {{ topic_menu_item.name }}< / a > < / li >
{% endfor -%}
2024-05-30 03:31:32 -07:00
< li > < hr class = "dropdown-divider" > < / li >
2024-05-30 02:54:25 -07:00
< li > < a class = "dropdown-item{% if active_child == 'list_topics' %} active{% endif %}" href = "/topics" > {{ _('More topics') }}< / a > < / li >
{% else %}
< li > < a class = "dropdown-item{% if active_child == 'list_topics' %} active{% endif %}" href = "/topics" > {{ _('Browse by topic') }}< / a > < / li >
{% endif %}
2024-04-05 19:24:59 -07:00
< li > < a class = "dropdown-item{% if active_child == 'list_communities' %} active{% endif %}" href = "/communities" > {{ _('All communities') }}< / a > < / li >
2024-01-11 20:15:08 -08:00
< / ul >
< / 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 %}
2024-01-11 20:15:08 -08:00
< li class = "nav-item dropdown{% if active_parent == 'home' %} active{% endif %}" >
2024-01-22 22:17:05 -08:00
< a class = "nav-link dropdown-toggle" data-bs-toggle = "dropdown" href = "/home" aria-haspopup = "true" aria-expanded = "false" > {{ _('Home') }}< / a >
2024-01-11 20:15:08 -08:00
< ul class = "dropdown-menu" >
2024-02-18 18:56:56 -08:00
< li > < a class = "dropdown-item{% if active_child == 'home' %} active{% endif %}" href = "/home" > < span class = "fe fe-home" > < / span > {{ _('Home') }}< / a > < / li >
2024-01-11 20:15:08 -08:00
< li > < a class = "dropdown-item{% if active_child == 'popular' %} active{% endif %}" href = "/popular" > < span class = "fe fe-popular" > < / span > {{ _('Popular') }}< / a > < / li >
2024-02-18 18:56:56 -08:00
< li > < a class = "dropdown-item{% if active_child == 'all' %} active{% endif %}" href = "/all" > < span class = "fe fe-all" > < / span > {{ _('All posts') }}< / a > < / li >
2024-01-11 20:15:08 -08:00
< / ul >
2024-01-11 15:34:08 -08:00
< li class = "nav-item dropdown{% if active_parent == 'communities' %} active{% endif %}" >
2024-01-27 21:11:32 -08:00
< a class = "nav-link dropdown-toggle" data-bs-toggle = "dropdown" href = "/topics" aria-haspopup = "true" aria-expanded = "false" > {{ _('Topics') }}< / a >
2024-01-11 15:34:08 -08:00
< ul class = "dropdown-menu" >
2024-05-30 02:54:25 -07:00
{% if menu_topics -%}
{% for topic_menu_item in menu_topics -%}
< li > < a class = "dropdown-item{% if topic and topic.id == topic_menu_item.id%} active{% endif %}" href = "/topic/{{ topic_menu_item.path() }}" > {{ topic_menu_item.name }}< / a > < / li >
{% endfor -%}
2024-05-30 03:31:32 -07:00
< li > < hr class = "dropdown-divider" > < / li >
2024-05-30 02:54:25 -07:00
< li > < a class = "dropdown-item{% if active_child == 'list_topics' %} active{% endif %}" href = "/topics" > {{ _('More topics') }}< / a > < / li >
{% else -%}
< li > < a class = "dropdown-item{% if active_child == 'list_topics' %} active{% endif %}" href = "/topics" > {{ _('Browse by topic') }}< / a > < / li >
{% endif -%}
< li > < a class = "dropdown-item{% if active_child == 'list_communities' %} active{% endif %}" href = "/communities" > {{ _('All communities') }}< / a > < / li >
2024-01-11 15:34:08 -08:00
{% if moderating_communities %}
2024-04-01 06:30:48 -07:00
< li > < hr class = "dropdown-divider" > < / li >
2024-01-11 15:34:08 -08:00
< li > < h6 class = "dropdown-header" > {{ _('Moderating') }}< / h6 > < / li >
2024-05-30 02:54:25 -07:00
{% for community_menu_item in moderating_communities -%}
2024-02-18 18:56:56 -08:00
< li class = "pl-2" > < a class = "dropdown-item{% if community and community.id == community_menu_item.id%} active{% endif %}" href = "/c/{{ community_menu_item.link() }}" > {{ community_menu_item.title }}< / a > < / li >
2024-05-30 02:54:25 -07:00
{% endfor -%}
2024-01-11 15:34:08 -08:00
{% endif %}
{% if joined_communities %}
2024-04-01 06:30:48 -07:00
< li > < hr class = "dropdown-divider" > < / li >
2024-01-11 15:34:08 -08:00
< li > < h6 class = "dropdown-header" > {{ _('Joined communities') }}< / h6 > < / li >
2024-05-30 02:54:25 -07:00
{% for community_menu_item in joined_communities -%}
2024-02-18 18:56:56 -08:00
< li class = "pl-2" > < a class = "dropdown-item{% if community and community.id == community_menu_item.id%} active{% endif %}" href = "/c/{{ community_menu_item.link() }}" > {{ community_menu_item.title }}< / a > < / li >
2024-05-30 02:54:25 -07:00
{% endfor -%}
2024-01-11 15:34:08 -08:00
{% endif %}
< / ul >
< / li >
< li class = "nav-item dropdown{% if active_parent == 'account' %} active{% endif %}" >
2024-06-03 14:44:10 -07:00
< a class = "nav-link dropdown-toggle" data-bs-toggle = "dropdown" href = "/u/{{ current_user.user_name.lower() }}" aria-haspopup = "true" aria-expanded = "false" > {{ _('Account') }}< / a >
2024-01-11 15:34:08 -08:00
< ul class = "dropdown-menu" >
2024-06-03 14:44:10 -07:00
< li > < a class = "dropdown-item{% if active_child == 'view_profile' %} active{% endif %}" href = "/u/{{ current_user.user_name.lower() }}" > {{ _('View profile') }}< / a > < / li >
2024-03-11 00:18:27 -07:00
< li > < a class = "dropdown-item{% if active_child == 'edit_profile' %} active{% endif %}" href = "/user/settings" > {{ _('Edit profile & settings') }}< / a > < / li >
2024-02-18 18:56:56 -08:00
< li > < a class = "dropdown-item{% if active_child == 'chats' %} active{% endif %}" href = "/chat" > {{ _('Chats') }}< / a > < / li >
2024-01-11 15:34:08 -08:00
< / ul >
< / 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) %}
2024-04-14 01:05:40 -07:00
< li class = "nav-item dropdown{% if active_parent == 'admin' %} active{% endif %}" >
< a class = "nav-link dropdown-toggle" data-bs-toggle = "dropdown" href = "/admin/" aria-haspopup = "true" aria-expanded = "false" > {{ _('Admin') }}< / a >
< ul class = "dropdown-menu" >
< li > < a class = "dropdown-item{{ ' active' if active_child == 'admin_site' }}" href = "{{ url_for('admin.admin_site') }}" > {{ _('Site profile') }}< / a > < / li >
< li > < a class = "dropdown-item{{ ' active' if active_child == 'admin_misc' }}" href = "{{ url_for('admin.admin_misc') }}" > {{ _('Misc settings') }}< / a > < / li >
< li > < a class = "dropdown-item{{ ' active' if active_child == 'admin_communities' }}" href = "{{ url_for('admin.admin_communities') }}" > {{ _('Communities') }}< / a > < / li >
2024-05-18 16:41:02 -07:00
< li > < a class = "dropdown-item{{ ' active' if active_child == 'admin_communities' }}" href = "{{ url_for('admin.admin_communities_no_topic') }}" > {{ _('Communities - no topic') }}< / a > < / li >
2024-04-14 01:05:40 -07:00
< li > < a class = "dropdown-item{{ ' active' if active_child == 'admin_topics' }}" href = "{{ url_for('admin.admin_topics') }}" > {{ _('Topics') }}< / a > < / li >
< li > < a class = "dropdown-item{{ ' active' if active_child == 'admin_users' }}" href = "{{ url_for('admin.admin_users', local_remote='local') }}" > {{ _('Users') }}< / a > < / li >
< li > < a class = "dropdown-item{{ ' active' if active_child == 'admin_users_trash' }}" href = "{{ url_for('admin.admin_users_trash', local_remote='local') }}" > {{ _('Monitoring - users') }}< / a > < / li >
< li > < a class = "dropdown-item{{ ' active' if active_child == 'admin_content_trash' }}" href = "{{ url_for('admin.admin_content_trash') }}" > {{ _('Monitoring - content') }}< / a > < / li >
2024-05-07 00:44:39 -07:00
< li > < a class = "dropdown-item{{ ' active' if active_child == 'admin_content_spam' }}" href = "{{ url_for('admin.admin_content_spam') }}" > {{ _('Monitoring - spammy content') }}< / a > < / li >
2024-06-01 21:45:21 -07:00
< li > < a class = "dropdown-item{{ ' active' if active_child == 'admin_content_deleted' }}" href = "{{ url_for('admin.admin_content_deleted') }}" > {{ _('Deleted content') }}< / a > < / li >
2024-04-14 01:05:40 -07:00
{% if g.site.registration_mode == 'RequireApplication' %}
< li > < a class = "dropdown-item{{ ' active' if active_child == 'admin_approve_registrations' }}" href = "{{ url_for('admin.admin_approve_registrations') }}" > {{ _('Registration applications') }}< / a > < / li >
{% endif %}
< li > < a class = "dropdown-item{{ ' active' if active_child == 'admin_reports' }}" href = "{{ url_for('admin.admin_reports') }}" > {{ _('Moderation') }}< / a > < / li >
< li > < a class = "dropdown-item{{ ' active' if active_child == 'admin_federation' }}" href = "{{ url_for('admin.admin_federation') }}" > {{ _('Federation') }}< / a > < / li >
< li > < a class = "dropdown-item{{ ' active' if active_child == 'admin_newsletter' }}" href = "{{ url_for('admin.newsletter') }}" > {{ _('Newsletter') }}< / a > < / li >
< li > < a class = "dropdown-item{{ ' active' if active_child == 'admin_activities' }}" href = "{{ url_for('admin.admin_activities') }}" > {{ _('Activities') }}< / a > < / li >
< / ul >
< / li >
2023-11-03 01:59:48 -07:00
{% 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-02-26 00:26:19 -08:00
< a class = "nav-link" href = "/notifications" aria-label = "{{ _('%(num)d unread notifications', num=current_user.unread_notifications) if current_user.unread_notifications else _('Notifications') }}" >
2024-01-05 14:01:44 -08:00
{% 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 %}
2024-02-29 23:50:02 -08:00
< li class = "nav-item" aria-label = "{{ _('Search') }}" > < a class = "nav-link" id = "search" href = "/search" tabindex = "" title = "{{ _('Search') }}" > < span class = "fe fe-search" > < / span > < / a > < / li >
2024-01-23 12:23:44 -08:00
< li class = "nav-item" aria-label = "{{ _('Light mode') }}" > < a class = "nav-link" id = "light_mode" href = "#" tabindex = "" title = "{{ _('Light mode') }}" > < span class = "fe fe-sun" > < / span > < / a > < / li >
< li class = "nav-item" aria-label = "{{ _('Dark mode') }}" > < a class = "nav-link" id = "dark_mode" href = "#" tabindex = "" title = "{{ _('Dark mode') }}" > < span class = "fe fe-moon" > < / span > < / a > < / li >
2023-07-27 21:22:12 -07:00
< / ul >
< / div >
< / div >
2024-01-22 22:17:05 -08:00
< / div >
2023-07-27 21:22:12 -07:00
{% endblock %}
{% block content %}
2024-01-22 22:17:05 -08:00
< div id = "outer_container" class = "{{ 'container-lg' if post_layout != 'masonry_wide' else 'container-fluid' }} flex-shrink-0" role = "main" >
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 >
2024-01-22 22:17:05 -08:00
< footer class = "footer mt-auto" role = "contentinfo" >
2024-02-26 00:26:19 -08:00
< p role = "timer" 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-04 17:54:45 -08:00
< p class = "text-center" > < a href = "https://patreon.com/PieFed" > Donate with Patreon< / a > < / p >
2024-04-18 13:34:41 -07:00
< p class = "text-center" > < a href = "/about" > {{ _('About') }}< / a > < / p >
< p class = "text-center" > < a href = "/keyboard_shortcuts" > {{ _('Keyboard shortcuts') }}< / a > < / p >
2024-01-25 16:07:16 -08:00
< p class = "text-center" > < a href = "https://codeberg.org/rimu/pyfedi" > PieFed is free and open source< / a > .< br / > Please < a href = "https://codeberg.org/rimu/pyfedi/issues" > report bugs< / a > or < a href = "https://join.piefed.social/get-involved/" > get involved< / a > .< / p >
2024-01-04 19:14:55 -08:00
< p class = "text-center" > < a href = "/privacy" > Privacy policy< / a > < / p >
2023-07-27 21:22:12 -07:00
< / footer >
2024-05-30 02:54:25 -07:00
{% endblock -%}
2023-07-27 21:22:12 -07:00
2024-05-30 02:54:25 -07:00
{% block scripts -%}
{% 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-05-30 02:54:25 -07:00
{% endif -%}
{% endblock -%}
{% if not low_bandwidth -%}
2024-01-11 15:34:08 -08:00
{{ str(bootstrap.load_js()).replace('< script ' , ' < script nonce = "' + session['nonce'] + '" ' ) | safe } }
2024-03-16 20:09:50 -07:00
< script src = "{{ url_for('static', filename='js/lightbox/baguetteBox.js') }}" nonce = "{{ session['nonce'] }}" > < / script >
2024-05-30 02:54:25 -07:00
{% 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-05-30 02:54:25 -07:00
{% if not low_bandwidth -%}
{% if post_layout == 'masonry' or post_layout == 'masonry_wide' -%}
2024-03-16 16:52:51 -07:00
<!-- -->
2024-05-30 02:54:25 -07:00
{% endif -%}
2024-03-25 01:46:31 -07:00
< script type = "text/javascript" src = "{{ url_for('static', filename='js/markdown/downarea.js', changed=getmtime('js/markdown/downarea.js')) }}" > < / script >
2024-05-30 02:54:25 -07:00
{% endif -%}
{% if theme() and file_exists('app/templates/themes/' + theme() + '/scripts.js') -%}
2024-04-16 09:29:27 -07:00
< script src = "{{ url_for('static', filename='themes/' + theme() + '/scripts.js') }}" > < / script >
2024-05-30 02:54:25 -07:00
{% endif -%}
{% block end_scripts -%}
2023-07-27 21:22:12 -07:00
2024-05-30 02:54:25 -07:00
{% endblock -%}
2023-07-27 21:22:12 -07:00
< / body >
< / html >