-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimport.html
122 lines (105 loc) · 2.43 KB
/
import.html
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
<!DOCTYPE html>
<html>
<head>
<title>Import Subreddits - Reddit Copycat</title>
<style>
body {
width: 100%;
max-width: 500px;
margin: 20px auto;
padding: 20px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
color: #1c1c1c;
}
h2 {
margin: 0 0 20px 0;
color: #ff4500;
display: flex;
align-items: center;
gap: 10px;
}
#dropZone {
border: 2px dashed #ccc;
border-radius: 8px;
padding: 40px 20px;
text-align: center;
cursor: pointer;
transition: all 0.3s ease;
background: #f8f9fa;
margin-bottom: 20px;
}
#dropZone.drag-over {
border-color: #ff4500;
background: #fff4f0;
}
#dropZone p {
margin: 0;
color: #666;
}
.icon {
font-size: 48px;
color: #ccc;
margin-bottom: 10px;
}
#importInput {
display: none;
}
.status {
padding: 15px;
border-radius: 8px;
margin-top: 15px;
display: none;
text-align: center;
}
.success {
background-color: #e8f5e9;
color: #2e7d32;
}
.error {
background-color: #ffebee;
color: #c62828;
}
.instructions {
background: #f8f9fa;
padding: 15px;
border-radius: 8px;
margin-bottom: 20px;
}
.instructions h3 {
margin-top: 0;
color: #1c1c1c;
}
.instructions ul {
margin: 0;
padding-left: 20px;
}
.instructions li {
margin: 5px 0;
color: #666;
}
</style>
</head>
<body>
<h2>
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z" fill="currentColor"/>
</svg>
Import Subreddits
</h2>
<div class="instructions">
<h3>How to Import</h3>
<ul>
<li>Drag and drop your subreddits JSON file here</li>
<li>Or click to select a file</li>
<li>The window will close automatically after successful import</li>
</ul>
</div>
<div id="dropZone">
<div class="icon">📁</div>
<p>Drag and drop your subreddits file here<br>or click to select</p>
</div>
<input type="file" id="importInput" accept=".json">
<div id="status" class="status"></div>
<script src="import.js"></script>
</body>
</html>