|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
|
|
|
<head>
|
|
|
<title>Create File - {{site_id}} | h by Xlnk</title>
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
<link
|
|
|
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fira+Code:wght@400;500&display=swap"
|
|
|
rel="stylesheet">
|
|
|
<style>
|
|
|
* {
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
body {
|
|
|
background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #0d0d1f 100%);
|
|
|
min-height: 100vh;
|
|
|
font-family: 'Inter', system-ui, sans-serif;
|
|
|
color: #e2e8f0;
|
|
|
}
|
|
|
|
|
|
.navbar {
|
|
|
background: rgba(15, 23, 42, 0.9);
|
|
|
backdrop-filter: blur(20px);
|
|
|
border-bottom: 1px solid rgba(99, 102, 241, 0.2);
|
|
|
padding: 16px 30px;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
position: sticky;
|
|
|
top: 0;
|
|
|
z-index: 100;
|
|
|
}
|
|
|
|
|
|
.nav-brand {
|
|
|
font-size: 1.5rem;
|
|
|
font-weight: 700;
|
|
|
background: linear-gradient(135deg, #818cf8, #c084fc);
|
|
|
-webkit-background-clip: text;
|
|
|
-webkit-text-fill-color: transparent;
|
|
|
background-clip: text;
|
|
|
text-decoration: none;
|
|
|
}
|
|
|
|
|
|
.nav-links {
|
|
|
display: flex;
|
|
|
gap: 20px;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.nav-links a {
|
|
|
color: #94a3b8;
|
|
|
text-decoration: none;
|
|
|
font-size: 0.9rem;
|
|
|
transition: color 0.3s ease;
|
|
|
}
|
|
|
|
|
|
.nav-links a:hover {
|
|
|
color: #818cf8;
|
|
|
}
|
|
|
|
|
|
.container {
|
|
|
max-width: 900px;
|
|
|
margin: 0 auto;
|
|
|
padding: 40px 20px;
|
|
|
}
|
|
|
|
|
|
.breadcrumb {
|
|
|
margin-bottom: 20px;
|
|
|
color: #64748b;
|
|
|
}
|
|
|
|
|
|
.breadcrumb a {
|
|
|
color: #818cf8;
|
|
|
text-decoration: none;
|
|
|
transition: color 0.3s ease;
|
|
|
}
|
|
|
|
|
|
.breadcrumb a:hover {
|
|
|
color: #a5b4fc;
|
|
|
}
|
|
|
|
|
|
.page-header {
|
|
|
margin-bottom: 30px;
|
|
|
}
|
|
|
|
|
|
.page-header h1 {
|
|
|
font-size: 1.8rem;
|
|
|
font-weight: 700;
|
|
|
background: linear-gradient(135deg, #818cf8, #c084fc, #f472b6);
|
|
|
-webkit-background-clip: text;
|
|
|
-webkit-text-fill-color: transparent;
|
|
|
background-clip: text;
|
|
|
}
|
|
|
|
|
|
.page-header p {
|
|
|
color: #94a3b8;
|
|
|
margin-top: 8px;
|
|
|
}
|
|
|
|
|
|
.flash-messages {
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
|
|
|
.flash {
|
|
|
padding: 12px 16px;
|
|
|
border-radius: 12px;
|
|
|
font-size: 0.9rem;
|
|
|
margin-bottom: 10px;
|
|
|
animation: slideIn 0.3s ease;
|
|
|
}
|
|
|
|
|
|
@keyframes slideIn {
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
transform: translateY(-10px);
|
|
|
}
|
|
|
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
transform: translateY(0);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.flash.error {
|
|
|
background: rgba(239, 68, 68, 0.15);
|
|
|
border: 1px solid rgba(239, 68, 68, 0.3);
|
|
|
color: #fca5a5;
|
|
|
}
|
|
|
|
|
|
.flash.success {
|
|
|
background: rgba(34, 197, 94, 0.15);
|
|
|
border: 1px solid rgba(34, 197, 94, 0.3);
|
|
|
color: #86efac;
|
|
|
}
|
|
|
|
|
|
.card {
|
|
|
background: rgba(15, 23, 42, 0.8);
|
|
|
backdrop-filter: blur(20px);
|
|
|
border: 1px solid rgba(99, 102, 241, 0.15);
|
|
|
border-radius: 16px;
|
|
|
padding: 30px;
|
|
|
}
|
|
|
|
|
|
.form-group {
|
|
|
margin-bottom: 24px;
|
|
|
}
|
|
|
|
|
|
label {
|
|
|
display: block;
|
|
|
color: #e2e8f0;
|
|
|
font-size: 0.9rem;
|
|
|
font-weight: 500;
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
|
|
|
input[type="text"] {
|
|
|
width: 100%;
|
|
|
padding: 14px 16px;
|
|
|
background: rgba(30, 41, 59, 0.8);
|
|
|
border: 1px solid rgba(148, 163, 184, 0.2);
|
|
|
border-radius: 12px;
|
|
|
color: #f1f5f9;
|
|
|
font-size: 1rem;
|
|
|
font-family: 'Fira Code', monospace;
|
|
|
transition: all 0.3s ease;
|
|
|
}
|
|
|
|
|
|
input[type="text"]:focus {
|
|
|
outline: none;
|
|
|
border-color: #818cf8;
|
|
|
box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
|
|
|
}
|
|
|
|
|
|
input::placeholder {
|
|
|
color: #64748b;
|
|
|
}
|
|
|
|
|
|
textarea {
|
|
|
width: 100%;
|
|
|
height: 300px;
|
|
|
background: rgba(30, 41, 59, 0.8);
|
|
|
border: 1px solid rgba(148, 163, 184, 0.2);
|
|
|
border-radius: 12px;
|
|
|
color: #f1f5f9;
|
|
|
font-size: 14px;
|
|
|
font-family: 'Fira Code', monospace;
|
|
|
padding: 16px;
|
|
|
line-height: 1.6;
|
|
|
resize: vertical;
|
|
|
transition: all 0.3s ease;
|
|
|
}
|
|
|
|
|
|
textarea:focus {
|
|
|
outline: none;
|
|
|
border-color: #818cf8;
|
|
|
box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
|
|
|
}
|
|
|
|
|
|
.hint {
|
|
|
color: #64748b;
|
|
|
font-size: 0.8rem;
|
|
|
margin-top: 8px;
|
|
|
}
|
|
|
|
|
|
.actions {
|
|
|
display: flex;
|
|
|
gap: 12px;
|
|
|
margin-top: 30px;
|
|
|
}
|
|
|
|
|
|
.btn {
|
|
|
padding: 12px 24px;
|
|
|
border-radius: 12px;
|
|
|
border: none;
|
|
|
cursor: pointer;
|
|
|
font-weight: 600;
|
|
|
font-family: inherit;
|
|
|
font-size: 0.95rem;
|
|
|
transition: all 0.3s ease;
|
|
|
text-decoration: none;
|
|
|
display: inline-flex;
|
|
|
align-items: center;
|
|
|
gap: 8px;
|
|
|
}
|
|
|
|
|
|
.btn-primary {
|
|
|
background: linear-gradient(135deg, #22c55e, #16a34a);
|
|
|
color: white;
|
|
|
}
|
|
|
|
|
|
.btn-primary:hover {
|
|
|
transform: translateY(-2px);
|
|
|
box-shadow: 0 10px 30px rgba(34, 197, 94, 0.4);
|
|
|
}
|
|
|
|
|
|
.btn-secondary {
|
|
|
background: rgba(100, 116, 139, 0.2);
|
|
|
border: 1px solid rgba(100, 116, 139, 0.3);
|
|
|
color: #94a3b8;
|
|
|
}
|
|
|
|
|
|
.btn-secondary:hover {
|
|
|
background: rgba(100, 116, 139, 0.3);
|
|
|
color: #e2e8f0;
|
|
|
}
|
|
|
|
|
|
.glow-orb {
|
|
|
position: fixed;
|
|
|
width: 400px;
|
|
|
height: 400px;
|
|
|
border-radius: 50%;
|
|
|
filter: blur(100px);
|
|
|
opacity: 0.15;
|
|
|
pointer-events: none;
|
|
|
z-index: -1;
|
|
|
}
|
|
|
|
|
|
.orb-1 {
|
|
|
background: #22c55e;
|
|
|
top: 20%;
|
|
|
right: -100px;
|
|
|
}
|
|
|
|
|
|
.orb-2 {
|
|
|
background: #6366f1;
|
|
|
bottom: 20%;
|
|
|
left: -100px;
|
|
|
}
|
|
|
</style>
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
<div class="glow-orb orb-1"></div>
|
|
|
<div class="glow-orb orb-2"></div>
|
|
|
|
|
|
<nav class="navbar">
|
|
|
<a href="/my-sites" class="nav-brand">h by Xlnk</a>
|
|
|
<div class="nav-links">
|
|
|
<a href="/files/{{site_id}}">Back to Files</a>
|
|
|
<a href="/my-sites">My Sites</a>
|
|
|
</div>
|
|
|
</nav>
|
|
|
|
|
|
<div class="container">
|
|
|
<div class="breadcrumb">
|
|
|
<a href="/my-sites">My Sites</a> / <a href="/manage/{{site_id}}">{{site_id}}</a> / <a
|
|
|
href="/files/{{site_id}}">Files</a> /
|
|
|
<strong>Create New</strong>
|
|
|
</div>
|
|
|
|
|
|
<div class="page-header">
|
|
|
<h1>📝 Create New File</h1>
|
|
|
<p>Create a new file in your site</p>
|
|
|
</div>
|
|
|
|
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
|
{% if messages %}
|
|
|
<div class="flash-messages">
|
|
|
{% for category, message in messages %}
|
|
|
<div class="flash {{ category }}">{{ message }}</div>
|
|
|
{% endfor %}
|
|
|
</div>
|
|
|
{% endif %}
|
|
|
{% endwith %}
|
|
|
|
|
|
<div class="card">
|
|
|
<form method="post">
|
|
|
<div class="form-group">
|
|
|
<label for="filename">Filename</label>
|
|
|
<input type="text" id="filename" name="filename" placeholder="e.g., about.html or css/styles.css"
|
|
|
value="{{ filename or '' }}" required autofocus>
|
|
|
<p class="hint">💡 You can include folder paths like "css/styles.css" to create files in subfolders
|
|
|
</p>
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
<label for="content">Content (optional)</label>
|
|
|
<textarea id="content" name="content"
|
|
|
placeholder="Enter file content here...">{{ content or '' }}</textarea>
|
|
|
</div>
|
|
|
|
|
|
<div class="actions">
|
|
|
<a href="/files/{{site_id}}" class="btn btn-secondary">Cancel</a>
|
|
|
<button type="submit" class="btn btn-primary">✨ Create File</button>
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
|
</div>
|
|
|
</body>
|
|
|
|
|
|
</html> |