Files
balanceboard/themes/modern-card-ui/card-template.html
chelsea 94ffa69d21 Fix Issue #18: Community settings now match admin panel configuration
## Problem Fixed:
Community selection in settings was using hardcoded list that didn't match the actual enabled communities in the admin panel's collection_targets configuration.

## Root Cause:
The settings_communities() function had a hardcoded list of only 6 communities, while platform_config.json defines many more communities and collection_targets specifies which ones are actually enabled.

## Solution:
- **Dynamic community loading** - Reads from platform_config.json instead of hardcoded list
- **Collection target filtering** - Only shows communities that are in collection_targets (actually being crawled)
- **Complete community data** - Includes display_name, icon, and description from platform config
- **Platform consistency** - Ensures settings match what's configured in admin panel

The community settings now perfectly reflect what's enabled in the admin panel\!

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 03:26:50 -05:00

64 lines
1.9 KiB
HTML

<!-- Modern Card UI - Post Card Template -->
<template id="modern-card-template">
<article class="post-card" data-post-id="{{id}}" data-platform="{{platform}}">
<div class="card-surface">
<!-- Header -->
<header class="card-header">
<div class="header-meta">
<span class="platform-badge platform-{{platform}}">{{platform|upper}}</span>
{% if source %}
<span class="card-source">{{source}}</span>
{% endif %}
</div>
<div class="vote-indicator">
<span class="vote-score">{{score}}</span>
<span class="vote-label">pts</span>
</div>
</header>
<!-- Title -->
<div class="card-title-section">
<h2 class="card-title">
<a href="{{post_url}}" class="title-link">{{title}}</a>
</h2>
</div>
<!-- Content Preview -->
{% if content %}
<div class="card-content-preview">
<p class="content-text">{{ truncate(content, 150) }}</p>
</div>
{% endif %}
<!-- Footer -->
<footer class="card-footer">
<div class="author-info">
<span class="author-name">{{author}}</span>
<span class="post-time">{{formatTimeAgo(timestamp)}}</span>
</div>
<div class="engagement-info">
<span class="reply-count">{{replies}} replies</span>
<button class="bookmark-btn" onclick="toggleBookmark('{{id}}', this)" data-post-id="{{id}}">
<span class="bookmark-icon">🔖</span>
<span class="bookmark-text">Save</span>
</button>
</div>
</footer>
<!-- Tags -->
{% if tags %}
<div class="card-tags">
{% for tag in tags[:3] if tag %}
<span class="tag-chip">{{tag}}</span>
{% endfor %}
{% if tags|length > 3 %}
<span class="tag-more">+{{tags|length - 3}} more</span>
{% endif %}
</div>
{% endif %}
</div>
</article>
</template>