Drag and drop fileuploading (janky).

This commit is contained in:
Gabriel Simmer 2019-02-28 22:27:13 -08:00
parent 8b49d75077
commit c252f1bf77
No known key found for this signature in database
GPG key ID: 0394452F45EF2817
2 changed files with 27 additions and 2 deletions

View file

@ -6,8 +6,13 @@
<head>
<title>{{ $path }} | PiNas</title>
<link rel="stylesheet" href="/assets/styles.css">
<script type="text/javascript" src="/assets/fileListing.js"></script>
</head>
<body>
<body ondragenter="dragEnter(event)" ondragexit="dragExit(event)">
<div id="uploadoverlay" class="fileupload hidden">
<p><img src="/assets/svgs/newfile.svg" alt="">Upload</p>
</div>
<header>
<a href="/" class="back-button">
<img src="/assets/svgs/back.svg" alt="">
@ -21,7 +26,7 @@
<div class="content">
{{ if eq $prefix "files" }}
<form action="/upload" method="post" enctype="multipart/form-data">
<input type="value" value="{{$path}}" name="path">
<input id="path" type="value" value="{{$path}}" name="path">
<input type="file" data-multiple-caption="{count} files selected" multiple name="file">
<input type="submit" value="Upload">
</form>

View file

@ -5,6 +5,26 @@ body {
background-color: #fefefe;
}
.fileupload {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,0.5);
z-index: 2;
cursor: pointer;
text-align: center;
color: white;
font-size: 70px;
}
.hidden {
display: none;
}
h1, h2, h3 {
padding: 0;
margin: 0;