Add github style links to docs sections

This commit is contained in:
itmuckel 2023-03-13 19:24:55 +01:00
parent ceacc1792d
commit cc70413e05
No known key found for this signature in database
GPG key ID: B31FDD4A4136F0E5
3 changed files with 12 additions and 10 deletions

View file

@ -146,7 +146,7 @@ fn render_module_documentation(
for entry in &module.entries {
match entry {
DocEntry::DocDef(doc_def) => {
// Only redner entries that are exposed
// Only render entries that are exposed
if all_exposed_symbols.contains(&doc_def.symbol) {
buf.push_str("<section>");
@ -154,7 +154,8 @@ fn render_module_documentation(
let href = format!("#{name}");
let mut content = String::new();
push_html(&mut content, "a", vec![("href", href.as_str())], name);
push_html(&mut content, "a", vec![("href", href.as_str())], "🔗");
push_html(&mut content, "strong", vec![], name);
for type_var in &doc_def.type_vars {
content.push(' ');

View file

@ -82,16 +82,16 @@ table tr td {
}
.entry-name a {
font-weight: bold;
color: var(--violet);
visibility: hidden;
font-size: 12px;
margin-left: -7px;
margin-right: 4px;
vertical-align: top;
}
.entry-name a:visited {
color: var(--violet);
}
.entry-name a:hover {
color: var(--green);
.entry-name:hover a {
visibility: visible;
text-decoration: none;
}
.pkg-full-name a {