Commit Graph

339 Commits

Author SHA1 Message Date
Eric Huss
4699269e49 Add SVG favicon. 2020-06-23 10:58:10 -07:00
Eric Huss
9268884b17
Merge pull request #1221 from manuel-woelker/fb-539-not-found-page
Generate 404.html page (#539)
2020-06-23 10:48:08 -07:00
Eric Huss
4f435c62e6
Merge pull request #1249 from ThePuzzlemaker/thepuzzlemaker-stylepatch
Fix issue where Font Awesome overrides `.hidden`'s `display: none`
2020-06-22 12:28:09 -07:00
Eric Huss
bc23d08fa5
Rename playpen to playground. (#1241)
looks good
2020-06-22 16:34:25 +02:00
ThePuzzlemaker
84d848f292
Fix issue where Font Awesome overrides .hidden's display: none 2020-06-10 12:55:22 -05:00
Manuel Woelker
bff36e7229 Add the config parameter output.html.site-url to set base url of the 404 page, making links and relative script/css loads behave correctly even in subdirectory paths 2020-06-10 12:46:23 +02:00
Bryce Fisher-Fleig
fb1476d1e3
fix: don't jump away from form input to search bar
Addresses #1020 with the suggestion from prior PR #1101
2020-06-04 14:35:49 -07:00
Michael-F-Bryan
b2d50392ea
Emit redirects towards the end of the rendering process 2020-05-27 02:42:56 +08:00
Eric Huss
5d5c55e619
Merge pull request #1171 from mark-i-m/master
implement support for book parts
2020-05-20 12:17:45 -07:00
Eric Huss
e677b72eb8
Merge pull request #1188 from pheki/remove-google-surveillance
Remove google fonts by serving them locally
2020-05-20 11:01:07 -07:00
Aphek
7e090ca42f Also copy font licenses when copy-fonts is enabled 2020-05-19 03:17:01 -03:00
Aphek
122c988477 Rename config from no-copy-fonts to copy-fonts 2020-05-19 03:09:25 -03:00
mark
2d63286c63 make part titles bold 2020-05-17 16:53:06 -05:00
mark
5dd2a5bff4 implement support for book parts 2020-05-17 16:53:06 -05:00
Eric Huss
1b3b10d2ae
Do not allow the sidebar to be dragged outside the window. (#1229) 2020-05-17 22:05:12 +02:00
Aphek
2c26c65f4d Remove google fonts by serving them locally
Co-authored-by: Aral Balkan <aral@ind.ie>
Co-authored-by: Collyn O'Kane <47607823+okaneco@users.noreply.github.com>
2020-05-15 02:48:28 -03:00
Gilles Rasigade
c2d58158da Revert HTML auto-formatting 2020-05-10 08:42:53 -07:00
Gilles Rasigade
61c8413138 Allow to define own HTML <head> attributes
Create a `index.hbs` template file to render additional HTML <head> attributes
2020-05-10 08:42:53 -07:00
Eric Huss
99ecd4f87c
Merge pull request #1170 from ehuss/fix-theme-focus
Fix theme selector focus.
2020-04-03 12:45:33 -07:00
Eric Huss
e839ef0866
Fix sidebar line-height. (#1182) 2020-04-03 21:09:23 +02:00
Eric Huss
21a16c9b75
Scroll sidebar to middle instead of top. (#1161)
* Fix: Scroll sidebar to current active section (#1067)

* Clean: Some code related to PR #1052

* Change `scrollIntoViewIfNeeded` with `scrollIntoView`

* Don't use onload event for sidebar scroll to reduce flickering.

Co-authored-by: 李鸿章 <poodll@163.com>
2020-03-24 21:08:53 +01:00
Eric Huss
4e8e1e1408
Don't highlight code spans in headers. (#1162) 2020-03-24 20:43:20 +01:00
Eric Huss
f7ffffbd1e Fix theme selector focus. 2020-03-20 11:12:42 -07:00
Dylan DPC
fd56a53e76
ui: improve menu folding (#989)
* ui: improve menu folding

Fold/unfold the menu bar just by the amount of scroll, not by its
full width

* refactor: use a variable for the menu bar height

* Fix menu scroll jittering, remove hover folding smoothness

Rewrite it to use `position:` `sticky` and `relative` instead
of continuous programmatic position changes

On-hover folding-unfolding transition removal is a side-effect
2020-03-06 01:11:37 +01:00
Dylan DPC
ca4b85b815
Increases line height for p, ul & ol (#1136) 2020-03-06 01:06:19 +01:00
Evan Carroll
2bd8bdf798 Support rel=next and rel=previous
This resolves GH #1149
2020-02-18 09:20:17 -06:00
Sergey Pedan
0da7ba4abe
Corrects inner/outer space in sidebar <li>s (#1137) 2020-02-17 22:04:59 +01:00
Avery Harnish
b8fc7a1b2d fix: ayu theme meta highlighting 2020-01-30 09:57:45 -06:00
Arashmidos
6a94492238 fix scroll issue (#1108)
* fix sidebar scrolling

* fix query selector
2019-12-02 11:07:24 +01:00
Dylan Owen
b6603468d6 Stop scrolling on socket reload 2019-11-12 18:06:11 -08:00
Benedikt Werner
e2a8600712
Remove outdated unused var in theme js code 2019-11-04 14:03:24 +01:00
Steve Klabnik
f79d5d4582 rust-lang-nursery -> rust-lang
Fixes #1080
2019-10-29 08:04:16 -05:00
Rostislav
820714a560 Use only relative font sizes (#894)
This replaces the only use of px for font-sizes by setting up a base
rem size on the root element in a way that is easy to calculate (1 rem =
10px) and scaling up according to browser settings.
2019-10-27 15:51:32 +01:00
Matthew Woodcraft
86a368b726 Introduce a --menu-bar-height CSS variable 2019-10-26 13:21:26 +01:00
Matthew Woodcraft
1dc482b00d Add scroll-margin-top to headings which contain link targets.
This means when the link is followed, the page scrolls in such a way as to
leave space for the fixed menu bar.

Fixes #1040
2019-10-26 12:55:12 +01:00
Benedikt Werner
c9dae170f3 Better automatic dark mode (#1069)
* Don't save default theme to localStorage

* Auto enable dark mode on no-js

* Fix light theme with no-js
2019-10-23 12:15:59 +02:00
rnitta
a592da33bb fix the behavior of sticky header (#1070) 2019-10-19 10:07:41 +02:00
Weihang Lo
6af6219e5b [Feature] expandable sidebar sections (ToC collapse) (#1027)
* render(toc): render expandable toc toggle

* ui(toc): js/css logic to toggle toc

* test: update rendered output css selector

* config: add `html.fold.[enable|level]`

* renderer: fold according to configs

* doc: add `output.html.fold`

* refactor: tidy fold config

- Derive default for `Fold`.
- Use `is_empty` instead of checking the length of chapters.
2019-10-19 09:56:08 +02:00
Andrew Pritchard
e5f74b6c86 Option to display copy buttons. (#1050)
* Option to display copy buttons.

- Added field to playpen data structure
- Communicate through window.playpen_copyable
- Javascript updated to check before displaying copy buttons.

* html -> html_config

Also:
- update description of copyable in source code.
- update description of line_numbers (my last PR to this repository)
2019-10-17 12:44:54 +02:00
Benedikt Werner
84a2ab0dba Reapply: Move hiding of boring lines into static content (#846) (#1065)
* Move hiding of boring lines into static content (#846)

* Fix test for hidden code
2019-10-16 11:27:14 +02:00
David Omar Flores Chávez
d63ef8330d Add !important to code {font-family} property (#1062)
If accepted, this will fix #1061
2019-10-11 14:21:13 +02:00
rnitta
01e50303a2 add a command to playpen (#1066) 2019-10-11 14:16:06 +02:00
Dylan DPC
2b3304cb8b
Revert "Move hiding of boring lines into static content (#846)" (#1064)
This reverts commit 4448f3fc4b.
2019-10-10 14:31:55 +02:00
Adrian Heine né Lang
4448f3fc4b Move hiding of boring lines into static content (#846) 2019-10-10 13:55:29 +02:00
Chris Ladd
859659f197 Fix inline code display css (#1058) 2019-10-07 09:24:35 +02:00
Eric Huss
93c9ae5700
Merge pull request #1037 from Flying-Toast/prefers-color-scheme
Automatically use a dark theme according to 'prefers-color-scheme'
2019-10-05 11:33:52 -07:00
morphologue
699844a5c3 Fix #1029 sidebar not auto-scrolling 2019-10-05 16:54:09 +10:00
Eric Huss
a6f317e352 Update highlight.js (#1041) 2019-09-30 00:07:54 +02:00
Flying-Toast
b0ae14a2c7 Automatically use a dark theme according to 'prefers-color-scheme' 2019-09-25 19:11:28 -04:00
Andrew Pritchard
81ab2eb7db Added line numbers to editable sections of code.
- Added line numbers to config struct
- Added playpen_line_numbers field to hbs renderer.
- Added section to set `window.playpen_line_numbers = true` in page template
- Use line number global variable to show line numbers when required.
2019-09-24 21:27:02 +08:00