{"id":2,"date":"2026-02-06T07:57:54","date_gmt":"2026-02-06T07:57:54","guid":{"rendered":"https:\/\/poltsamaal.ee\/kunstikool\/?page_id=2"},"modified":"2026-09-22T08:03:41","modified_gmt":"2026-09-22T08:03:41","slug":"demoleht","status":"publish","type":"page","link":"https:\/\/poltsamaal.ee\/kunstikool\/","title":{"rendered":""},"content":{"rendered":"\r\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-e35d3e13 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column has-background is-layout-flow wp-block-column-is-layout-flow\" style=\"border-style: none;border-width: 0px;border-top-left-radius: 15px;border-top-right-radius: 15px;border-bottom-left-radius: 15px;border-bottom-right-radius: 15px;background-color: #fbfbfb;padding-left: var(--wp--preset--spacing--20);flex-basis: 50%\">\r\n<p class=\"has-large-font-size wp-block-paragraph\">Avaldatud<\/p>\r\n<div class=\"wp-block-query alignwide\">\r\n\r\n\r\n\r\n<\/div>\r\n<\/div>\r\n<!-- \/wp:post-content -->\r\n\r\n<!-- wp:column {\"width\":\"50%\",\"style\":{\"spacing\":{\"padding\":{\"right\":\"var:preset|spacing|20\"}}}} -->\r\n<div class=\"wp-block-column\" style=\"padding-right: var(--wp--preset--spacing--20);flex-basis: 50%\"><!-- wp:shortcode --> \n<style>\n            .subsite-events-only {\n                width: 100%;\n                max-width: 700px;\n                margin: 0 auto 20px;\n                padding: clamp(15px, 3%, 30px);\n                background: rgba(255, 255, 255, 0.95);\n                border-radius: 20px;\n                box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);\n                box-sizing: border-box;\n    \t\t\tcolor: #111;\n            }\n\n            .subsite-events-title {\n                margin: 0 0 20px;\n                color: #111;\n                font-size: clamp(25px, 4vw, 32px);\n                font-weight: 800;\n            }\n\n\t\t\t.subsite-events-list {\n                display: flex;\n                flex-direction: column;\n                gap: 12px;\n                min-height: 304px;\n            }\n\n            .subsite-event-card {\n                display: flex;\n                align-items: center;\n                gap: 12px;\n                width: 100%;\n                min-height: 146px;\n                margin-bottom: 0;\n                padding: 16px 16px;\n                color: inherit !important;\n                text-decoration: none !important;\n                background: #fff;\n                border: 1px solid #e5e5e5;\n                border-left: 10px solid var(--event-color);\n                border-radius: 15px;\n                box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);\n                box-sizing: border-box;\n                transition: transform 0.2s, box-shadow 0.2s;\n            }\n\n            .subsite-event-card:hover {\n                transform: translateY(-2px);\n                box-shadow: 0 8px 22px rgba(0, 0, 0, 0.09);\n            }\n\n            .subsite-event-content {\n                flex: 1;\n                min-width: 0;\n            }\n\n            .subsite-event-meta {\n                display: flex;\n                align-items: center;\n                flex-wrap: wrap;\n                gap: 8px;\n                margin-bottom: 8px;\n            }\n\n            .subsite-event-badge {\n                padding: 4px 10px;\n                color: #fff;\n                background: var(--event-color);\n                border-radius: 6px;\n                font-size: 11px;\n                font-weight: 800;\n                letter-spacing: 0.5px;\n                text-transform: uppercase;\n            }\n\n            .subsite-event-category {\n                padding: 4px 8px;\n                color: #555;\n                background: #f0f0f0;\n                border: 1px solid #ddd;\n                border-radius: 6px;\n                font-size: 11px;\n                font-weight: 800;\n                letter-spacing: 0.3px;\n                text-transform: uppercase;\n                max-width: calc(100% - 115px);\n                white-space: nowrap;\n                overflow: hidden;\n                text-overflow: ellipsis;\n            }\n\n            .subsite-event-date,\n            .subsite-event-time {\n                color: #444;\n                font-size: 13.5px;\n                font-weight: 800;\n                white-space: nowrap;\n            }\n\n            .subsite-event-date,\n            .subsite-event-time {\n                color: #444;\n                font-size: 14px;\n                font-weight: 800;\n            }\n\n            .subsite-event-name {\n                display: -webkit-box;\n                -webkit-line-clamp: 2;\n                -webkit-box-orient: vertical;\n                overflow: hidden;\n                margin: 0;\n                color: #111;\n                font-size: 19px;\n                font-weight: 700;\n                line-height: 1.25;\n                min-height: 2.5em;\n            }\n\n            .subsite-event-description {\n                margin-top: 6px;\n                color: #666;\n                font-size: 14px;\n                line-height: 1.4;\n            }\n\n            .subsite-event-image {\n                width: 100px;\n                height: 75px;\n                flex-shrink: 0;\n                overflow: hidden;\n                background: #fbfbfb;\n                border: 1px solid #eee;\n                border-radius: 10px;\n            }\n\n            .subsite-event-image img {\n                width: 100%;\n                height: 100%;\n                object-fit: cover;\n            }\n\n            .subsite-image-placeholder {\n                width: 100%;\n                height: 100%;\n                background: #f4f4f4;\n            }\n\n            .subsite-events-empty {\n                margin: 0 0 15px;\n                padding: 20px;\n                color: #555;\n                text-align: center;\n                background: #fafafa;\n                border: 1px solid #eee;\n                border-radius: 12px;\n            }\n\n            \/* 1. Center the pagination exactly like Teated *\/\n            \/* Center pagination & prevent blue text selection on click *\/\n\t\t\t.subsite-events-only .wp-block-query-pagination {\n\t\t\t\tjustify-content: center !important;\n\t\t\t\tflex-wrap: nowrap !important;\n\t\t\t\tmargin-top: 20px;\n\t\t\t\tmargin-bottom: 10px;\n\t\t\t\tuser-select: none;\n\t\t\t\t-webkit-user-select: none; \/* Safari \/ iOS *\/\n\t\t\t}\n\n\t\t\t\/* Fallback: Ensure no blue highlight ever shows if selection is triggered *\/\n\t\t\t.subsite-events-only .wp-block-query-pagination ::selection {\n\t\t\t\tbackground: transparent;\n\t\t\t}\n\n\t\t\t\/* 2. Inactive page numbers: solid underline by default *\/\n\t\t    \/* 4. Active page number: NO underline *\/\n\t\t\t.subsite-events-only .wp-block-query-pagination .page-numbers,\n\t\t\t.subsite-events-only .wp-block-query-pagination .page-numbers.current {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\tmin-width: 24px;   \/* Tagab, et kitsas number 1 ja laiem number 8 v\u00f5tavad t\u00e4pselt sama ruumi *\/\n\t\t\t\theight: 37px;\n\t\t\t\tpadding: 0 8px;    \/* S\u00e4ilitab teemakohase 8px k\u00fclgpolsterduse *\/\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\ttext-align: center;\n\t\t\t}\n\n\t\t\t\/* ADDED: Numbers and arrows always statically black, regardless of parent section color *\/\n\t\t\t.subsite-events-only .wp-block-query-pagination,\n\t\t\t.subsite-events-only .wp-block-query-pagination a,\n\t\t\t.subsite-events-only .wp-block-query-pagination a:hover,\n\t\t\t.subsite-events-only .wp-block-query-pagination a:visited,\n\t\t\t.subsite-events-only .wp-block-query-pagination .page-numbers,\n\t\t\t.subsite-events-only .wp-block-query-pagination .page-numbers.current,\n\t\t\t.subsite-events-only .wp-block-query-pagination-next,\n\t\t\t.subsite-events-only .wp-block-query-pagination-previous {\n\t\t\t\tcolor: #111 !important;\n\t\t\t}\n\n\t\t\t.subsite-events-only .wp-block-query-pagination .page-numbers.current {\n\t\t\t\ttext-decoration: none !important;\n\t\t\t}\n\n\n            \/* 5. Arrow links: NEVER underlined (default or hover) & centered *\/\n            .subsite-events-only .wp-block-query-pagination-next,\n            .subsite-events-only .wp-block-query-pagination-previous {\n                display: inline-flex;\n                align-items: center;\n                justify-content: center;\n            }\n\n            .subsite-events-only .wp-block-query-pagination-next,\n            .subsite-events-only .wp-block-query-pagination-previous,\n            .subsite-events-only .wp-block-query-pagination-next:hover,\n            .subsite-events-only .wp-block-query-pagination-previous:hover {\n                text-decoration: none !important;\n            }\n\n            \/* Bottom calendar link label *\/\n            .subsite-events-footer {\n                margin-top: 18px;\n                text-align: center;\n            }\n\n            .subsite-calendar-link {\n                display: inline-block;\n                color: #111 !important;\n                font-size: 15px;\n                font-weight: 700;\n                text-decoration: underline !important;\n                text-underline-offset: 4px;\n                transition: color 0.2s, opacity 0.2s;\n            }\n\n            .subsite-calendar-link:hover {\n                color: #555 !important;\n                opacity: 0.8;\n            }\n\n            @media (max-width: 480px) {\n                .subsite-events-list {\n                    min-height: auto;\n                }\n\n                .subsite-event-card {\n                    min-height: auto;\n                    flex-direction: column;\n                    align-items: stretch;\n                    gap: 12px;\n                    padding: 15px;\n                }\n\n                .subsite-event-image {\n                    order: -1;\n                    width: 100%;\n                    height: 160px;\n                }\n\n                .subsite-event-name {\n                    min-height: auto;\n                    font-size: 18px;\n                }\n            }\n        <\/style>\n\n        <div class=\"subsite-events-only\" id=\"events-widget-7654\">\n            <h2 class=\"subsite-events-title\">S\u00fcndmused<\/h2>\n\n            \n                <div class=\"subsite-events-list\">\n                                            <a\n                            href=\"https:\/\/poltsamaal.ee\/kunstikool\/sundmused\/lennumasinad\/\"\n                            class=\"subsite-event-card\"\n                            data-page=\"1\"\n                            style=\"--event-color: #db08db; \"\n                        >\n                            <div class=\"subsite-event-content\">\n                                <div class=\"subsite-event-meta\">\n                                    <span class=\"subsite-event-badge\">\n                                        Kunstikool                                    <\/span>\n\n                                    \n                                    <span class=\"subsite-event-date\">\n                                        \ud83d\udcc5 21. september 2026 \u2013 13. detsember 2026                                    <\/span>\n\n                                                                            <span class=\"subsite-event-time\">\n                                            \ud83d\udd52 12:00                                        <\/span>\n                                                                    <\/div>\n\n                                <div class=\"subsite-event-name\">\n                                    LENNUMASINAD                                <\/div>\n\n                                                            <\/div>\n\n                            <div class=\"subsite-event-image\">\n                                                                    <img decoding=\"async\"\n                                        src=\"https:\/\/poltsamaal.ee\/kunstikool\/wp-content\/uploads\/sites\/6\/2026\/09\/Untitled-design-28.png\"\n                                        alt=\"LENNUMASINAD\"\n                                    >\n                                                            <\/div>\n                        <\/a>\n                                    <\/div>\n\n                \n            \n            <!-- Clickable label at the bottom -->\n            <div class=\"subsite-events-footer\">\n                <a href=\"https:\/\/poltsamaal.ee\/kunstikool\/sundmused\/\" class=\"subsite-calendar-link\">\n                    Vaata kogu s\u00fcndmuste kalendrit siit                <\/a>\n            <\/div>\n        <\/div>\n\n        <script>\n        (function() {\n            const wrapper = document.getElementById('events-widget-7654');\n            if (!wrapper) return;\n\n            const cards = wrapper.querySelectorAll('.subsite-event-card');\n            const nav = wrapper.querySelector('.wp-block-query-pagination');\n            if (!nav) return;\n\n            const numbersWrap = nav.querySelector('.wp-block-query-pagination-numbers');\n            const prevBtn = nav.querySelector('.wp-block-query-pagination-previous');\n            const nextBtn = nav.querySelector('.wp-block-query-pagination-next');\n            const totalPages = 1;\n            let currentPage = 1;\n\n            function goToPage(targetPage) {\n                if (targetPage < 1 || targetPage > totalPages) return;\n                currentPage = targetPage;\n\n                \/\/ 1. Toggle card visibility (max 2 per page)\n                cards.forEach(function(card) {\n                    const page = parseInt(card.getAttribute('data-page'), 10);\n                    card.style.display = (page === currentPage) ? 'flex' : 'none';\n                });\n\n                \/\/ 2. Re-render numbers using Gutenberg's exact span\/a markup\n                if (numbersWrap) {\n                    let numbersHtml = '';\n                    for (let p = 1; p <= totalPages; p++) {\n                        if (p === currentPage) {\n                            numbersHtml += '<span aria-current=\"page\" class=\"page-numbers current\" data-page=\"' + p + '\">' + p + '<\/span>\\n';\n                        } else {\n                            numbersHtml += '<a class=\"page-numbers\" href=\"#\" data-page=\"' + p + '\">' + p + '<\/a>\\n';\n                        }\n                    }\n                    numbersWrap.innerHTML = numbersHtml;\n                }\n\n                \/\/ 3. Arrow visibility logic (preserves layout width so numbers do not jump)\n                if (prevBtn) {\n                    prevBtn.style.visibility = (currentPage > 1) ? 'visible' : 'hidden';\n                    prevBtn.style.pointerEvents = (currentPage > 1) ? 'auto' : 'none';\n                }\n                if (nextBtn) {\n                    nextBtn.style.visibility = (currentPage < totalPages) ? 'visible' : 'hidden';\n                    nextBtn.style.pointerEvents = (currentPage < totalPages) ? 'auto' : 'none';\n                }\n            }\n\n            \/\/ Event delegation so dynamically updated <a> tags always work seamlessly\n            nav.addEventListener('click', function(e) {\n                const targetNumber = e.target.closest('.page-numbers');\n                if (targetNumber && targetNumber.tagName.toLowerCase() === 'a') {\n                    e.preventDefault();\n                    goToPage(parseInt(targetNumber.getAttribute('data-page'), 10));\n                    return;\n                }\n\n                const targetPrev = e.target.closest('.wp-block-query-pagination-previous');\n                if (targetPrev) {\n                    e.preventDefault();\n                    goToPage(currentPage - 1);\n                    return;\n                }\n\n                const targetNext = e.target.closest('.wp-block-query-pagination-next');\n                if (targetNext) {\n                    e.preventDefault();\n                    goToPage(currentPage + 1);\n                    return;\n                }\n            });\n        })();\n        <\/script>\n\n         <!-- \/wp:shortcode --><\/div>\r\n<!-- \/wp:column --><\/div>\r\n<!-- \/wp:columns -->","protected":false},"excerpt":{"rendered":"<p>Avaldatud<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-2","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/poltsamaal.ee\/kunstikool\/wp-json\/wp\/v2\/pages\/2","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/poltsamaal.ee\/kunstikool\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/poltsamaal.ee\/kunstikool\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/poltsamaal.ee\/kunstikool\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/poltsamaal.ee\/kunstikool\/wp-json\/wp\/v2\/comments?post=2"}],"version-history":[{"count":47,"href":"https:\/\/poltsamaal.ee\/kunstikool\/wp-json\/wp\/v2\/pages\/2\/revisions"}],"predecessor-version":[{"id":244,"href":"https:\/\/poltsamaal.ee\/kunstikool\/wp-json\/wp\/v2\/pages\/2\/revisions\/244"}],"wp:attachment":[{"href":"https:\/\/poltsamaal.ee\/kunstikool\/wp-json\/wp\/v2\/media?parent=2"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}