feat: chat — les posts affichent le markdown rendu comme un document, code coloré #193
This commit is contained in:
@@ -13852,6 +13852,70 @@ body.reading-mode .file-actions {
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
/* #193 — un post peut être rendu comme un document markdown (mistune côté
|
||||
serveur + hljs côté client) : on annule le `pre-wrap` hérité (sinon les
|
||||
retours à la ligne du HTML source deviennent des lignes vides) et on
|
||||
compacte la typographie `.md-content` pour une bulle de chat. */
|
||||
.file-chat-body.file-chat-md {
|
||||
white-space: normal;
|
||||
word-break: normal;
|
||||
}
|
||||
.file-chat-body .md-content > :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.file-chat-body .md-content > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.file-chat-body .md-content h1,
|
||||
.file-chat-body .md-content h2,
|
||||
.file-chat-body .md-content h3,
|
||||
.file-chat-body .md-content h4,
|
||||
.file-chat-body .md-content h5,
|
||||
.file-chat-body .md-content h6 {
|
||||
font-size: 1rem;
|
||||
margin: 0.7em 0 0.35em;
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.file-chat-body .md-content p {
|
||||
margin: 0.4em 0;
|
||||
}
|
||||
.file-chat-body .md-content ul,
|
||||
.file-chat-body .md-content ol {
|
||||
padding-left: 1.3em;
|
||||
margin: 0.4em 0;
|
||||
}
|
||||
.file-chat-body .md-content pre {
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
.file-chat-body .md-content pre code {
|
||||
font-size: 0.78rem;
|
||||
line-height: 1.45;
|
||||
}
|
||||
.file-chat-body .md-content :not(pre) > code {
|
||||
font-size: 0.82rem;
|
||||
padding: 1px 4px;
|
||||
border-radius: 4px;
|
||||
background: var(--bg-hover, rgba(128, 128, 128, 0.15));
|
||||
}
|
||||
.file-chat-body .md-content table {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
.file-chat-body .md-content img {
|
||||
max-width: 100%;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.file-chat-body .md-content .wikilink,
|
||||
.file-chat-body .md-content .wikilink-anchor {
|
||||
color: var(--accent, #58a6ff);
|
||||
cursor: pointer;
|
||||
}
|
||||
.file-chat-form {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
|
||||
Reference in New Issue
Block a user