Cara menampilkan ikon pemuatan dengan HTML
mrfdn.com – Saya sibuk melihat Express dan HTMX. Dan rasanya menyenangkan karena HTMX seperti sulap.
Hal-hal yang dianggap malas ternyata bisa dengan mudah dilakukan dengan susah payah.
Misalnya, sekarang saya ingin menampilkan sinyal pemuatan selama transfer data di server.
Ini sangat sederhana, HTMX memiliki gaya yang disebut hx-indicator.
Cara ini dapat ditempatkan pada tombol atau tag html yang membawa data. Di sini saya menggunakan simbol <button> untuk mendapatkan datanya.
<button hx-trigger="click" hx-get="/fetchdata" hx-target="#lihatdata" hx-indicator="#loading">Fetch</button>
Kemudian buat simbol baru untuk meletakkan simbol pemuatan, bisa berupa teks atau gambar.
Di label atur atributnya class="htmx-indicator". Contohnya meliputi:
<div id="loading" class="htmx-indicator">Loading data...</div>
Jadi nanti ketika menekan tombol Fetch maka indikator akan otomatis aktif dengan menampilkan tulisan Loading data…, dan setelah data terdeteksi maka indikator tersebut akan langsung hilang.
Demikian tutorial singkat cara menampilkan icon loading dengan htmx.
Semoga bermanfaat.
PakarPBN
A Private Blog Network (PBN) is a collection of websites that are controlled by a single individual or organization and used primarily to build backlinks to a “money site” in order to influence its ranking in search engines such as Google. The core idea behind a PBN is based on the importance of backlinks in Google’s ranking algorithm. Since Google views backlinks as signals of authority and trust, some website owners attempt to artificially create these signals through a controlled network of sites.
In a typical PBN setup, the owner acquires expired or aged domains that already have existing authority, backlinks, and history. These domains are rebuilt with new content and hosted separately, often using different IP addresses, hosting providers, themes, and ownership details to make them appear unrelated. Within the content published on these sites, links are strategically placed that point to the main website the owner wants to rank higher. By doing this, the owner attempts to pass link equity (also known as “link juice”) from the PBN sites to the target website.
The purpose of a PBN is to give the impression that the target website is naturally earning links from multiple independent sources. If done effectively, this can temporarily improve keyword rankings, increase organic visibility, and drive more traffic from search results.