-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
35 lines (35 loc) · 1.44 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="/css/style.css">
<title>Imgboard</title>
<script src="/js/app.js" type="module" crossorigin="use-credentials" defer></script>
</head>
<body>
<header>
<h1>IMGBOARD</h1>
</header>
<div id="main">
<image-modal v-if="imageClicked" :image-id="imageClicked" @close="hideModal"></image-modal>
<form class="upload-form">
<input v-model="title" type="text" name="title" placeholder="title" required>
<input v-model="username" type="text" name="username" placeholder="username">
<input v-model="description" type="text" name="description" placeholder="description">
<input @change="selectFile" type="file" id="file_input" name="file" accept="image/*" ref="fileInput" required>
<button @click.prevent="upload">Upload</button>
</form>
<div class="image-wrapper">
<div v-for="image in images" class="image" @click="showModal(image.id)">
<img :src="image.url" :alt="image.description" :key="image.id"></image>
<div class="image-title" :key="image.id">
{{image.title}} <span>({{image.created_at}})</span>
</div>
</div>
</div>
<div class="more-btn">
<button v-if="moreImagesAvailable" @click="loadMoreImages">More</button>
</div>
</div>
</body>
</html>