-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubmit.html
More file actions
268 lines (246 loc) · 16.2 KB
/
Copy pathsubmit.html
File metadata and controls
268 lines (246 loc) · 16.2 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<script>
(function () {
try {
var theme = localStorage.getItem('kn-theme') || 'light';
if (theme === 'dark') {
document.documentElement.setAttribute('data-theme', 'dark');
document.documentElement.classList.add('dark');
} else {
document.documentElement.setAttribute('data-theme', 'light');
document.documentElement.classList.remove('dark');
}
} catch (e) { }
})();
</script>
<meta http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://static.cloudflareinsights.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https:; connect-src 'self' https://*.supabase.co wss://*.supabase.co https://cdn.jsdelivr.net https://cloudflareinsights.com https://static.cloudflareinsights.com; frame-src *; form-action 'self';" />
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>Submit - K. Notes</title>
<meta name="description"
content="Submit a new story, link, or question to K. Notes. Share high-quality content with the community." />
<meta property="og:type" content="website" />
<meta property="og:title" content="Submit - K. Notes" />
<meta property="og:description"
content="Submit a new story, link, or question to K. Notes. Share high-quality content with the community." />
<meta property="og:image" content="assets/img/logo.png" />
<meta property="og:url" content="submit.html" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:title" content="Submit - K. Notes" />
<meta property="twitter:description"
content="Submit a new story, link, or question to K. Notes. Share high-quality content with the community." />
<meta property="twitter:image" content="assets/img/logo.png" />
<link href="assets/css/styles.css" rel="stylesheet" />
<link href="assets/css/modal.css" rel="stylesheet" />
<link rel="icon" type="image/png" href="assets/img/logo.png" />
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap"
rel="stylesheet" />
<link href="assets/css/submit.css" rel="stylesheet" />
</head>
<body class="font-body-md text-body-md text-on-surface">
<noscript>
<div
style="padding:16px;background:#fff3cd;border:1px solid #ffc107;margin:16px;border-radius:4px;font-size:14px;">
JavaScript is required to submit content on K. Notes. Please enable JavaScript and reload the page.
</div>
</noscript>
<div class="max-w-[85%] mx-auto bg-surface-bright pb-8 mt-2">
<header
class="bg-[#ff6600] text-black text-sm rounded-none w-full flat no shadows flex items-center px-2 py-0.5"
style="max-width: 100%;">
<div class="flex items-center gap-1 w-full text-[13px]">
<a href="index.html" class="font-bold text-black px-1 mr-2 hover:underline" title="K.Notes">K. Notes</a>
<div class="flex flex-wrap items-center gap-1 text-black">
<a class="hover:underline" href="index.html">feed</a> |
<a class="hover:underline" href="comments.html">comments</a> |
<a class="hover:underline" href="ask.html">ask</a> |
<a class="hover:underline" href="show.html">show</a> |
<a class="hover:underline font-bold" href="submit.html">submit</a> |
<a class="hover:underline" href="leaderboard.html">leaders</a>
</div>
<div class="ml-auto text-black flex items-center gap-4">
<a class="hover:underline text-black" href="login.html">login</a>
</div>
</div>
</header>
<main class="bg-[#f6f6ef] p-4">
<div id="auth-message" class="mb-4 p-2 bg-yellow-50 border border-yellow-200 text-yellow-800 rounded">
You must be <a href="login.html" class="underline font-bold">logged in</a> to submit news.
</div>
<div id="submit-loading" class="text-center p-4 text-gray-500 text-sm">Loading...</div>
<div id="submit-quick-links" class="hidden mb-3 flex flex-wrap gap-2 text-xs">
<span class="text-gray-500">Quick submit:</span>
<a href="#news"
class="submit-quick-link text-[#ff6600] hover:underline font-medium flex items-center gap-1"
data-cat="news">
<span class="material-symbols-outlined" style="font-size:14px;">newspaper</span> News
</a>
<a href="#ask"
class="submit-quick-link text-[#ff6600] hover:underline font-medium flex items-center gap-1"
data-cat="ask">
<span class="material-symbols-outlined" style="font-size:14px;">help</span> Ask
</a>
<a href="#show"
class="submit-quick-link text-[#ff6600] hover:underline font-medium flex items-center gap-1"
data-cat="show">
<span class="material-symbols-outlined" style="font-size:14px;">rocket_launch</span> Show
</a>
</div>
<form id="submit-form" class="mt-4 max-w-2xl" autocomplete="off" novalidate>
<table class="border-spacing-0 border-collapse w-full">
<tbody>
<tr>
<td class="py-2 w-16 align-top">category</td>
<td class="py-2">
<select id="submit-category"
class="border border-gray-400 p-1 text-sm w-full focus:outline-none focus:border-[#ff6600]">
<option value="news">News (Link)</option>
<option value="ask">Ask (Discussion)</option>
<option value="show">Show (Submit Work)</option>
</select>
</td>
</tr>
<tr>
<td class="py-2 w-16 align-top">title</td>
<td class="py-2"><input type="text" id="submit-title" required maxlength="120"
class="border border-gray-400 p-1 text-sm w-full focus:outline-none focus:border-[#ff6600]"
placeholder="Title of your submission">
</td>
</tr>
<tr id="row-url">
<td class="py-2 w-16 align-top">url</td>
<td class="py-2"><input type="url" id="submit-url"
class="border border-gray-400 p-1 text-sm w-full focus:outline-none focus:border-[#ff6600]"
placeholder="https://example.com">
</td>
</tr>
<tr id="row-text">
<td class="py-2 w-16 align-top">text</td>
<td class="py-2 relative">
<div class="flex items-center gap-2 mb-1" id="text-toolbar" style="display:none;">
<button type="button" id="btn-upload-image"
class="text-[11px] bg-gray-100 hover:bg-gray-200 border border-gray-300 px-2 py-0.5 rounded-sm flex items-center gap-1 cursor-pointer">
<span class="material-symbols-outlined"
style="font-size:12px">upload_file</span> Upload File
</button>
<button type="button" id="btn-media-library"
class="text-[11px] bg-gray-100 hover:bg-gray-200 border border-gray-300 px-2 py-0.5 rounded-sm flex items-center gap-1 cursor-pointer">
<span class="material-symbols-outlined"
style="font-size:12px">folder_shared</span> Media & Work
</button>
<input type="file" id="image-upload-input"
accept="image/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.csv,.txt" class="hidden">
</div>
<textarea id="submit-text"
class="border border-gray-400 p-1 text-sm w-full h-32 focus:outline-none focus:border-[#ff6600]"
maxlength="40000" placeholder="Write your text here (supports Markdown)"></textarea>
</td>
</tr>
<tr>
<td></td>
<td class="py-4 flex gap-2 items-center">
<button type="submit" id="btn-submit"
class="bg-gray-200 border border-gray-400 px-4 py-1 hover:bg-gray-300 text-black cursor-pointer text-sm">submit</button>
<span id="submit-status" class="text-xs text-gray-500 hidden"></span>
</td>
</tr>
</tbody>
</table>
<div class="mt-8 text-gray-700 text-xs leading-relaxed border-t border-gray-200 pt-4">
<p class="mb-2 text-sm text-[#ff6600]"><b>Submission Rules:</b></p>
<ul class="list-disc ml-4 space-y-1 mb-4">
<li>Select <b>News</b> to submit a link. <a href="#news"
class="text-[#ff6600] underline text-[10px] flex inline-flex items-center gap-0.5"><span
class="material-symbols-outlined" style="font-size:10px;">link</span> quick link</a>
</li>
<li>Select <b>Ask</b> to submit a question or start a discussion (leave url blank). <a
href="#ask"
class="text-[#ff6600] underline text-[10px] flex inline-flex items-center gap-0.5"><span
class="material-symbols-outlined" style="font-size:10px;">help</span> quick link</a>
</li>
<li>Select <b>Show</b> for projects you've created. <a href="#show"
class="text-[#ff6600] underline text-[10px] flex inline-flex items-center gap-0.5"><span
class="material-symbols-outlined" style="font-size:10px;">rocket_launch</span> quick
link</a></li>
<li>Please read the <a href="guidelines.html" class="underline">Guidelines</a> and <a
href="faq.html" class="underline">FAQ</a> before posting.</li>
</ul>
<p class="mb-2 text-sm text-[#ff6600]"><b>Formatting Manual:</b></p>
<ul class="list-disc ml-4 space-y-2">
<li><b>YouTube Videos:</b> Just paste a YouTube link (e.g.
<code>https://youtube.com/watch?v=...</code>). It will automatically convert to a live
playable video!
</li>
<li><b>Images:</b> Paste a direct link to an image ending in <code>.jpg, .png, .gif</code> and
it will auto-embed. Or use Markdown: <code></code>.</li>
<li><b>Markdown & HTML:</b> You can use standard Markdown for bold (<code>**bold**</code>),
lists, and even standard HTML tags.</li>
<li><b>Indentation:</b> Your spacing and indentation will be preserved perfectly.</li>
</ul>
</div>
</form>
</main>
<footer
class="bg-[#f6f6ef] dark:bg-stone-900 text-[#ff6600] text-xs text-gray-600 rounded-none border-t-2 border-[#ff6600] mt-4 flat no shadows flex flex-col items-center gap-2 py-8 w-full max-w-[85%] mx-auto"
style="max-width: 100%;">
<div class="flex justify-center w-full mb-2">
<span class="text-[10px] text-gray-500 font-normal">By Khushaank Gupta</span>
</div>
<div class="flex flex-wrap justify-center gap-2 text-gray-600 mb-4">
<a class="hover:underline text-gray-600" href="guidelines.html">Guidelines</a> |
<a class="hover:underline text-gray-600" href="faq.html">FAQ</a> |
<a class="hover:underline text-gray-600" href="lists.html">Lists</a> |
<a class="hover:underline text-gray-600" href="api.html">API</a> |
<a class="hover:underline text-gray-600" href="security.html">Security</a> |
<a class="hover:underline text-gray-600" href="legal.html">Legal</a> |
<a class="hover:underline text-gray-600" href="about.html">About</a> |
<a class="hover:underline text-gray-600" href="contact.html">Feedback</a>
</div>
<form id="footer-search-form" class="flex items-center gap-2"
onsubmit="event.preventDefault(); window.location.href='search.html?search='+document.getElementById('footer-search-input').value;">
<span class="text-gray-500 text-xs">Search:</span>
<input type="text" id="footer-search-input"
class="border border-gray-400 px-2 py-0.5 text-xs rounded-sm focus:outline-none focus:border-[#ff6600] text-black w-48">
</form>
</footer>
</div>
<div id="media-library-modal"
class="hidden fixed inset-0 bg-black/60 z-[100] flex items-center justify-center p-4 backdrop-blur-sm">
<div
class="bg-white rounded-lg shadow-2xl w-full max-w-3xl max-h-[85vh] flex flex-col overflow-hidden border border-gray-200">
<div class="p-4 border-b border-gray-100 flex items-center justify-between bg-white">
<div class="flex items-center gap-2">
<span class="material-symbols-outlined text-[#ff6600]">folder_shared</span>
<h3 class="font-bold text-base text-gray-900">Media & Work Library</h3>
</div>
<button type="button" id="btn-close-media"
class="text-gray-400 hover:text-gray-600 p-1 rounded-full hover:bg-gray-100 transition-colors cursor-pointer">
<span class="material-symbols-outlined" style="font-size:20px">close</span>
</button>
</div>
<div class="p-6 overflow-y-auto flex-1 bg-gray-50/50">
<div id="media-library-grid" class="grid gap-3">
</div>
</div>
<div class="p-4 border-t border-gray-100 bg-white flex items-center justify-between">
<div class="text-xs text-gray-500 flex items-center gap-1">
<span class="material-symbols-outlined" style="font-size:14px">info</span>
Click an image to insert it into your post
</div>
<button type="button" id="btn-upload-more-submit"
class="text-[11px] bg-[#ff6600] text-white px-3 py-1.5 rounded font-medium hover:bg-[#e65c00] transition-colors flex items-center gap-1 cursor-pointer">
<span class="material-symbols-outlined" style="font-size:14px">upload</span>
Upload New
</button>
</div>
</div>
</div>
<script src="assets/js/exit-interceptor.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dompurify/dist/purify.min.js"></script>
<script type="module" src="assets/js/submit.js"></script>
<script type="module" src="assets/js/session.js"></script>
</body>
</html>