Commit Graph

122 Commits

Author SHA1 Message Date
Michal Budzynski dfc24bec01 Fixed tooltip styling
Also fixed problem with garbage being put in clipboard
when triggered repeatedly
2017-05-31 21:07:47 +02:00
Michal Budzynski e567d22f1c Initial implementation of clipboard handling 2017-05-31 19:56:17 +02:00
Michal Budzynski 8bfcd9939c Updated highlight.js to v9.12.0
Fixing problem with raw strings syntax highlighting
Also backported updates to atelier-dune-light.css
2017-05-31 15:12:20 +02:00
aaaxx cc1cb9edb0 CSS: better fallback stack for monospaced fonts
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
2017-05-24 06:07:58 +02:00
Michal Budzynski 9c8c819ec3 Inline code with hyperlink is now highlighted
Inline code with hyperlink has now a different color then
standard inline code and has a on hover underline.
2017-05-20 17:10:53 +02:00
Michal Budzynski 75bbd55128 Changes made with rustfmt including `use_try_shorthand`
Updated the project rustfmt.toml to include `use_try_shorthand = true`.
Run rustfmt on all rust sources.
2017-05-19 13:04:37 +02:00
Michal Budzynski e4dd03c8f0 Fix indentation of hidden code blocks
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
2017-05-18 00:04:09 +02:00
Michael-F-Bryan 4a634f08da Updated google analytics to index.hbs and hbs_renderer.rs 2017-05-16 13:05:21 +08:00
Phil Ruffwind 3066597acc Change MathJax to use CDNJS
Because the MathJax CDN will soon be retired.
2017-05-05 17:08:59 -04:00
Mathieu David b5ec813d2f Merge pull request #250 from regexident/master
Added monospace font with support for box-drawing chars
2017-04-15 20:37:17 +02:00
Vincent Esche 41735b4579 Added monospace font with support for box-drawing chars 2017-04-15 14:16:28 +02:00
steveklabnik 80f01d70c6 Accept nightly examples.
This also brings us to parity with rustdoc regarding attributes in
general; while this PR was focused on enabling nightly, that was a
happy accident.
2017-03-31 17:06:03 -04:00
CrazyMerlyn f814e96459 Fix keyboard navigation to trigger only if no modifier key is pressed 2017-03-23 13:29:04 +05:30
Carol (Nichols || Goulding) 56f597b90c Update to highlight.js 9.10.0 2017-03-09 22:45:59 -05:00
Mathieu David c88656284c Regenerate css 2017-02-19 11:13:19 +01:00
Steve Klabnik d609988264 remove js rendering 2017-02-16 17:07:16 -05:00
Pavel Ivashkov b97a8205f6 widen hit regions of menu buttons
![see here](http://i.imgur.com/jCZTCfr.png)
2017-02-11 21:20:12 +02:00
Matt Brubeck 3a0cfc87df Add current chapter title to handlebars context 2016-12-31 10:34:36 -08:00
Gambhiro 85d8e2ebd3 use theme_path key in book.json when given 2016-12-07 14:22:32 +00:00
Mathieu David cf35e08abc Merge pull request #181 from thomastanck/master
Use fixed positioning and remove overflow-x's for smoother scrolling …
2016-11-22 10:06:41 +01:00
Carol (Nichols || Goulding) 08b5d14f7e Add hljs class to all code blocks, regardless of highlighting
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.
2016-11-13 21:14:00 -05:00
Thomas Tan f9101ca62c Use fixed positioning and remove overflow-x's for smoother scrolling experience in iOS 2016-11-09 16:18:40 +00:00
rnkaufman 2600c62cf9 Highlight js update 2016-10-27 18:26:02 -07:00
Adam Hess f26f41fde3 slugify section headers
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.
2016-10-20 22:02:16 -07:00
Mathieu David 4852e9e65a Merge branch 'master' of https://github.com/azerupi/mdBook 2016-09-12 22:50:03 +02:00
Mathieu David e54b6643e1 regenerate css 2016-09-12 22:43:29 +02:00
Mathieu David c7a95ccb8b Fix round corners in theme selector, changes were previously comitted directly to the css file causing them to be overwritten 2016-09-12 22:19:36 +02:00
Mathieu David 81a8f946b7 Fix print.styl, changes were previously comitted directly to the css file causing them to be overwritten 2016-09-12 22:10:33 +02:00
Boris Egorov 49608b560b Make line-height for chapter greater than section
Fixes #166
2016-09-04 22:04:55 +07:00
icanrealizeum b4948b680f Fixes #156 - anchors are now URI encoded
also fixes https://github.com/rust-lang/book/issues/166 anchors duplication

Thanks @azerupi for mentoring in #156 !
Cheers!
2016-07-31 15:21:58 +03:00
Onur Aslan b9e22bb8f2 Use light theme when javascript is disabled
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
2016-06-15 17:25:28 +03:00
Boris-Chengbiao Zhou dfef0d7585 Add print media query 2016-06-10 19:30:26 +02:00
Boris-Chengbiao Zhou e861880f95 Implement Serve feature 2016-04-02 05:20:46 +02:00
Lucio Franco ceb139a848 Moved CDN's to https 2016-03-23 14:16:41 -06:00
Mathieu David ad0794a0bd Add a rustfmt config and run rustfmt on the code base 2016-03-17 22:31:28 +01:00
Jesse Stricker 330b1ad55d Add description config option 2016-02-25 14:32:49 +01:00
Jesse Stricker f508db6113 Add favicon support to theme 2016-02-22 17:17:07 +01:00
Jesse Stricker 1083d1822d Add default favicon.png 2016-02-22 16:59:53 +01:00
funkill f2b913c9dd add rounding for first and last items in theme selector 2016-02-16 11:15:08 +03:00
Mathieu David 5891e4b5db Fix bug where theme-popup was under the navigation arrows making it impossible to change the theme 2016-02-16 08:50:57 +01:00
Mathieu David 7364d41f0c Style tables, different header bg, alternate row color and border 2016-02-05 18:09:35 +01:00
Mathieu David 0b00c270d5 Fix a style bug caused by the insertion of the theme-popup div inside font awesome icon <i>
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
2016-02-03 17:55:19 +01:00
Mathieu David 78b6148463 Basic formatting for tables + Styling for blockquotes
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.
2016-01-03 13:47:59 +01:00
Mathieu David 78e1897b47 Remove code that has better equivalent in std
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.
2016-01-03 13:02:04 +01:00
Mathieu David 5170e6b675 Fix #89, bug introduced earlier where all headers are black in all color themes 2016-01-01 11:02:24 +01:00
Mathieu David a7f329d337 Add href to heading anchors so that the url for the anchor is displayed in the url bar when clicking the header 2016-01-01 02:17:40 +01:00
Mathieu David db7424e947 Continue #29, playpens are now runnable 2016-01-01 00:32:12 +01:00
Mathieu David ae6334f358 Fix bug where we would not check if there was actually a page to navigate to when using arrow keys 2015-12-30 17:19:43 +01:00
Mathieu David 600eb02fee Fix bug introduced earlier, where navigation arrows would become blue when visited + make the tooltip on nvigation arrows a little clearer 2015-12-30 16:48:46 +01:00
Mathieu David 41462e8b2d Merge pull request #87 from funkill/keys_navigation
add navigation by arrows
2015-12-30 16:37:09 +01:00