hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit f726683fae3a309141efee1776e3352a15ca6619
parent 1d772e47290414fb7ca5cdcf194dfd027933fd05
Author: Drew DeVault <sir@cmpwn.com>
Date:   Mon, 19 Apr 2021 14:55:20 -0400

haredoc: mock up tags & source code URL

Diffstat:
Mcmd/haredoc/html.ha | 16+++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/cmd/haredoc/html.ha b/cmd/haredoc/html.ha @@ -13,7 +13,7 @@ fn emit_html(decls: summary, template: bool) (void | error) = { if (template) head()?; // TODO: Module name - fmt::println("<h2>hash::fnv</h2>")?; + fmt::println("<h2>hash::fnv <span class='heading-extra'>+linux +x86_64</span></h2>")?; fmt::println("<p class='readme'>TODO: Insert module README here")?; if (len(decls.types) != 0) { fmt::println("<h4>Types</h4>")?; @@ -96,6 +96,8 @@ fn details(decl: ast::decl) (void | error) = { unparse::ident(os::stdout, decl_ident(decl))?; fmt::print("'>")?; unparse::ident(os::stdout, decl_ident(decl))?; + // TODO: Make this URL real + fmt::print("<span class='heading-extra'><a href='#'>[source]</a></span>")?; fmt::println("</h3>")?; fmt::println("<pre class='decl'>")?; @@ -319,6 +321,18 @@ ol li { padding-left: 0; } +h2, h3, h4 { + display: flex; +} + +.heading-extra { + align-self: flex-end; + flex-grow: 1; + text-align: right; + font-size: 0.8rem; + color: #444; +} + @media(max-width: 1000px) { main { padding: 0;