feat: improve heading appearance with heading level markers #
This commit is contained in:
parent
cbaf7ebe37
commit
5bff8aa977
@ -203,7 +203,7 @@ img {
|
||||
.anchor:visited,
|
||||
.anchor:link,
|
||||
.anchor:active {
|
||||
color: var(--boatYellow2);
|
||||
color: var(--carpYellow);
|
||||
}
|
||||
|
||||
h1,
|
||||
@ -216,6 +216,8 @@ h6 {
|
||||
font-family: sans-serif;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 5px;
|
||||
text-decoration: underline;
|
||||
text-decoration-color: var(--boatYellow2);
|
||||
}
|
||||
|
||||
h1 {
|
||||
@ -242,6 +244,12 @@ h6 {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
heading-level {
|
||||
color: var(--autumnYellow);
|
||||
font-weight: normal;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: var(--crystalBlue);
|
||||
}
|
||||
|
@ -48,6 +48,11 @@ impl HeadingAdapter for HeaderLinkAdapter {
|
||||
output,
|
||||
"<a id=\"{}\" class=\"anchor\" href=\"#{}\">",
|
||||
id, id
|
||||
)?;
|
||||
write!(
|
||||
output,
|
||||
"<heading-level>{} </heading-level>",
|
||||
"#".repeat(heading.level as usize)
|
||||
)
|
||||
}
|
||||
|
||||
@ -85,7 +90,10 @@ impl MDComrakSettings<'_> {
|
||||
R: std::io::BufRead + std::io::Seek,
|
||||
{
|
||||
let mut syntaxes = SyntaxSet::load_defaults_newlines().into_builder();
|
||||
syntaxes.add_from_folder(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/syntaxes/"), true)?;
|
||||
syntaxes.add_from_folder(
|
||||
concat!(env!("CARGO_MANIFEST_DIR"), "/assets/syntaxes/"),
|
||||
true,
|
||||
)?;
|
||||
let theme = ThemeSet::load_from_reader(theme_cursor)?;
|
||||
let mut theme_set = ThemeSet::new();
|
||||
theme_set.themes.insert(String::from(theme_name), theme);
|
||||
|
Loading…
Reference in New Issue
Block a user