diff --git a/admin/db.go b/admin/db.go index 89b7735..af662c7 100644 --- a/admin/db.go +++ b/admin/db.go @@ -127,13 +127,14 @@ func Update(table string, value reflect.Value) error { // skip update of id to avoid replacing it if tag == "id" { continue } + fmt.Println(">>>>>>>>>>>>>>>>> field", tag, "=", field.Interface()) builder = builder.Set(tag, field.Interface()) } builder = builder.Where(sq.Eq{"id": value.FieldByName("Id").Interface()}) sql_query, args, err := builder.ToSql() - fmt.Println("UPDATE QUERY", sql_query, args) + fmt.Println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!UPDATE QUERY", sql_query, args) if err != nil { return err} _, err = data.DB.Exec(sql_query, args...) diff --git a/common/api.go b/common/api.go index 9d3f70b..6028589 100644 --- a/common/api.go +++ b/common/api.go @@ -56,7 +56,9 @@ func ReflectOnPost(typeOf reflect.Type, c *fiber.Ctx) (reflect.Value, error) { var validate *validator.Validate validate = validator.New(validator.WithRequiredStructEnabled()) - if err := validate.Struct(result); err != nil { + err := validate.Struct(result) + + if err != nil { validationErrors := err.(validator.ValidationErrors) log.Println(validationErrors) return result_val, err diff --git a/data/models.go b/data/models.go index 3021b26..7cfbeb9 100644 --- a/data/models.go +++ b/data/models.go @@ -36,6 +36,10 @@ type Game struct { Url string `db:"url" json:"url"` Tags string `db:"tags" json:"tags"` Video string `db:"video" json:"video"` + CurrentStatus string `db:"current_status" json:"current_status" form:"current_status"` + PlannedWork string `db:"planned_work" json:"planned_work" form:"planned_work"` + CodeUrl string `db:"code_url" json:"code_url" form:"code_url"` + HeaderImage string `db:"header_image" json:"header_image" form:"header_image"` } func Models() map[string]reflect.Type { diff --git a/migrations/20250918184107_game_page_info.sql b/migrations/20250918184107_game_page_info.sql new file mode 100644 index 0000000..e8c3559 --- /dev/null +++ b/migrations/20250918184107_game_page_info.sql @@ -0,0 +1,15 @@ +-- +goose Up +-- +goose StatementBegin +ALTER TABLE game ADD COLUMN current_status TEXT DEFAULT ""; +ALTER TABLE game ADD COLUMN planned_work TEXT DEFAULT ""; +ALTER TABLE game ADD COLUMN code_url TEXT DEFAULT ""; +ALTER TABLE game ADD COLUMN header_image TEXT DEFAULT ""; +-- +goose StatementEnd + +-- +goose Down +-- +goose StatementBegin +ALTER TABLE game DROP COLUMN current_status; +ALTER TABLE game DROP COLUMN planned_work; +ALTER TABLE game DROP COLUMN code_url; +ALTER TABLE game DROP COLUMN header_image; +-- +goose StatementEnd diff --git a/static/images/game_mini_header.png b/static/images/game_mini_header.png new file mode 100644 index 0000000..600c910 Binary files /dev/null and b/static/images/game_mini_header.png differ diff --git a/static/input_style.css b/static/input_style.css index 5ad1bf8..71aa6c0 100644 --- a/static/input_style.css +++ b/static/input_style.css @@ -200,7 +200,7 @@ block.center-vertical { } bar { - @apply flex flex-row p-4 gap-4; + @apply flex flex-col sm:flex-row p-4 gap-4; } bar.center-horizontal { diff --git a/static/style.css b/static/style.css index 66d63b9..0527f8b 100644 --- a/static/style.css +++ b/static/style.css @@ -247,6 +247,9 @@ .flex { display: flex; } + .grid { + display: grid; + } .hidden { display: none; } @@ -262,6 +265,9 @@ .aspect-\[9\/12\]\! { aspect-ratio: 9/12 !important; } + .aspect-square { + aspect-ratio: 1 / 1; + } .aspect-square\! { aspect-ratio: 1 / 1 !important; } @@ -308,12 +314,21 @@ .flex-1 { flex: 1; } + .flex-shrink { + flex-shrink: 1; + } .shrink-0 { flex-shrink: 0; } + .border-collapse { + border-collapse: collapse; + } .transform { transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,); } + .resize { + resize: both; + } .two-panel { grid-template-columns: repeat(1, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); @@ -351,6 +366,9 @@ .justify-evenly { justify-content: space-evenly; } + .gap-0 { + gap: calc(var(--spacing) * 0); + } .gap-0\! { gap: calc(var(--spacing) * 0) !important; } @@ -414,6 +432,10 @@ border-width: 1px !important; border-color: var(--color-red-900) !important; } + .border { + border-style: var(--tw-border-style); + border-width: 1px; + } .border-1 { border-style: var(--tw-border-style); border-width: 1px; @@ -484,6 +506,9 @@ .bg-gray-800 { background-color: var(--color-gray-800); } + .bg-green-400 { + background-color: var(--color-green-400); + } .bg-green-400\! { background-color: var(--color-green-400) !important; } @@ -496,6 +521,9 @@ .\!p-4 { padding: calc(var(--spacing) * 4) !important; } + .p-0 { + padding: calc(var(--spacing) * 0); + } .p-0\! { padding: calc(var(--spacing) * 0) !important; } @@ -523,6 +551,9 @@ .\!pb-20 { padding-bottom: calc(var(--spacing) * 20) !important; } + .pb-0 { + padding-bottom: calc(var(--spacing) * 0); + } .pb-0\! { padding-bottom: calc(var(--spacing) * 0) !important; } @@ -541,6 +572,9 @@ .pb-8 { padding-bottom: calc(var(--spacing) * 8); } + .pb-10 { + padding-bottom: calc(var(--spacing) * 10); + } .pb-10\! { padding-bottom: calc(var(--spacing) * 10) !important; } @@ -589,12 +623,18 @@ --tw-font-weight: var(--font-weight-light); font-weight: var(--font-weight-light); } + .text-wrap { + text-wrap: wrap; + } .text-gray-50 { color: var(--color-gray-50); } .text-gray-300 { color: var(--color-gray-300); } + .text-gray-400 { + color: var(--color-gray-400); + } .text-gray-950 { color: var(--color-gray-950); } @@ -604,15 +644,27 @@ .text-red-500 { color: var(--color-red-500); } + .underline { + text-decoration-line: underline; + } .shadow-lg { --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); } + .outline { + outline-style: var(--tw-outline-style); + outline-width: 1px; + } .transition { transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events; transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); transition-duration: var(--tw-duration, var(--default-transition-duration)); } + .\*\:\!p-0 { + :is(& > *) { + padding: calc(var(--spacing) * 0) !important; + } + } .\*\:text-xl { :is(& > *) { font-size: var(--text-xl); @@ -1045,9 +1097,12 @@ block.center-vertical { } bar { display: flex; - flex-direction: row; + flex-direction: column; gap: calc(var(--spacing) * 4); padding: calc(var(--spacing) * 4); + @media (width >= 40rem) { + flex-direction: row; + } } bar.center-horizontal { justify-content: center; diff --git a/views/game.html b/views/game.html index 6d4deda..b86739f 100644 --- a/views/game.html +++ b/views/game.html @@ -6,35 +6,55 @@
| RECENT REVIEWS: | Insanely Optimistic |
|---|---|
| ENGLISH REVIEWS: | Probably Racist |
| RELEASE DATE: | A Total Fantasy |
| DEVELOPER: | Zed A. Shaw |
| PUBLISHER: | My Fucking Self |
Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.
-| + |
Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.
+Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.
-Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.
- +All of the code for this project is online in my personal git repository. It's not open source, but you can read the code, run the game, and learn from it. Think of it like the programmer's version of a thirst trap on Instagram. You can look but you own nothing.
+ +