Fixes a lot of browser incompatibilities in localStorage/cookie handling
Including but not limited to:
- loss of styling and functionality on chromium private mode
- loss of styling and functionality on safari and safari private mode
- awaiting verification if problems in mobile safari are solved.
List of system fonts (R, I, B means roman, italic and bold. Ubuntu probably comes with more fonts, but I couldn't find a list to confirm.):
```txt
Windows
----------
Consolas R RI B BI
Courier R
Courier New R RI B BI
Lucida Console R
Mac
----------
Andale Mono R
Courier R RI B BI
Courier New R RI B BI
Menlo R RI B BI
Monaco R
Ubuntu
----------
Ubuntu Mono R RI B BI
DejaVu Sans Mono R RI B BI
```
```css
font-family: Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace;
```
Consolas and Ubuntu are professionally designed fonts ([Lucas de Groot][1] and [Dalton Maag][2]), with true, calligraphic italic, so they go at the top of the stack.
Menlo is [based on DejaVu Sans Mono][3], the only difference being a few tweaked glyphs, so DejaVu serves as a fallback for it.
As for Courier New, other than being unreadably spindly, it's the default monospaced font in all browsers, so there's no need to include it in the stack.
The `monospace, monospace;` declaration is, by now, [a standard hack][4] that overrides some browsers' behaviour of defaulting the `monospace` elements to smaller font size. Without it, any relative font size you apply to them will be calculated from that reduced size (seems to be 13 px in all browsers).
[1]: https://en.wikipedia.org/wiki/Luc(as)_de_Groot
[2]: https://en.wikipedia.org/wiki/Dalton_Maag
[3]: http://www.leancrew.com/all-this/2009/10/the-compleat-menlovera-sans-comparison/
[4]: https://stackoverflow.com/questions/38781089/font-family-monospace-monospace
Hidden code blocks are no longer indented with
one additional space (required for doctests to compile in some cases)
Now the behavior is similar to the rustdoc's
Fixes#179.
Highlight.js does not apply syntax highlighting to code blocks marked
no-highlight, nohighlight, plain, or text. When it finds blocks of those
languages, it does not add the `hljs` class to those code blocks either.
highlight.css and tomorrow-night.css use the `hljs` class to give code
blocks their backrgound color and text color, and we want that to apply
even if the code doesn't get syntax highlighting markup.
This is a somewhat hacky solution to get just that behavior! After this
commit, code blocks with no-highlight, nohighlight, plain, or text
language set on them will indeed get the hljs colors.
The current section headers are url encoded. Because of that they
have some funny characters like %20. We can clean that up by removing
all of the non-word characters before placing them in the anchor.
mdBook is setting theme (by adding a class attribute to body tag) with javascript.
Page is not using any theme by default and page is not using any styling unless
javascript is enabled.
This patch is adding class attribute to body tag and making mdBook to use `light`
theme when javascript is disabled.
Fixes: #144
The div is now inserted after the <i>, the text color has also been changed to the foreground color and the "(default)" text that indicates the default theme is now grey to contrast with the theme name
Fixes#97
Added basic formatting for tables so that they have some padding and are aligned in the center of the page.
I did not add color or borders because I am not sure how tables should look like.
A lot of people in IntermezzOS want asides, blockquotes are probably the easiest way to do that. I have thus styled blockquotes for all the color themes.
Path_Ext has been stabilized in the Standard Library, the temporary copy I had can go.
I found a fs::create_dir_all method that does exactly what create_path was doing, but better... create_path is thus replaced with that.
- Just uses the header's text as its anchor name. Spaces work. Scrolling to the anchor works even when the anchor is added after the dom loads.
- Adjust theme css to only style links, not <a> tags used as anchors.