Skip to content

Commit

Permalink
fix: normalize Arabic text rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
dewanakl committed Dec 31, 2024
1 parent 32a6355 commit 9ae6267
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ <h2 class="font-esthetic my-4" style="font-size: 2.5rem;">Wahyu &amp; Riski</h2>

<!-- Bride -->
<section class="bg-black text-center px-2" id="bride">
<h2 class="font-arabic py-4 m-0" style="font-size: 2rem;">بِسْمِ اللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ</h2>
<h2 class="font-arabic py-4 m-0" style="font-size: 2rem;">بِسْمِ اللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ</h2>
<h2 class="font-esthetic py-4 m-0" style="font-size: 2rem;">Assalamualaikum Warahmatullahi Wabarakatuh</h2>
<p class="pb-4 m-0" style="font-size: 0.95rem;">Tanpa mengurangi rasa hormat, kami mengundang Anda untuk berkenan menghadiri acara pernikahan kami:</p>

Expand Down Expand Up @@ -486,7 +486,7 @@ <h2 class="font-esthetic text-center mt-2 mb-4" style="font-size: 2.5rem;">Ucapa
<p class="pb-2 pt-4" style="font-size: 0.95rem;">Terima kasih atas perhatian dan doa restu Anda, yang menjadi kebahagiaan serta kehormatan besar bagi kami.</p>

<h2 class="font-esthetic" style="font-size: 2rem;">Wassalamualaikum Warahmatullahi Wabarakatuh</h2>
<h2 class="font-arabic pt-4" style="font-size: 2rem;">اَلْحَمْدُ لِلّٰهِ رَبِّ الْعٰلَمِيْنَۙ</h2>
<h2 class="font-arabic pt-4" style="font-size: 2rem;">اَلْحَمْدُ لِلّٰهِ رَبِّ الْعٰلَمِيْنَۙ</h2>

<hr class="my-3">

Expand Down
10 changes: 10 additions & 0 deletions js/guest.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,15 @@ export const guest = (() => {
*/
const animate = (svg, timeout, classes) => util.timeOut(() => svg.classList.add(classes), timeout);

/**
* @returns {void}
*/
const normalize = () => {
document.querySelectorAll('.font-arabic').forEach((el) => {
el.innerHTML = String(el.innerHTML).normalize('NFC');
});
};

/**
* @returns {void}
*/
Expand All @@ -192,6 +201,7 @@ export const guest = (() => {
session.init();
offline.init();

normalize();
countDownDate();
information = storage('information');

Expand Down

0 comments on commit 9ae6267

Please sign in to comment.