# Unemployed #10 - HTMX

No update on the job hunting today. An ex coworker gave me a job vacancy from Switzerland and didn’t took any action yet.

Decided to continue on my playground building a short url service using Go. The first one was how to implement [templ](https://templ.guide/) in go as view template. It was interesting because we can separate the view components and made it reusable.

```go
package components

templ Header() {
    <header class="bg-gray-800 py-4">
        <div class="container mx-auto px-4">
            <h1 class="text-2xl font-bold">Goshu</h1>
        </div>
    </header>
}
```

That component later could be called into other template by `@components.Head()`. As a person who familiar with [Laravel Blade](https://laravel.com/docs/11.x/blade), separating components seems good idea.

Anyway the landing looks like this now:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1729264606705/543a2322-51f1-4026-903d-a97a60ef7412.png align="center")

Tried [htmx](https://htmx.org/) on POST form got successfully implemented but I struggled little bit. It’s been a while I played around with html forms because for recent years mostly related with REST API and platform related development. Also I need to adapt on the htmx syntax including all the events, attributes, etc.

However I still couldn’t parse the JSON response on the views side once the form submitted successfully. Definitely will be my next research on that.

That’s it, have a good day!

[← Unemployed #9 - Update On Job Hunting](https://blog.didiktrisusanto.dev/unemployed-9-update-on-job-hunting)

[Unemployed #37 - End of Search and Incoming Offers →](https://blog.didiktrisusanto.dev/unemployed-37-end-of-search-and-incoming-offers)
