59 lines
4.3 KiB
Handlebars
59 lines
4.3 KiB
Handlebars
<html>
|
|
<head>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
|
|
</head>
|
|
|
|
<body>
|
|
<div class="vstack gap-3">
|
|
<div class="bg-light border rounded-3 p-2">
|
|
<div class="d-grid gap-2">
|
|
<form action="/upload/{{current.0.path}}" method="post" enctype="multipart/form-data">
|
|
<input type="file" id="file" name="upload" onchange="this.form.submit()" hidden/>
|
|
</form>
|
|
<div class="d-flex flex-row">
|
|
<a type="button" class="btn btn-outline-primary text-start col-sm-1 ms-1 me-1" href="/serve/{{parent.0.path}}" role="button">
|
|
..
|
|
</a>
|
|
<a type="button" class="btn btn-outline-secondary text-start col-sm-1 ms-1 me-1" href="/logout" role="button">
|
|
Logout
|
|
</a>
|
|
<button class="btn btn-outline-success text-start col-sm-1 ms-1 me-1" onclick="document.getElementById('file').click()">
|
|
<i class="bi bi-file-earmark-plus"></i>
|
|
</button>
|
|
</div>
|
|
{{#each ctx}}
|
|
<div class="d-flex flex-row">
|
|
{{#if is_file}}
|
|
<a type="button" class="btn btn-outline-secondary text-start col-sm-3" href="/file/{{path}}" role="button" style="overflow: hidden;">
|
|
<i class="bi bi-file-earmark"></i>
|
|
{{name}}
|
|
</a>
|
|
{{else}}
|
|
<a type="button" class="btn btn-outline-secondary text-start col-sm-3" href="/serve/{{path}}" role="button" style="overflow: hidden;">
|
|
<i class="bi bi-folder-fill"></i>
|
|
{{name}}
|
|
</a>
|
|
{{/if}}
|
|
|
|
<a type="button" class="btn btn-outline-danger text-start ms-1 me-1" href="/del/{{path}}" role="button">
|
|
<i class="bi bi-trash"></i>
|
|
</a>
|
|
</div>
|
|
{{/each}}
|
|
<div class="d-flex flex-row">
|
|
<form class='form-inline' action="/dir/{{current.0.path}}" method="post" id = "create-form">
|
|
<div class="input-group mb-3 flex-nowrap">
|
|
<input type="text" class="form-control" id="name" name="name" placeholder = "Create Folder"/>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
document.getElementById("name").addEventListener("keyup", function (event) { if (event.keyCode == 13) { document.getElementById("create-form").submit(); }});
|
|
</script>
|
|
</body>
|
|
</html>
|