forked from retoor/devplacepy
feat: add threaded comments with polymorphic targets and slug-based routing
Introduce `load_comments` helper supporting polymorphic target types (post, project, bug) with nested parent-child threading. Refactor comment creation to use `target_type`/`target_uid` and `resolve_target_redirect` for correct redirects. Replace raw UID-based post/project routes with slug-aware resolution via `resolve_post`/`resolve_project` and `make_combined_slug`. Update SEO, sitemap, and FAB styling to use slugs and hardcoded red accent. Add reusable `_comment_section.html` template.
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
|
||||
<div class="projects-grid">
|
||||
{% for project in projects %}
|
||||
<a href="/projects/{{ project['uid'] }}" class="project-card fade-in" style="display: block; text-decoration: none; color: inherit;">
|
||||
<a href="/projects/{{ project['slug'] or project['uid'] }}" class="project-card fade-in" style="display: block; text-decoration: none; color: inherit;">
|
||||
<div class="project-card-header">
|
||||
<h3 class="project-card-title">{{ project['title'] }}</h3>
|
||||
<form method="POST" action="/votes/project/{{ project['uid'] }}" style="display:inline;">
|
||||
|
||||
Reference in New Issue
Block a user