@php

@endphp

<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="canonical" href="{{ $current = url()->current() }}">

    <!-- CSRF Token -->
    <meta name="csrf-token" content="{{ csrf_token() }}">

    <title>{{ config('app.name', 'Laravel') }}</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
    <link rel="stylesheet" href="https://code.jquery.com/ui/1.14.0/themes/base/jquery-ui.css">
    <script src="https://code.jquery.com/ui/1.14.0/jquery-ui.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/tw-city-selector@2.1.2/dist/tw-city-selector.min.js" integrity="sha256-hZYD69DCuACzSTM46JaQmmUGaGACVGasofM9IWItwdo=" crossorigin="anonymous"></script>
    <!-- Fonts -->
    <link rel="dns-prefetch" href="//fonts.bunny.net">
    <link href="https://fonts.bunny.net/css?family=Nunito" rel="stylesheet">

    <!-- Scripts -->
    @vite(['resources/sass/app.scss', 'resources/js/app.js'])
    @yield('style')
    <script>
        function verifyId(id) {
            id = id.trim();
            
            verification = id.match("^[A-Z][12]\\d{8}$")
            if(!verification){
                return false
            }

            let conver = "ABCDEFGHJKLMNPQRSTUVXYWZIO"
            let weights = [1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1]

            id = String(conver.indexOf(id[0]) + 10) + id.slice(1);

            checkSum = 0
            for (let i = 0; i < id.length; i++) {
                c = parseInt(id[i])
                w = weights[i]
                checkSum += c * w
            }
            
            return checkSum % 10 == 0
        }
        
        function toHalfWidth(str) {
            if (typeof str !== 'string') return str;

            const fullWidthMap = {
                '　': ' ', // 全形空格
            };

            return str.replace(/[\uFF01-\uFF5E\u3000]/g, function(char) {
                if (char === '　') return fullWidthMap['　'];
                return String.fromCharCode(char.charCodeAt(0) - 0xFEE0);
            });
        }
    </script>
</head>
<body>
    <div id="app">
        <!-- <nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm"> -->
        <div class="top-bar">
            <div class="top-bar-inner">
                <div class="top-bar-logo" onclick="window.location='https://dph.tycg.gov.tw/'" title="回到桃園市政府衛生局">&nbsp;</div>
                <div class="top-bar-banner" onclick="window.location='/'" title="回到活動首頁">&nbsp;</div>
            </div>
        </div>
        <!--
        <div class="menu-bar">
            <div class="menu-bar-inner">
                <div class="menu-bar-item menu-bar-item-1">
                    <a class="nav-link" href="/health_literacy">
                        健康識能有獎徵答
                    </a>
                </div>
                <div class="menu-bar-item menu-bar-item-2">
                    <a class="nav-link" href="/metabolism">
                        代謝起跑拿好禮
                    </a>
                </div>
                <div class="menu-bar-item menu-bar-item-3">
                    <a class="nav-link" href="/improved_health">
                        改善健康拿大獎
                    </a>
                </div>
                <div class="menu-bar-item menu-bar-item-4">
                    <a class="nav-link" href="/health_allowance">
                        身體健康有補助
                    </a>
                </div>
            </div>
        </div>
        -->
        <!--<div class="navbar-bg" style="display:block;">-->
            <nav class="navbar navbar-expand-md navbar-light ">
                <div class="container navbar-container">
                    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
                        <span class="navbar-toggler-icon"></span><span style="font-size:0.7em">選單</span>
                    </button>
                    <div class="collapse navbar-collapse" id="navbarSupportedContent">
                        <!-- Left Side Of Navbar -->
                        <ul class="navbar-nav me-auto main-btns">
                            <li class="nav-item nav-btn0">
                                &nbsp;
                            </li>
                            <li class="nav-item nav-btn1">
                                <a class="nav-link" href="/health_literacy">
                                    健康知識學起來 輕鬆領取桃園幣
                                </a>
                            </li>
                            <li class="nav-item nav-btn2">
                                <a class="nav-link" href="/metabolism">
                                    符合代謝新收案 早鳥報名最划算
                                </a>
                            </li>
                            <li class="nav-item nav-btn3">
                                <a class="nav-link" href="/improved_health">
                                    健康達標GO 大獎汽車不是夢
                                </a>
                            </li>
                            <li class="nav-item nav-btn4">
                                <a class="nav-link" href="/health_allowance">
                                    翻轉代謝新人生 皮蛇疫苗加碼補
                                </a>
                            </li>
                            <li class="nav-item"><hr style="width:80%; margin: 0 auto;"></li>
                            <li class="nav-item nav-btn5">
                                <a class="nav-link" href="/news">
                                    最新消息
                                </a>
                            </li>
                            <li class="nav-item nav-btn6">
                                <a class="nav-link" href="/health_infos">
                                    健康資訊
                                </a>
                            </li>
                            <li class="nav-item nav-btn7">
                                <a class="nav-link" href="/notices">
                                    注意事項
                                </a>
                            </li>
                            <li class="nav-item nav-btn8">
                                <a class="nav-link" href="/faqs">
                                    常見問題
                                </a>
                            </li>
                        </ul>

                    </div>
                </div>
            </nav>
        <!--</div>-->

        <div class="main-content">
            <div class="main-content-inner">
                @yield('content')

                <div style="height: 20px;">&nbsp;</div>
                <div class="container nav-item-3-container">
                    <div class="row justify-content-center">
                        <div class="col-md-3 text-align-center">
                            <div class="nav-item-3">
                                <a class="nav-link" href="/news">　最新消息</a>
                            </div>
                        </div>
                        <div class="col-md-3 text-align-center">
                            <div class="nav-item-3">
                                <a class="nav-link" href="/health_infos">　健康資訊</a>
                            </div>
                        </div>
                        <div class="col-md-3 text-align-center">
                            <div class="nav-item-3">
                                <a class="nav-link" href="/notices">　注意事項</a>
                            </div>
                        </div>
                        <div class="col-md-3 text-align-center">
                            <div class="nav-item-3">
                                <a class="nav-link" href="/faqs">　常見問題</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        

        <div class="footer-bar">
            
            <div class="footer-bar-inner">
                <div class="footer-bar-item footer-bar-item-1 text-center"><a class="nav-link" href="/link">友站連結</a></div>
                <div class="footer-bar-item footer-bar-item-2 text-center"><a class="nav-link" href="/contact_us">客服專線</a></div>
                <div class="footer-bar-item footer-bar-item-3 text-center"><a class="nav-link" href="/picm">隱私政策</a></div>
            </div>
            <div style="height:10px;">&nbsp;</div>
            <div class="justify-content-center">
                <div class="footer text-center">
                    Ⓒ2025版權所有 桃園市政府衛生局
                </div>
            </div>
        </div>
    </div>
    @yield('script')
</body>

</html>
