Commit Graph

78 Commits

Author SHA1 Message Date
Fabian Boehm
88b445ce9e Put short footnotes on one line again
Unlike before, this doesn't force the number to be on the same line as
strongly, that's fine.

So short footnotes look like

-------------
[1] Some text
-------------

Longer footnotes may look like

--------------
[2]

Some more text
--------------
2022-06-16 19:14:45 +02:00
Fabian Boehm
70a1febd6d Readd some missed changes
The "Warning:" on the warning (in index.html#default shell) wasn't in
the line with the text, the features list had more padding and some
headers were smaller, some table stuff
2022-06-16 19:14:45 +02:00
Fabian Boehm
e5a1da8b22 Remove unneeded guff 2022-06-16 19:14:45 +02:00
Fabian Boehm
6d8b88fb1d doc theme: Simplify
Move related stuff together and remove some unneeded guff

Specifically the weird "clear:" stuff causes rendering issues for me
in Firefox.
2022-06-16 19:14:45 +02:00
Fabian Homborg
618b0d0add Make doc css not depend on sphinx' css
This has required workarounds a few times, plus if it changes it might
break our theme. See e.g.

4712da3eb1
e27456df24
a6d484836e
85522036f5

So we import the rules we *use* and throw away the rest. Note that
this might still have rules that are no longer necessary - e.g. some
that are required to work around sphinx bugs would still be left.

It could benefit from some cleanup and simplification, and from
switching to a flex layout instead of the 230px hardcoded
sidebar - sphinx tried that, but it doesn't really work with our
narrow layout, so we disabled it again.
2022-06-16 19:14:45 +02:00
Fabian Homborg
82445e3e6d docs: Add colored border to inline code
Makes it stand out just a teensy bit more. It's the same border we use
for code *blocks*
2022-06-01 20:58:27 +02:00
Fabian Homborg
f5848135e3 docs: Yeah nah undo flex
This is broken in narrow screens - the sidebar shrinks to unusable
proportions but still stays.

So instead we go the *other* way, force the left margin and undo the flexifying.

(again we should really stop relying on sphinx' css)
2022-06-01 20:54:02 +02:00
Fabian Homborg
b487f8b662 docs: Darker border color for dark mode code blocks 2022-06-01 20:44:53 +02:00
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
Fabian Homborg
86ab81dadf Remove searchtools.js
With sphinx 4.5.0:

1. Some of our builtins actually give results (cd, end, set)
2. Some give broken results (and, if, or)
3. Only "for" even triggers the help page we hacked in

So this is of dubious use, and removing it gets us out of the awkward situation of shipping it.

Plus upstream sphinx has ditched jquery, so we would have to rewrite it anyway.
2022-05-19 17:38:41 +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
Aaron Gyes
579d1e190c pygments.css: update colors
Try some nicer greens, and grey for comments in the code blocks.
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
Aaron Gyes
ec855c75c0 run fish.png through imageoptim
14KB -> 7KB
2021-10-16 14:33:12 -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
0d054f16c4 docs: Remove background from pygments
For some reason I've seen one version of firefox use this over the one
we set in pydoctheme.css. Since we set it there in both light and dark
mode, this one should not be used.
2021-07-30 18:36:12 +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
c241b782e7 docs: Use white instead of black for some highlighting colors
Fixes #8100
2021-07-01 17:06:20 +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