♻️ refactor: improve Zola v0.22.0 compatibility (#612)
This commit is contained in:
@@ -113,6 +113,11 @@ lazy_async_image = false
|
|||||||
|
|
||||||
# Configuration of the link checker.
|
# Configuration of the link checker.
|
||||||
|
|
||||||
|
[markdown.highlighting]
|
||||||
|
theme = "catppuccin-frappe"
|
||||||
|
style = "class"
|
||||||
|
error_on_missing_language = true
|
||||||
|
|
||||||
[link_checker]
|
[link_checker]
|
||||||
# Skip link checking for external URLs that start with these prefixes
|
# Skip link checking for external URLs that start with these prefixes
|
||||||
skip_prefixes = ["http://[2001:db8::]/"]
|
skip_prefixes = ["http://[2001:db8::]/"]
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ code {
|
|||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Legacy table support for Zola versions older than 0.22.0 */
|
||||||
table {
|
table {
|
||||||
margin: 0rem;
|
margin: 0rem;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
@@ -21,18 +22,15 @@ code {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: start;
|
text-align: start;
|
||||||
|
|
||||||
td,
|
td, th, tr {
|
||||||
th,
|
|
||||||
tr {
|
|
||||||
border: none;
|
border: none;
|
||||||
padding: 0rem;
|
padding: 0rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Line number col.
|
|
||||||
tbody td:first-child {
|
tbody td:first-child {
|
||||||
opacity: 50%;
|
opacity: 50%;
|
||||||
padding-inline-end: 0.8rem;
|
padding-inline-end: 0.8rem;
|
||||||
width: 1px; // Without this, iOS Safari centres short lines.
|
width: 1px;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
text-align: end;
|
text-align: end;
|
||||||
}
|
}
|
||||||
@@ -41,6 +39,23 @@ code {
|
|||||||
background-color: inherit;
|
background-color: inherit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* Span-based layout (Giallo; Zola v0.22.0 and above) */
|
||||||
|
.giallo-l {
|
||||||
|
float: left;
|
||||||
|
clear: left;
|
||||||
|
width: 100%;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.giallo-ln {
|
||||||
|
display: inline-block;
|
||||||
|
opacity: 0.5;
|
||||||
|
padding-inline-end: 0.8rem;
|
||||||
|
min-width: 3ch;
|
||||||
|
color: inherit;
|
||||||
|
user-select: none;
|
||||||
|
text-align: end;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover code {
|
a:hover code {
|
||||||
@@ -65,8 +80,8 @@ pre {
|
|||||||
|
|
||||||
// Supports both native Zola way of adding src, and old shortcode-based logic.
|
// Supports both native Zola way of adding src, and old shortcode-based logic.
|
||||||
// See: https://github.com/welpo/tabi/pull/489
|
// See: https://github.com/welpo/tabi/pull/489
|
||||||
&::after,
|
code .source-path,
|
||||||
code .source-path {
|
code[data-name]::after {
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -76,13 +91,16 @@ pre {
|
|||||||
max-width: calc(100% - 14em);
|
max-width: calc(100% - 14em);
|
||||||
height: 0.9rem;
|
height: 0.9rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
content: attr(data-name);
|
|
||||||
color: var(--hover-color);
|
color: var(--hover-color);
|
||||||
font-size: 0.65rem;
|
font-size: 0.65rem;
|
||||||
text-align: end;
|
text-align: end;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
code[data-name]::after {
|
||||||
|
content: attr(data-name);
|
||||||
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
display: block;
|
display: block;
|
||||||
@@ -123,6 +141,10 @@ html[data-code-direction="inherit"] {
|
|||||||
code, pre {
|
code, pre {
|
||||||
direction: inherit;
|
direction: inherit;
|
||||||
}
|
}
|
||||||
|
.giallo-l {
|
||||||
|
float: right;
|
||||||
|
clear: right;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.copy-code {
|
.copy-code {
|
||||||
|
|||||||
Reference in New Issue
Block a user