From 1da3051c3d34755a3a3bbdc8811949d655d04a59 Mon Sep 17 00:00:00 2001 From: itsig0 Date: Sun, 24 Mar 2024 18:30:43 +0100 Subject: [PATCH] + build command for makefile --- Makefile | 11 ++++- view/home/home_templ.go | 2 +- view/hptracker/tracker_templ.go | 88 ++++++++++++++++----------------- view/layout/base_templ.go | 6 +-- view/layout/footer_templ.go | 2 +- view/layout/header_templ.go | 2 +- 6 files changed, 60 insertions(+), 51 deletions(-) diff --git a/Makefile b/Makefile index e732327..4f889f0 100644 --- a/Makefile +++ b/Makefile @@ -6,4 +6,13 @@ templ: @templ generate -watch -proxy=http://localhost:3000 sass: - @sass --no-source-map --watch view/stylesheets/tallytome.scss public/tallytome.css \ No newline at end of file + @sass --no-source-map --watch view/stylesheets/tallytome.scss public/tallytome.css + +build: + @rm -rf tmp/release/tallytome + @mkdir -p tmp/release/tallytome + @templ generate + @go build main.go + @mv main tallytome + @mv tallytome tmp/release/tallytome + @cp -r public tmp/release/tallytome \ No newline at end of file diff --git a/view/home/home_templ.go b/view/home/home_templ.go index 2485086..bc927c8 100644 --- a/view/home/home_templ.go +++ b/view/home/home_templ.go @@ -31,7 +31,7 @@ func Show(hx bool) templ.Component { templ_7745c5c3_Buffer = templ.GetBuffer() defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Schön hier aber waren sie schon mal in Mordor?

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/view/hptracker/tracker_templ.go b/view/hptracker/tracker_templ.go index 3e09fca..9df0c52 100644 --- a/view/hptracker/tracker_templ.go +++ b/view/hptracker/tracker_templ.go @@ -82,7 +82,7 @@ func Show(hx bool, td TrackerData) templ.Component { templ_7745c5c3_Buffer = templ.GetBuffer() defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -90,7 +90,7 @@ func Show(hx bool, td TrackerData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 2) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -98,7 +98,7 @@ func Show(hx bool, td TrackerData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 3) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

TP

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -106,7 +106,7 @@ func Show(hx bool, td TrackerData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 4) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Mana

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -114,7 +114,7 @@ func Show(hx bool, td TrackerData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 5) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -147,7 +147,7 @@ func TrackerHeader(td TrackerData) templ.Component { templ_7745c5c3_Var3 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 6) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Kampfrunde: ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -160,7 +160,7 @@ func TrackerHeader(td TrackerData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 7) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -168,7 +168,7 @@ func TrackerHeader(td TrackerData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 8) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -192,7 +192,7 @@ func TrackerColumn(td TrackerData) templ.Component { templ_7745c5c3_Var5 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 9) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -200,7 +200,7 @@ func TrackerColumn(td TrackerData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 10) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -208,7 +208,7 @@ func TrackerColumn(td TrackerData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 11) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -232,7 +232,7 @@ func HPTracker(td TrackerData) templ.Component { templ_7745c5c3_Var6 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 12) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("TP: ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -245,7 +245,7 @@ func HPTracker(td TrackerData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 13) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("/") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -258,7 +258,7 @@ func HPTracker(td TrackerData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 14) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -267,7 +267,7 @@ func HPTracker(td TrackerData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 15) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -299,7 +299,7 @@ func ManaTracker(td TrackerData) templ.Component { templ_7745c5c3_Var10 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 17) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Mana: ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -312,7 +312,7 @@ func ManaTracker(td TrackerData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 18) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("/") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -325,7 +325,7 @@ func ManaTracker(td TrackerData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 19) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -334,7 +334,7 @@ func ManaTracker(td TrackerData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 20) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -388,7 +388,7 @@ func BaseStats(td TrackerData, bd BaseData) templ.Component { templ_7745c5c3_Var14 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 22) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Standard Werte
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if bd.Errors != "" { - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 26) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -430,12 +430,12 @@ func BaseStats(td TrackerData, bd BaseData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 27) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 28) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -459,17 +459,17 @@ func Hp(dd DamageData) templ.Component { templ_7745c5c3_Var16 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 29) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if dd.Errors != "" { - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 33) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -495,22 +495,22 @@ func Hp(dd DamageData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 34) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 35) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -534,17 +534,17 @@ func Mana(md ManaData) templ.Component { templ_7745c5c3_Var18 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 38) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if md.Errors != "" { - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 42) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -570,12 +570,12 @@ func Mana(md ManaData) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 43) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 44) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/view/layout/base_templ.go b/view/layout/base_templ.go index c55a746..5c60214 100644 --- a/view/layout/base_templ.go +++ b/view/layout/base_templ.go @@ -24,7 +24,7 @@ func Base(hx bool) templ.Component { } ctx = templ.ClearChildren(ctx) if hx == false { - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" Tallytome
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -32,7 +32,7 @@ func Base(hx bool) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 2) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -40,7 +40,7 @@ func Base(hx bool) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 3) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/view/layout/footer_templ.go b/view/layout/footer_templ.go index 9d6fd89..da512a0 100644 --- a/view/layout/footer_templ.go +++ b/view/layout/footer_templ.go @@ -23,7 +23,7 @@ func footer() templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Feet

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/view/layout/header_templ.go b/view/layout/header_templ.go index 6db5e21..1e43682 100644 --- a/view/layout/header_templ.go +++ b/view/layout/header_templ.go @@ -23,7 +23,7 @@ func header() templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }