Implement complete collection persistence with database-backed survival across server restarts
• Add full multi-table schema for collections with normalized design (collections, collection_templates, collection_items, collection_item_versions) • Implement collection detection and processing in enhancement pipeline for .insertr-add elements • Add template extraction and storage from existing HTML children with multi-variant support • Enable collection reconstruction from database on server restart with proper DOM rebuilding • Extend ContentClient interface with collection operations and full database integration • Update enhance command to use engine.DatabaseClient for collection persistence support
This commit is contained in:
@@ -95,6 +95,53 @@
|
||||
font-size: 1.25rem;
|
||||
margin: 0 0 0.5rem 0;
|
||||
}
|
||||
|
||||
/* Testimonials styling for .insertr-add demo */
|
||||
.testimonials {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.testimonial-item {
|
||||
background: white;
|
||||
border: 1px solid #d1d5db;
|
||||
border-radius: 8px;
|
||||
padding: 1.5rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.testimonial-item blockquote {
|
||||
font-style: italic;
|
||||
font-size: 1.1rem;
|
||||
color: #374151;
|
||||
margin: 0 0 1rem 0;
|
||||
quotes: """ """;
|
||||
}
|
||||
|
||||
.testimonial-item blockquote:before {
|
||||
content: open-quote;
|
||||
font-size: 1.5rem;
|
||||
color: #3b82f6;
|
||||
}
|
||||
|
||||
.testimonial-item blockquote:after {
|
||||
content: close-quote;
|
||||
font-size: 1.5rem;
|
||||
color: #3b82f6;
|
||||
}
|
||||
|
||||
.testimonial-item cite {
|
||||
display: block;
|
||||
text-align: right;
|
||||
font-weight: 600;
|
||||
color: #6b7280;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.testimonial-item cite:before {
|
||||
content: "— ";
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -166,5 +213,33 @@
|
||||
</div>
|
||||
<p class="insertr">Need help? Contact our <a id="support-link" class="fancy" href="mailto:support@example.com" title="Email our support team">support team</a> anytime.</p>
|
||||
</div>
|
||||
|
||||
<!-- Example 8: Collection Management (.insertr-add) -->
|
||||
<div class="example">
|
||||
<h3>Example 8: Dynamic Collection (.insertr-add)</h3>
|
||||
<div class="example-description">
|
||||
Tests dynamic add/remove/reorder functionality. In edit mode, you should see "+ Add Item" button and item controls.
|
||||
</div>
|
||||
<div class="testimonials insertr-add">
|
||||
<div class="testimonial-item">
|
||||
<blockquote class="insertr">Not all that is gold does glitter</blockquote>
|
||||
<cite class="insertr">Tolkien</cite>
|
||||
</div>
|
||||
<div class="testimonial-item">
|
||||
<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">
|
||||
<blockquote class="insertr">Innovation distinguishes between a leader and a follower</blockquote>
|
||||
<cite class="insertr">Steve Jobs</cite>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Add login gate for testing -->
|
||||
<footer style="margin-top: 3rem; padding: 2rem; border-top: 1px solid #e5e7eb; text-align: center;">
|
||||
<p>© 2024 Insertr Demo Site</p>
|
||||
<a href="#" class="insertr-gate" style="color: #6b7280; text-decoration: none; font-size: 0.9rem;">Admin Login</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user