Commit Graph

2031 Commits

Author SHA1 Message Date
Michael Bryan
0d0deb7c40 Pulled page rendering out into its own method 2017-06-15 17:43:44 +08:00
Michal Budzynski
e8908e32c9 Minor cleanup
- removing need to explicitly use `Path::new` all over the place
- removed warnings from doctests (normally invisible unless `cargo test -- --nocapture`)
- no doctests are norun/ignore now
- updated docs both in book-example and in docs not to refer to nonexisting API's
2017-06-14 21:55:42 +02:00
Mathieu David
9e9a08806d Merge pull request #329 from budziq/ios_playpen_buttons
Fix for playpen buttons missing on mobile safari and chrome IOS
2017-06-13 18:43:34 +02:00
Michal Budzynski
ee9fa8c86f Fix for playpen buttons missing on mobile safari and chrome IOS 2017-06-13 16:59:29 +02:00
Ning Sun
e890579141 (fix) some merge issue 2017-06-13 20:53:25 +08:00
Ning Sun
9aa39a6a12 (chore) update handlebars to 0.27.0
Signed-off-by: Ning Sun <sunng@about.me>
2017-06-13 20:43:36 +08:00
Ning Sun
6ee6da074e (refactor) rework helpers based on new handlebars api
Signed-off-by: Ning Sun <sunng@about.me>
2017-06-13 20:43:17 +08:00
Ning Sun
2bb274d424 Merge branch 'master' of github.com:azerupi/mdBook 2017-06-13 20:40:46 +08:00
Mathieu David
19692c76df Merge pull request #326 from budziq/fix_clipboard
copying to clipboard no longer copies the compilation results from "play"
2017-06-12 14:15:41 +02:00
Michal Budzynski
a6275ebcdb copying to clipboard no longer copies the compilation results from "play" 2017-06-12 14:02:53 +02:00
Mathieu David
6a279e2775 Merge branch 'Cldfire-master' 2017-06-12 11:26:19 +02:00
Mathieu David
9ce6eebe43 Merge branch 'master' of git://github.com/Cldfire/mdBook into Cldfire-master 2017-06-12 11:19:31 +02:00
Mathieu David
0b6378eb13 Merge branch 'budziq-custom_js' 2017-06-12 11:10:46 +02:00
Mathieu David
350c86155b Merge branch 'custom_js' of git://github.com/budziq/mdBook into budziq-custom_js 2017-06-12 11:09:07 +02:00
Mathieu David
ad9bda2d69 Merge pull request #324 from budziq/store_js
Move from localStorage to store.js (v2.0.3) - also hide sidebar on mobile
2017-06-12 11:03:03 +02:00
Michal Budzynski
08fd255a56 Move from localStorage to store.js (v2.0.3)
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.
2017-06-12 01:53:25 +02:00
Michal Budzynski
f607978780 Hide sidebar on link selection when it occupies large space
in relation to the whole screen width (solves problems on phones)
2017-06-11 15:13:31 +02:00
Michal Budzynski
f96e7e5cba Implemented support for additional JS 2017-06-11 15:08:09 +02:00
Mathieu David
6c279453d9 Merge pull request #321 from pravic/es5-fix
One more ES5 fix.
2017-06-09 22:10:03 +02:00
pravic
56163f69f8 One more ES5 fix. 2017-06-09 22:48:57 +03:00
Mathieu David
a9862a56b3 Merge pull request #320 from pravic/es5-fix
Fix ES5 compatibility.
2017-06-09 21:41:23 +02:00
pravic
eba90f5440 Fix ES5 compatibility. 2017-06-09 21:59:29 +03:00
Cldfire
44efc65c63 Add Ayu theme
Also adds the a new variable, `$inline-code-color`, to base.styl. The `Ayu` theme needed this to change the text color of inline code.
2017-06-06 16:35:44 -04:00
Steve Klabnik
8a05f0d499 Merge pull request #287 from azerupi/toml-config
Revamp config code
2017-06-05 10:56:44 -04:00
Mathieu David
f1121cf8c2 fix build failure 2017-06-04 20:47:34 +02:00
Mathieu David
1a8e54bb52 remove unused methods 2017-06-04 20:41:31 +02:00
Mathieu David
23efa9e146 Document the TOML configuration file 2017-06-04 20:41:31 +02:00
Mathieu David
bb4ceb481f Allow an additional custom stylesheets, closes #178 2017-06-04 20:41:31 +02:00
Mathieu David
c6bfe0b1d7 Adds a test for #240 2017-06-04 20:41:31 +02:00
Mathieu David
2e812db13c Fix for google-analytics 2017-06-04 20:41:31 +02:00
Mathieu David
70383d0a25 New config structs supports json again (the old style) for a little deprecation period 2017-06-04 20:41:31 +02:00
Mathieu David
d3ae2eda56 Replace the old book structure with the new one 2017-06-04 20:41:31 +02:00
Mathieu David
170bf8b1eb New configuration struct + tests #285 2017-06-04 20:41:31 +02:00
Mathieu David
272022621d Merge pull request #307 from budziq/theme_reload
Now changes to `theme` directory trigger rebuild for `mdbook serve`
2017-06-01 13:56:26 +02:00
Michal Budzynski
be3418a269 Now changes to theme directory trigger rebuild for mdbook serve
As `theme` dir is no longer under `src`. Updates to "theme" did not
trigger book rebuild.
Also fixed misleading docs about `theme` dir being located in `src`
2017-06-01 13:11:39 +02:00
Mathieu David
3e80268a44 Merge pull request #303 from budziq/clipboard
RFC - Initial implementation of clipboard handling
2017-05-31 22:22:15 +02:00
Michal Budzynski
3a809e4a1c Added local fallback for clipboard.js 2017-05-31 21:51:19 +02:00
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
Mathieu David
bfc3fbb405 Merge pull request #304 from budziq/hljs_update
Updated highlight.js to v9.12.0
2017-05-31 15:50:06 +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
Mathieu David
316bcf7b5d Merge pull request #300 from budziq/serving_url
Reformatted "Serving on " message for easier consumption
2017-05-27 11:54:12 +02:00
Michal Budzynski
453b97bec0 Reformatted "Serving on " message for easier consumption
Now we have: `Serving on: http://localhost:3000`
2017-05-27 11:34:46 +02:00
Mathieu David
4364ec3a7b Merge pull request #298 from superstring/master
Fix websocket port option for serve
2017-05-26 13:54:07 +02:00
superstring
7de24f86a9 Change --ws-port to --websocket-port 2017-05-26 19:18:32 +08:00
superstring
027c21aef7 Fix websocket port option for serve 2017-05-26 12:04:20 +08:00
Mathieu David
64f0bdbfba Merge pull request #297 from aaaxx/master
CSS: better fallback stack for monospaced fonts
2017-05-24 10:28:25 +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
Mathieu David
35ef31757b Merge pull request #295 from budziq/err_ch
Friendlier errors from build.rs and support for Windows stylus build
2017-05-22 18:20:57 +02:00
Michal Budzynski
87f26a82b6 Fix for different naming of nodejs on ubuntu
also added static lifetime to str constants as these were failing on nightly windows
2017-05-22 17:06:38 +02:00