Skip to content
This repository was archived by the owner on Sep 21, 2023. It is now read-only.

Commit b310e6e

Browse files
committed
Added better drag & drop support
1 parent 78c7208 commit b310e6e

File tree

2 files changed

+38
-5
lines changed

2 files changed

+38
-5
lines changed

index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<!-- https://getbootstrap.com/docs/3.4/getting-started/ -->
2323
<link rel="stylesheet" href="styles/bootstrap.min.css">
2424
<link rel="stylesheet" href="styles/bootstrap-theme.min.css">
25-
<link rel="stylesheet" href="styles/style.css?ver=1.2">
25+
<link rel="stylesheet" href="styles/style.css?ver=2.0.1">
2626
</head>
2727
<body>
2828
<noscript>
@@ -133,8 +133,8 @@ <h2>Select Files &amp; Infos</h2>
133133
<label for="encryptedFiles">
134134
En/Decrypt-File(s):
135135
</label>
136-
<div class="bottom-space">
137-
<input type="file" accept=".png,.ogg,.m4a,.rpgmvp,.rpgmvm,.rpgmvo,.png_,.ogg_,.m4a_" name="encryptedFiles" id="encryptedFiles" multiple required>
136+
<div class="bottom-space drag-drop-file">
137+
<input type="file" accept=".png,.ogg,.m4a,.rpgmvp,.rpgmvm,.rpgmvo,.png_,.ogg_,.m4a_" name="encryptedFiles" id="encryptedFiles" title="Drag and drop files here or select them" multiple required>
138138
</div>
139139
</div>
140140
</fieldset>
@@ -314,8 +314,8 @@ <h2>Select RPGMVP / PNG_ Files</h2>
314314
<label for="encryptedImg">
315315
Select File/s to restore:
316316
</label>
317-
<div class="bottom-space">
318-
<input id="encryptedImg" type="file" accept=".rpgmvp,.png_" name="encryptedImg" multiple required>
317+
<div class="bottom-space drag-drop-file">
318+
<input id="encryptedImg" type="file" accept=".rpgmvp,.png_" name="encryptedImg" title="Drag and drop files here or select them" multiple required>
319319
</div>
320320
</fieldset>
321321

styles/style.css

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,29 @@ button#encrypt > span {
348348
margin: 0;
349349
}
350350

351+
/* Drag & Drop Styles */
352+
.drag-drop-file {
353+
position: relative;
354+
}
355+
356+
.drag-drop-file input[type="file"] {
357+
outline: 2px dashed #92b0b3;
358+
outline-offset: -10px;
359+
padding: 60px 0;
360+
background-color: #efefef;
361+
text-align: center;
362+
width: 100%;
363+
}
364+
365+
.drag-drop-file:before {
366+
content: "(or) Drag and Drop files here.";
367+
color: #92b0b3;
368+
position: absolute;
369+
bottom: 30px;
370+
left: 50%;
371+
transform: translate(-50%);
372+
}
373+
351374
/* Media-Queries */
352375
@media all and (min-width: 801px) and (max-width: 1080px) {
353376
#home a.menu-link,
@@ -372,6 +395,11 @@ button#encrypt > span {
372395
.button-grid-wrapper .box2 button {
373396
width: 100%;
374397
}
398+
399+
/* Drag & Drop Styles */
400+
.drag-drop-file input[type="file"] {
401+
padding-bottom: 90px;
402+
}
375403
}
376404

377405
@media all and (max-width: 800px) {
@@ -431,4 +459,9 @@ button#encrypt > span {
431459
.button-grid-wrapper .box2 button {
432460
width: 100%;
433461
}
462+
463+
/* Drag & Drop Styles */
464+
.drag-drop-file input[type="file"] {
465+
padding-bottom: 90px;
466+
}
434467
}

0 commit comments

Comments
 (0)