增加调试前端页面
This commit is contained in:
143
internal/handler/chatpage/app.css
Normal file
143
internal/handler/chatpage/app.css
Normal file
@@ -0,0 +1,143 @@
|
||||
:root {
|
||||
color: #17251e;
|
||||
background: #eef2ed;
|
||||
font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
|
||||
font-synthesis: none;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
min-width: 320px;
|
||||
min-height: 100vh;
|
||||
background:
|
||||
radial-gradient(circle at 85% 5%, rgba(177, 204, 181, .55), transparent 28rem),
|
||||
#eef2ed;
|
||||
}
|
||||
|
||||
button, input, textarea { font: inherit; }
|
||||
|
||||
button {
|
||||
min-height: 44px;
|
||||
border: 0;
|
||||
border-radius: 12px;
|
||||
padding: 0 18px;
|
||||
color: #fff;
|
||||
background: #175d3b;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button:hover { background: #0e472c; }
|
||||
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #e1a73d; outline-offset: 2px; }
|
||||
button:disabled { cursor: wait; opacity: .55; }
|
||||
|
||||
.shell {
|
||||
width: min(940px, calc(100% - 32px));
|
||||
margin: 32px auto;
|
||||
}
|
||||
|
||||
.masthead {
|
||||
display: flex;
|
||||
align-items: start;
|
||||
justify-content: space-between;
|
||||
gap: 24px;
|
||||
padding: 28px 32px;
|
||||
color: #f8fbf8;
|
||||
border-radius: 22px 22px 0 0;
|
||||
background: #123d2b;
|
||||
}
|
||||
|
||||
.eyebrow { margin: 0 0 8px; color: #b9d4c2; font-size: .75rem; font-weight: 700; letter-spacing: .16em; }
|
||||
h1 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.25rem); line-height: 1.2; }
|
||||
.intro { max-width: 680px; margin: 12px 0 0; color: #dbe8df; line-height: 1.7; }
|
||||
h2 { margin: 0; font-size: 1rem; }
|
||||
|
||||
.quiet-button { color: #194f35; background: #e6eee8; white-space: nowrap; }
|
||||
.quiet-button:hover { background: #d2e2d7; }
|
||||
|
||||
.credential-card {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr minmax(300px, 1.2fr);
|
||||
gap: 10px 24px;
|
||||
align-items: center;
|
||||
padding: 20px 32px;
|
||||
border-bottom: 1px solid #dce4de;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.credential-card p { margin: 5px 0 0; color: #5d6c63; font-size: .86rem; }
|
||||
.credential-form { display: flex; gap: 8px; }
|
||||
.credential-form input { min-width: 0; flex: 1; }
|
||||
.credential-state { grid-column: 2; }
|
||||
|
||||
input, textarea {
|
||||
width: 100%;
|
||||
border: 1px solid #bdc9c0;
|
||||
border-radius: 12px;
|
||||
padding: 11px 13px;
|
||||
color: #17251e;
|
||||
background: #fbfcfb;
|
||||
}
|
||||
|
||||
.conversation {
|
||||
overflow: hidden;
|
||||
border-radius: 0 0 22px 22px;
|
||||
box-shadow: 0 16px 48px rgba(28, 55, 39, .12);
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.messages {
|
||||
min-height: 360px;
|
||||
max-height: min(58vh, 620px);
|
||||
overflow-y: auto;
|
||||
padding: 26px 32px;
|
||||
}
|
||||
|
||||
.message {
|
||||
width: fit-content;
|
||||
max-width: min(78%, 720px);
|
||||
margin: 0 0 18px;
|
||||
border-radius: 5px 17px 17px;
|
||||
padding: 13px 16px;
|
||||
line-height: 1.7;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.message p { margin: 0; white-space: pre-wrap; }
|
||||
.assistant-message { border: 1px solid #dce6df; background: #f5f8f6; }
|
||||
.user-message { margin-left: auto; color: #fff; border-radius: 17px 5px 17px 17px; background: #1d6945; }
|
||||
.error-message { color: #7b211c; border: 1px solid #e9b9b5; background: #fff2f0; }
|
||||
|
||||
.noscript-warning {
|
||||
margin: 0;
|
||||
padding: 14px 18px;
|
||||
color: #7b211c;
|
||||
border: 1px solid #e9b9b5;
|
||||
background: #fff2f0;
|
||||
}
|
||||
|
||||
.composer { padding: 18px 22px 20px; border-top: 1px solid #e1e7e2; background: #f8faf8; }
|
||||
.composer textarea { display: block; min-height: 82px; resize: vertical; background: #fff; }
|
||||
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }
|
||||
.composer-footer p { margin: 0; color: #68766d; font-size: .82rem; }
|
||||
|
||||
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
|
||||
|
||||
@media (max-width: 680px) {
|
||||
.shell { width: 100%; margin: 0; }
|
||||
.masthead { padding: 22px 18px; border-radius: 0; }
|
||||
.intro { font-size: .9rem; }
|
||||
.credential-card { grid-template-columns: 1fr; padding: 18px; }
|
||||
.credential-form { flex-wrap: wrap; }
|
||||
.credential-form input { flex-basis: 100%; }
|
||||
.credential-state { grid-column: 1; }
|
||||
.conversation { border-radius: 0; box-shadow: none; }
|
||||
.messages { min-height: calc(100vh - 480px); padding: 20px 16px; }
|
||||
.message { max-width: 92%; }
|
||||
.composer { padding: 14px 12px; }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after { scroll-behavior: auto !important; }
|
||||
}
|
||||
Reference in New Issue
Block a user