init f0ckm
This commit is contained in:
54
views/meme-select.html
Normal file
54
views/meme-select.html
Normal file
@@ -0,0 +1,54 @@
|
||||
@include(snippets/header)
|
||||
<div class="pagewrapper">
|
||||
<div id="main">
|
||||
<div class="meme-layout-wrapper">
|
||||
<link rel="stylesheet" href="/s/css/meme-creator.css">
|
||||
<div class="meme-select-container">
|
||||
<h1 class="meme-title">{{ t('meme.select_title') }}</h1>
|
||||
<p class="meme-subtitle">{{ t('meme.select_subtitle') }}</p>
|
||||
|
||||
<div class="category-filter-bar">
|
||||
@each(categories as cat)
|
||||
<button class="category-chip @if(cat == 'All') active @endif" data-category="{!! cat !!}">{!! cat !!}</button>
|
||||
@endeach
|
||||
</div>
|
||||
|
||||
<div class="template-grid">
|
||||
@each(templates as template)
|
||||
<a href="/meme/{{ template.id }}" class="template-item" data-category="{!! template.category || 'General' !!}">
|
||||
<div class="template-image-wrapper">
|
||||
<img src="{{ template.url }}" alt="{!! template.name !!}" loading="lazy">
|
||||
</div>
|
||||
<div class="template-info">
|
||||
<span class="template-name">{!! template.name !!}</span>
|
||||
<span class="template-category-tag">{!! template.category || 'General' !!}</span>
|
||||
</div>
|
||||
</a>
|
||||
@endeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.querySelectorAll('.category-chip').forEach(chip => {
|
||||
chip.addEventListener('click', () => {
|
||||
const category = chip.getAttribute('data-category');
|
||||
|
||||
// Update active chip
|
||||
document.querySelectorAll('.category-chip').forEach(c => c.classList.remove('active'));
|
||||
chip.classList.add('active');
|
||||
|
||||
// Filter grid
|
||||
document.querySelectorAll('.template-item').forEach(item => {
|
||||
if (category === 'All' || item.getAttribute('data-category') === category) {
|
||||
item.style.display = 'flex';
|
||||
} else {
|
||||
item.style.display = 'none';
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
@include(snippets/footer)
|
||||
Reference in New Issue
Block a user