Fix some generated documentation styles

This commit is contained in:
Richard Feldman 2023-11-18 19:18:24 -05:00
parent 2bd8673941
commit b8f89a121b
No known key found for this signature in database
GPG Key ID: F1F21AA5B1D9E43B
4 changed files with 17 additions and 13 deletions

View File

@ -200,7 +200,7 @@ fn render_package_index(root_module: &LoadedModule) -> String {
// The HTML for the index page
let mut index_buf = String::new();
push_html(&mut index_buf, "h2", vec![], "Exposed Modules");
push_html(&mut index_buf, "h2", vec![("class", "module-name")], "Exposed Modules");
push_html(
&mut index_buf,
"ul",
@ -222,7 +222,7 @@ fn render_module_documentation(
push_html(&mut buf, "h2", vec![("class", "module-name")], {
let mut link_buf = String::new();
push_html(&mut link_buf, "a", vec![("href", "/#")], module_name);
push_html(&mut link_buf, "a", vec![("href", "/")], module_name);
link_buf
});

View File

@ -173,8 +173,9 @@ main {
line-height: 1.85em;
margin-top: 2px;
padding: 48px;
min-width: 0; /* necessary for text-overflow: ellipsis to work in descendants */
max-width: 740px;
/* necessary for text-overflow: ellipsis to work in descendants */
min-width: 0;
}
/* Module links on the package index page (/index.html) */
@ -254,7 +255,8 @@ padding: 0px 16px;
font-family: var(--font-sans);
font-size: 24px;
height: 100%;
min-width: 0; /* necessary for text-overflow: ellipsis to work in descendants */
/* min-width must be set to something (even 0) for text-overflow: ellipsis to work in descendants, but we want this anyway. */
min-width: 1024px;
}
.top-header-triangle {
@ -548,6 +550,8 @@ pre>samp {
.top-header {
justify-content: space-between;
width: auto;
/* min-width must be set to something (even 0) for text-overflow: ellipsis to work in descendants. */
min-width: 0;
}
.pkg-full-name {
@ -591,6 +595,7 @@ pre>samp {
grid-row-end: above-footer;
padding: 18px;
font-size: 16px;
max-width: none;
}
#sidebar-nav {

View File

@ -164,8 +164,8 @@ main {
font-family: var(--font-sans);
font-size: 24px;
height: 100%;
min-width: 0;
/* necessary for text-overflow: ellipsis to work in descendants */
/* min-width must be set to something (even 0) for text-overflow: ellipsis to work in descendants, but we want this anyway. */
min-width: 1024px;
}
.top-header-triangle {
@ -403,10 +403,6 @@ pre {
/* This is only visible in mobile. */
}
.top-header {
width: auto;
}
.pkg-full-name {
margin-left: 8px;
margin-right: 12px;
@ -478,7 +474,10 @@ pre {
}
.top-header {
width: auto;
justify-content: space-between;
/* min-width must be set to something (even 0) for text-overflow: ellipsis to work in descendants. */
min-width: 0;
}
.content {

View File

@ -1,8 +1,8 @@
# Documentation
- [Builtins](https://www.roc-lang.org/builtins) - docs for modules built into the language—`Str`, `Num`, etc.
- [builtins](/builtins) - docs for modules built into the language—`Str`, `Num`, etc.
- basic-webserver - a platform for making Web servers ([source code](https://github.com/roc-lang/basic-webserver))
- [basic-cli](https://www.roc-lang.org/packages/basic-cli) - a platform for making command-line interfaces ([source code](https://github.com/roc-lang/basic-cli))
- [basic-cli](/packages/basic-cli) - a platform for making command-line interfaces ([source code](https://github.com/roc-lang/basic-cli))
In the future, a language reference will be on this page too.