Form UI 1st step

This commit is contained in:
Djeex
2025-08-17 22:44:54 +02:00
parent a8f3c1b497
commit 5d863223e3
3 changed files with 126 additions and 45 deletions

View File

@ -45,69 +45,105 @@
<form id="site-info-form">
<fieldset>
<legend>Info</legend>
<label>Title: <input type="text" name="info.title"></label><br>
<label>Subtitle: <input type="text" name="info.subtitle"></label><br>
<label>Description: <textarea name="info.description"></textarea></label><br>
<label>Canonical URL: <input type="text" name="info.canonical"></label><br>
<label>Keywords (comma separated): <input type="text" name="info.keywords"></label><br>
<label>Author: <input type="text" name="info.author"></label><br>
<div class="input-field">
<label>Title:</label>
<input type="text" name="info.title">
</div>
<div class="input-field">
<label>Subtitle:</label>
<input type="text" name="info.subtitle">
</div>
<div class="input-field">
<label>Description:</label>
<textarea name="info.description"></textarea>
</div>
<div class="input-field">
<label>Canonical URL:</label>
<input type="text" name="info.canonical">
</div>
<div class="input-field">
<label>Keywords (comma separated):</label>
<input type="text" name="info.keywords">
</div>
<div class="input-field">
<label>Author:</label>
<input type="text" name="info.author">
</div>
</fieldset>
<fieldset>
<legend>Social</legend>
<label>Instagram URL: <input type="text" name="social.instagram_url"></label><br>
<label>Thumbnail: <input type="text" name="social.thumbnail" readonly></label>
<input type="file" id="thumbnail-upload" accept="image/png,image/jpeg,image/webp">
<img id="thumbnail-preview" src="" alt="Thumbnail preview" style="max-width:100px;display:none;">
</fieldset>
<div class="input-field">
<label>Instagram URL: </label>
<input type="text" name="social.instagram_url">
</div>
<div class="input-field">
<label>Thumbnail: </label>
<input type="text" name="social.thumbnail" readonly>
</div>
<div class="input-field">
<label>Upload Thumbnail: </label>
<input type="file" id="thumbnail-upload" accept="image/png,image/jpeg,image/webp">
<img id="thumbnail-preview" src="" alt="Thumbnail preview" style="max-width:100px;display:none;">
</div>
</fieldset>
<fieldset>
<legend>Menu</legend>
<div id="menu-items-list"></div>
<div id="menu-items-list">
</div>
<button type="button" id="add-menu-item">+ Add menu item</button>
</fieldset>
<fieldset>
<legend>Footer</legend>
<label>Copyright: <input type="text" name="footer.copyright"></label><br>
<label>Legal Label: <input type="text" name="footer.legal_label"></label><br>
<div class="input-field">
<label>Copyright: </label>
<input type="text" name="footer.copyright"></label>
</div>
<div class="input-field">
<label>Legal Label: </label>
<input type="text" name="footer.legal_label"></label>
</div>
</fieldset>
<fieldset>
<legend>Build</legend>
<label>Theme:
<select name="build.theme" id="theme-select"></select>
</label>
<label>
<input type="checkbox" name="build.convert_images" id="convert-images-checkbox">
Convert images
</label><br>
<label>
<input type="checkbox" name="build.resize_images" id="resize-images-checkbox">
Resize images
</label><br>
</fieldset>
<div class="input-field">
<label>Theme:</label>
<select name="build.theme" id="theme-select"></select>
</div>
<div class="input-field">
<label>Convert images</label>
<input type="checkbox" name="build.convert_images" id="convert-images-checkbox">
</div>
<div class="input-field">
<label>Resize images</label>
<input type="checkbox" name="build.resize_images" id="resize-images-checkbox">
</div>
</fieldset>
<fieldset>
<legend>Legals</legend>
<label>Hoster Name: <input type="text" name="legals.hoster_name"></label><br>
<label>Hoster Address: <input type="text" name="legals.hoster_adress"></label><br>
<label>Hoster Contact: <input type="text" name="legals.hoster_contact"></label><br>
<div>
<label>Intellectual Property:</label>
<div id="ip-list"></div>
<button type="button" id="add-ip-paragraph">+ Add paragraph</button>
<div class="input-field">
<label>Hoster Name:</label>
<input type="text" name="legals.hoster_name">
</div>
<div class="input-field">
<label>Hoster Address:</label>
<input type="text" name="legals.hoster_adress">
</div>
<div class="input-field">
<label>Hoster Contact:</label>
<input type="text" name="legals.hoster_contact">
</div>
<div class="input-field">
<label>Intellectual Property:</label>
<div id="ip-list"></div>
<button type="button" id="add-ip-paragraph">+ Add paragraph</button>
</div>
</div>
</fieldset>
<button type="submit">Save</button>
</form>
<div id="site-info-status"></div>
</div>
<div id="delete-modal" class="modal" style="display:none;">
<div class="modal-content">
<span id="delete-modal-close" class="modal-close">&times;</span>
<h3>Confirm Deletion</h3>
<p id="delete-modal-text">Are you sure you want to delete this image?</p>
<div class="modal-actions">
<button id="delete-modal-confirm" class="modal-btn danger">Delete</button>
<button id="delete-modal-cancel" class="modal-btn">Cancel</button>
</div>
</div>
</div>
<script src="{{ url_for('static', filename='js/site-info.js') }}"></script>
</body>
</html>