docs: document DEVPLACE_DISABLE_SERVICES env var, news router, modal class toggle, and news service behavior

This commit is contained in:
2026-05-12 10:45:52 +00:00
parent 331e19b14e
commit 388d4e3af8
36 changed files with 1232 additions and 301 deletions
+22 -9
View File
@@ -39,20 +39,23 @@
{% endif %}
</head>
<body>
{% if user %}
<nav class="topnav">
<div class="topnav-inner">
<a href="/feed" class="topnav-logo">Dev<span>Place</span></a>
<div class="topnav-links">
<a href="/feed" class="topnav-link {% if request.url.path == '/feed' %}active{% endif %}">Home</a>
<a href="/" class="topnav-link {% if request.url.path == '/' %}active{% endif %}">Home</a>
<a href="/feed" class="topnav-link {% if request.url.path == '/feed' %}active{% endif %}">Posts</a>
<a href="/news" class="topnav-link {% if 'news' in request.url.path %}active{% endif %}">News</a>
<a href="/projects" class="topnav-link {% if 'projects' in request.url.path %}active{% endif %}">Projects</a>
{% if user %}
<a href="/messages" class="topnav-link {% if 'messages' in request.url.path %}active{% endif %}">Messages</a>
{% if user.get('role') == 'Admin' %}
<a href="/admin" class="topnav-link {% if 'admin' in request.url.path %}active{% endif %}">Admin</a>
{% endif %}
{% endif %}
</div>
<div class="topnav-right">
{% if user %}
<a href="/notifications" class="topnav-icon">
<span class="nav-bell">&#x1F514;</span>
{% set unread_count = get_unread_count(user["uid"]) %}
@@ -60,17 +63,25 @@
<span class="nav-badge">{{ unread_count }}</span>
{% endif %}
</a>
<a href="/profile/{{ user['username'] }}" class="topnav-user">
{% set _user = user %}{% set _size = 32 %}{% set _size_class = "sm" %}{% include "_avatar_link.html" %}
<div class="topnav-user-info">
<span class="topnav-user-name">{{ user['username'] }}</span>
<span class="topnav-user-role">{{ user.get('role', 'Member') }}</span>
<div class="topnav-user-dropdown">
<a href="/profile/{{ user['username'] }}" class="topnav-user">
<img src="{{ avatar_url('multiavatar', user['username'], 32) }}" class="avatar-img avatar-sm" alt="{{ user['username'] }}" loading="lazy">
<div class="topnav-user-info">
<span class="topnav-user-name">{{ user['username'] }}</span>
<span class="topnav-user-role">{{ user.get('role', 'Member') }}</span>
</div>
</a>
<div class="dropdown-menu">
<a href="/auth/logout" class="dropdown-item">Logout</a>
</div>
</a>
</div>
{% else %}
<a href="/auth/login" class="topnav-link">Login</a>
<a href="/auth/signup" class="btn btn-primary btn-sm">Sign Up</a>
{% endif %}
</div>
</div>
</nav>
{% endif %}
{% if breadcrumbs and breadcrumbs|length > 1 %}
<nav aria-label="Breadcrumb" class="breadcrumb">
@@ -92,6 +103,7 @@
{% block content %}{% endblock %}
</main>
{% block footer %}
<footer class="site-footer">
<div class="footer-inner">
<span class="footer-copy">&copy; DevPlace</span>
@@ -100,6 +112,7 @@
</nav>
</div>
</footer>
{% endblock %}
<script src="https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js"></script>
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.11.1/build/highlight.min.js"></script>