Skip to content

Commit 4feb5fd

Browse files
committed
Revert "use new header support, thanks mdbook!"
This reverts commit ed69a6c. This doesn't seem to work.
1 parent ed69a6c commit 4feb5fd

File tree

2 files changed

+239
-1
lines changed

2 files changed

+239
-1
lines changed

second-edition/theme/header.hbs

Lines changed: 0 additions & 1 deletion
This file was deleted.

second-edition/theme/index.hbs

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
<!DOCTYPE HTML>
2+
<html lang="{{ language }}">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>{{ title }}</title>
6+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
7+
<meta name="description" content="{{ description }}">
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
10+
<base href="{{ path_to_root }}">
11+
12+
<link rel="stylesheet" href="book.css">
13+
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
14+
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
15+
16+
<link rel="shortcut icon" href="{{ favicon }}">
17+
18+
<!-- Font Awesome -->
19+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
20+
21+
<link rel="stylesheet" href="highlight.css">
22+
<link rel="stylesheet" href="tomorrow-night.css">
23+
<link rel="stylesheet" href="ayu-highlight.css">
24+
25+
<!-- Custom theme -->
26+
{{#each additional_css}}
27+
<link rel="stylesheet" href="{{this}}">
28+
{{/each}}
29+
30+
<style>
31+
.page-wrapper.has-warning > .nav-chapters {
32+
/* add height for warning content & margin */
33+
top: 120px;
34+
}
35+
36+
p.warning {
37+
background-color: rgb(242, 222, 222);
38+
border-bottom-color: rgb(238, 211, 215);
39+
border-bottom-left-radius: 4px;
40+
border-bottom-right-radius: 4px;
41+
border-bottom-style: solid;
42+
border-bottom-width: 0.666667px;
43+
border-image-outset: 0 0 0 0;
44+
border-image-repeat: stretch stretch;
45+
border-image-slice: 100% 100% 100% 100%;
46+
border-image-source: none;
47+
border-image-width: 1 1 1 1;
48+
border-left-color: rgb(238, 211, 215);
49+
border-left-style: solid;
50+
border-left-width: 0.666667px;
51+
border-right-color: rgb(238, 211, 215);
52+
border-right-style: solid;
53+
border-right-width: 0.666667px;
54+
border-top-color: rgb(238, 211, 215);
55+
border-top-left-radius: 4px;
56+
border-top-right-radius: 4px;
57+
border-top-style: solid;
58+
border-top-width: 0.666667px;
59+
color: rgb(185, 74, 72);
60+
margin-bottom: 0px;
61+
margin-left: 0px;
62+
margin-right: 0px;
63+
margin-top: 30px;
64+
padding-bottom: 8px;
65+
padding-left: 14px;
66+
padding-right: 35px;
67+
padding-top: 8px;
68+
}
69+
p.warning strong {
70+
color: rgb(185, 74, 72)
71+
}
72+
p.warning a {
73+
color: rgb(0, 136, 204)
74+
}
75+
76+
a .hljs {
77+
color: #4183c4;
78+
}
79+
80+
.rust .content a .hljs,
81+
.coal .content a .hljs,
82+
.navy .content a .hljs {
83+
color: #2b79a2;
84+
}
85+
86+
a:hover .hljs {
87+
text-decoration: underline;
88+
}
89+
90+
/* Styles keystrokes such as ctrl-C */
91+
.keystroke {
92+
font-variant: small-caps;
93+
}
94+
</style>
95+
96+
{{#if mathjax_support}}
97+
<!-- MathJax -->
98+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
99+
{{/if}}
100+
101+
<!-- Fetch Clipboard.js from CDN but have a local fallback -->
102+
<script src="https://cdn.jsdelivr.net/clipboard.js/1.6.1/clipboard.min.js"></script>
103+
<script>
104+
if (typeof Clipboard == 'undefined') {
105+
document.write(unescape("%3Cscript src='clipboard.min.js'%3E%3C/script%3E"));
106+
}
107+
</script>
108+
109+
<!-- Fetch JQuery from CDN but have a local fallback -->
110+
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
111+
<script>
112+
if (typeof jQuery == 'undefined') {
113+
document.write(unescape("%3Cscript src='jquery.js'%3E%3C/script%3E"));
114+
}
115+
</script>
116+
117+
<!-- Fetch store.js from local - TODO add CDN when 2.x.x is available on cdnjs -->
118+
<script src="store.js"></script>
119+
120+
<!-- Custom JS script -->
121+
{{#each additional_js}}
122+
<script type="text/javascript" src="{{this}}"></script>
123+
{{/each}}
124+
125+
</head>
126+
<body class="light">
127+
<!-- Set the theme before any content is loaded, prevents flash -->
128+
<script type="text/javascript">
129+
var theme = store.get('mdbook-theme');
130+
if (theme === null || theme === undefined) { theme = 'light'; }
131+
$('body').removeClass().addClass(theme);
132+
</script>
133+
134+
<!-- Hide / unhide sidebar before it is displayed -->
135+
<script type="text/javascript">
136+
var sidebar = store.get('mdbook-sidebar');
137+
if (sidebar === "hidden") { $("html").addClass("sidebar-hidden") }
138+
else if (sidebar === "visible") { $("html").addClass("sidebar-visible") }
139+
</script>
140+
141+
<div id="sidebar" class="sidebar">
142+
{{#toc}}{{/toc}}
143+
</div>
144+
145+
<div id="page-wrapper" class="page-wrapper has-warning">
146+
147+
<div class="page" tabindex="-1">
148+
<header><p class="warning">You are reading a <strong>draft</strong> of the next edition of TRPL. For more, go <a href="../index.html">here</a>.</p></header>
149+
<div id="menu-bar" class="menu-bar">
150+
<div class="left-buttons">
151+
<i id="sidebar-toggle" class="fa fa-bars"></i>
152+
<i id="theme-toggle" class="fa fa-paint-brush"></i>
153+
</div>
154+
155+
<h1 class="menu-title">{{ book_title }}</h1>
156+
157+
<div class="right-buttons">
158+
<a href="print.html">
159+
<i id="print-button" class="fa fa-print" title="Print this book"></i>
160+
</a>
161+
</div>
162+
</div>
163+
164+
<div id="content" class="content">
165+
{{{ content }}}
166+
</div>
167+
168+
<!-- Mobile navigation buttons -->
169+
{{#previous}}
170+
<a rel="prev" href="{{link}}" class="mobile-nav-chapters previous">
171+
<i class="fa fa-angle-left"></i>
172+
</a>
173+
{{/previous}}
174+
175+
{{#next}}
176+
<a rel="next" href="{{link}}" class="mobile-nav-chapters next">
177+
<i class="fa fa-angle-right"></i>
178+
</a>
179+
{{/next}}
180+
181+
</div>
182+
183+
{{#previous}}
184+
<a href="{{link}}" class="nav-chapters previous" title="You can navigate through the chapters using the arrow keys">
185+
<i class="fa fa-angle-left"></i>
186+
</a>
187+
{{/previous}}
188+
189+
{{#next}}
190+
<a href="{{link}}" class="nav-chapters next" title="You can navigate through the chapters using the arrow keys">
191+
<i class="fa fa-angle-right"></i>
192+
</a>
193+
{{/next}}
194+
195+
</div>
196+
197+
198+
<!-- Local fallback for Font Awesome -->
199+
<script>
200+
if ($(".fa").css("font-family") !== "FontAwesome") {
201+
$('<link rel="stylesheet" type="text/css" href="_FontAwesome/css/font-awesome.css">').prependTo('head');
202+
}
203+
</script>
204+
205+
<!-- Livereload script (if served using the cli tool) -->
206+
{{{livereload}}}
207+
208+
{{#if google_analytics}}
209+
<script>
210+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
211+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
212+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
213+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
214+
215+
ga('create', '{{google_analytics}}', 'auto');
216+
ga('send', 'pageview');
217+
</script>
218+
{{/if}}
219+
220+
{{#if playpens_editable}}
221+
<script src="{{ ace_js }}" type="text/javascript" charset="utf-8"></script>
222+
<script src="{{ editor_js }}" type="text/javascript" charset="utf-8"></script>
223+
<script src="{{ mode_rust_js }}" type="text/javascript" charset="utf-8"></script>
224+
<script src="{{ theme_dawn_js }}" type="text/javascript" charset="utf-8"></script>
225+
<script src="{{ theme_tomorrow_night_js }}" type="text/javascript" charset="utf-8"></script>
226+
{{/if}}
227+
228+
{{#if is_print}}
229+
<script>
230+
$(document).ready(function() {
231+
window.print();
232+
})
233+
</script>
234+
{{/if}}
235+
236+
<script src="highlight.js"></script>
237+
<script src="book.js"></script>
238+
</body>
239+
</html>

0 commit comments

Comments
 (0)