Implement class-based template differentiation and fix collection item creation

- Add class-based template comparison to differentiate styling variants
- Implement template deduplication based on structure + class signatures
- Add GetCollectionTemplate method to repository interface and implementations
- Fix collection item creation by replacing unimplemented CreateCollectionItemAtomic
- Add template selection modal with auto-default selection in frontend
- Generate meaningful template names from distinctive CSS classes
- Fix unique constraint violations with timestamp-based collection item IDs
- Add collection templates API endpoint for frontend template fetching
- Update simple demo with featured/compact/dark testimonial variants for testing
This commit is contained in:
2025-10-27 21:02:59 +01:00
parent 0bad96d866
commit 00255cb105
10 changed files with 486 additions and 33 deletions

View File

@@ -142,6 +142,29 @@
.testimonial-item cite:before {
content: "— ";
}
/* Styling variants for template differentiation testing */
.testimonial-item.featured {
border-left: 4px solid #3b82f6;
background: #eff6ff;
}
.testimonial-item.compact {
padding: 1rem;
}
.testimonial-item.dark {
background: #1f2937;
color: white;
}
.testimonial-item.dark blockquote {
color: #e5e7eb;
}
.testimonial-item.dark cite {
color: #9ca3af;
}
</style>
</head>
<body>
@@ -225,11 +248,11 @@
<blockquote class="insertr">Not all that is gold does glitter</blockquote>
<cite class="insertr">Tolkien</cite>
</div>
<div class="testimonial-item">
<div class="testimonial-item featured">
<blockquote class="insertr">The journey of a thousand miles begins with one step</blockquote>
<cite class="insertr">Lao Tzu</cite>
</div>
<div class="testimonial-item">
<div class="testimonial-item compact dark">
<blockquote class="insertr">Innovation distinguishes between a leader and a follower</blockquote>
<cite class="insertr">Steve Jobs</cite>
</div>