Skip to main content

Command Palette

Search for a command to run...

Unemployed #10 - HTMX

Updated
1 min read
Unemployed #10 - HTMX
D

Hi, I am a cat lover and software engineer from Malang, mostly doing PHP and stuff. Software Engineer Live in Malang, Indonesia Visit my resume and portfolios at didiktrisusanto.dev See you, folks!

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 in go as view template. It was interesting because we can separate the view components and made it reusable.

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, separating components seems good idea.

Anyway the landing looks like this now:

Tried htmx 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

Unemployed #37 - End of Search and Incoming Offers →

More from this blog

D

Didik Tri Susanto

32 posts

Hi, welcome to my blog. I am a cat lover and software engineer from Malang, mostly doing PHP, Go and stuff. I will cover topics like software engineering, career, Laravel, web development, and Golang