Skip to content

Commit

Permalink
feat: infocards middle part\!
Browse files Browse the repository at this point in the history
  • Loading branch information
dd84ai committed Mar 24, 2024
1 parent ab2b64a commit 67c0e83
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 6 deletions.
10 changes: 10 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,13 @@ tasks:
dev:templ:
cmds:
- templ generate -watch --cmd="go run . --act=web"

dev:watch:
cmds:
# pip install watchdog[watchmedo]
- >
watchmedo auto-restart
--patterns "*.templ;*.go;*.css"
-i "*_templ.go"
--recursive
-- sh -c "task web; sleep infinity"
11 changes: 9 additions & 2 deletions darkstat/common/common_static/common.templ
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
package common_static

templ CommonCSS() {
<style>
<style>
/*Defaults*/
h3 {
font-size: 1.4em;
font-weight: bold;
}

p {
font-size: 1.17em;
}
</style>
}
}
20 changes: 17 additions & 3 deletions darkstat/front/bases.templ
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,23 @@ templ BasesT(bases []configs_export.Base) {
}

templ BasesInfo(info configs_export.Infocard) {
<div class="info">
for _, line := range info.Beginning {
<p>{ line }</p>
<style>
.infocard {
margin: 10px;

.infocard_p {
margin-top: 10px;
margin-bottom: 10px;
}
}
</style>
<div class="infocard">
<h3>infocard</h3>
for _, line := range info.Start {
<p class="infocard_p">{ line }</p>
}
for _, line := range info.Middle {
<p class="infocard_p">{ line }</p>
}
</div>
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21.1

require (
github.com/a-h/templ v0.2.543
github.com/darklab8/fl-configs v0.6.1
github.com/darklab8/fl-configs v0.7.0
github.com/darklab8/go-typelog v0.6.0
github.com/darklab8/go-utils v0.12.0
github.com/yosssi/gohtml v0.0.0-20201013000340-ee4748c638f4
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ github.com/darklab8/fl-configs v0.6.0 h1:iHLgESF7qKsxEc2viB7mmJil0d7ZGF5pRUbEkzX
github.com/darklab8/fl-configs v0.6.0/go.mod h1:8zaCaFL21TvawP65KB9NOJ+nEpaMDQYsnoOi77RiSVY=
github.com/darklab8/fl-configs v0.6.1 h1:gqbhBCkYyMebcHO/3TgSfc/NkNkpK5XnSScrR1Ckysw=
github.com/darklab8/fl-configs v0.6.1/go.mod h1:8zaCaFL21TvawP65KB9NOJ+nEpaMDQYsnoOi77RiSVY=
github.com/darklab8/fl-configs v0.7.0 h1:bK6km7nhkiVVEmjn1gf9r2MLEJ7fVJC1oIi1O+2OnVA=
github.com/darklab8/fl-configs v0.7.0/go.mod h1:8zaCaFL21TvawP65KB9NOJ+nEpaMDQYsnoOi77RiSVY=
github.com/darklab8/go-typelog v0.5.0 h1:7/lG9BH1svf2vcSOdNhYbFhKBr8tveHBgw4D/ChaISA=
github.com/darklab8/go-typelog v0.5.0/go.mod h1:AwwOf3dkp/tpevHFNbkB+PbwlDrUUgO1CVFkEnj+q5w=
github.com/darklab8/go-typelog v0.6.0 h1:Ci8imc7ScXiy5e1qMgf46NyJjrqNLPoIE1gbVe7bxl4=
Expand Down

0 comments on commit 67c0e83

Please sign in to comment.