import type { FC } from "hono/jsx"; import { css, Style } from "hono/css"; const Layout: FC = (props) => { const globalClass = css` :-hono-global { * { margin: 0; padding: 0; user-select: none; box-sizing: border-box; -webkit-user-drag: none; } :root { --text-color: #000; --text-color-gray: #cbcbcb; --text-color-hover: #fff; --icon-color: #444; } @media (prefers-color-scheme: dark) { :root { --text-color: #fff; --text-color-gray: #cbcbcb; --text-color-hover: #3c3c3c; --icon-color: #cbcbcb; } } a { text-decoration: none; color: var(--text-color); } body { width: 100vw; height: 100vh; display: flex; flex-direction: column; justify-content: space-between; align-items: center; color: var(--text-color); background-color: var(--text-color-hover); font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei"; transition: color 0.3s, background-color 0.3s; } main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; margin: 20px; height: 100%; } .img { width: 120px; height: 120px; margin-bottom: 20px; } .img img, .img svg { width: 100%; height: 100%; } .title { display: flex; flex-direction: column; align-items: center; margin-bottom: 40px; } .title .title-text { font-size: 28px; font-weight: bold; margin-bottom: 12px; } .title .title-tip { font-size: 20px; opacity: 0.8; } .title .content { margin-top: 30px; display: flex; padding: 20px; border-radius: 12px; border: 1px dashed var(--text-color); } .control { display: flex; flex-direction: row; align-items: center; } .control button { display: flex; flex-direction: row; align-items: center; color: var(--text-color); border: var(--text-color) solid; background-color: var(--text-color-hover); border-radius: 8px; padding: 8px 12px; margin: 0 8px; transition: color 0.3s, background-color 0.3s; cursor: pointer; } .control button .btn-icon { width: 22px; height: 22px; margin-right: 8px; } .control button .btn-text { font-size: 14px; } .control button:hover { border: var(--text-color) solid; background: var(--text-color); color: var(--text-color-hover); } .control button i { margin-right: 6px; } footer { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 30px; padding: 20px; } .social { display: flex; flex-direction: row; align-items: center; margin-bottom: 8px; } .social .link { display: flex; flex-direction: row; align-items: center; margin: 0 4px; } .social .link::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background-color: var(--text-color); opacity: 0.4; margin-left: 8px; } .social .link:last-child::after { display: none; } .social .link svg { width: 22px; height: 22px; } footer .power, footer .icp { font-size: 14px; } footer a { color: var(--text-color-gray); transition: color 0.3s; } footer a:hover { color: var(--text-color); } } `; return ( {props.title} {props.children} ); }; export default Layout;