Files
devplacepy/devplacepy/templates/news_detail.html
T
retoor d10f1af118 feat: add seo_meta service for AI-generated SEO metadata with CLI management and database layer
Implement a new `SeoMetaService` subservice that generates clean SEO title/description/keywords for published content items, distinct from the existing SEO diagnostics auditor. Add `seo_metadata` polymorphic table with soft-delete support, batch query methods, and usage tracking. Extend the CLI with `seo-meta prune` and `seo-meta clear` commands for job row lifecycle management. Wire `schedule_seo_meta_for_table` into content creation and editing flows in `content.py`. Document the new service in `AGENTS.md` and `README.md`, including the `extra_head` site setting for custom `<head>` injection.
2026-06-19 20:15:22 +00:00

55 lines
2.4 KiB
HTML

{% extends "base.html" %}
{% block extra_head %}
<link rel="stylesheet" href="{{ static_url('/static/css/news.css') }}">
<link rel="stylesheet" href="{{ static_url('/static/css/post.css') }}">
{% endblock %}
{% block content %}
<div class="news-detail">
<article class="news-detail-card">
{% if image_url %}
<div class="news-detail-image">
<img src="{{ image_url }}" alt="{{ article['title'] }}" loading="lazy" class="image-fallback">
</div>
{% endif %}
<div class="news-detail-body">
<div class="news-detail-meta">
<span class="news-source">{{ article['source_name'] }}</span>
{% if is_admin(user) %}
{% if article.get('featured') %}
<span class="news-featured-badge">&#x2605; Featured</span>
{% endif %}
{% if grade >= 9 %}
<span class="news-grade news-grade-top">Grade {{ grade }}</span>
{% elif grade >= 7 %}
<span class="news-grade news-grade-high">Grade {{ grade }}</span>
{% else %}
<span class="news-grade">Grade {{ grade }}</span>
{% endif %}
{% endif %}
<span class="news-time">{{ dt_ago(article.synced_at) if article.get('synced_at') else time_ago }}</span>
</div>
<h1 class="news-detail-title">{{ render_title(article['title']) }}</h1>
{% if article.get('content') %}
<div class="news-detail-content rendered-content">{{ render_content(article['content']) }}</div>
{% endif %}
<div class="news-detail-actions">
<a href="{{ article['url'] }}" target="_blank" rel="noopener" class="news-detail-read-link">
Read on {{ article['source_name'] }} &#x2197;
</a>
<button type="button" class="news-detail-back" data-share="/news/{{ article['slug'] or article['uid'] }}">&#x1F517; Share</button>
{% set _type = "news" %}{% set _uid = article['uid'] %}{% set _bookmarked = bookmarked %}{% include "_bookmark_button.html" %}
<a href="/news" class="news-detail-back">&larr; Back to News</a>
</div>
</div>
</article>
{% with target_uid=article['uid'], target_type="news", comments=comments %}
{% include "_comment_section.html" %}
{% endwith %}
</div>
{% endblock %}