feat(reader): full Markdown and HTML rendering for GitHub READMEs, tables, images and links
This commit is contained in:
1 parent
c5e0e2dcfa
commit
ca70580e62
5 files changed
+432
-54
No files matched your search
@@ -2808,6 +2808,140 @@ body {
|
||||
margin: 32px 0;
|
||||
}
|
||||
|
||||
/* Headings */
|
||||
.reader-content-body h1,
|
||||
.reader-content-body h2,
|
||||
.reader-content-body h3,
|
||||
.reader-content-body h4,
|
||||
.reader-content-body h5,
|
||||
.reader-content-body h6 {
|
||||
color: var(--text-main);
|
||||
font-weight: 700;
|
||||
line-height: 1.35;
|
||||
margin: 32px 0 16px;
|
||||
text-indent: 0 !important;
|
||||
}
|
||||
|
||||
.reader-content-body h1 {
|
||||
font-size: 28px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.reader-content-body h2 {
|
||||
font-size: 23px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.reader-content-body h3 {
|
||||
font-size: 19px;
|
||||
}
|
||||
|
||||
.reader-content-body h4 {
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
/* Markdown Tables */
|
||||
.reader-table-wrap {
|
||||
overflow-x: auto;
|
||||
margin: 24px 0;
|
||||
border-radius: var(--radius-md);
|
||||
border: 1px solid var(--border-color);
|
||||
background: var(--bg-surface);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.reader-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 14.5px;
|
||||
line-height: 1.6;
|
||||
text-indent: 0 !important;
|
||||
}
|
||||
|
||||
.reader-table th,
|
||||
.reader-table td {
|
||||
padding: 10px 16px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
border-right: 1px solid var(--border-color);
|
||||
vertical-align: top;
|
||||
text-indent: 0 !important;
|
||||
}
|
||||
|
||||
.reader-table th:last-child,
|
||||
.reader-table td:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.reader-table tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.reader-table th {
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
font-weight: 700;
|
||||
color: var(--text-main);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.reader-table tbody tr:hover {
|
||||
background-color: rgba(255, 255, 255, 0.02);
|
||||
}
|
||||
|
||||
/* Links & Images */
|
||||
.reader-link {
|
||||
color: var(--primary);
|
||||
text-decoration: underline;
|
||||
text-decoration-thickness: 1px;
|
||||
text-underline-offset: 3px;
|
||||
transition: color 0.15s ease;
|
||||
}
|
||||
|
||||
.reader-link:hover {
|
||||
color: var(--primary-hover);
|
||||
}
|
||||
|
||||
.reader-img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
border-radius: var(--radius-md);
|
||||
margin: 8px 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.reader-content-body p img {
|
||||
margin: 4px 6px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.reader-content-body p[style*="text-align: center"],
|
||||
.reader-content-body p.text-center {
|
||||
text-indent: 0 !important;
|
||||
}
|
||||
|
||||
.reader-content-body strong,
|
||||
.reader-content-body b {
|
||||
font-weight: 700;
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.reader-content-body em,
|
||||
.reader-content-body i {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.reader-content-body sub,
|
||||
.reader-content-body sup {
|
||||
font-size: 0.8em;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
.reader-content-body sub { bottom: -0.25em; }
|
||||
.reader-content-body sup { top: -0.5em; }
|
||||
|
||||
/* Interactive Words */
|
||||
.reader-word {
|
||||
cursor: pointer;
|
||||
|
||||
Reference in new issue
Block a user