Commit Graph

60 Commits

Author SHA1 Message Date
Fabian Homborg
4712da3eb1 docs theme: Make work with sphinx 4.5 and 5.0
Sphinx 5.0 makes the document div a flex container, which clashes
badly with the margin that earlier versions need.

So we remove the margin and flex the div ourselves, which should work
with either.

It's time we make this freestanding - these changes are annoying.
2022-06-01 17:48:51 +02:00
Fabian Homborg
6d93f89e03 docs theme: Make inline code stand out more 2022-06-01 17:35:42 +02:00
David Adam
71a6f979a5 docs/index: reword default shell section 2022-03-29 13:33:06 +08:00
Fabian Homborg
a6d484836e docs: Align text left
Otherwise this does "justify", which in bad cases can spread the text
over the width of the whole line, leaving awkward space between words.

This looks something like

```
The    main    file    is    ~/.config/fish/config.fish
```

The current python docs theme also left-aligns.
2022-03-11 20:14:47 +01:00
Fabian Homborg
7555391790 Make a bit wider with less padding 2022-02-27 18:01:29 +01:00
Fabian Homborg
615ea22387 Doc theme: Use code font for in-line commands as well
This makes them stand out a bit more
2022-02-24 18:12:22 +01:00
Fabian Homborg
05ac24006e Doc theme: Rationalize line-height/margin
Now all based on multiples of 1em.
2022-02-24 18:01:25 +01:00
Fabian Homborg
5af1e64441 Explain the issues of setting fish as login shell
Also stop explaining this in three places. In particular this removes
an FAQ entry.

Fixes #8078
2022-02-18 15:30:57 +01:00
Fabian Homborg
e27456df24 css: Use same font for headers
For some reason classic.css gives these a special font. Let's just
pick the body font again.
2022-01-13 19:25:44 +01:00
Fabian Homborg
7a3594d840 docs: Increase contrast in dark theme for header/footer
This was flagged by one of those WCAG checkers, and there's no real
reason to introduce another color here.
2022-01-13 17:07:04 +01:00
Fabian Homborg
9220b96531 Make inline code color a little bluer 2022-01-13 16:23:54 +01:00
Fabian Homborg
e2157d09df Add a background and some padding to inline-code
This allows it to be distinguished not just based on the font.

Not adding a border because that's a bit much.
2022-01-13 16:23:54 +01:00
Fabian Homborg
30dc91225e css: Pick nicer fonts
Unfortunately the normal font families like "sans-serif" and
"monospace" are basically broken because the browser defaults are
decades old.

TODO: Inline code is barely distinguishable.
2022-01-13 16:23:54 +01:00
Fabian Homborg
c6fa2ec82f
Doc theme: Stop picking specific code fonts again
d54c8a42a9 reintroduced #7714 by picking Source Code Pro again, which is *broken* on MacOS.
2022-01-12 12:48:14 +01:00
Aaron Gyes
6e426cefbd HTML docs theme: increase line spacing for synopsis section 2021-12-24 16:02:52 -08:00
Fabian Homborg
6b7fe49858 docs: Restrict underlining links to the body
Adding the underline in the list of sections makes them bleed
together, making it hard to discern where one ends and the other
begins.

In the body of the text we don't have that issue - multiple links are
rarely next to each other.

Fixes #8439
2021-11-12 18:47:56 +01:00
Fabian Homborg
9a9cd5172d docs: Don't make envvar names so large and in a different font
They're still bold, so still quite noticeable.

But not *IN YOUR FACE*.
2021-11-12 18:21:38 +01:00
Aaron Gyes
94890c28d3 Underline links. Use CSS to add $ to envvar links 2021-11-06 14:09:27 -07:00
ridiculousfish
13133f66be docs: remove an errant } from the css file
This was causing strange spacing in the language docs.
2021-11-06 12:30:51 -07:00
Aaron Gyes
da896cfcd4 pydoctheme.css: bump up line spacing
make this less of an eye-chart.
2021-11-05 16:34:34 -07:00
Aaron Gyes
d54c8a42a9 Documentation WIP:
Start doing the envvar:: directives and cut some copy. These should
be linking up now.
2021-11-05 05:14:02 -07:00
Aaron Gyes
1c5a88ad21 pydoctheme.css: render #synopsis usage as monospace. 2021-11-04 13:23:22 -07:00
Fabian Homborg
7f34b8ab53 docs: Add copy buttons to all the codeblocks
This uses a bit of javascript to add copy buttons, so you can directly
copy all the code in a given block to the clipboard!

For codeblocks without prompts, it just copies all the code, for
blocks with prompts, it copies all the lines after prompts, under the
assumption that that's the code to be executed.

It would give you *all* the lines, so the output wouldn't be
interleaved like it is in the html, but good enough.

The buttons appear on hover, so they aren't usable on phones, but
since you won't really have a clipboard on phones and I have no idea
how to make them not always in front of the text otherwise: Eh.

I'm not in love with the javascript here, but it'll do.
2021-08-15 20:09:49 +02:00
Fabian Homborg
768a9b1fd3 docs: Stop making code *smaller*
Why would we change font-size to "96.5%"?

This was inherited from the python docs theme.
2021-07-01 17:50:25 +02:00
Fabian Homborg
866df31c9d docs: Increase contrast
Especially in dark-mode this was often too close to the background.

Should make it easier to read.

