Igalia / wpewebkit.org

WPE Website
https://wpewebkit.org
3 stars 9 forks source link

Add link to documentation directory in each release page #231

Closed aperezdc closed 3 months ago

aperezdc commented 3 months ago

Add a button to the documentation directory under /reference for those releases that have it. A small JS data script adds a hasDocumentation computed data property to each page, which will be true in release pages for the wpewebkit package, from versions 2.23.90 onwards (inclusive). The version comparison is done reusing the semver package. Just in case there might be some release after that version that does not have documentation, the hideDocumentation data attribute is also honored.

While at it, fix the post date being close tight to the download and documentation buttons. Instead, promote the <time> element containing the date to a block, which causes it to occupy its own “line”. To avoid stealing much vertical space for the buttons, a new .btn-l CSS class is added, similar to .btn-xl, which produces smaller buttons.


Site preview: https://igalia.github.io/wpewebkit.org/aperezdc/release-doc-links/

aperezdc commented 3 months ago

This is how the release pages look now:

pic

meyerweb commented 3 months ago

On the GitHub site preview pages (e.g., https://igalia.github.io/wpewebkit.org/aperezdc/release-doc-links/release/wpewebkit-2.44.2.html), I’m only seeing the Download button. Is this an artifact of GH Pages builds, or was there a change since @aperezdc’s screenshot was posted?

csaavedra commented 3 months ago

On the GitHub site preview pages (e.g., https://igalia.github.io/wpewebkit.org/aperezdc/release-doc-links/release/wpewebkit-2.44.2.html), I’m only seeing the Download button. Is this an artifact of GH Pages builds, or was there a change since @aperezdc’s screenshot was posted?

The previews have never worked well for this site.

meyerweb commented 3 months ago

The previews have never worked well for this site.

Wow, seriously — local preview works fine, so I’m working off that.

The secondary-classed buttons are set to be much too low-contrast. I’ve fiddled with some variants and here are two. Please don’t think I mean we should do both: I think we should pick one or the other. (Or a third way that is better than either of these, if someone has one, such as changing a text color or some other adjustment.) Thoughts?

CleanShot 2024-05-29 at 12 07 08

csaavedra commented 3 months ago

I do like that version better, and I would even say that different colors for documentation and download might make sense to distinguish that one will download a file, and the other open another webpage.

aperezdc commented 3 months ago

The previews have never worked well for this site.

Wow, seriously — local preview works fine, so I’m working off that.

The secondary-classed buttons are set to be much too low-contrast. I’ve fiddled with some variants and here are two. Please don’t think I mean we should do both: I think we should pick one or the other. (Or a third way that is better than either of these, if someone has one, such as changing a text color or some other adjustment.) Thoughts?

CleanShot 2024-05-29 at 12 07 08

I tried locally and I see the blue button invoves changing from the .btn-secondary CSS class to .btn-primary—it looks nicer in my opinion as well, so I'm going to push that change as well.

Do we agree on merging this PR with the addition of making the buttons blue with .btn-primary?