-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
38 lines (38 loc) · 1.36 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
36
37
38
<html>
<body>
<head>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<div id="app" class="min-h-screen flex flex-col items-center">
<div class="bg-[#212121] flex-grow w-full flex flex-col items-center">
<div class="flex flex-col w-[600px]">
<div v-if="imageURL || loading" class="w-full flex justify-end">
<div class="bg-[#303030] text-white rounded-md p-4 m-4">
{{ lastPrompt }}
</div>
</div>
<div v-if="loading" class="w-full flex items-start">
<div class="text-white w-full text-left p-4">
Generating image...
</div>
</div>
<a v-else-if="imageURL" :href="imageURL" target="_blank">
<img :src="imageURL" class="w-[320px] cursor-pointer" />
</a>
</div>
</div>
<form
@submit.prevent="handleSubmit"
class="bg-[#2f2f2f] absolute bottom-4 flex items-center gap-3 p-4 rounded-md"
>
<textarea
v-model="prompt"
class="bg-transparent outline-none focus:outline-none text-white min-w-[320px]"
></textarea>
<button class="bg-white p-2 rounded-md">Generate</button>
</form>
</div>
<script src="./script.js"></script>
</body>
</html>