Improving the D documentation web presentation
WebFreak001
d.forum at webfreak.org
Fri May 29 07:39:59 UTC 2020
On Friday, 29 May 2020 at 02:12:34 UTC, Adam D. Ruppe wrote:
> On Wednesday, 27 May 2020 at 12:55:07 UTC, WebFreak001 wrote:
>> - In the small overloads buttons (.overloads>li
>> .overload-signature), remove all parameter type qualifiers and
>> default values, only keep names and basic types
>
> I'm not sure I can do this without more invasive changes to the
> generator.
Yeah but for some functions I think it could make it much more
readable if you did do that. You could use libdparse and try to
parse that declaration as variable definition + trailing
semicolon to exactly find the parts of the expression.
> But I did most the changes here you can refresh to reload:
>
> http://dpldocs.info/experimental-docs/arsd.simpledisplay.SimpleWindow.this.1.html
>
> only regenerated sdpy dox with the new html btw.
>
> I'm pretty sure I missed a few spots applying your new stuff,
> and I rejected a few pieces. But.... I don't hate it so far.
meh, still 1.1rem font size :p
can you maybe comment on the overload changes a little?
Especially keeping the margins around the whole block and keeping
the ridge border + 2px borders between buttons.
>> Make link for `const(char)[]` as type explaining that it works
>> with strings and char arrays. Also embed the graph from and
>> link to
>> https://dlang.org/spec/const3.html#implicit_qualifier_conversions
>>
>> Make link for `size_t` and `ptrdiff_t` as type explaining that
>> it's an (unsigned) integer type, commonly (u)int or (u)long
>> with link to https://dlang.org/spec/type.html#size_t
>
> Once upon a time, I was going to do a bunch of links like this.
> Never actually got around to.... almost any of them. But i like
> the idea.
Maybe it's worth writing that down somewhere in some issue
tracker or todo comment
> I still need to check it across more pages and other browsers
> before going all the way. But I think this is gonna be ok.
>
> I still don't love the "Example" header - not all those are
> examples (notably view source!). So might tweak that.
I was just thinking of some content to fill there, might be worth
putting anything else in there too. In the C# docs it says "C#"
because .NET can be used from multiple languages.
> BTW on the hard questions:
>
> http://dpldocs.info/experimental-docs/arsd.cgi.Cgi.this.2.html
>
> the delegates in there always look bleh. idk.
hm seems ok imo
Also about the prefix with "Function" part again: In the sidebar
you already have the headers for these things, why not use those?
Found another small area for improvement on enum members:
.enum-members {
min-width: 60%;
margin: auto;
}
/* just added .enum-members .enum-member-name to the inline code
definition */
tt.D, .inline-code, .parameter-descriptions .parameter-name,
.enum-members .enum-member-name {
color: black;
font-weight: 500;
background-color: #f2f2f2;
padding: 0px 0.5ex;
border-radius: 2px;
}
.enum-member .enum-attributes:empty {
display: none;
}
.enum-members td,
.enum-members th {
padding: 0.25em 0.5em;
}
.enum-members th {
background-color: #e8e8e8;
color: black;
}
.enum-members tr.enum-member > td:nth-child(2) >
div:only-child:empty:before {
display: inline;
content: "n/a";
color: rgba(0, 0, 0, 0.4);
font-style: italic;
}
Before: https://i.imgur.com/zjHPMWI.png
After: https://i.imgur.com/twNnJxd.png
More information about the Digitalmars-d
mailing list