108 lines
3.6 KiB
Org Mode
108 lines
3.6 KiB
Org Mode
* new exersice after long time
|
|
now will be learning https://github.com/a-h/templ
|
|
it's a templating solution for go, more similar to jsx
|
|
but it also needs a pre-processing step, so i'm adding it like tailwind
|
|
|
|
with Makefile for make run/live
|
|
and will need to add as a step in project build
|
|
|
|
* setting up
|
|
https://git.sunshine.industries/efim/golang-templ-and-tailwind
|
|
have separate repo, but i guess i'll remove .git from this dir,
|
|
to have single commits across Learning HTMX?
|
|
|
|
or maybe magit will just allow for simple integration?
|
|
just not pushing into origin, committing, and then committing from overall repository?
|
|
|
|
** not so simple, but still quite OK!
|
|
|
|
there's now 'subtree' which is separate concept from submodule,
|
|
and it is maybe simpler:
|
|
|
|
https://magit.vc/manual/magit/Subtree.html
|
|
|
|
i'm using the repo url
|
|
ssh://gitea@git.sunshine.industries:65433/efim/golang-templ-and-tailwind.git
|
|
|
|
and the command magit subtree add,
|
|
specify the directory, and it gets embedded it seems.
|
|
i have one level magit dispatch and my notes would be committed to the main repo,
|
|
i would potentially be able to pull in commits from the parent?
|
|
|
|
and maybe somehow contribute, but yeah, this is still confusing 🙂
|
|
how would i commit to subtree upstream if there are conflicting changes?
|
|
maybe i'll just get denied, as simple as that.
|
|
|
|
allright! let's add exercise specific data (again)
|
|
|
|
* so, starting dev
|
|
|
|
old process:
|
|
1. open second browser and open png with style
|
|
first mobile
|
|
2. enable view C-S-m in firefox
|
|
the responsive mode
|
|
|
|
i suppose next is adding colors to tailwind configuration?
|
|
from the styleguide file
|
|
|
|
also
|
|
3. check desktop style, whether any big rearrangements are required
|
|
so that i'd start mobile with way to rearrange things
|
|
|
|
do i have a separate note with all of these things?
|
|
i've also used some commands to vertically center my stuff
|
|
|
|
** DONE allright, tailwind config go
|
|
font, size, colors
|
|
|
|
** well, i don't really want to go on.
|
|
but yeah, i'll need hierarchy of the elements.
|
|
|
|
** ok. thoughs:
|
|
the componets would be
|
|
- my balance bubble
|
|
because it is spacially separate
|
|
- spending summary
|
|
- graph inside spending summary
|
|
or maybe don't even need that
|
|
|
|
the component should take up all space provided to it.
|
|
if parent would want to add space around - that's easy to do,
|
|
but if component insists on adding space around itself - harder to reuse?
|
|
because then if parent would want to have child take up all space - negative padding?
|
|
|
|
*** allright, @ to include sub templates
|
|
|
|
** well, last part? preparing the docker container for deployment on Render.com?
|
|
|
|
which port should be used?
|
|
also, this would be first time i'll add templ as a build step
|
|
|
|
** for some reason image doesn't work well
|
|
|
|
podman run -d -p 9090:8080 localhost/expenses-chart:latest /nix/store/l4r6glmzbvkhg97lp4dn7nm76w6hz41g-expenses-chart-0.0.1/bin/temp-exercise
|
|
|
|
this runs,
|
|
but podman run -it expenses-chart:latest
|
|
Error: crun: executable file `/nix/store/l4r6glmzbvkhg97lp4dn7nm76w6hz41g-expenses-chart-0.0.1/bin/templ-exercise` not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found
|
|
|
|
oh, well
|
|
|
|
** you know what - i give up
|
|
|
|
for some reason when i open url to app running in container,
|
|
and it's on the 8080 port of the host machine - the static files are served
|
|
|
|
if i use any other port of local machine, to forward into container,
|
|
the static files are not served
|
|
|
|
maybe this is bug in go? i don't know
|
|
StripPrefix doesn't seem to do anything
|
|
|
|
and for some reason in this specific exercise CMD doesn't work in the container
|
|
so let's just give up!
|
|
|
|
i could try to write a docker file and check with that, but yeah
|
|
|