mirror of
https://github.com/ION606/static-site-hosting.git
synced 2026-05-14 22:16:54 +00:00
shift to subdomains
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user