/* ICOSIN site — shared header/footer, menus, and data-driven blocks. */ (function () { "use strict"; document.documentElement.classList.remove("no-js"); var D = window.ICOSIN; var ed = D.editions[D.current]; var root = document.body.getAttribute("data-root") || ""; var page = document.body.getAttribute("data-page") || ""; var cfp = D.pretalxBase + "/" + ed.pretalxSlug + "/"; var Y = ed.year + "/"; var icon = { menu: '', close: '', chev: '' }; var NAV = [ { label: "Call for Papers", href: Y, id: "edition" }, { label: "Committees", id: "committee", sub: [ { label: "Advisory Board", href: "committee/#advisory" }, { label: "Technical Program Committee", href: "committee/#tpc" }, { label: "Reviewers", href: "reviewers/" }, { label: "Organizing Committee", href: "committee/#organizing" } ] }, { label: "Speakers", href: Y + "#speakers" }, { label: "For Authors", id: "authors", sub: [ { label: "Submission Guidelines", href: "authors/#guidelines" }, { label: "Paper Template", href: "authors/#template" }, { label: "Registration Fee", href: "authors/#fees" }, { label: "Program Schedule", href: "authors/#schedule" }, { label: "Presentation Template", href: "authors/#presentation" }, { label: "Virtual Background (Zoom)", href: "authors/#background" }, { label: "Flyer", href: "authors/#flyer" } ] }, { label: "Proceedings", href: "proceedings/", id: "proceedings" }, { label: "Previous ICOSIN", href: "past/", id: "past" }, { label: "Contact", href: "contact/", id: "contact" } ]; function esc(s) { return String(s).replace(/[&<>"]/g, function (c) { return { "&": "&", "<": "<", ">": ">", '"': """ }[c]; }); } /* ---------- header ---------- */ var header = document.getElementById("site-header"); if (header) { var desktop = NAV.map(function (n) { var cur = n.id === page ? ' aria-current="page"' : ""; if (n.sub) { return '
  • "; } return '
  • " + n.label + "
  • "; }).join(""); var mobile = 'Home' + NAV.map(function (n) { if (n.sub) return '
    ' + n.label + "
    " + n.sub.map(function (s) { return '' + s.label + ""; }).join(""); return '' + n.label + ""; }).join(""); header.className = "site-header"; header.innerHTML = '" + '"; var toggle = header.querySelector(".menu-toggle"); var menu = header.querySelector(".mobile-menu"); toggle.addEventListener("click", function () { var open = menu.classList.toggle("open"); toggle.setAttribute("aria-expanded", open); toggle.innerHTML = open ? icon.close : icon.menu; document.body.style.overflow = open ? "hidden" : ""; }); menu.addEventListener("click", function (e) { if (e.target.tagName === "A") toggle.click(); }); } /* ---------- footer ---------- */ var footer = document.getElementById("site-footer"); if (footer) { footer.className = "site-footer"; footer.innerHTML = '
    ' + '
    ' + "
    " + 'ICOSINInt\'l Conference on Smart Informatics' + '

    An annual international conference on artificial intelligence, informatics and computing, organized by the ' + esc(D.owner.name) + ", Pontianak — on the Equator, in the heart of Borneo.

    " + "
    " + "

    Conference

    " + "

    For Authors

    " + "

    Contact

    " + "
    " + '
    © ' + new Date().getFullYear() + " ICOSIN · " + esc(D.owner.name) + "ICOSIN " + ed.year + " co-hosted with Universiti Malaysia Sarawak (UNIMAS)
    " + "
    "; } /* ---------- helpers ---------- */ var MONTHS = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; function fmtDate(iso) { var p = iso.split("-"); return MONTHS[+p[1] - 1] + " " + +p[2] + ", " + p[0]; } function todayISO() { return new Date(Date.now() + 7 * 3600 * 1000).toISOString().slice(0, 10); } function idr(n) { return "IDR " + n.toLocaleString("en-US"); } document.querySelectorAll("[data-ed]").forEach(function (el) { var v = ed[el.getAttribute("data-ed")]; if (v != null) el.textContent = v; }); document.querySelectorAll("[data-cfp]").forEach(function (el) { el.href = cfp; }); document.querySelectorAll("[data-mail]").forEach(function (el) { el.href = "mailto:" + D.email; if (!el.textContent.trim()) el.textContent = D.email; }); /* Important dates, with changed dates struck through */ document.querySelectorAll("[data-render=dates]").forEach(function (el) { var today = todayISO(), nextDone = false; el.innerHTML = ed.dates.map(function (d) { var cls = []; if (d.date < today) cls.push("past"); else if (!nextDone) { cls.push("next"); nextDone = true; } if (d.main) cls.push("main"); return '
  • " + esc(d.label) + "
  • "; }).join(""); }); document.querySelectorAll("[data-render=fees]").forEach(function (el) { el.innerHTML = "" + ed.fees.map(function (f) { return ""; }).join("") + "
    CategoryFee
    " + esc(f.who) + '' + idr(f.idr) + "
    "; }); function personCard(p, flag) { return '
    ' + esc(p.name) + '
    ' + "

    " + esc(p.name) + "

    " + esc(p.affiliation) + "

    " + (flag && p.country ? '' + esc(p.country) + "" : "") + "
    "; } document.querySelectorAll("[data-render=keynotes]").forEach(function (el) { el.innerHTML = ed.keynotes.map(function (p) { return personCard(p, true); }).join(""); }); document.querySelectorAll("[data-render=welcoming]").forEach(function (el) { el.innerHTML = ed.welcoming.map(function (p) { return personCard(p, false); }).join(""); }); document.querySelectorAll("[data-render=speakers-row]").forEach(function (el) { var list = el.getAttribute("data-list") === "welcoming" ? ed.welcoming : ed.keynotes; el.innerHTML = list.map(function (p) { return '
    ' + esc(p.name) + "" + esc(p.affiliation) + "
    "; }).join(""); }); document.querySelectorAll("[data-render=tracks]").forEach(function (el) { var limit = +(el.getAttribute("data-limit") || 0); el.innerHTML = ed.tracks.map(function (t) { var list = limit ? t.topics.slice(0, limit) : t.topics; var more = limit && t.topics.length > limit ? '+ ' + (t.topics.length - limit) + " more topics →" : ""; return '
    ' + esc(t.code) + "

    " + esc(t.name) + "

    " + more + "
    "; }).join(""); }); /* Partners of the edition, grouped by role */ document.querySelectorAll("[data-render=partners]").forEach(function (el) { el.className += " partner-list"; el.innerHTML = ed.partners.map(function (p) { return '

    ' + esc(p.role) + "

    " + esc(p.name) + "

    "; }).join(""); }); /* General chair welcome message */ document.querySelectorAll("[data-render=chair]").forEach(function (el) { var c = ed.generalChair; var initials = c.name.replace(/(Prof|Dr|S\.T|M\.T)\.?/g, "").match(/\b[A-Z]/g) || []; el.innerHTML = '
    ' + '
    ' + (c.photo ? '' + esc(c.name) + '' : "" + initials.slice(0, 2).join("") + "") + "
    " + "
    " + c.message.map(function (p) { return "

    " + esc(p) + "

    "; }).join("") + "
    " + '
    ' + esc(c.name) + "" + esc(c.title) + "
    "; }); /* Countdown */ document.querySelectorAll("[data-render=countdown]").forEach(function (cd) { var target = new Date(ed.startTime).getTime(); cd.innerHTML = ["Days", "Hours", "Minutes", "Seconds"].map(function (p) { return "
    0" + p + "
    "; }).join(""); var cells = cd.querySelectorAll("b"); var tick = function () { var s = Math.max(0, Math.floor((target - Date.now()) / 1000)); [Math.floor(s / 86400), Math.floor(s % 86400 / 3600), Math.floor(s % 3600 / 60), s % 60].forEach(function (v, i) { cells[i].textContent = i ? String(v).padStart(2, "0") : v; }); }; tick(); setInterval(tick, 1000); }); /* Reveal on scroll */ var els = document.querySelectorAll(".reveal"); if ("IntersectionObserver" in window) { var io = new IntersectionObserver(function (entries) { entries.forEach(function (e) { if (e.isIntersecting) { e.target.classList.add("in"); io.unobserve(e.target); } }); }, { rootMargin: "0px 0px -8% 0px" }); els.forEach(function (el) { io.observe(el); }); } else { els.forEach(function (el) { el.classList.add("in"); }); } })();