adding different layouts for testing
This commit is contained in:
@@ -86,6 +86,19 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="settings-item" style="background: rgba(0,0,0,0.2); padding: 15px; border-radius: 4px; display: flex; align-items: center; justify-content: space-between; margin-top: 10px;">
|
||||
<div>
|
||||
<label style="display: block; font-weight: bold; color: var(--accent);">Default Feed Layout</label>
|
||||
<p style="margin: 2px 0 0 0; font-size: 0.8em; color: #aaa;">Default layout for new users and guests on the main page.</p>
|
||||
</div>
|
||||
<select id="default_feed_layout_select" onchange="saveAdminSettings()" style="background: #333; border: 1px solid #444; color: #fff; padding: 5px 8px; border-radius: 4px; font-size: 0.85em;">
|
||||
<option value="0" {{ default_feed_layout === 0 ? 'selected' : '' }}>Grid (Compact)</option>
|
||||
<option value="1" {{ default_feed_layout === 1 ? 'selected' : '' }}>Grid (3-column Modern)</option>
|
||||
<option value="2" {{ default_feed_layout === 2 ? 'selected' : '' }}>Feed (X / Instagram)</option>
|
||||
<option value="3" {{ default_feed_layout === 3 ? 'selected' : '' }}>YouTube Style</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<span id="settings-status" style="display: block; margin-top: 10px; font-size: 0.8em; font-weight: bold; text-align: right;"></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -107,6 +120,7 @@
|
||||
const registrationToggle = document.getElementById('registration_open_toggle');
|
||||
const minTagsInput = document.getElementById('min_tags_input');
|
||||
const trustedUploadsInput = document.getElementById('trusted_uploads_input');
|
||||
const feedLayoutSelect = document.getElementById('default_feed_layout_select');
|
||||
|
||||
status.textContent = 'Saving...';
|
||||
status.style.color = 'var(--accent)';
|
||||
@@ -123,6 +137,7 @@
|
||||
...(registrationToggle ? { registration_open: registrationToggle.checked ? 'on' : 'off' } : {}),
|
||||
min_tags: minTagsInput.value,
|
||||
trusted_uploads: trustedUploadsInput.value,
|
||||
default_feed_layout: feedLayoutSelect ? feedLayoutSelect.value : '0',
|
||||
csrf_token: '{{ csrf_token }}'
|
||||
}).toString()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user