-
Notifications
You must be signed in to change notification settings - Fork 0
/
Upload.html
187 lines (163 loc) · 5.1 KB
/
Upload.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bazzar Bandhu Drop</title>
<style>
body {
background-color: #221d1d;
color: #f6f6f6;
font-family: 'Arial', sans-serif;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
}
.logo {
position: absolute;
top: 20px;
left: 20px;
display: flex;
align-items: center;
}
.logo img {
height: 40px;
margin-right: 5px;
}
.logo span {
font-size: 1.5rem;
font-weight: bold;
}
.drop-zone {
width: 300px;
height: 300px;
border-radius: 50%;
background-color: #0b0a27;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
cursor: pointer;
position: relative;
overflow: hidden;
}
.drop-zone::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 50%;
border: 2px dashed #4CAF50;
}
/* .drop-zone::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 50px;
height: 50px;
background-color: #282828;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
} */
.drop-zone::after img {
width: 30px;
}
.drop-zone h3 {
margin-top: 20px;
font-size: 1.2rem;
text-align: center;
}
.drop-zone p {
font-size: 1.2rem;
margin-top: 5px;
text-align: center;
}
.drop-zone .upload-button {
background-color: #4CAF50;
color: #f6eeee;
padding: 10px 20px;
border: none;
border-radius: 5px;
font-size: 1rem;
cursor: pointer;
margin-top: 10px;
transition: background-color 0.3s ease;
}
.drop-zone .upload-button:hover {
background-color: #45a049;
}
.drop-zone.active::before {
border-color: #4CAF50;
}
.drop-zone.active::after {
background-color: #4CAF50;
}
h1 {
font-size: 5.0rem;
margin-top: 50px;
text-decoration-color: #f4efef;
}
p {
font-size: 1.9rem;
margin-top: 0px;
text-align: center;
color: #e6d8d8;
}
</style>
</head>
<body>
<div class="logo">
<img src="loginlogo.png" alt="Netlify Logo">
<span>Bazzar Bandhu</span>
</div>
<div class="drop-zone">
<img src="Fol.jpeg" alt="Folder Icon">
<h3>Drag and drop your site <br> output file here</h3>
<p>Or, <a href="#" class="upload-link">browse to upload.</a></p>
</div>
<h1>Drag & drop. It's online.</h1>
<p>Drop a file with your site's excel and csv files. <br> We'll give you a link to share it.</p>
<script>
const dropZone = document.querySelector('.drop-zone');
const uploadButton = document.querySelector('.upload-button');
// Event listeners for drag and drop
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
dropZone.addEventListener(eventName, (event) => {
event.preventDefault();
event.stopPropagation();
if (eventName === 'dragenter' || eventName === 'dragover') {
dropZone.classList.add('active');
} else {
dropZone.classList.remove('active');
}
});
});
// Handle dropped files
dropZone.addEventListener('drop', (event) => {
const files = event.dataTransfer.files;
// Handle file uploads
});
// Handle file selection from browse button
uploadButton.addEventListener('click', () => {
const fileInput = document.createElement('input');
fileInput.type = 'file';
fileInput.accept = '*/*';
fileInput.click();
fileInput.addEventListener('change', (event) => {
const files = event.target.files;
// Handle file uploads
});
});
</script>
</body>
</html>