h
File size: 9,392 Bytes
e767f32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
<!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>