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
+86 -35
View File
@@ -1,19 +1,11 @@
{% extends "base.html" %}
{% block footer %}{% endblock %}
{% block extra_head %}
<link rel="stylesheet" href="/static/css/landing.css">
<link rel="stylesheet" href="/static/css/news.css">
{% endblock %}
{% block content %}
<div class="landing">
<nav class="landing-nav">
<div class="landing-logo">Dev<span>Place</span></div>
<div class="landing-nav-links">
<a href="/">Home</a>
<a href="/projects">Projects</a>
<a href="/auth/login">Login</a>
<a href="/auth/signup" class="btn btn-primary btn-sm">Sign Up</a>
</div>
</nav>
<section class="landing-hero">
<h1>Devplace.net &mdash; The Developer <span>Social Network</span></h1>
<p>Track industry shifts. Discover bold releases. Share what you're building in an open, uncensored environment.</p>
@@ -38,41 +30,100 @@
</div>
</div>
<div class="landing-daily-topic">
<div class="landing-daily-topic-label">Daily Topic</div>
<h3>{{ daily_topic.get('title', '') }}</h3>
<p>{{ daily_topic.get('summary', '') }}</p>
<div class="landing-daily-topic-links">
<a href="/feed">Read More</a>
<a href="/feed">Source</a>
</div>
</div>
<div class="landing-auth-link">
Already have an account? <a href="/auth/login">Log In</a>
</div>
</section>
{% if landing_articles %}
<section class="landing-news">
<h2>Developer News</h2>
<div class="landing-news-grid">
{% for article in landing_articles %}
<a href="{{ article.url }}" target="_blank" rel="noopener" class="landing-news-card">
{% if article.image_url %}
<div class="landing-news-img">
<img src="{{ article.image_url }}" alt="" loading="lazy">
{% if landing_posts %}
<section class="landing-section">
<div class="landing-section-header">
<h2>Latest Posts</h2>
<a href="/feed" class="landing-section-link">Browse all posts &rarr;</a>
</div>
<div class="landing-posts-grid">
{% for item in landing_posts %}
<article class="landing-post-card">
<div class="landing-post-header">
{% set _user = item.author %}
{% set _size = 28 %}
{% set _size_class = "sm" %}
{% include "_avatar_link.html" %}
<div class="landing-post-author-wrap">
<a href="/profile/{{ item.author['username'] }}" class="landing-post-author">{{ item.author['username'] }}</a>
<span class="landing-post-time">{{ item.time_ago }}</span>
</div>
<span class="badge badge-{{ item.post['topic'] }}">{{ item.post['topic'] }}</span>
</div>
{% if item.post.get('title') %}
<h3 class="landing-post-title">
<a href="/posts/{{ item.slug }}">{{ item.post['title'] }}</a>
</h3>
{% endif %}
<div class="landing-news-body">
<span class="landing-news-source">{{ article.source_name }}</span>
<h3>{{ article.title[:100] }}{% if article.title|length > 100 %}...{% endif %}</h3>
<span class="landing-news-date">{{ article.synced_at }}</span>
<div class="landing-post-content rendered-content" data-render>{{ item.post['content'][:200] }}{% if item.post['content']|length > 200 %}...{% endif %}</div>
<div class="landing-post-footer">
<span class="landing-post-stat">+{{ item.stars }}</span>
<span class="landing-post-stat">&#x1F4AC; {{ item.comment_count }}</span>
<a href="/posts/{{ item.slug }}" class="landing-post-open">Open &rarr;</a>
</div>
</a>
</article>
{% endfor %}
</div>
</section>
{% endif %}
{% if landing_articles %}
<section class="landing-section">
<div class="landing-section-header">
<h2>Developer News</h2>
<a href="/news" class="landing-section-link">View all news &rarr;</a>
</div>
<div class="news-grid">
{% for item in landing_articles %}
<article class="news-card">
{% if item.image_url %}
<div class="news-card-image">
<img src="{{ item.image_url }}" alt="" loading="lazy" onerror="this.parentElement.style.display='none'">
</div>
{% endif %}
<div class="news-card-body">
<div class="news-card-meta">
<span class="news-source">{{ item.source_name }}</span>
{% if item.grade >= 9 %}
<span class="news-grade news-grade-top">Grade {{ item.grade }}</span>
{% elif item.grade >= 7 %}
<span class="news-grade news-grade-high">Grade {{ item.grade }}</span>
{% else %}
<span class="news-grade">Grade {{ item.grade }}</span>
{% endif %}
<span class="news-time">{{ item.time_ago }}</span>
</div>
<h3 class="news-card-title">
<a href="/news/{{ item.slug or item.uid }}">{{ item.title }}</a>
</h3>
{% if item.description %}
<p class="news-card-desc">{{ item.description[:250] }}{% if item.description|length > 250 %}...{% endif %}</p>
{% endif %}
<a href="{{ item.url }}" target="_blank" rel="noopener" class="news-read-link">
Read on {{ item.source_name }} &#x2197;
</a>
</div>
</article>
{% endfor %}
</div>
</section>
{% endif %}
<footer class="landing-footer">
<p>&copy; DevPlace &mdash; The Developer Social Network</p>
<div class="landing-footer-links">
<a href="/feed">Posts</a>
<a href="/news">News</a>
<a href="/projects">Projects</a>
<a href="/auth/login">Login</a>
<a href="/auth/signup">Sign Up</a>
<a href="/bugs">Bug Report</a>
</div>
</footer>
</div>
{% endblock %}
{% endblock %}