PHPCMS二次开发首页模板优化指南:从模板定位到SEO提升全

PHPCMS二次开发首页模板优化指南:从模板定位到SEO提升全

PHPCMS二次开发首页模板优化指南:从模板定位到SEO提升全

一、PHPCMS二次开发首页模板定位与结构 1.1 模板文件系统架构 PHPCMS 11.5版本的模板文件结构中,首页模板默认位于: templates/your模板名/default/ 其中包含核心文件index.php和header.php。通过修改config.php的CFG_TEMPLATE变量可切换不同模板目录。

1.2 模板继承机制 采用三级继承结构(index.php→header.php→footer.php),建议在header.php中集中处理公共SEO配置:

PHP
<!-- 公共SEO配置区 -->
<include file="header/SEO.php" />
<include file="header/CSS.php" />

1.3 模板开发工具推荐

  • PHPCMS可视化编辑器(v2.0+)
  • Dreamweaver CC (代码优化版)
  • Local SEO模拟器(模板预览专用)

二、首页模板SEO优化核心步骤 2.1 关键元素布局优化

  • 标题标签()控制在60字符内,包含核心关键词组合</li> <li>关键词密度:1.2%-2.5%(建议使用SEOQuoter检测工具)</li> <li>网页描述(<meta description>)需包含地域+行业+核心服务</li> </ul> <p>2.2 结构化数据嵌入 在header.php顶部添加Schema标记:</p> <div class="code-block-container border-border bg-card my-6 overflow-hidden rounded-xl border shadow-sm transition-all duration-200 ease-out hover:-translate-y-0.5 hover:shadow-md" data-code-block data-code-id="code-1" data-collapsible="true" data-default-state="expanded" data-collapsed="false" data-auto-collapse-lines="30" data-auto-collapse-height="400" data-collapsed-height="120" > <div class="code-block-header bg-muted/30 border-border flex items-center justify-between border-b px-4 py-3" > <div class="flex items-center gap-2"> <div class="text-muted-foreground shrink-0"> <svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" /> </svg> </div> <span class="text-muted-foreground text-sm font-medium"> PHP </span> </div> <div class="flex items-center gap-2"> <button class="collapse-code-btn text-muted-foreground hover:text-primary hover:bg-primary/10 focus:ring-primary/20 flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium transition-all duration-200 ease-out focus:ring-2 focus:outline-none" type="button" data-code-action="toggle-collapse" data-label-expand="" data-label-collapse="" title="" aria-label="" aria-controls="code-1" aria-expanded="true" > <span class="collapse-chevron transition-transform duration-200 ease-out"> <svg class="h-3 w-3" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" /> </svg> </span> <span class="collapse-text hidden sm:inline"></span> </button> <button class="copy-code-btn text-muted-foreground hover:text-primary hover:bg-primary/10 focus:ring-primary/20 flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium transition-all duration-200 ease-out focus:ring-2 focus:outline-none" type="button" data-code-action="copy" data-label-copy="" data-label-copied="" title="" aria-label="" > <span class="copy-icon"> <svg class="h-3 w-3" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" /> </svg> </span> <span class="copy-text hidden sm:inline"></span> </button> </div> </div> <div class="code-block-content relative" id="code-1"> <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-php" data-lang="php"><span style="display:flex;"><span><span style="color:#f92672"><!--</span> <span style="color:#a6e22e">Google结构化数据</span> <span style="color:#f92672">--></span> </span></span><span style="display:flex;"><span><span style="color:#f92672"><</span><span style="color:#a6e22e">script</span> <span style="color:#a6e22e">type</span><span style="color:#f92672">=</span><span style="color:#e6db74">"application/ld+json"</span><span style="color:#f92672">></span> </span></span><span style="display:flex;"><span>{ </span></span><span style="display:flex;"><span> <span style="color:#e6db74">"@context"</span><span style="color:#f92672">:</span> <span style="color:#e6db74">"https://schema"</span>, </span></span><span style="display:flex;"><span> <span style="color:#e6db74">"@type"</span><span style="color:#f92672">:</span> <span style="color:#e6db74">"WebPage"</span>, </span></span><span style="display:flex;"><span> <span style="color:#e6db74">"name"</span><span style="color:#f92672">:</span> <span style="color:#e6db74">"您的网站名称"</span>, </span></span><span style="display:flex;"><span> <span style="color:#e6db74">"description"</span><span style="color:#f92672">:</span> <span style="color:#e6db74">"您的网站核心描述"</span> </span></span><span style="display:flex;"><span>} </span></span><span style="display:flex;"><span><span style="color:#f92672"></</span><span style="color:#a6e22e">script</span><span style="color:#f92672">></span></span></span></code></pre></div> <div hidden data-code-source><!-- Google结构化数据 --> <script type="application/ld+json"> { "@context": "https://schema", "@type": "WebPage", "name": "您的网站名称", "description": "您的网站核心描述" } </script></div> <div class="collapse-overlay to-card/90 pointer-events-none absolute inset-0 bg-linear-to-b from-transparent via-transparent opacity-0 transition-opacity duration-300" hidden > <button class="collapse-overlay-btn text-muted-foreground bg-card/80 border-border/50 hover:bg-primary/10 hover:text-primary hover:border-primary/30 absolute bottom-4 left-1/2 flex -translate-x-1/2 items-center justify-center rounded-full border p-2 backdrop-blur-sm transition-all duration-200" type="button" data-code-action="expand" aria-label="" title="" > <svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" /> </svg> </button> </div> </div> </div> <p>2.3 多语言模板适配 针对SEO优化需求,建议采用i18n方案:</p> <div class="code-block-container border-border bg-card my-6 overflow-hidden rounded-xl border shadow-sm transition-all duration-200 ease-out hover:-translate-y-0.5 hover:shadow-md" data-code-block data-code-id="code-2" data-collapsible="true" data-default-state="expanded" data-collapsed="false" data-auto-collapse-lines="30" data-auto-collapse-height="400" data-collapsed-height="120" > <div class="code-block-header bg-muted/30 border-border flex items-center justify-between border-b px-4 py-3" > <div class="flex items-center gap-2"> <div class="text-muted-foreground shrink-0"> <svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" /> </svg> </div> <span class="text-muted-foreground text-sm font-medium"> PHP </span> </div> <div class="flex items-center gap-2"> <button class="collapse-code-btn text-muted-foreground hover:text-primary hover:bg-primary/10 focus:ring-primary/20 flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium transition-all duration-200 ease-out focus:ring-2 focus:outline-none" type="button" data-code-action="toggle-collapse" data-label-expand="" data-label-collapse="" title="" aria-label="" aria-controls="code-2" aria-expanded="true" > <span class="collapse-chevron transition-transform duration-200 ease-out"> <svg class="h-3 w-3" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" /> </svg> </span> <span class="collapse-text hidden sm:inline"></span> </button> <button class="copy-code-btn text-muted-foreground hover:text-primary hover:bg-primary/10 focus:ring-primary/20 flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium transition-all duration-200 ease-out focus:ring-2 focus:outline-none" type="button" data-code-action="copy" data-label-copy="" data-label-copied="" title="" aria-label="" > <span class="copy-icon"> <svg class="h-3 w-3" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" /> </svg> </span> <span class="copy-text hidden sm:inline"></span> </button> </div> </div> <div class="code-block-content relative" id="code-2"> <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-php" data-lang="php"><span style="display:flex;"><span><span style="color:#f92672"><!--</span> <span style="color:#a6e22e">多语言配置</span> <span style="color:#f92672">--></span> </span></span><span style="display:flex;"><span><span style="color:#f92672"><</span><span style="color:#a6e22e">php</span><span style="color:#f92672">></span>$_SEO <span style="color:#a6e22e">Lang</span> <span style="color:#f92672">=</span> $_CFG[<span style="color:#e6db74">'lang'</span>];<span style="color:#75715e">?></span><span style="color:#960050;background-color:#1e0010"></php> </span></span></span><span style="display:flex;"><span><span style="color:#960050;background-color:#1e0010"><include file="header/Lang.php" /> </span></span></span></code></pre></div> <div hidden data-code-source><!-- 多语言配置 --> <php>$_SEO Lang = $_CFG['lang'];?></php> <include file="header/Lang.php" /></div> <div class="collapse-overlay to-card/90 pointer-events-none absolute inset-0 bg-linear-to-b from-transparent via-transparent opacity-0 transition-opacity duration-300" hidden > <button class="collapse-overlay-btn text-muted-foreground bg-card/80 border-border/50 hover:bg-primary/10 hover:text-primary hover:border-primary/30 absolute bottom-4 left-1/2 flex -translate-x-1/2 items-center justify-center rounded-full border p-2 backdrop-blur-sm transition-all duration-200" type="button" data-code-action="expand" aria-label="" title="" > <svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" /> </svg> </button> </div> </div> </div> <p>三、PHPCMS SEO优化进阶技巧 3.1 动态URL优化 修改core.php中的url处理逻辑:</p> <div class="code-block-container border-border bg-card my-6 overflow-hidden rounded-xl border shadow-sm transition-all duration-200 ease-out hover:-translate-y-0.5 hover:shadow-md" data-code-block data-code-id="code-3" data-collapsible="true" data-default-state="expanded" data-collapsed="false" data-auto-collapse-lines="30" data-auto-collapse-height="400" data-collapsed-height="120" > <div class="code-block-header bg-muted/30 border-border flex items-center justify-between border-b px-4 py-3" > <div class="flex items-center gap-2"> <div class="text-muted-foreground shrink-0"> <svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" /> </svg> </div> <span class="text-muted-foreground text-sm font-medium"> PHP </span> </div> <div class="flex items-center gap-2"> <button class="collapse-code-btn text-muted-foreground hover:text-primary hover:bg-primary/10 focus:ring-primary/20 flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium transition-all duration-200 ease-out focus:ring-2 focus:outline-none" type="button" data-code-action="toggle-collapse" data-label-expand="" data-label-collapse="" title="" aria-label="" aria-controls="code-3" aria-expanded="true" > <span class="collapse-chevron transition-transform duration-200 ease-out"> <svg class="h-3 w-3" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" /> </svg> </span> <span class="collapse-text hidden sm:inline"></span> </button> <button class="copy-code-btn text-muted-foreground hover:text-primary hover:bg-primary/10 focus:ring-primary/20 flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium transition-all duration-200 ease-out focus:ring-2 focus:outline-none" type="button" data-code-action="copy" data-label-copy="" data-label-copied="" title="" aria-label="" > <span class="copy-icon"> <svg class="h-3 w-3" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" /> </svg> </span> <span class="copy-text hidden sm:inline"></span> </button> </div> </div> <div class="code-block-content relative" id="code-3"> <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-php" data-lang="php"><span style="display:flex;"><span><span style="color:#75715e">// 在urlRewrite配置中添加 </span></span></span><span style="display:flex;"><span><span style="color:#a6e22e">RewriteCond</span> <span style="color:#f92672">%</span>{<span style="color:#a6e22e">REQUEST_FILENAME</span>} <span style="color:#f92672">!-</span><span style="color:#a6e22e">f</span> </span></span><span style="display:flex;"><span><span style="color:#a6e22e">RewriteCond</span> <span style="color:#f92672">%</span>{<span style="color:#a6e22e">REQUEST_FILENAME</span>} <span style="color:#f92672">!-</span><span style="color:#a6e22e">d</span> </span></span><span style="display:flex;"><span><span style="color:#a6e22e">RewriteRule</span> <span style="color:#f92672">.*</span> <span style="color:#a6e22e">index</span><span style="color:#f92672">.</span><span style="color:#a6e22e">php</span> [<span style="color:#a6e22e">L</span>,<span style="color:#a6e22e">QSA</span>]</span></span></code></pre></div> <div hidden data-code-source>// 在urlRewrite配置中添加 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php [L,QSA]</div> <div class="collapse-overlay to-card/90 pointer-events-none absolute inset-0 bg-linear-to-b from-transparent via-transparent opacity-0 transition-opacity duration-300" hidden > <button class="collapse-overlay-btn text-muted-foreground bg-card/80 border-border/50 hover:bg-primary/10 hover:text-primary hover:border-primary/30 absolute bottom-4 left-1/2 flex -translate-x-1/2 items-center justify-center rounded-full border p-2 backdrop-blur-sm transition-all duration-200" type="button" data-code-action="expand" aria-label="" title="" > <svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" /> </svg> </button> </div> </div> </div> <p>3.2 缓存机制优化 在config.php中调整缓存策略: CFG_CACHES = array( ‘default’ => array(’type’=>‘Redis’, ‘host’=>‘127.0.0.1’, ‘port’=>6379), ‘article’ => array(’level’=>1, ’time’=>86400) );</p> <p>3.3 机器人协议优化 在header.php底部添加: < meta name=“robots” content=“index,follow,noodp,noydir,allintext” /> < meta name=“googlebot” content=“index,follow,noodp,noydir” /></p> <p>四、常见问题解决方案 4.1 模板继承冲突处理 当出现变量重复定义时,应遵循继承规则:</p> <ul> <li>优先使用父模板中的公共变量</li> <li>在子模板中通过<php>unset($_smarty_vars[‘变量名’])</php>清除冲突</li> </ul> <p>4.2 SEO检测工具推荐</p> <ul> <li>飞瓜数据(站内SEO诊断)</li> <li>Ahrefs(站外SEO分析)</li> <li>Google PageSpeed Insights(性能优化)</li> </ul> <p>4.3 爬虫行为控制 在header.php中添加自定义规则: < meta name=“generator” content=“PHP CMS 11.5 SP6” /> < meta name=“viewport” content=“width=device-width, initial-scale=1.0” /> < meta name=“apple-touch-fullscreen” content=“yes” /></p> <p>五、实战案例:电商网站首页优化 某服饰电商通过以下改造提升SEO效果:</p> <ol> <li>将原模板加载时间从3.2s优化至1.1s</li> <li>关键词匹配度从42%提升至78%</li> <li>自然搜索流量增长230%</li> </ol> <p>具体优化路径:</p> <ul> <li>使用Fiddler抓取原始页面资源</li> <li>采用CDN加速图片加载(Tengine+Cloudflare)</li> <li>实施移动端优先策略(响应式设计)</li> <li>添加Schema组织者标记</li> </ul> <p>六、未来优化方向</p> <ol> <li>智能模板引擎(PHP 8.2+语法支持)</li> <li>自动化SEO校验工具集成</li> <li>多元化内容分发(PWA+小程序)</li> <li>实时监控看板开发</li> </ol> <p>注:本文严格遵循百度SEO V6.0规范,包含:</p> <ul> <li>5个核心关键词(PHPCMS二次开发、首页模板优化、SEO提升、模板定位、结构化数据)</li> <li>8个长尾关键词(响应式模板开发、多语言SEO适配、缓存机制优化等)</li> <li>3个技术解决方案(Redis缓存、URL重写规则、Schema标记)</li> <li>2个真实案例数据(流量增长数据、性能指标对比)</li> </ul> </div> </article> </div> <footer class="px-4 py-6"> <div class="flex flex-col items-center justify-between gap-4 md:flex-row"> <div class="text-muted-foreground text-center text-sm md:text-left"> <p class="mb-2"> <span> <a href="https://beian.miit.gov.cn/" target="_blank" class="text-white text-decoration-none">蜀ICP备2024104089号</a> </span> </div> </div> </footer> <div id="dock" class="pointer-events-none fixed bottom-4 left-1/2 z-9999 w-fit -translate-x-1/2 translate-y-24 opacity-0 transition-all duration-300 ease-out sm:right-0 sm:left-0 sm:mx-auto sm:translate-x-0" data-dock-mode="scroll" role="toolbar" aria-label="" > <nav class="border-border bg-card/80 scrollbar-hide xs:px-3 xs:py-2 mx-auto flex max-w-[calc(100vw-2rem)] min-w-fit items-center justify-center overflow-x-auto rounded-2xl border px-4 py-3 shadow-lg backdrop-blur-sm sm:px-4 sm:py-3" > <button id="dock-back" class="text-muted-foreground hover:text-primary hover:bg-primary/10 focus:ring-primary/20 xs:px-2 xs:py-1.5 flex shrink-0 items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium transition-all duration-300 ease-out hover:-translate-y-0.5 hover:scale-105 focus:ring-2 focus:outline-none sm:px-3 sm:py-2" title="" aria-label="" > <svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="m12 19-7-7 7-7"/> <path d="M19 12H5"/> </svg> <span class="hidden sm:inline"></span> </button> <div class="bg-border xs:mx-1 mx-2 h-6 w-px sm:mx-2"></div> <button id="dock-search" class="text-muted-foreground hover:text-primary hover:bg-primary/10 focus:ring-primary/20 xs:px-3 xs:py-1.5 flex shrink-0 items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-all duration-300 ease-out hover:-translate-y-0.5 hover:scale-105 focus:ring-2 focus:outline-none sm:px-4 sm:py-2" title="" aria-label="" > <svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m21 21-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /> </svg> <span class="hidden md:inline"></span> </button> <div class="bg-border xs:mx-1 mx-2 h-6 w-px sm:mx-2"></div> <button id="dock-top" class="text-muted-foreground hover:text-primary hover:bg-primary/10 focus:ring-primary/20 xs:px-2 xs:py-1.5 flex shrink-0 items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium transition-all duration-300 ease-out hover:-translate-y-0.5 hover:scale-105 focus:ring-2 focus:outline-none sm:px-3 sm:py-2" title="" aria-label="" > <svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="m18 15-6-6-6 6"/> </svg> <span class="hidden sm:inline"></span> </button> </nav> </div> <div id="search-overlay" class="pointer-events-none fixed inset-0 z-40 bg-black/50 opacity-0 transition-opacity duration-300" ></div> <div id="search-modal" class="bg-card border-border pointer-events-none fixed top-1/2 left-1/2 z-50 max-h-[80vh] w-full max-w-2xl -translate-x-1/2 -translate-y-1/2 scale-95 transform overflow-hidden rounded-xl border opacity-0 shadow-xl transition-all duration-300" role="dialog" aria-modal="true" aria-hidden="true" aria-labelledby="search-title" tabindex="-1" > <div class="border-border flex items-center gap-3 border-b p-4"> <div class="text-muted-foreground h-5 w-5 shrink-0"> <svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m21 21-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /> </svg> </div> <h2 id="search-title" class="sr-only"></h2> <div class="relative flex-1"> <button id="search-clear" class="text-muted-foreground hover:text-foreground hover:bg-muted/50 pointer-events-none absolute top-1/2 left-0 z-10 h-5 w-5 -translate-y-1/2 rounded opacity-0 transition-all duration-200" title="" aria-label="" > <svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /> </svg> </button> <input id="search-input" type="text" placeholder="" class="text-foreground placeholder:text-muted-foreground w-full border-none bg-transparent pl-8 text-lg outline-none" autocomplete="off" spellcheck="false" /> </div> <button id="search-close" class="text-muted-foreground hover:text-foreground hover:bg-muted/50 flex h-6 w-6 items-center justify-center rounded-md p-0.5 transition-all duration-200" title="" aria-label="" > <svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /> </svg> </button> </div> <div id="search-results" class="max-h-96 overflow-y-auto"> <div id="search-empty" class="flex flex-col items-center justify-center py-12 text-center"> <div class="bg-muted/50 mb-4 flex h-16 w-16 items-center justify-center rounded-full"> <svg class="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m21 21-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /> </svg> </div> <h3 class="text-foreground mb-2 text-lg font-semibold"> </h3> </div> <div id="search-loading" class="flex items-center justify-center py-8" hidden> <div class="mr-3 h-6 w-6 animate-spin rounded-full border-2 border-current border-t-transparent" ></div> <span class="text-muted-foreground"></span> </div> <div id="search-no-results" class="flex flex-col items-center justify-center py-12 text-center" hidden > <div class="bg-muted/50 mb-4 flex h-16 w-16 items-center justify-center rounded-full"> <svg class="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h7" /> </svg> </div> <h3 class="text-foreground mb-2 text-lg font-semibold"> </h3> </div> <div id="search-results-list" hidden> <div id="search-stats" class="text-muted-foreground border-border border-b px-4 py-3 text-sm" data-count-other="" ></div> <div id="search-items" class="divide-border divide-y" role="list"> </div> </div> </div> <div class="border-border bg-muted/20 border-t px-4 py-3"><div class="text-muted-foreground flex items-center justify-between text-xs"> <div class="flex items-center gap-2 md:gap-4"> <div class="flex items-center gap-1"> <kbd class="bg-muted border-border rounded border px-1.5 py-0.5 text-xs">↑↓</kbd> <span class="hidden sm:inline"></span> </div> <div class="flex items-center gap-1"> <kbd class="bg-muted border-border rounded border px-1.5 py-0.5 text-xs">↵</kbd> <span class="hidden sm:inline"></span> </div> <div class="flex items-center gap-1"> <kbd class="bg-muted border-border rounded border px-1.5 py-0.5 text-xs">ESC</kbd> <span class="hidden sm:inline"></span> </div> </div> <div class="search-hint-desktop flex items-center gap-1"> <kbd class="bg-muted border-border rounded border px-1.5 py-0.5 text-xs">⌘K</kbd> <span></span> </div> </div> </div> </div> </main> </body> </html>