vdoc: polish fonts a bit (#7560)
parent
e9affe33ce
commit
333cd41fca
|
@ -109,6 +109,7 @@ body {
|
||||||
scrollbar-width: thin;
|
scrollbar-width: thin;
|
||||||
scrollbar-color: #a0aec0 transparent;
|
scrollbar-color: #a0aec0 transparent;
|
||||||
scrollbar-color: var(--menu-scrollbar-color) transparent;
|
scrollbar-color: var(--menu-scrollbar-color) transparent;
|
||||||
|
font-family: 'Work Sans', sans-serif;
|
||||||
}
|
}
|
||||||
*::-webkit-scrollbar {
|
*::-webkit-scrollbar {
|
||||||
width: 8px;
|
width: 8px;
|
||||||
|
@ -124,7 +125,6 @@ body {
|
||||||
}
|
}
|
||||||
.doc-nav li {
|
.doc-nav li {
|
||||||
line-height: 1.8;
|
line-height: 1.8;
|
||||||
font-weight: 300;
|
|
||||||
}
|
}
|
||||||
.doc-nav .content.show {
|
.doc-nav .content.show {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -300,6 +300,9 @@ body {
|
||||||
}
|
}
|
||||||
.doc-content > .doc-node > .title {
|
.doc-content > .doc-node > .title {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
font-family: 'Work Sans', sans-serif;
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 0.3rem;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
border-bottom: 1px solid #f1f5f8;
|
border-bottom: 1px solid #f1f5f8;
|
||||||
|
@ -316,8 +319,10 @@ body {
|
||||||
fill: var(--ref-symbol-hover-color);
|
fill: var(--ref-symbol-hover-color);
|
||||||
}
|
}
|
||||||
.doc-content > .doc-node h1 {
|
.doc-content > .doc-node h1 {
|
||||||
font-size: 2.5rem;
|
font-size: 2rem;
|
||||||
font-weight: 400;
|
}
|
||||||
|
.doc-content > .doc-node h2 {
|
||||||
|
font-size: 1.3rem;
|
||||||
}
|
}
|
||||||
.doc-content > .doc-node .signature {
|
.doc-content > .doc-node .signature {
|
||||||
border-color: #a0aec0;
|
border-color: #a0aec0;
|
||||||
|
@ -334,8 +339,7 @@ body {
|
||||||
.doc-content > .doc-node > .title h4,
|
.doc-content > .doc-node > .title h4,
|
||||||
.doc-content > .doc-node > .title h5,
|
.doc-content > .doc-node > .title h5,
|
||||||
.doc-content > .doc-node > .title h6 {
|
.doc-content > .doc-node > .title h6 {
|
||||||
font-weight: 400;
|
font-weight: 500;
|
||||||
padding-top: 0.6rem 0;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.doc-content > .doc-node > .title h1 a,
|
.doc-content > .doc-node > .title h1 a,
|
||||||
|
@ -382,6 +386,7 @@ body {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
-ms-overflow-style: none;
|
-ms-overflow-style: none;
|
||||||
scrollbar-width: none;
|
scrollbar-width: none;
|
||||||
|
font-family: 'Work Sans', sans-serif;
|
||||||
}
|
}
|
||||||
.doc-toc::-webkit-scrollbar {
|
.doc-toc::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
@ -49,7 +49,9 @@ const (
|
||||||
<meta http-equiv="x-ua-compatible" content="IE=edge" />
|
<meta http-equiv="x-ua-compatible" content="IE=edge" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>{{ title }} | vdoc</title>
|
<title>{{ title }} | vdoc</title>
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500;600&display=swap" rel="stylesheet">
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
|
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
|
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
|
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
|
||||||
|
@ -377,9 +379,9 @@ fn doc_node_html(dd doc.DocNode, link string, head bool, tb &table.Table) string
|
||||||
md_content := markdown.to_html(dd.comment)
|
md_content := markdown.to_html(dd.comment)
|
||||||
hlighted_code := html_highlight(dd.content, tb)
|
hlighted_code := html_highlight(dd.content, tb)
|
||||||
node_class := if dd.kind == .const_group { ' const' } else { '' }
|
node_class := if dd.kind == .const_group { ' const' } else { '' }
|
||||||
sym_name := if dd.parent_name.len > 0 && dd.parent_name != 'void' { dd.parent_name + '.' +
|
sym_name := if dd.parent_name.len > 0 && dd.parent_name != 'void' { '($dd.parent_name) $dd.name' } else { dd.name }
|
||||||
dd.name } else { dd.name }
|
tag := if dd.parent_name.len > 0 && dd.parent_name != 'void' { '${dd.parent_name}.$dd.name' } else { dd.name }
|
||||||
node_id := slug(sym_name)
|
node_id := slug(tag)
|
||||||
hash_link := if !head { ' <a href="#$node_id">#</a>' } else { '' }
|
hash_link := if !head { ' <a href="#$node_id">#</a>' } else { '' }
|
||||||
dnw.writeln('<section id="$node_id" class="doc-node$node_class">')
|
dnw.writeln('<section id="$node_id" class="doc-node$node_class">')
|
||||||
if dd.name.len > 0 {
|
if dd.name.len > 0 {
|
||||||
|
|
Loading…
Reference in New Issue