summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorMaksymilian Jopek <maks@jopek.eu>2021-11-02 23:18:46 +0100
committerMaksymilian Jopek <maks@jopek.eu>2021-11-02 23:41:18 +0100
commit9cff90d8ed3880670c9ff49dbe2a993b5aeb3132 (patch)
tree779baff2cad04f2aa5e302605717f8613be43e2a /views
downloadbars-manager-9cff90d8ed3880670c9ff49dbe2a993b5aeb3132.tar.gz
bars-manager-9cff90d8ed3880670c9ff49dbe2a993b5aeb3132.tar.zst
bars-manager-9cff90d8ed3880670c9ff49dbe2a993b5aeb3132.zip
v1.0.0
Diffstat (limited to 'views')
-rw-r--r--views/filemanager.hbs45
-rw-r--r--views/info.hbs10
-rw-r--r--views/layouts/main.hbs41
-rw-r--r--views/upload.hbs10
4 files changed, 106 insertions, 0 deletions
diff --git a/views/filemanager.hbs b/views/filemanager.hbs
new file mode 100644
index 0000000..f5f7b18
--- /dev/null
+++ b/views/filemanager.hbs
@@ -0,0 +1,45 @@
+<div style="float: left; width: 19%; height: 90%; background-color: grey; color: lightgrey; font-size: 1.4em; text-align: center;">
+ Filemanager<br>
+ <a href="remove-all" style="color: lightgrey"><u>Remove data about files from array</u></a>
+</div>
+<div style="float: left; width: 80%; font-color: lightgrey; font-size: 1.3em; margin-left: 10px; margin-top: -10px;">
+ <table>
+ <style>
+ table {
+ border-spacing: 0;
+ font-size: 1.3em;
+ width: 100%;
+ text-align: center;
+ }
+ td {
+ min-width: 50px;
+ }
+ </style>
+ <thead style="background-color: lightblue;">
+ <tr>
+ <th>id</th>
+ <th>obraz</th>
+ <th>name</th>
+ <th>size</th>
+ <th>type</th>
+ <th>-</th>
+ <th>-</th>
+ <th>-</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#each FILES}}
+ <tr>
+ <td>{{id}}</td>
+ <td><img src="{{img}}" width="20" height="20"></td>
+ <td>{{name}}</td>
+ <td>{{size}}</td>
+ <td>{{type}}</td>
+ <td><a href="/delete?id={{id}}">DELETE</a></td>
+ <td><a href="/info?id={{id}}">INFO</a></td>
+ <td><a href="/download?id={{id}}" download="{{name}}">DOWNLOAD</a></td>
+ </tr>
+ {{/each}}
+ </tbody>
+ </table>
+</div> \ No newline at end of file
diff --git a/views/info.hbs b/views/info.hbs
new file mode 100644
index 0000000..08e9ef7
--- /dev/null
+++ b/views/info.hbs
@@ -0,0 +1,10 @@
+<div style="float: left; width: 19%; height: 90%; background-color: grey; color: lightgrey; font-size: 1.4em; text-align: center;">
+ File info
+</div>
+<div style="float: left; width: 80%; font-color: lightgrey; font-size: 1.3em; margin-left: 10px; margin-top: -10px;">
+ <div><span style="font-size: 1.3em; color: darkblue;">id:</span> {{id}}<br></div>
+ <div style="margin-top: 10px;"><span style="font-size: 1.3em; color: darkblue;">name:</span> {{name}}<br></div>
+ <div style="margin-top: 10px;"><span style="font-size: 1.3em; color: darkblue;">path:</span> {{path}}<br></div>
+ <div style="margin-top: 10px;"><span style="font-size: 1.3em; color: darkblue;">size:</span> {{size}}<br></div>
+ <div style="margin-top: 10px;"><span style="font-size: 1.3em; color: darkblue;">savedate:</span> {{date}}<br></div>
+</div>
diff --git a/views/layouts/main.hbs b/views/layouts/main.hbs
new file mode 100644
index 0000000..70fb5a0
--- /dev/null
+++ b/views/layouts/main.hbs
@@ -0,0 +1,41 @@
+<html lang="en">
+
+<head>
+    
+ <meta charset="UTF-8" />
+    
+ <title>cwiczenie 01</title>
+ <style>
+ body, html {
+ margin: 0;
+ padding: 0;
+ }
+ header {
+ width: 100%;
+ height: 90px;
+ background-color: darkblue;
+ display: flex;
+ align-items: center;
+ margin: 0;
+ margin-top: -20px;
+ font-size: 1.4em;
+ }
+ header > a {
+ color: white;
+ margin-left: 20px;
+ }
+ </style>
+</head>
+
+<body>
+ <header>
+ <a href="/upload">UPLOAD</a>
+ <a href="/filemanager">FILEMANGER</a>
+ <a href="/info">INFO</a>
+ </header>
+    
+ {{{body}}}
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/views/upload.hbs b/views/upload.hbs
new file mode 100644
index 0000000..1ba8698
--- /dev/null
+++ b/views/upload.hbs
@@ -0,0 +1,10 @@
+<div style="float: left; width: 19%; height: 90%; background-color: grey; color: lightgrey; font-size: 1.4em; text-align: center;">
+ Multiupload
+</div>
+<div style="float: left; width: 80%; font-color: lightgrey; margin-left: 10px; margin-top: -10px;">
+ <form action="/upload" method="POST" enctype="multipart/form-data" style="margin: 40px">
+ <input type="file" accept="*/*" name="upl" multiple id="files" style="font-size: 1.3em;">
+ <button type="submit" style="font-size: 1.3em;">Upload</button>
+ </form>
+ {{!-- <button onclick="uploadFiles()">Upload</button> --}}
+</div> \ No newline at end of file