Commit Graph

340 Commits

Author SHA1 Message Date
leo a385b194b9
handlers/home: render success with StatusOK
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-11 05:07:53 +02:00
leo 468e20da0a
handlers/index: refactor to use c.Render
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-11 05:01:19 +02:00
leo f80e06078a
handlers/home: redirect w/ 303 instead of 301
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-11 04:55:56 +02:00
leo 847d4aab22
handlers: rename helper.go -> error.go
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-11 04:54:31 +02:00
leo 9bbfbe923e
app: set debug lvl also to gommon Echo logger
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-11 04:48:24 +02:00
leo 741af20b6e
app: call logger consistently
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-11 04:45:33 +02:00
leo bef3cb228e
app(logger): restore the old behaviour
All checks were successful
continuous-integration/drone/push Build is passing
that is - have the Logger() method return pointer to the local (s)logger
2023-05-11 04:42:38 +02:00
leo 355f09bf5a
set embeds early to prevent nil pointer derefs
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-11 04:40:10 +02:00
leo 122ea638c9
go: refactor template rendering
All checks were successful
continuous-integration/drone/push Build is passing
* create pkg 'modules/template'
* move template rendering code from 'handlers' to 'modules/template'
* update call sites
* walk the 'templates' dir to discover nested hierarchies
* solidify LiveMode handling (vs embedded assets)
* break out funcMap to it's own file
* general clean-up
2023-05-11 04:32:39 +02:00
leo 61760fa373
app/assets.go: add info on what path failed
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-11 03:09:12 +02:00
leo 46cc1d663f
go(handlers): split get,set funcMap funcs
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-10 19:17:17 +02:00
leo 2215383c5d
go: refactor handlers
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-10 19:09:41 +02:00
leo 813d0c233e
echo settings: enable rate-limiting
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-10 17:48:02 +02:00
leo 30347cd485
gitignore: ignore vim sessions [skip ci] 2023-05-10 12:42:26 +02:00
leo a879704535
go: partially rework how slogging works
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-09 17:35:00 +02:00
leo e44238600b
slogging: add a default if unknown level is set
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-09 13:23:51 +02:00
leo 0efb419d56
tmpl,just: process SVGs with svgo
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-08 23:42:27 +02:00
leo df0c280ad1
go: redo asset handling
All checks were successful
continuous-integration/drone/push Build is passing
* only embed substructure of assets
* create subfolders for css, imgs
* add .gitattributes file specifying pcmt.css as generated (by tailwind)
2023-05-08 00:13:33 +02:00
leo 1b2679ad97
go: add generate mechanism for frontend
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-07 19:37:44 +02:00
leo 0490786f11
refactor(handlers): break out signin funcs
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-07 00:19:10 +02:00
leo e122e26596
templates(navbar): condition the link target
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-07 00:14:32 +02:00
leo 4f697282cf
templates: align footer with the main container
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-07 00:12:37 +02:00
leo 9dbc475145
go: implement the Echo renderer for templates
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-06 21:50:35 +02:00
leo e651235f90
air: update config [skip ci] 2023-05-06 13:49:23 +02:00
leo 7d1c65e5a9
config: rename dir testconfigs to testdata
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-06 13:47:46 +02:00
leo f8df3f3806
dhall: switch to using the versioned config
All checks were successful
continuous-integration/drone/push Build is passing
the Dhall config package formerly in ./config/schema has been moved to
https://git.dotya.ml/mirre-mt/pcmt-config-schema/, meaning the schema
has been decoupled from this repository.

the schema is now being versioned, which makes it easier to progress
without breaking stuff (unless we wanted to reference the versions by
commit hashes...).

* use schema version 0.0.0
2023-05-06 01:48:03 +02:00
leo c4f8cf87f5
go: redirect signed users from / to /home
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-06 00:09:13 +02:00
leo eafc9c1e92
go,tmpl: conditionally show content to users
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-06 00:03:41 +02:00
leo 0a34bca1c1
go: allow choosing db type, setting connstr
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-05 23:10:56 +02:00
leo f1bb52c58f
go: add a setting val for whether db is set up
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-05 22:58:13 +02:00
leo b1ab686493
go: add db module for preps/checks
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-05 22:52:59 +02:00
leo 4dad751716
handlers: rm pages.go [skip ci] 2023-05-05 19:58:35 +02:00
leo bb4854cf1f
nix: add devenv
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-05 19:43:28 +02:00
leo bfafc4a8be
config: update schema
All checks were successful
continuous-integration/drone/push Build is passing
* couple session-related attrs in a record
* couple logger-pertaining attrs in a record
* update config Go representation
* update Go config consumers
2023-05-05 19:31:43 +02:00
leo 5a1ec4fe28
js: correct the commands [skip ci] 2023-05-05 15:09:02 +02:00
leo dfdcc77737
conf: add pretty printing,raw conf, conf tests
All checks were successful
continuous-integration/drone/push Build is passing
* also, set debug logger directly in config if devel mode is set
* add new flag to indicate whether the passed config is path or raw
  config
2023-05-04 23:49:25 +02:00
leo 2a56ba3456
ci: bump golang to 1.20.4
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-05 01:33:36 +02:00
leo d9265cafa8
config: use new form + add example [skip ci]
* also unstage config.dhall and add it to the list of the ignored
2023-05-04 21:40:25 +02:00
leo 746eb82f67
go: make sure flags are properly checked
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 21:28:30 +02:00
leo 44025ccd36
dhall: create a package for config [skip ci] 2023-05-04 21:02:15 +02:00
leo 0c835d0daf
fix(config.dhall): correct the port range
All checks were successful
continuous-integration/drone/push Build is passing
well this is embarassing
2023-05-04 16:42:05 +02:00
leo 9fd55dbc0b
app: pre-declare errors
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 16:38:15 +02:00
leo 38f72825e0
app: switch a couple of Info statements to Debug
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 16:35:41 +02:00
leo 18adb45692
ci: make frontend depend on pull
All checks were successful
continuous-integration/drone/push Build is passing
* change git status checking method to git diff-index
2023-05-04 15:12:24 +02:00
leo 1f427abbbe
ci: rename 'npm i' to 'frontend'
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 15:09:29 +02:00
leo f3b6075c27
ci: set GOPATH on arch to make use of caching
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 15:07:07 +02:00
leo 48e3c49b52
ci: run tests sooner
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 15:00:42 +02:00
leo 6c47b6e354
just: run pg with user namespaces [skip ci] 2023-05-04 00:12:39 +02:00
leo ecd3330ea8
fix(just): mount actual data folder [skip ci] 2023-05-04 00:12:14 +02:00
leo 279514f350
just: add prod target [skip ci] 2023-05-03 23:58:40 +02:00