PageSourceSearch

https://files.hsktest.ai/h5-assets/hsk/assets/MainLayout-Cx_TCn3k.js

js hsktest.ai collected 2026-10-05 13:44:24 UTC 2,842 bytes, 1 lines download raw bytes

1import{j as e}from"./jsx-runtime-u17CrQMm.js";import{u as f}from"./chunk-OB3PAWPO-CebuCBZf.js";import{B as n}from"./button-DgjfxsXc.js";import{c as b}from"./utils-DVATcSIQ.js";import{u as j}from"./auth-store-BKHNal2U.js";import{L as N,a as v}from"./LanguageSwitcher-BYKPXK4d.js";import{C as i}from"./ClientOnly-O8iMKly9.js";import{u as w}from"./useLocalizedPublicPath-DVWRR38s.js";import{u as k}from"./createLucideIcon-B69DRb2p.js";import{U as y}from"./user-BJhghweo.js";function E({children:m,className:c,showLogout:x=!0,showLanguageSwitcher:d=!0,pageTitle:r,header:a}){const t=f(),{t:o}=k("intro"),{student:s,logout:h}=j(),l=w(),u=()=>{const p=l("/");h(),t(p)},g=()=>{t(l("/"))};return e.jsxs("div",{className:"min-h-screen bg-slate-50 flex flex-col font-sans",children:[e.jsxs("header",{className:"sticky top-0 z-50 flex justify-between items-center px-4 md:px-6 py-2 bg-white/80 backdrop-blur-xl shadow-sm shrink-0 min-h-14 border-b border-slate-200/60 gap-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 md:gap-3 min-w-0 flex-1",children:[e.jsx("div",{className:"flex items-center gap-2 cursor-pointer shrink-0",onClick:g,children:e.jsx("img",{src:"/images/logo.png?v=2",alt:"Logo",className:"h-8 md:h-9 w-auto"})}),a&&e.jsx("div",{className:"flex items-center flex-1",children:a}),!a&&r&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block h-6 w-px bg-slate-200 shrink-0"}),e.jsx("h1",{className:"text-lg font-bold text-slate-800 truncate hidden md:block",children:r})]})]}),e.jsxs("div",{className:"flex items-center gap-2 md:gap-4 shrink-0",children:[e.jsx(i,{children:s&&e.jsxs("div",{className:"text-sm font-medium text-slate-700 hidden sm:flex items-center gap-2 cursor-pointer hover:bg-slate-100/80 px-3 py-1.5 rounded-full transition-colors",onClick:()=>t("/user/dashboard"),children:[e.jsx("div",{className:"w-6 h-6 bg-gradient-to-br from-blue-100 to-blue-50 text-blue-600 rounded-full flex items-center justify-center font-bold text-[10px] shadow-sm",children:s.name?.[0]||s.username?.[0]||"U"}),s.name||s.username]})}),d&&e.jsx(N,{showLabel:!1,triggerClassName:"rounded-full px-2 py-1 bg-white shadow-sm border"}),x&&e.jsx(i,{children:s?e.jsxs(n,{variant:"ghost",size:"sm",className:"text-slate-600 gap-2 hover:text-red-600 hover:bg-red-50 text-sm",onClick:u,children:[e.jsx(v,{className:"h-4 w-4"}),o("logout")]}):e.jsxs(n,{variant:"ghost",size:"sm",className:"text-slate-600 gap-2 hover:text-emerald-600 hover:bg-emerald-50 text-sm",onClick:()=>t("/login"),children:[e.jsx(y,{className:"h-4 w-4"}),o("login","登录 / 注册")]})})]})]}),e.jsx("main",{className:b("flex-1 container mx-auto px-4 py-4 max-w-8xl flex flex-col gap-4",c),children:m}),e.jsx("footer",{className:"bg-slate-800 text-slate-400 py-3 text-center text-[10px] shrink-0 mt-auto",children:o("footer")})]})}export{E as M};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.