{"id":1066,"date":"2026-01-15T13:24:14","date_gmt":"2026-01-15T06:24:14","guid":{"rendered":"https:\/\/tulex.law.tu.ac.th\/news-events\/"},"modified":"2026-06-16T21:00:22","modified_gmt":"2026-06-16T14:00:22","slug":"news-events","status":"publish","type":"page","link":"https:\/\/tulex.law.tu.ac.th\/en\/news-events\/","title":{"rendered":"News"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1066\" class=\"elementor elementor-1066 elementor-56\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-96c3eff e-flex e-con-boxed e-con e-parent\" data-id=\"96c3eff\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[]}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-440b417 elementor-widget elementor-widget-shortcode\" data-id=\"440b417\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">        <link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/font-awesome\/6.4.0\/css\/all.min.css\">\n        <style>\n            :root { --tulex-red: #CD202E; }\n            .tulex-news-wrap { max-width: 1560px; margin: 0 auto; padding: 20px; font-family: 'Prompt', sans-serif; }\n            .tulex-news-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; flex-wrap: wrap; gap: 20px; }\n            \/* =========================================\n               Search Box (\u0e14\u0e35\u0e44\u0e0b\u0e19\u0e4c\u0e43\u0e2b\u0e21\u0e48)\n               ========================================= *\/\n            .tulex-search-box { \n                display: flex; \n                align-items: center; \n                flex: 1; \n                max-width: 450px; \n                background: #fff; \n                border: 1px solid #e0e0e0; \n                border-radius: 50px; \/* \u0e42\u0e04\u0e49\u0e07\u0e21\u0e19\u0e41\u0e1a\u0e1a\u0e41\u0e04\u0e1b\u0e0b\u0e39\u0e25 *\/\n                padding: 6px 6px 6px 20px; \/* \u0e40\u0e27\u0e49\u0e19\u0e23\u0e30\u0e22\u0e30\u0e43\u0e2b\u0e49\u0e1b\u0e38\u0e48\u0e21\u0e14\u0e49\u0e32\u0e19\u0e43\u0e19 (Inset) *\/\n                transition: all 0.3s ease; \n                box-shadow: 0 4px 15px rgba(0,0,0,0.03); \/* \u0e40\u0e07\u0e32\u0e1a\u0e32\u0e07\u0e46 \u0e43\u0e2b\u0e49\u0e01\u0e25\u0e48\u0e2d\u0e07\u0e14\u0e39\u0e25\u0e2d\u0e22\u0e02\u0e36\u0e49\u0e19\u0e21\u0e32 *\/\n            }\n            .tulex-search-box:focus-within { \n                border-color: var(--tulex-red); \n                box-shadow: 0 4px 20px rgba(205, 32, 46, 0.12); \n            }\n            .tulex-search-box i.fa-magnifying-glass { \n                color: #888; \n                font-size: 16px;\n            }\n            .tulex-search-box input { \n                flex: 1; \n                border: none; \n                padding: 10px 15px; \n                font-size: 15px; \n                outline: none; \n                font-family: 'Prompt', sans-serif; \n                background: transparent;\n            }\n            .tulex-search-btn { \n                background: var(--tulex-red); \n                color: #fff; \n                border: none; \n                padding: 10px 28px; \n                border-radius: 40px; \/* \u0e1b\u0e38\u0e48\u0e21\u0e42\u0e04\u0e49\u0e07\u0e21\u0e19\u0e23\u0e31\u0e1a\u0e01\u0e31\u0e1a\u0e01\u0e25\u0e48\u0e2d\u0e07\u0e14\u0e49\u0e32\u0e19\u0e19\u0e2d\u0e01 *\/\n                font-family: 'Prompt', sans-serif; \n                font-weight: 600; \n                font-size: 15px;\n                cursor: pointer; \n                transition: all 0.3s ease; \n                height: auto;\n            }\n            .tulex-search-btn:hover { \n                background: #a81824; \n                transform: translateY(-1px); \/* \u0e25\u0e39\u0e01\u0e40\u0e25\u0e48\u0e19\u0e22\u0e01\u0e1b\u0e38\u0e48\u0e21\u0e02\u0e36\u0e49\u0e19\u0e19\u0e34\u0e14\u0e19\u0e36\u0e07\u0e15\u0e2d\u0e19\u0e0a\u0e35\u0e49\u0e40\u0e21\u0e32\u0e2a\u0e4c *\/\n                box-shadow: 0 4px 12px rgba(205, 32, 46, 0.3);\n            }\n            .tulex-search-btn:hover { background: #a81824; }\n            .tulex-news-tabs { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; max-width: 100%; }\n            .tulex-news-tabs::-webkit-scrollbar { display: none; }\n            .tulex-tab-btn { padding: 8px 20px; font-size: 14px; border-radius: 20px; border: none; cursor: pointer; transition: 0.3s; font-weight: 500; font-family: 'Prompt', sans-serif; white-space: nowrap; flex-shrink: 0; }\n            .tulex-tab-btn.active { background: var(--tulex-red); color: #fff; }\n            .tulex-tab-btn:not(.active) { background: #f5f5f5; color: #555; }\n            .tulex-tab-btn:not(.active):hover { background: #e0e0e0; color: #222; }\n            .tulex-news-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 30px; }\n            .tulex-news-card { background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid #f0f0f0; transition: 0.3s; cursor: pointer; display: flex; flex-direction: column; text-decoration: none !important; }\n            .tulex-news-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(0,0,0,0.08); border-color: #f5c6cb; }\n            .tulex-news-thumb { width: 100%; height: 230px; overflow: hidden; position: relative; }\n            .tulex-news-thumb img { width: 100%;  object-fit: cover; transition: 0.5s; }\n            .tulex-news-card:hover .tulex-news-thumb img { transform: scale(1.08); }\n            .tulex-news-badge { position: absolute; top: 15px; left: 15px; background: var(--tulex-red); color: #fff; padding: 5px 15px; border-radius: 20px; font-size: 12px; font-weight: 500; z-index: 2; }\n            .tulex-news-badge.sticky { background: #ffb400; color: #000; }\n            .tulex-news-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }\n            .tulex-news-date { font-size: 13px; color: #999; margin-bottom: 10px; display: flex; align-items: center; gap: 5px; }\n            .tulex-news-title { font-size: 19px; font-weight: 600; color: #222; margin-bottom: 15px; line-height: 1.4; transition: 0.3s; }\n            .tulex-news-card:hover .tulex-news-title { color: var(--tulex-red); }\n            .tulex-readmore { font-size: 14px; font-weight: 600; color: var(--tulex-red); margin-top: auto; display: flex; align-items: center; gap: 8px; }\n            .tulex-pagination { text-align: center; margin-top: 50px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }\n            .tulex-page-btn { padding: 10px 18px; border-radius: 8px; border: 1px solid #eee; color: #555; background: #fff; transition: 0.3s; cursor: pointer; font-family: 'Prompt', sans-serif; font-size: 14px; font-weight: 500; }\n            .tulex-page-btn:hover { background: #f9f9f9; border-color: #ccc; }\n            .tulex-page-btn.current { background: var(--tulex-red); color: #fff; border-color: var(--tulex-red); }\n            .tulex-loader-wrap { position: relative; min-height: 300px; }\n            .tulex-loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: none; flex-direction: column; align-items: center; color: var(--tulex-red); z-index: 10; }\n            .tulex-loader i { font-size: 40px; margin-bottom: 10px; }\n            .tulex-loader.active { display: flex; }\n            .tulex-content-faded { opacity: 0.3; pointer-events: none; }\n            @media (max-width: 991px) {\n                .tulex-news-container { grid-template-columns: 1fr !important; }\n                .tulex-search-box { max-width: 100% !important; }\n                .tulex-news-header { flex-direction: column !important; align-items: stretch !important; }\n                .tulex-news-tabs { width: 100%; } \n            }\n        <\/style>\n\n        <div class=\"tulex-news-wrap\">\n            <div class=\"tulex-news-header\">\n                <div class=\"tulex-search-box\">\n                    <i class=\"fa-solid fa-magnifying-glass\"><\/i>\n                    <input type=\"text\" id=\"tulexNewsSearch\" placeholder=\"Search news or activities...\">\n                    <button type=\"button\" id=\"tulexNewsSearchBtn\" class=\"tulex-search-btn\">Search<\/button>\n                <\/div>\n\n                <div class=\"tulex-news-tabs\" id=\"tulexNewsTabs\">\n                    <button class=\"tulex-tab-btn active\" data-cat=\"all\">All<\/button>\n                                                <button class=\"tulex-tab-btn\" data-cat=\"press-release\">News<\/button>\n                                        <\/div>\n            <\/div>\n\n            <div class=\"tulex-loader-wrap\">\n                <div id=\"tulexNewsLoader\" class=\"tulex-loader\">\n                    <i class=\"fa-solid fa-circle-notch fa-spin\"><\/i>\n                    <span>Loading...<\/span>\n                <\/div>\n                <div id=\"tulexNewsResults\"><\/div>\n            <\/div>\n        <\/div>\n\n        <script>\n            document.addEventListener('DOMContentLoaded', function() {\n                const ajaxUrl = 'https:\/\/tulex.law.tu.ac.th\/wp-admin\/admin-ajax.php';\n                const langCode = 'en';\n                \n                const searchInput = document.getElementById('tulexNewsSearch');\n                const searchBtn = document.getElementById('tulexNewsSearchBtn');\n                const tabs = document.querySelectorAll('.tulex-tab-btn');\n                const resultsContainer = document.getElementById('tulexNewsResults');\n                const loader = document.getElementById('tulexNewsLoader');\n\n                let currentCat = 'all';\n                let currentPage = 1;\n                let currentSearch = '';\n                let typingTimer;\n\n                function fetchNews() {\n                    loader.classList.add('active');\n                    resultsContainer.classList.add('tulex-content-faded');\n\n                    const formData = new URLSearchParams();\n                    formData.append('action', 'tulex_load_news');\n                    formData.append('paged', currentPage);\n                    formData.append('search', currentSearch);\n                    formData.append('category', currentCat);\n                    formData.append('lang', langCode);\n\n                    fetch(ajaxUrl, {\n                        method: 'POST',\n                        body: formData\n                    })\n                    .then(response => response.text())\n                    .then(html => {\n                        resultsContainer.innerHTML = html;\n                        loader.classList.remove('active');\n                        resultsContainer.classList.remove('tulex-content-faded');\n                    })\n                    .catch(error => {\n                        console.error('Error fetching news:', error);\n                        loader.classList.remove('active');\n                        resultsContainer.classList.remove('tulex-content-faded');\n                    });\n                }\n\n                fetchNews();\n\n                if(searchInput) {\n                    searchInput.addEventListener('input', function() {\n                        clearTimeout(typingTimer);\n                        currentSearch = this.value;\n                        currentPage = 1; \n                        typingTimer = setTimeout(fetchNews, 500);\n                    });\n                }\n\n                if(searchBtn) {\n                    searchBtn.addEventListener('click', function() {\n                        clearTimeout(typingTimer);\n                        currentSearch = searchInput.value;\n                        currentPage = 1;\n                        fetchNews();\n                    });\n                }\n\n                tabs.forEach(tab => {\n                    tab.addEventListener('click', function() {\n                        tabs.forEach(t => t.classList.remove('active'));\n                        this.classList.add('active');\n\n                        currentCat = this.getAttribute('data-cat');\n                        currentPage = 1;\n                        fetchNews();\n                    });\n                });\n\n                if(resultsContainer) {\n                    resultsContainer.addEventListener('click', function(e) {\n                        if (e.target.closest('.tulex-page-btn')) {\n                            const btn = e.target.closest('.tulex-page-btn');\n                            if (!btn.classList.contains('current')) {\n                                currentPage = btn.getAttribute('data-page');\n                                fetchNews();\n                                document.querySelector('.tulex-news-wrap').scrollIntoView({ behavior: 'smooth' });\n                            }\n                        }\n                    });\n                }\n            });\n        <\/script>\n        <\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":22,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"TEC\\Tickets\\Commerce\\Module","_tribe_ticket_capacity":"0","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"footnotes":"","_tec_slr_enabled":"","_tec_slr_layout":""},"class_list":["post-1066","page","type-page","status-publish","hentry"],"acf":[],"ticketed":false,"_links":{"self":[{"href":"https:\/\/tulex.law.tu.ac.th\/en\/wp-json\/wp\/v2\/pages\/1066","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tulex.law.tu.ac.th\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/tulex.law.tu.ac.th\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/tulex.law.tu.ac.th\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/tulex.law.tu.ac.th\/en\/wp-json\/wp\/v2\/comments?post=1066"}],"version-history":[{"count":1,"href":"https:\/\/tulex.law.tu.ac.th\/en\/wp-json\/wp\/v2\/pages\/1066\/revisions"}],"predecessor-version":[{"id":1067,"href":"https:\/\/tulex.law.tu.ac.th\/en\/wp-json\/wp\/v2\/pages\/1066\/revisions\/1067"}],"wp:attachment":[{"href":"https:\/\/tulex.law.tu.ac.th\/en\/wp-json\/wp\/v2\/media?parent=1066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}