As always, colors not checked for artistic merit for I have none.
2021-07-01 17:48:08 +02:00
Fabian Homborg
85522036f5 docs: Undo sphinx awkwardness with code blocks
This set "clear: both", which resulted in code blocks sometimes being
pushed down a lot, resulting in weird empty space.

Just undo it, I have no idea why it's there, presumably it makes sense
with sphinx' stock theme?
2021-06-23 17:33:40 +02:00
Fabian Homborg
f6a6537f7b css: Some minor adjustments
Make borders less bright in dark version, add some padding to the body.
2021-06-10 21:00:18 +02:00
Fabian Homborg
7a5e192607 Make background a bit more blue, brighter 2021-06-05 11:17:53 +02:00
Fabian Homborg
c2b35d3171 Adjust colors a teensy bit
Make a bit less ultra-dark blue
2021-06-05 11:17:53 +02:00
Fabian Homborg
606a8a7a1a Darkmode for docs
This uses the prefers-color-scheme media query to pick between dark and light mode,
so the user automatically gets the colorscheme they prefer.
2021-06-05 11:17:53 +02:00
Fabian Homborg
1fc6f77378 docs: Make toctree more spread out
Easier to tap on a phone
2021-06-03 20:55:36 +02:00
Fabian Homborg
a17f7468b7 docs: Make sidebar more readable
and tappable - more line-height, larger fonts in narrow mode.

In turn the search box really doesn't need that massive margin above.
2021-06-03 20:55:36 +02:00
Fabian Homborg
850419d127 docs: Style footnote-references like footnotes
Emphasizes that they belong together
2021-06-02 17:48:16 +02:00
Fabian Homborg
1fed36d005 docs: Deduplicate some styles 2021-06-02 17:47:07 +02:00
Fabian Homborg
bc00188ca8 docs: Make footnotes stand out a teensy bit 2021-06-02 17:12:45 +02:00
Fabian Homborg
553ce7a006 docs: Inherit some more background colors
Unfortunately sphinx hardcodes these again in classic.css, and if we
want to change them we need to make these the same again.
2021-06-02 17:12:45 +02:00
Fabian Homborg
884768dded docs: Make some background-colors dependent
This is so we can more easily change the background.
2021-06-02 17:12:45 +02:00
Fabian Homborg
cfc8d14a8d docs: Force sections to be full-width
Otherwise there's this weird *gap*, where the sections are narrow even
tho there's plenty of space?

So you have this screen layout:

```table
| sidebar | text        |
| sidebar | narr        |
| sidebar | ower        |
| sidebar | than        |
| sidebar | need        |
| sidebar | ed          |
```

For some gosh-forsaken reason.
2021-05-27 22:40:04 +02:00
Fabian Homborg
21cb791557 docs: Let the sidebar move
This means the nice navigation to other chapters always stays on
screen, instead of scrolling away.
2021-05-27 22:17:30 +02:00
Fabian Homborg
4bcecc8983 docs: Make background at least one screen tall
Otherwise this would look ugly by stopping the gradient after the
content, so in e.g. the `end` or `false` page it would leave an ugly stripe at
the bottom.
2021-04-17 17:36:32 +02:00
Fabian Homborg
5b4db4a6ea docs: Remove some useless wrappers
The "classic" theme is a mostly useless wrapper around the basic theme
that just adds a collapsible sidebar (that we no longer have).

Moving to basic directly drops a layer of indirection and a file that
needs to be transferred over the net.

Same thing goes for "default.css" which literally just includes
classic.css (WHYYYY???)

(also this removes some useless javascript)
2021-03-02 16:59:38 +01:00
Fabian Homborg
bf801afef8 docs: Move custom.css into the main css
There's no real separation here so one file is preferable.

We'll leave the pygments.css intact because that handles a different thing
2021-03-02 16:49:23 +01:00
Fabian Homborg
3d180b7c50 docs: Make TOC appear first on narrow screens
This used to put the TOC last, which is the last place you'd want it.

It's not perfect and we do some hacky layoutery to achieve it, but it
should generally be usable.
2021-01-27 21:53:24 +01:00
Fabian Homborg
fc5f7975a6 docs: Make tables scrollable on overflow
This makes the *tables* themselves scrollable, not the section div
they are in, which means the section doesn't scroll along with
them (it's already reflowed).
2021-01-27 17:56:24 +01:00
Fabian Homborg
d5ce648e10 docs/theme: Indent
Just do what emacs does, I don't like any of the available css
autoformatters (and we don't use it enough for that to matter)
2021-01-26 09:19:47 +01:00
Fabian Homborg
1e0ac9fa77 docs/theme: Remove prefixed boxshadow
See https://caniuse.com/css-boxshadow

TL;DR: It's supported by everything, the unprefixed version was added
to Firefox *4*.
2021-01-26 09:18:07 +01:00
Fabian Homborg
75f197b28e docs/theme: Add bottom margin
This makes it look like it's a page on top of the background gradient
2021-01-26 09:10:42 +01:00
Fabian Homborg
d4e76f5c5a docs/theme: Remove a bit of padding 2021-01-25 23:02:38 +01:00
Fabian Homborg
dc552fa0ab docs/theme: Make sidebar border less intrusive
Only on the right, much lighter, no radius
2021-01-25 22:59:30 +01:00
Fabian Homborg
651259e794 docs/theme: Fix padding when the searchbox is last
See e.g. the commands page - there's no separate TOC, so the searchbox
almost runs into the border
2021-01-25 22:55:29 +01:00