Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make documentation sites more readable #69

Open
OnkelTem opened this issue May 5, 2022 · 14 comments
Open

Make documentation sites more readable #69

OnkelTem opened this issue May 5, 2022 · 14 comments

Comments

@OnkelTem
Copy link

OnkelTem commented May 5, 2022

In my humble opinion, the left column is very hard to read:

image

This is how it looks on my main display:

image

As you see the left col is too narrow, so that every other line gets wrapped, which makes it really hard to read, and it cannot be resized, yet at regular 1980px width:

  • it allocates just 11% of the width
  • right column takes another 40%
  • so ~50% of the width is unused.

Please, do something. Or I can do it, if you say where can I find the site sources.

@khill-fbmc
Copy link

I came to start something along these same lines... It should be a simple css fix....

@khill-fbmc
Copy link

Ok, so, its 3 css rules to help things out, and I slapped it into a userscript for anyone who wants 😃

// ==UserScript==
// @name         Yargs Docs Fix
// @namespace    http://kevinhill.codes
// @version      0.1
// @description  Fix the sidebar width
// @author       Kevin Hill
// @match        http://yargs.js.org/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=js.org
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var style = document.createElement("style");
    style.type = "text/css";
    style.innerText=String.raw`
    .content { max-width: 100% !important; }

    @media (min-width: 1200px) {
      .content-root { padding-left: 400px; }
      .menubar { width: 400px; }
    }
    `;

    document.getElementsByTagName("head")[0].appendChild(style);
})();

image

@OnkelTem
Copy link
Author

Good catch! Thank you @khill-fbmc

Have you published it already?

@kevinkhill
Copy link

Where is a good place to publish?

@OnkelTem
Copy link
Author

OnkelTem commented Jun 18, 2022

Where is a good place to publish?

Oh, I thought you knew. Well, I take it, the default place where Violentmonkey/Tampermonkey extensions look for user scripts is this repository: https://greasyfork.org/

To publish your user script, you can go here https://greasyfork.org/en/scripts/by-site/yargs.js.org and click the "Publish a script you've written"

They'll want you to register though. And also, it's not that straightforward, as you'd have to paste your script in their form.
I would expect publishing to work right from the extension, hehe, but for some reason it doesn't work.

@kevinkhill
Copy link

😂 I just make user scripts to fix my own annoyances. I never thought to publish, lol

I'll look into it. Are you using it? Did it work for you?

@kevinkhill
Copy link

Easy enough 😃 https://greasyfork.org/en/scripts/446661-yargs-docs-fix

@OnkelTem
Copy link
Author

Yes, thank you! Successfuly installed the script and it worked :)

@kevinkhill
Copy link

Awesome! What a productive 24hrs we just had 👍🏻

@OnkelTem
Copy link
Author

Awesome! What a productive 24hrs we just had 👍🏻

Ahahah. True, bro!

@bcoe bcoe transferred this issue from yargs/yargs Jun 20, 2022
@bcoe
Copy link
Member

bcoe commented Jun 20, 2022

Will happily take patches to improve the styles on the website, if anyone wants to take a pass at updating the CSS.

@khill-fbmc
Copy link

heh, will you look at that 👍🏻 here it is! The right repo. When I get a moment, I'll take a peek at incorporating more page breaks for large monitors, since I also need something better for 🖥️ 2560 x 1080

@OnkelTem
Copy link
Author

OnkelTem commented Jun 21, 2022

Wait, where is the repo?

Ah, well! I see it now. We ARE in the repo! :)

@shadowspawn
Copy link
Member

Feedback on whether the CSS changes in PR #75 are appropriate is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants