-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.html
160 lines (157 loc) · 4.6 KB
/
app.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
{{ define "content" }}
<section class="hero">
<div class="hero-body">
<div class="container has-text-centered">
<p class="title">Build progressively enhanced reactive html apps</p>
<p class="subtitle">
using <a href="https://golang.org/">Go</a>,
<a href="https://pkg.go.dev/html/template">html/template</a>
& <a href="https://alpinejs.dev/">Alpine.js</a>
</p>
</div>
</div>
</section>
{{/*
<section class="">
<div class="container has-text-centered block">
<a class="button is-large is-responsive is-dark" href="/docs">
Get started
</a>
</div>
</section>
*/}}
<section class="">
<div class="container content is-size-5">
<div class="columns">
<div class="column is-8 is-offset-2">
<div class="content">
<div class="box">{{ markdown "app.md" "hero" }}</div>
</div>
</div>
</div>
</div>
</section>
<section class="section">
<div class="container has-text-centered is-size-6">
<p class="">
Scroll below to see a demo & a quickstart guide
<i>↓</i> or read about
<a href="https://adnaan.notion.site/Fir-2358531aced84bf1b0b1a687760fff3b"
>how it works</a
>.
</p>
</div>
</section>
<section class="section box" style="">
<div class="columns">
<div class="column is-5">
<div class="content" x-data>
{{ markdown "app.md" "section1.0" }}
<div class="block">
<div class="py-2 is-size-4">Count: {{ .count }}</div>
<form method="post">
<button
class="button is-success"
formaction="/?event=inc"
type="submit"
>
+
</button>
<button
class="button is-danger"
formaction="/?event=dec"
type="submit"
>
-
</button>
</form>
</div>
{{ markdown "app.md" "section1.1" }}
</div>
</div>
<div class="column is-6 is-offset-1" x-data="{tab: 'tab1'}">
<div class="tabs is-boxed">
<ul>
<li :class="{ 'is-active': tab === 'tab1' }">
<a @click.prevent="tab = 'tab1'">counter.html</a>
</li>
<li :class="{ 'is-active': tab === 'tab2' }">
<a @click.prevent="tab = 'tab2'"> counter.go</a>
</li>
</ul>
</div>
<div x-show="tab === 'tab1'">
{{ markdown
"https://raw.githubusercontent.com/livefir/docs/main/examples/counter/counter.html"
}}
</div>
<div x-show="tab === 'tab2'">
{{ markdown
"https://raw.githubusercontent.com/livefir/docs/main/examples/counter/counter.go"
}}
</div>
</div>
</div>
</section>
<section class="section box" style="">
<div class="columns">
<div class="column is-5">
<div class="content" x-data>
{{ markdown "app.md" "section2.0" }}
<div class="block" x-data>
<div class="py-2 is-size-4" @fir:[inc:ok,dec:ok]="$fir.replace()">
Count: {{ .count }}
</div>
<form method="post" @submit.prevent="$fir.submit()">
<button
class="button is-success"
formaction="/?event=inc"
type="submit"
>
+
</button>
<button
class="button is-danger"
formaction="/?event=dec"
type="submit"
>
-
</button>
</form>
</div>
{{ markdown "app.md" "section2.1" }}
<div class="card px-2 py-2 mb-4">
<div class="card-content">
<p class="has-text-weight-semibold">
{{ markdown "app.md" "section2.2" }}
</p>
</div>
</div>
{{ markdown "app.md" "section2.3" }}
</div>
</div>
<div class="column is-6 is-offset-1" x-data="{tab: 'tab1'}">
<div class="tabs is-boxed">
<ul>
<li :class="{ 'is-active': tab === 'tab1' }">
<a @click.prevent="tab = 'tab1'">counter.html</a>
</li>
<li :class="{ 'is-active': tab === 'tab2' }">
<a @click.prevent="tab = 'tab2'"> counter.go</a>
</li>
</ul>
</div>
<div x-show="tab === 'tab1'">
{{ markdown
"https://raw.githubusercontent.com/livefir/docs/main/examples/counter-live/counter.html"
}}
</div>
<div x-show="tab === 'tab2'">
{{ markdown
"https://raw.githubusercontent.com/livefir/docs/main/examples/counter-live/counter.go"
}}
</div>
</div>
</div>
</section>
{{ end }}