blob: b78616d8874a0f6cba28b52a62069a1f530df849 (
plain)
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
|
package main
import "time"
templ index(prompt, negPrompt, imageURL string, howLong time.Duration) {
<style>
.big-input {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
padding: 0.5rem;
width: 100%;
}
</style>
<form>
<input class="big-input" id="prompt" name="prompt" type="text" value={ prompt }/>
<br/>
<input class="big-input" id="negative_prompt" name="negative_prompt" type="text" value={ negPrompt }/>
<br/>
<button>Submit</button>
</form>
if imageURL != "" {
<div id="image">
<img
width="100%"
src={ imageURL }
/>
<p>Generated in { howLong.String() }</p>
</div>
}
}
templ ohNoes(why string) {
<big>Oh noes!</big>
<p>{ why }</p>
<p>Audience: please laugh.</p>
}
|