32 lines
866 B
Text
32 lines
866 B
Text
|
<div class="box">
|
||
|
<form method="POST" enctype="multipart/form-data">
|
||
|
<h1>
|
||
|
Upload
|
||
|
</h1>
|
||
|
<div class="field">
|
||
|
<label for="image">Choisir une image</label>
|
||
|
<input
|
||
|
type="file"
|
||
|
accept="image/*"
|
||
|
class="custom-file-input"
|
||
|
id="image"
|
||
|
name="image"
|
||
|
aria-describedby="file"
|
||
|
/>
|
||
|
</div>
|
||
|
|
||
|
<button type="submit" class="button is-primary">Uploader</button>
|
||
|
|
||
|
<% if ( page.upload ) { %>
|
||
|
<div class="grid gap-5 grid-cols-1 md:grid-cols-2">
|
||
|
<div class="image-preview">
|
||
|
<img src="<%= page.upload.smallFile %>" alt="Miniature" />
|
||
|
</div>
|
||
|
<div>
|
||
|
<%- include('../partials/file-links', {file: page.upload, index: 0}) %>
|
||
|
</div>
|
||
|
</div>
|
||
|
<% } %>
|
||
|
</form>
|
||
|
</div>
|