<div th:fragment="home_head">
    <head>
        <style>
            .homePage{
                color: #fff;font-size: 21px;
                display: block;text-align: center;
                font-weight: bold;padding: 0 14px;letter-spacing: 2px;
            }

            #hd {
                position: relative;
                background-image: url(/home/base/bg-head1.jpg);
                height: 400px;
                background-size: cover;
                display: flex;
                justify-content: center;
                align-items: center;
            }

        </style>
    </head>

    <div id="hd">
        <img th:src="@{/home/base/test.png}"  id="ltlogo" >
        <form action="" id="search_form" class="layui-form" >
            <label>
                <input name="title" id="title" type="text"  placeholder="请输入搜索内容" class="layui-input">
            </label>
            <button  class="layui-btn" onclick="queryList()">搜索</button>
        </form>
        <ul class="layui-nav" id="dhl">
            <li class="layui-nav-item">
                <a href="base.html" class="homePage">首页</a>
            </li>
            <li class="layui-nav-item">
                <a href="announce_view.html" class="homePage">通知公告</a>
            </li>
            <li class="layui-nav-item">
                <a href="work_view.html" class="homePage">工作动态</a>
            </li>
            <li class="layui-nav-item">
                <a href="dept_trends_view.html" class="homePage">部门动态</a>
            </li>
            <li class="layui-nav-item">
                <a href="business_view.html" class="homePage">检察业务</a>
            </li>
            <li class="layui-nav-item">
                <a href="special_view.html" class="homePage">专题活动</a>
            </li>
        </ul>
    </div>
    <script th:src="@{/js/jquery.min.js?v=3.6.3}"></script>
    <script type="text/javascript">
        function queryList(){
            var title = $("#title").val();
            if (title){
                $('#search_form').submit(function(){
                    var actionStr="/search";
                    $("#search_form").removeAttr("action").attr("action",actionStr);
                    return true;
                });
            }else{
                alert("请输入查询关键字！")
            }
        }

    </script>
</div>
