-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Uses an iframe instead. The downside of iframes comes from them not necessarily being same-origin as the main page (particularly with `file:///` URLs), which can cause themes to fall out of sync, but that's not a problem here since themes don't work without JS anyway.
- Loading branch information
Showing
5 changed files
with
80 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<!DOCTYPE HTML> | ||
<html lang="{{ language }}" class="{{ default_theme }}" dir="{{ text_direction }}"> | ||
<head> | ||
<!-- sidebar iframe generated using mdBook | ||
This is a frame, and not included directly in the page, to control the total size of the | ||
book. The TOC contains an entry for each page, so if each page includes a copy of the TOC, | ||
the total size of the page becomes O(n**2). | ||
The frame is only used as a fallback when JS is turned off. When it's on, the sidebar is | ||
instead added to the main page by `toc.js` instead. The JavaScript mode is better | ||
because, when running in a `file:///` URL, the iframed page would not be Same-Origin as | ||
the rest of the page, so the sidebar and the main page theme would fall out of sync. | ||
--> | ||
<meta charset="UTF-8"> | ||
<meta name="robots" content="noindex"> | ||
{{#if base_url}} | ||
<base href="{{ base_url }}"> | ||
{{/if}} | ||
<!-- Custom HTML head --> | ||
{{> head}} | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="theme-color" content="#ffffff"> | ||
<link rel="stylesheet" href="{{ path_to_root }}css/variables.css"> | ||
<link rel="stylesheet" href="{{ path_to_root }}css/general.css"> | ||
<link rel="stylesheet" href="{{ path_to_root }}css/chrome.css"> | ||
{{#if print_enable}} | ||
<link rel="stylesheet" href="{{ path_to_root }}css/print.css" media="print"> | ||
{{/if}} | ||
<!-- Fonts --> | ||
<link rel="stylesheet" href="{{ path_to_root }}FontAwesome/css/font-awesome.css"> | ||
{{#if copy_fonts}} | ||
<link rel="stylesheet" href="{{ path_to_root }}fonts/fonts.css"> | ||
{{/if}} | ||
<!-- Custom theme stylesheets --> | ||
{{#each additional_css}} | ||
<link rel="stylesheet" href="{{ ../path_to_root }}{{ this }}"> | ||
{{/each}} | ||
</head> | ||
<body class="sidebar-iframe-inner"> | ||
{{#toc}}{{/toc}} | ||
</body> | ||
</html> |