{"id":1798,"date":"2026-07-28T10:02:54","date_gmt":"2026-07-28T10:02:54","guid":{"rendered":"https:\/\/nils.gov.lk\/?page_id=1798"},"modified":"2026-07-28T10:06:31","modified_gmt":"2026-07-28T10:06:31","slug":"online-registration","status":"publish","type":"page","link":"https:\/\/nils.gov.lk\/?page_id=1798","title":{"rendered":"Online Registration"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1798\" class=\"elementor elementor-1798\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-067c4d6 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"067c4d6\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"aux-parallax-section elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9283a60\" data-id=\"9283a60\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b26bfd4 elementor-widget elementor-widget-html\" data-id=\"b26bfd4\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>NILS Online Registration Portal<\/title>\n    <link href=\"https:\/\/fonts.googleapis.com\/css2?family=Poppins:wght@300;400;500;600;700&display=swap\"\n        rel=\"stylesheet\">\n    <link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/font-awesome\/6.4.0\/css\/all.min.css\">\n    <style>\n        :root {\n            --nils-blue: #003366;\n            --nils-gold: #ffcc00;\n            --bg: #f8fafc;\n            --white: #ffffff;\n            --text-main: #0f172a;\n            --text-sub: #475569;\n        }\n\n        * {\n            margin: 0;\n            padding: 0;\n            box-sizing: border-box;\n        }\n\n        body {\n            font-family: 'Poppins', sans-serif;\n            background-color: var(--bg);\n            color: var(--text-main);\n            overflow-x: hidden;\n            top: 0 !important;\n        }\n\n        .top-bar {\n            background: #ffffff;\n            padding: 10px 20px;\n            display: flex;\n            justify-content: flex-end;\n            align-items: center;\n            border-bottom: 1px solid #e2e8f0;\n            position: sticky;\n            top: 0;\n            z-index: 1000;\n        }\n\n        header {\n            background: linear-gradient(-45deg, #003366, #00509d, #001a33, #003366);\n            background-size: 400% 400%;\n            animation: gradientBG 15s ease infinite;\n            color: white;\n            padding: 4rem 1rem 5rem;\n            text-align: center;\n            border-bottom: 6px solid var(--nils-gold);\n        }\n\n        @keyframes gradientBG {\n            0% {\n                background-position: 0% 50%;\n            }\n\n            50% {\n                background-position: 100% 50%;\n            }\n\n            100% {\n                background-position: 0% 50%;\n            }\n        }\n\n        .container {\n            max-width: 1300px;\n            margin: auto;\n            padding: 0 20px 60px;\n            position: relative;\n            z-index: 20;\n        }\n\n        .controls-section {\n            max-width: 900px;\n            margin: -40px auto 50px;\n            background: white;\n            padding: 25px;\n            border-radius: 24px;\n            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);\n            text-align: center;\n        }\n\n        .search-flex {\n            display: flex;\n            gap: 15px;\n            width: 100%;\n        }\n\n        .category-nav {\n            display: flex;\n            gap: 12px;\n            flex-wrap: wrap;\n            justify-content: center;\n            margin-top: 20px;\n        }\n\n        .cat-pill {\n            padding: 10px 22px;\n            background: #fff;\n            border: 1.5px solid #e2e8f0;\n            border-radius: 50px;\n            font-size: 0.85rem;\n            font-weight: 500;\n            cursor: pointer;\n            transition: 0.3s;\n        }\n\n        .cat-pill.active {\n            background: var(--nils-blue);\n            color: white;\n            border-color: var(--nils-blue);\n        }\n\n        .course-grid {\n            display: grid;\n            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n            gap: 30px;\n        }\n\n        .card {\n            background: var(--white);\n            border-radius: 24px;\n            overflow: hidden;\n            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);\n            display: flex;\n            flex-direction: column;\n            transition: 0.4s;\n            border: 1px solid rgba(0, 0, 0, 0.05);\n        }\n\n        .card:hover {\n            transform: translateY(-8px);\n            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);\n        }\n\n        .card-img-container {\n            width: 100%;\n            position: relative;\n            background: #eee;\n            cursor: pointer;\n            overflow: hidden;\n        }\n\n        .card-img {\n            width: 100%;\n            height: auto;\n            display: block;\n            object-fit: contain;\n        }\n\n        .badge {\n            position: absolute;\n            top: 15px;\n            left: 15px;\n            background: rgba(0, 51, 102, 0.85);\n            color: white;\n            padding: 5px 12px;\n            border-radius: 50px;\n            font-size: 10px;\n            font-weight: 600;\n            text-transform: uppercase;\n            z-index: 5;\n        }\n\n        .badge-tag {\n            top: 45px;\n            background: #ea580c;\n        }\n\n        .card-body {\n            padding: 25px;\n            flex-grow: 1;\n            display: flex;\n            flex-direction: column;\n            cursor: pointer;\n        }\n\n        .card h3 {\n            font-size: 1.3rem;\n            font-weight: 700;\n            color: var(--nils-blue);\n            margin-bottom: 12px;\n            line-height: 1.3;\n        }\n\n        .card-desc {\n            font-size: 0.9rem;\n            color: var(--text-sub);\n            line-height: 1.6;\n            margin-bottom: 10px;\n        }\n\n        .read-more-link {\n            color: var(--nils-blue);\n            font-weight: 600;\n            font-size: 0.85rem;\n            text-decoration: underline;\n            margin-bottom: 15px;\n            display: inline-block;\n        }\n\n        .info-group {\n            margin-top: auto;\n            padding-top: 15px;\n            border-top: 1px solid #f1f5f9;\n            font-size: 0.85rem;\n        }\n\n        .info-row {\n            display: flex;\n            align-items: center;\n            gap: 10px;\n            margin-bottom: 5px;\n            color: var(--text-sub);\n        }\n\n        .price-tag {\n            font-size: 1.5rem;\n            font-weight: 800;\n            color: #ea580c;\n            margin: 15px 0;\n        }\n\n        .apply-btn {\n            background: var(--nils-blue);\n            color: white;\n            text-align: center;\n            padding: 14px;\n            border-radius: 14px;\n            text-decoration: none;\n            font-weight: 600;\n            transition: 0.3s;\n            display: inline-block;\n        }\n\n        .apply-btn:hover {\n            background: #00509d;\n        }\n\n        .modal-overlay {\n            position: fixed;\n            top: 0;\n            left: 0;\n            width: 100%;\n            height: 100%;\n            background: rgba(0, 0, 0, 0.85);\n            backdrop-filter: blur(8px);\n            display: none;\n            justify-content: center;\n            align-items: flex-start;\n            z-index: 4000;\n            overflow-y: auto;\n            padding: 40px 15px;\n        }\n\n        .modal-content {\n            background: white;\n            width: 100%;\n            max-width: 700px;\n            border-radius: 24px;\n            padding: 35px;\n            position: relative;\n            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);\n            margin: auto;\n        }\n\n        .close-modal {\n            float: right;\n            cursor: pointer;\n            font-size: 26px;\n            color: var(--text-sub);\n            margin-bottom: 10px;\n        }\n\n        \/* Unified single-post modal *\/\n        .post-modal-img-wrap {\n            width: 100%;\n            border-radius: 16px;\n            overflow: hidden;\n            margin-bottom: 20px;\n            background: #f1f5f9;\n            cursor: zoom-in;\n        }\n\n        .post-modal-img {\n            width: 100%;\n            height: auto;\n            display: block;\n            object-fit: contain;\n        }\n\n        .post-modal-meta {\n            display: flex;\n            flex-wrap: wrap;\n            gap: 10px 20px;\n            margin: 18px 0 6px;\n            padding: 14px 18px;\n            background: #f8fafc;\n            border: 1.5px solid #e2e8f0;\n            border-radius: 14px;\n            font-size: 0.9rem;\n            font-weight: 600;\n            color: var(--text-main);\n        }\n\n        .post-modal-meta span {\n            display: flex;\n            align-items: center;\n        }\n\n        .post-modal-meta i {\n            color: var(--nils-blue);\n            margin-right: 8px;\n        }\n\n        .post-modal-price {\n            font-size: 1.6rem;\n            font-weight: 800;\n            color: #ea580c;\n            margin: 18px 0;\n        }\n\n        .post-modal-actions {\n            display: flex;\n            gap: 12px;\n            flex-wrap: wrap;\n            margin-top: 10px;\n        }\n\n        .post-modal-actions .apply-btn {\n            flex: 1;\n            min-width: 160px;\n        }\n\n        .copy-link-btn {\n            background: #f1f5f9;\n            color: var(--text-main);\n            border: 1.5px solid #e2e8f0;\n            padding: 14px 18px;\n            border-radius: 14px;\n            font-weight: 600;\n            cursor: pointer;\n            display: inline-flex;\n            align-items: center;\n            gap: 8px;\n            font-family: 'Poppins', sans-serif;\n            font-size: 0.9rem;\n            transition: 0.2s;\n        }\n\n        .copy-link-btn:hover {\n            background: #e2e8f0;\n        }\n\n        .toast {\n            position: fixed;\n            bottom: 30px;\n            left: 50%;\n            transform: translateX(-50%);\n            background: #0f172a;\n            color: white;\n            padding: 12px 24px;\n            border-radius: 50px;\n            font-size: 0.85rem;\n            z-index: 6100;\n            opacity: 0;\n            pointer-events: none;\n            transition: 0.3s;\n        }\n\n        .toast.show {\n            opacity: 1;\n        }\n\n        .img-modal-overlay {\n            position: fixed;\n            top: 0;\n            left: 0;\n            width: 100%;\n            height: 100%;\n            background: rgba(0, 0, 0, 0.95);\n            display: none;\n            flex-direction: column;\n            justify-content: flex-start;\n            align-items: center;\n            z-index: 5000;\n            padding: 60px 15px;\n            overflow-y: auto;\n        }\n\n        .close-btn {\n            position: absolute;\n            top: 25px;\n            right: 35px;\n            color: white;\n            font-size: 55px;\n            cursor: pointer;\n            z-index: 5100;\n            font-weight: bold;\n            line-height: 1;\n        }\n\n        .img-zoom-content {\n            max-width: 90%;\n            max-height: none;\n            border-radius: 8px;\n            object-fit: contain;\n            margin-top: 10px;\n            margin-bottom: 40px;\n        }\n\n        footer {\n            background: var(--nils-blue);\n            color: white;\n            padding: 40px 20px;\n            text-align: center;\n            margin-top: 50px;\n            border-top: 5px solid var(--nils-gold);\n        }\n\n        @media (max-width: 768px) {\n            .course-grid {\n                grid-template-columns: 1fr;\n            }\n\n            header h1 {\n                font-size: 1.8rem;\n            }\n\n            .search-flex {\n                flex-direction: column;\n            }\n\n            .modal-content {\n                padding: 25px;\n                width: 95%;\n            }\n\n            .post-modal-actions {\n                flex-direction: column;\n            }\n\n            .post-modal-actions .apply-btn {\n                width: 100%;\n            }\n\n            .img-modal-overlay {\n                padding-top: 80px;\n            }\n\n            .close-btn {\n                top: 20px;\n                right: 20px;\n                font-size: 45px;\n            }\n\n            .img-zoom-content {\n                max-width: 98%;\n            }\n        }\n    <\/style>\n<\/head>\n\n<body>\n    <div class=\"top-bar\">\n        <div id=\"google_translate_element\"><\/div>\n    <\/div>\n\n    <header>\n        <h1>NILS Online Registration<\/h1>\n        <p>National Institute of Labour Studies<\/p>\n    <\/header>\n\n    <!-- Unified single-post modal: image + title + full description + meta + Register Now + Copy Link -->\n    <div class=\"modal-overlay\" id=\"postModal\" onclick=\"closePostModal()\">\n        <div class=\"modal-content\" onclick=\"event.stopPropagation()\">\n            <span class=\"close-modal\" onclick=\"closePostModal()\"><i class=\"fa-solid fa-circle-xmark\"><\/i><\/span>\n            <h2 id=\"postModalTitle\" style=\"color:var(--nils-blue); font-size:1.6rem; margin-bottom:15px;\">Course\n                Title<\/h2>\n            <div class=\"post-modal-img-wrap\" onclick=\"openImg(document.getElementById('postModalImg').src)\">\n                <img id=\"postModalImg\" class=\"post-modal-img\"\n                    onerror=\"this.src='https:\/\/via.placeholder.com\/600x600?text=No+Image'\">\n            <\/div>\n            <div id=\"postModalDesc\"\n                style=\"line-height:1.7; color:var(--text-sub); white-space: pre-line; font-size: 0.95rem;\">\n                Description...<\/div>\n            <div class=\"post-modal-meta\">\n                <span><i class=\"fa-regular fa-calendar\"><\/i><span id=\"postModalDate\">TBA<\/span><\/span>\n                <span><i class=\"fa-regular fa-clock\"><\/i><span id=\"postModalTime\">TBA<\/span><\/span>\n                <span><i class=\"fa-solid fa-location-dot\"><\/i><span id=\"postModalLocation\">NILS<\/span><\/span>\n            <\/div>\n            <div class=\"post-modal-price\" id=\"postModalPrice\">LKR 0<\/div>\n            <div class=\"post-modal-actions\">\n                <a href=\"#\" target=\"_blank\" id=\"postModalApply\" class=\"apply-btn\">Register Now<\/a>\n                <button type=\"button\" class=\"copy-link-btn\" onclick=\"copyPostLink()\"><i\n                        class=\"fa-solid fa-link\"><\/i> Copy Link<\/button>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <div class=\"img-modal-overlay\" id=\"imgModal\" onclick=\"closeModal('imgModal')\">\n        <span class=\"close-btn\" onclick=\"closeModal('imgModal')\">\u00d7<\/span>\n        <img id=\"fullImg\" class=\"img-zoom-content\">\n    <\/div>\n\n    <div class=\"toast\" id=\"toast\">Link copied!<\/div>\n\n    <div class=\"container\">\n        <div class=\"controls-section\">\n            <div class=\"search-flex\">\n                <input type=\"text\" id=\"searchInput\" class=\"search-box\"\n                    placeholder=\"Search for a course or date (e.g. 2026.03)...\" onkeyup=\"applyFilters()\"\n                    style=\"flex: 1; padding:15px; border-radius:14px; border:1px solid #e2e8f0; outline:none;\">\n                <input type=\"month\" id=\"monthFilter\" class=\"search-box\" onchange=\"applyFilters()\"\n                    title=\"Filter by Month\"\n                    style=\"padding:15px; border-radius:14px; border:1px solid #e2e8f0; outline:none; cursor:pointer; color: var(--text-sub); font-family: 'Poppins', sans-serif;\">\n            <\/div>\n            <div class=\"category-nav\" id=\"categoryNav\">\n                <div class=\"cat-pill active\" id=\"pill-all\" onclick=\"setCat('All')\">All Programs<\/div>\n            <\/div>\n        <\/div>\n\n        <div id=\"loader\" style=\"text-align:center;\"><i class=\"fa-solid fa-spinner fa-spin fa-2x\"><\/i><\/div>\n        <div class=\"course-grid\" id=\"courseGrid\"><\/div>\n    <\/div>\n\n    <footer>\n        <p>\u00a9 <span id=\"year\"><\/span> National Institute of Labour Studies<\/p>\n        <p>Developed by - V.P.R.L. Vidanapathirana<\/p>\n        <div style=\"margin-top: 15px;\">\n            <a href='https:\/\/www.counters-free.net\/'\n                style=\"color: white; text-decoration: none; font-size: 10px; opacity: 0.7;\">counter-FREE<\/a>\n            <br>\n            <script type='text\/javascript'\n                src='https:\/\/www.freevisitorcounters.com\/auth.php?id=221ab83fc2a6c6e94c9fc1d96dc2c026eee5a3ae'><\/script>\n            <script type=\"text\/javascript\"\n                src=\"https:\/\/www.freevisitorcounters.com\/en\/home\/counter\/1514547\/t\/1\"><\/script>\n        <\/div>\n    <\/footer>\n\n    <script type=\"text\/javascript\">\n        function googleTranslateElementInit() {\n            new google.translate.TranslateElement({ pageLanguage: 'en', includedLanguages: 'si,ta,en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE }, 'google_translate_element');\n        }\n    <\/script>\n    <script src=\"\/\/translate.google.com\/translate_a\/element.js?cb=googleTranslateElementInit\"><\/script>\n\n    <script>\n        const API_URL = \"https:\/\/script.google.com\/macros\/s\/AKfycbxlMiseZ5YjuzOFeNWSaJ5mqQ-EC5tWGIsFbRMGpTCBeGhiqZLLBJRI-Ch2ib6NjFEA\/exec\";\n        let allData = [];\n        let currentCat = 'All';\n        document.getElementById('year').textContent = new Date().getFullYear();\n\n        \/\/ Kept exactly as in your original file\n        function fixImg(url) {\n            if (!url) return 'https:\/\/via.placeholder.com\/600x600?text=No+Image';\n            if (url.includes('drive.google.com')) {\n                const id = url.split('id=')[1] || url.split('\/d\/')[1].split('\/')[0];\n                return `https:\/\/lh3.googleusercontent.com\/u\/0\/d\/${id}`;\n            }\n            return url;\n        }\n\n        async function load() {\n            try {\n                const r = await fetch(API_URL);\n                allData = await r.json();\n                updateNav();\n                applyFilters();\n                \/\/ Deep-link: if the URL was opened with ?post=<id>, auto-open that post's modal\n                const params = new URLSearchParams(window.location.search);\n                const initialPost = params.get('post');\n                if (initialPost) openPost(initialPost, false);\n            } catch (e) { document.getElementById('loader').innerText = \"Failed to load.\"; }\n        }\n\n        function updateNav() {\n            const nav = document.getElementById('categoryNav');\n            let cats = [];\n            allData.forEach(i => {\n                if (i.Category) {\n                    const parts = i.Category.split(',').map(s => s.trim());\n                    cats.push(...parts);\n                }\n            });\n            const uniqueCats = [...new Set(cats)].filter(Boolean);\n            uniqueCats.forEach(c => {\n                const div = document.createElement('div');\n                div.className = 'cat-pill';\n                div.innerText = c;\n                div.onclick = () => setCat(c);\n                nav.appendChild(div);\n            });\n        }\n\n        function applyFilters() {\n            const q = document.getElementById('searchInput').value.toLowerCase();\n            const m = document.getElementById('monthFilter').value;\n            const filterMonth = m ? m.replace('-', '.') : '';\n            const today = new Date();\n            const todayStr = today.getFullYear() + '.' +\n                String(today.getMonth() + 1).padStart(2, '0') + '.' +\n                String(today.getDate()).padStart(2, '0');\n\n            const filtered = allData.filter(i => {\n                const nameMatch = i.Name && i.Name.toLowerCase().includes(q);\n                const searchDateMatch = i.Date && i.Date.toLowerCase().includes(q);\n                const catMatch = currentCat === 'All' || (i.Category && i.Category.includes(currentCat));\n                const monthMatch = filterMonth === '' || (i.Date && i.Date.startsWith(filterMonth));\n                let isPastPostFilter = true;\n                if (i.Date && i.Date !== 'TBA' && i.Date.match(\/^\\d{4}\\.\\d{2}\\.\\d{2}$\/)) {\n                    isPastPostFilter = i.Date >= todayStr;\n                }\n                return (nameMatch || searchDateMatch) && catMatch && isPastPostFilter && monthMatch;\n            });\n\n            filtered.sort((a, b) => {\n                const dateA = a.Date || 'TBA';\n                const dateB = b.Date || 'TBA';\n                if (dateA === 'TBA') return 1;\n                if (dateB === 'TBA') return -1;\n                return dateA.localeCompare(dateB);\n            });\n\n            render(filtered);\n        }\n\n        function render(data) {\n            document.getElementById('loader').style.display = 'none';\n            const grid = document.getElementById('courseGrid');\n            grid.innerHTML = data.map(item => {\n                const cats = item.Category ? item.Category.split(',').map(s => s.trim()) : [];\n                let badgeHTML = `<span class=\"badge\">${cats[0] || ''}<\/span>`;\n                if (cats[1]) badgeHTML += `<span class=\"badge badge-tag\">${cats[1]}<\/span>`;\n\n                const rawDesc = item.Description || \"\";\n                const isLong = rawDesc.length > 100;\n                const shortDesc = isLong ? rawDesc.substring(0, 100) + \"...\" : rawDesc;\n                const priceDisp = String(item.Price).toLowerCase() === 'free' ? 'FREE' : 'LKR ' + Number(item.Price).toLocaleString();\n                const imgSrc = fixImg(item.Image_URL);\n\n                return `\n                <div class=\"card\">\n                    <div class=\"card-img-container\" onclick=\"openPost('${item.rowId}')\">\n                        ${badgeHTML}\n                        <img decoding=\"async\" src=\"${imgSrc}\" class=\"card-img\" loading=\"lazy\" onerror=\"this.src='https:\/\/via.placeholder.com\/600x600?text=No+Image'\">\n                    <\/div>\n                    <div class=\"card-body\" onclick=\"openPost('${item.rowId}')\">\n                        <h3>${item.Name || \"\"}<\/h3>\n                        <div class=\"card-desc\">${shortDesc}<\/div>\n                        ${isLong ? `<span class=\"read-more-link\">Read More<\/span>` : \"\"}\n                        <div class=\"info-group\">\n                            <div class=\"info-row\"><i class=\"fa-regular fa-calendar\"><\/i> ${item.Date || 'TBA'}<\/div>\n                            <div class=\"info-row\"><i class=\"fa-solid fa-location-dot\"><\/i> ${item.Location || 'NILS'}<\/div>\n                        <\/div>\n                        <div class=\"price-tag\">${priceDisp}<\/div>\n                        <a href=\"${item.Apply_Link || '#'}\" target=\"_blank\" class=\"apply-btn\" onclick=\"event.stopPropagation()\">Register Now<\/a>\n                    <\/div>\n                <\/div>`;\n            }).join('');\n        }\n\n        function setCat(c) {\n            currentCat = c;\n            document.querySelectorAll('.cat-pill').forEach(p => {\n                if (c === 'All') { p.classList.toggle('active', p.innerText === 'All Programs'); }\n                else { p.classList.toggle('active', p.innerText === c); }\n            });\n            applyFilters();\n        }\n\n        \/\/ Opens the unified post modal for a given rowId.\n        \/\/ updateUrl=true (default) pushes a shareable ?post=<id> URL into history (no page reload).\n        \/\/ updateUrl=false is used on initial page load when the URL already contains ?post=<id>.\n        function openPost(rowId, updateUrl = true) {\n            const item = allData.find(i => String(i.rowId) === String(rowId));\n            if (!item) return;\n\n            const imgSrc = fixImg(item.Image_URL);\n            const priceDisp = String(item.Price).toLowerCase() === 'free' ? 'FREE' : 'LKR ' + Number(item.Price).toLocaleString();\n\n            document.getElementById('postModalImg').src = imgSrc;\n            document.getElementById('postModalTitle').innerText = item.Name || \"\";\n            document.getElementById('postModalDesc').innerHTML = (item.Description || \"\").replace(\/\\n\/g, '<br>');\n            document.getElementById('postModalDate').innerText = item.Date || 'TBA';\n            document.getElementById('postModalTime').innerText = item.Time || 'TBA';\n            document.getElementById('postModalLocation').innerText = item.Location || 'NILS';\n            document.getElementById('postModalPrice').innerText = priceDisp;\n            document.getElementById('postModalApply').href = item.Apply_Link || '#';\n\n            document.getElementById('postModal').style.display = 'flex';\n            document.getElementById('postModal').scrollTop = 0;\n            document.body.style.overflow = 'hidden';\n\n            if (updateUrl) {\n                const url = new URL(window.location.href);\n                url.searchParams.set('post', rowId);\n                history.pushState({ postId: rowId }, '', url);\n            }\n        }\n\n        function closePostModal() {\n            document.getElementById('postModal').style.display = 'none';\n            document.body.style.overflow = 'auto';\n\n            const url = new URL(window.location.href);\n            if (url.searchParams.has('post')) {\n                url.searchParams.delete('post');\n                history.pushState({}, '', url);\n            }\n        }\n\n        function copyPostLink() {\n            navigator.clipboard.writeText(window.location.href).then(() => {\n                const toast = document.getElementById('toast');\n                toast.classList.add('show');\n                setTimeout(() => toast.classList.remove('show'), 2000);\n            }).catch(() => {\n                prompt(\"Copy this link:\", window.location.href);\n            });\n        }\n\n        \/\/ Handles browser back\/forward so the modal stays in sync with the URL\n        window.addEventListener('popstate', () => {\n            const params = new URLSearchParams(window.location.search);\n            const postId = params.get('post');\n            if (postId) {\n                openPost(postId, false);\n            } else {\n                document.getElementById('postModal').style.display = 'none';\n                document.body.style.overflow = 'auto';\n            }\n        });\n\n        function openImg(src) {\n            document.getElementById('fullImg').src = src;\n            document.getElementById('imgModal').style.display = 'flex';\n            document.getElementById('imgModal').scrollTop = 0;\n            document.body.style.overflow = 'hidden';\n        }\n\n        function closeModal(id) {\n            document.getElementById(id).style.display = 'none';\n            document.body.style.overflow = document.getElementById('postModal').style.display === 'flex' ? 'hidden' : 'auto';\n        }\n\n        load();\n    <\/script>\n\n    <script async type='module' src='https:\/\/interfaces.zapier.com\/assets\/web-components\/zapier-interfaces\/zapier-interfaces.esm.js'><\/script>\n    <zapier-interfaces-chatbot-embed is-popup='true' chatbot-id='cme4jgxxz000y106i3p2z8u8i'><\/zapier-interfaces-chatbot-embed>\n<\/body>\n\n<\/html>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>NILS Online Registration Portal NILS Online Registration National Institute of Labour Studies Course Title Description&#8230; TBA TBA NILS LKR 0 Register Now Copy Link \u00d7 Link copied! All Programs \u00a9 National Institute of Labour Studies Developed by &#8211; V.P.R.L. Vidanapathirana counter-FREE<\/p>\n","protected":false},"author":6,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1798","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/nils.gov.lk\/index.php?rest_route=\/wp\/v2\/pages\/1798","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nils.gov.lk\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/nils.gov.lk\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/nils.gov.lk\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/nils.gov.lk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1798"}],"version-history":[{"count":4,"href":"https:\/\/nils.gov.lk\/index.php?rest_route=\/wp\/v2\/pages\/1798\/revisions"}],"predecessor-version":[{"id":1802,"href":"https:\/\/nils.gov.lk\/index.php?rest_route=\/wp\/v2\/pages\/1798\/revisions\/1802"}],"wp:attachment":[{"href":"https:\/\/nils.gov.lk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}