shift to subdomains

This commit is contained in:
2025-02-17 13:31:24 -05:00
parent 1e827f03a5
commit 678da4dcc8
5 changed files with 339 additions and 193 deletions
+10 -6
View File
@@ -12,11 +12,14 @@
<input type="text" name="name" required>
</div>
<!-- Add slug input -->
<div class="form-group">
<label>Custom URL Slug:</label>
<input type="text" name="slug" required pattern="[a-zA-Z0-9\-_]+"
title="Letters, numbers, hyphens, and underscores only">
<label>Site URL:</label>
<div style="display: flex; align-items: center;">
<input type="text" name="subdomain" required pattern="[a-zA-Z0-9\-_]+"
title="Letters, numbers, hyphens, and underscores only" value="{{ subdomain }}"
style="flex: 1;">
<span style="margin-left: 5px;">.{{ hostname }}</span>
</div>
</div>
<div class="form-group" onclick="document.querySelector('#file-input').click()">
@@ -27,7 +30,6 @@
</label>
</div>
<!-- File Preview Section -->
<div id="file-preview" class="file-preview">
<h5>Selected Files:</h5>
<div id="file-grid" class="file-grid"></div>
@@ -69,7 +71,9 @@
<!-- Site Actions -->
<div class="site-actions">
<a href="{{ url_for('edit_site', site_id=site.id) }}" class="btn">Edit</a>
<a href="{{ url_for('serve_site_content', slug=site.slug) }}" class="btn" target="_blank">View Site</a>
<a href="{{ url_for('serve_site_content', filename='index.html', _external=True, subdomain=site.subdomain) }}">Visit
{{ site.name }}
</a>
<form method="POST" action="{{ url_for('delete_site', site_id=site.id) }}" style="display: inline;">
<button type="submit" class="btn btn-danger">Delete Site</button>
</form>