Allow uploading of files and folders.
This commit is contained in:
@@ -301,6 +301,57 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Note Preferences Card -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">
|
||||
<span class="icon"><i class="ti ti-notes"></i></span>
|
||||
Note Preferences
|
||||
</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ url_for('update_note_preferences') }}" class="modern-form">
|
||||
<div class="form-group">
|
||||
<label for="note_preview_font" class="form-label">Preview Font</label>
|
||||
<select id="note_preview_font" name="note_preview_font" class="form-control">
|
||||
<option value="system" {% if not g.user.preferences or g.user.preferences.note_preview_font == 'system' %}selected{% endif %}>System Default</option>
|
||||
<option value="sans-serif" {% if g.user.preferences and g.user.preferences.note_preview_font == 'sans-serif' %}selected{% endif %}>Sans-serif (Arial, Helvetica)</option>
|
||||
<option value="serif" {% if g.user.preferences and g.user.preferences.note_preview_font == 'serif' %}selected{% endif %}>Serif (Times, Georgia)</option>
|
||||
<option value="monospace" {% if g.user.preferences and g.user.preferences.note_preview_font == 'monospace' %}selected{% endif %}>Monospace (Courier, Consolas)</option>
|
||||
<option value="georgia" {% if g.user.preferences and g.user.preferences.note_preview_font == 'georgia' %}selected{% endif %}>Georgia</option>
|
||||
<option value="palatino" {% if g.user.preferences and g.user.preferences.note_preview_font == 'palatino' %}selected{% endif %}>Palatino</option>
|
||||
<option value="garamond" {% if g.user.preferences and g.user.preferences.note_preview_font == 'garamond' %}selected{% endif %}>Garamond</option>
|
||||
<option value="bookman" {% if g.user.preferences and g.user.preferences.note_preview_font == 'bookman' %}selected{% endif %}>Bookman</option>
|
||||
<option value="comic-sans" {% if g.user.preferences and g.user.preferences.note_preview_font == 'comic-sans' %}selected{% endif %}>Comic Sans MS</option>
|
||||
<option value="trebuchet" {% if g.user.preferences and g.user.preferences.note_preview_font == 'trebuchet' %}selected{% endif %}>Trebuchet MS</option>
|
||||
<option value="arial-black" {% if g.user.preferences and g.user.preferences.note_preview_font == 'arial-black' %}selected{% endif %}>Arial Black</option>
|
||||
<option value="impact" {% if g.user.preferences and g.user.preferences.note_preview_font == 'impact' %}selected{% endif %}>Impact</option>
|
||||
</select>
|
||||
<span class="form-hint">Choose your preferred font for note content</span>
|
||||
</div>
|
||||
|
||||
<div class="font-preview-section">
|
||||
<label class="form-label">Preview</label>
|
||||
<div id="font-preview" class="font-preview">
|
||||
<h3>Sample Heading</h3>
|
||||
<p>This is how your notes will appear with the selected font. The quick brown fox jumps over the lazy dog.</p>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
||||
<ul>
|
||||
<li>First item in a list</li>
|
||||
<li>Second item with <strong>bold text</strong></li>
|
||||
<li>Third item with <em>italic text</em></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<span class="icon"><i class="ti ti-check"></i></span>
|
||||
Save Preferences
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -905,6 +956,57 @@
|
||||
.card:nth-child(3) {
|
||||
animation-delay: 0.2s;
|
||||
}
|
||||
|
||||
.card:nth-child(4) {
|
||||
animation-delay: 0.3s;
|
||||
}
|
||||
|
||||
/* Font Preview Section */
|
||||
.font-preview-section {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.font-preview {
|
||||
border: 1px solid #e9ecef;
|
||||
border-radius: 8px;
|
||||
padding: 1.5rem;
|
||||
background: #f8f9fa;
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.font-preview h3 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.font-preview p {
|
||||
margin-bottom: 1rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.font-preview ul {
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
|
||||
.font-preview li {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
/* Font families for preview */
|
||||
.font-system { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
|
||||
.font-sans-serif { font-family: Arial, Helvetica, sans-serif; }
|
||||
.font-serif { font-family: "Times New Roman", Times, serif; }
|
||||
.font-monospace { font-family: "Courier New", Courier, monospace; }
|
||||
.font-georgia { font-family: Georgia, serif; }
|
||||
.font-palatino { font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif; }
|
||||
.font-garamond { font-family: Garamond, serif; }
|
||||
.font-bookman { font-family: "Bookman Old Style", serif; }
|
||||
.font-comic-sans { font-family: "Comic Sans MS", cursive; }
|
||||
.font-trebuchet { font-family: "Trebuchet MS", sans-serif; }
|
||||
.font-arial-black { font-family: "Arial Black", sans-serif; }
|
||||
.font-impact { font-family: Impact, sans-serif; }
|
||||
</style>
|
||||
|
||||
<script>
|
||||
@@ -1032,6 +1134,33 @@ function isValidUrl(string) {
|
||||
}
|
||||
}
|
||||
|
||||
// Font preview update
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const fontSelect = document.getElementById('note_preview_font');
|
||||
const fontPreview = document.getElementById('font-preview');
|
||||
|
||||
if (fontSelect && fontPreview) {
|
||||
fontSelect.addEventListener('change', function() {
|
||||
updateFontPreview(this.value);
|
||||
});
|
||||
|
||||
// Set initial font
|
||||
updateFontPreview(fontSelect.value);
|
||||
}
|
||||
|
||||
function updateFontPreview(fontValue) {
|
||||
// Remove all font classes
|
||||
fontPreview.className = 'font-preview';
|
||||
|
||||
// Add the selected font class
|
||||
if (fontValue !== 'system') {
|
||||
fontPreview.classList.add('font-' + fontValue);
|
||||
} else {
|
||||
fontPreview.classList.add('font-system');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function resetAvatar() {
|
||||
if (confirm('Reset to your default avatar? This will remove any custom avatar.')) {
|
||||
const form = document.createElement('form');
|
||||
|
||||
Reference in New Issue
Block a user