-
-
+
+
Guide-Format anklicken um zu generieren oder Vorschau zu öffnen.
+
+
+
+
+
+
+
Stell eine Frage zum aktuellen Abschnitt.
+
+
+ {{ m.content }}
+
+
Denkt…
+
+
+
+
+
+
@@ -42,10 +167,13 @@ function injectPadding(e) {
display: flex;
flex-direction: column;
align-items: center;
- padding: 2rem;
background: #f0f1f4;
}
+.preview.landscape {
+ padding: 2rem;
+}
+
.preview-header {
display: flex;
justify-content: space-between;
@@ -76,15 +204,14 @@ function injectPadding(e) {
.preview-frame {
width: 100%;
- max-width: 900px;
flex: 1;
border: none;
background: #fff;
- box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}
.preview-frame.landscape {
max-width: 1180px;
+ box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}
.empty-preview {
@@ -94,4 +221,209 @@ function injectPadding(e) {
height: 100%;
color: #5a6470;
}
+
+.chat-fab {
+ position: fixed;
+ right: 1.5rem;
+ bottom: 1.5rem;
+ width: 52px;
+ height: 52px;
+ border: none;
+ border-radius: 50%;
+ background: #6366f1;
+ color: #fff;
+ font-size: 1.4rem;
+ cursor: pointer;
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
+ z-index: 20;
+}
+
+.chat-fab:hover {
+ background: #4f46e5;
+}
+
+.chat-panel {
+ position: fixed;
+ right: 1.5rem;
+ bottom: 1.5rem;
+ width: 360px;
+ height: 500px;
+ max-height: calc(100vh - 3rem);
+ display: flex;
+ flex-direction: column;
+ background: #fff;
+ border: 1px solid #e2e5e9;
+ border-radius: 12px;
+ box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
+ z-index: 20;
+ overflow: hidden;
+}
+
+.chat-header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 0.6rem 0.9rem;
+ background: #6366f1;
+ color: #fff;
+ font-weight: 600;
+ font-size: 0.9rem;
+}
+
+.chat-close {
+ border: none;
+ background: none;
+ color: #fff;
+ font-size: 1.4rem;
+ line-height: 1;
+ cursor: pointer;
+ padding: 0 4px;
+}
+
+.chat-messages {
+ flex: 1;
+ overflow-y: auto;
+ padding: 0.9rem;
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+}
+
+.chat-hint {
+ color: #9aa3af;
+ font-size: 0.82rem;
+ text-align: center;
+ margin-top: 1rem;
+}
+
+.chat-msg {
+ max-width: 85%;
+ padding: 7px 11px;
+ border-radius: 12px;
+ font-size: 0.85rem;
+ line-height: 1.4;
+ white-space: pre-wrap;
+ word-break: break-word;
+}
+
+.chat-msg.user {
+ align-self: flex-end;
+ background: #6366f1;
+ color: #fff;
+ border-bottom-right-radius: 3px;
+}
+
+.chat-msg.assistant {
+ align-self: flex-start;
+ background: #f1f3f7;
+ color: #1a1a1a;
+ border-bottom-left-radius: 3px;
+}
+
+.chat-typing {
+ color: #9aa3af;
+ font-style: italic;
+}
+
+.chat-msg.markdown :deep(p) {
+ margin: 0 0 0.5em;
+}
+
+.chat-msg.markdown :deep(p:last-child) {
+ margin-bottom: 0;
+}
+
+.chat-msg.markdown :deep(ul),
+.chat-msg.markdown :deep(ol) {
+ margin: 0.3em 0;
+ padding-left: 1.2em;
+}
+
+.chat-msg.markdown :deep(li) {
+ margin: 0.15em 0;
+}
+
+.chat-msg.markdown :deep(code) {
+ background: #e4e7ee;
+ padding: 1px 4px;
+ border-radius: 4px;
+ font-family: "SF Mono", Consolas, monospace;
+ font-size: 0.8em;
+}
+
+.chat-msg.markdown :deep(pre) {
+ background: #1e2330;
+ color: #e6e8ee;
+ padding: 8px 10px;
+ border-radius: 8px;
+ overflow-x: auto;
+ margin: 0.5em 0;
+}
+
+.chat-msg.markdown :deep(pre code) {
+ background: none;
+ padding: 0;
+ color: inherit;
+ font-size: 0.78em;
+}
+
+.chat-msg.markdown :deep(h1),
+.chat-msg.markdown :deep(h2),
+.chat-msg.markdown :deep(h3) {
+ font-size: 0.95em;
+ margin: 0.4em 0 0.2em;
+}
+
+.chat-msg.markdown :deep(a) {
+ color: #4f46e5;
+}
+
+.chat-msg.markdown :deep(table) {
+ border-collapse: collapse;
+ font-size: 0.95em;
+}
+
+.chat-msg.markdown :deep(th),
+.chat-msg.markdown :deep(td) {
+ border: 1px solid #d8dde3;
+ padding: 2px 6px;
+}
+
+.chat-input {
+ display: flex;
+ gap: 6px;
+ padding: 0.6rem;
+ border-top: 1px solid #e2e5e9;
+}
+
+.chat-input textarea {
+ flex: 1;
+ resize: none;
+ height: 38px;
+ padding: 8px 10px;
+ border: 1px solid #d8dde3;
+ border-radius: 8px;
+ font-size: 0.85rem;
+ font-family: inherit;
+ outline: none;
+}
+
+.chat-input textarea:focus {
+ border-color: #6366f1;
+}
+
+.chat-input button {
+ width: 38px;
+ border: none;
+ border-radius: 8px;
+ background: #6366f1;
+ color: #fff;
+ font-size: 1rem;
+ cursor: pointer;
+}
+
+.chat-input button:disabled {
+ opacity: 0.4;
+ cursor: not-allowed;
+}