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

BIN
config/photos/thumbnail.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 920 KiB

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>
<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:
<div class="input-field">
<label>Theme:</label>
<select name="build.theme" id="theme-select"></select>
</label>
<label>
</div>
<div class="input-field">
<label>Convert images</label>
<input type="checkbox" name="build.convert_images" id="convert-images-checkbox">
Convert images
</label><br>
<label>
</div>
<div class="input-field">
<label>Resize images</label>
<input type="checkbox" name="build.resize_images" id="resize-images-checkbox">
Resize images
</label><br>
</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>
<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>
<script src="{{ url_for('static', filename='js/site-info.js') }}"></script>
</body>
</html>

View File

@ -61,6 +61,7 @@ h1, h2 {
padding: 10px;
text-align: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
border: 1px solid #2f2e2e80;
}
.photo img {
@ -464,3 +465,47 @@ h1, h2 {
gap: 8px;
}
}
/* --- Site Info --- */
#site-info-form input, #site-info-form textarea {
display: block;
margin-top: 5px;
border: none;
backdrop-filter: blur(20px);
background: #00293054;
border-radius: 5px;
outline: none;
font-size: 14px;
font-weight: 400;
color: #fff;
border-radius: 5px;
border: 1px solid #aaa;
padding: 0 15px;
height: 42px;
margin: 8px 0;
}
#site-info-form label {
font-size: 12px;
font-weight: 500;
}
#site-info-form .input-field {
display: flex;
width: calc(100% / 3 - 15px);
flex-direction: column;
margin: 4px 0;
}
#site-info-form fieldset{
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
border:none;
}
h3 {
display: block;
}