1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vdoc: adds missing color tags; change design of footer

This commit is contained in:
Daniel Däschle
2020-06-07 01:23:56 +02:00
committed by GitHub
parent 442030a7c8
commit eb42d2220f
2 changed files with 29 additions and 27 deletions

View File

@ -231,9 +231,10 @@ fn doc_node_html(dd doc.DocNode, link string, head bool, tb &table.Table) string
sym_name = '${dd.parent_type}.' + sym_name
}
node_id := slug(sym_name)
hash_link := if head_tag != 'h1' { ' <a href="#$node_id">#</a>' } else { '' }
dnw.writeln('<section id="$node_id" class="doc-node">')
if dd.name != 'README' {
dnw.write('<div class="title"><$head_tag>$sym_name <a href="#$node_id">#</a></$head_tag>')
dnw.write('<div class="title"><$head_tag>$sym_name$hash_link</$head_tag>')
if link.len != 0 {
dnw.write('<a class="link" rel="noreferrer" target="_blank" href="$link">$link_svg</a>')
}