Learning-HTMX/17-results-summary-componen...
efim f238940622 docs: readme for first Go exercise 2023-10-04 11:52:18 +00:00
..
design init: adding frontendmentor task resources 2023-10-03 14:27:38 +00:00
public feat: generating tailwind out.css in nix build 2023-10-04 11:28:28 +00:00
templates feat: split results into insertable component 2023-10-04 09:13:12 +00:00
.gitignore feat: generating tailwind out.css in nix build 2023-10-04 11:28:28 +00:00
.project init: 17 - simple page with go ssr 2023-10-03 10:15:07 +00:00
README.org docs: readme for first Go exercise 2023-10-04 11:52:18 +00:00
data.json init: adding frontendmentor task resources 2023-10-03 14:27:38 +00:00
default.nix feat: generating tailwind out.css in nix build 2023-10-04 11:28:28 +00:00
go.mod init: 17 - simple page with go ssr 2023-10-03 10:15:07 +00:00
input.css feat: colors for items via css variable 2023-10-04 05:16:52 +00:00
main.go feat: docker image for results component 2023-10-04 10:39:33 +00:00
results-summary-component-go feat: docker image for results component 2023-10-04 10:39:33 +00:00
screenshot-desktop.png docs: readme for first Go exercise 2023-10-04 11:52:18 +00:00
screenshot-mobile.png docs: readme for first Go exercise 2023-10-04 11:52:18 +00:00
style-guide.md init: adding frontendmentor task resources 2023-10-03 14:27:38 +00:00
tailwind.config.js feat: colors for items via css variable 2023-10-04 05:16:52 +00:00

README.org

Frontend Mentor - Results summary component solution

This is a solution to the Results summary component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Overview

The challenge

Users should be able to:

  • View the optimal layout for the interface depending on their device's screen size
  • See hover and focus states for all interactive elements on the page
  • Bonus: Use the local JSON data to dynamically populate the content

Screenshot

/efim/Learning-HTMX/media/commit/8ff2ec3766ddd9db79546b8b00f55d14417097db/17-results-summary-component-go/screenshot-mobile.png /efim/Learning-HTMX/media/commit/8ff2ec3766ddd9db79546b8b00f55d14417097db/17-results-summary-component-go/screenshot-desktop.png

My process

Built with

  • Semantic HTML5 markup
  • TailwindCSS
  • Flexbox
  • CSS Grid
  • Mobile-first workflow
  • Go Server Side Rendering
  • Nix for building and docker image creation

What I learned

restarting server of file watch

go doesn't have built in restart on file watch, and there are separate programs that do that

wgo -verbose -file .go -file .gohtml -file tailwind.config.js tailwindcss -i ./input.css -o public/out.css :: go run main.go -p 1234

and doing tailwind first, because server embeds the output css file, so it's needed for the build step

setting up static routes with default go web server
generating template and returning it as response of go route
embedding files into the binary for portability
using css variables to set custom colors in TailwindCSS
getting cli arguments in the go program

Continued development

Further things to learn: getting data from forms, general go things - coroutines, utilizing sqlite, embedding PocketBase

Useful resources