-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsiteTemplate.html
203 lines (194 loc) · 8.62 KB
/
siteTemplate.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<meta charset='utf-8'>
<script charset="UTF-8" src="site/Paradoc.js"> </script>
<template>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
<title>${Bookmark.Header.title}</title>
<script>
// This script and all subsequent scripts will be *prefetched* by the browser.
// But they wont' be executed because the initial Paradoc.js wipes out the entire
// doc by injecting a plaintext node. However, the browser will fetch these resources.
// If the paths are invalid you will get an error message about it. However, this is
// actually a kind of benefit. The browser warms up the cache while you are merely fetching
// the template. Then when it comes time to use the template to render the real page,
// The cache is warm.
// TODO: Make a variable that can be tested like if(!Bookmark)
/*
if(typeof Bookmark === 'undefined') {
debugger;
alert(
'If you see this alert while fetching the templates, ' +
'your path to Paradoc.js is likely messed up above'
);
}
*/
</script>
<!-- Bookmark -->
<!--<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> -->
<script src='site/vendor/jquery.js'></script>
<!-- You are required to add the attribute fromSiteTemplate when loading the Bookmark script from a site template -->
<script charset="UTF-8" fromSiteTemplate src="site/Paradoc.js"> </script>
<!-- fonts -->
<!-- if including a private coding font/word font, remove the non-private one from document after rendering to avoid bundling it -->
<script class="removeFromRenderedPage" src='site/vendor/highlight.pack.js'></script>
<script class="removeFromRenderedPage" src='site/vendor/reason-highlightjs.js'></script>
<script src='site/vendor/medium-zoom.js'></script>
<script class="removeFromRenderedPage" src='site/vendor/stylus.min.js'></script>
<link href='./site/fonts/WordFont.css' rel='stylesheet'>
<link href='./site/fonts/PrivateCodingFont.css' rel='stylesheet'>
<link href='./site/fonts/CodingFont.css' rel='stylesheet'>
<!-- Meta -->
<meta content="${Bookmark.Header.title|Title}" property="og:title">
<meta content="${Bookmark.Header.template.ogType|websiteDeafult}" property="og:type">
<meta content="${Bookmark.Header.description|Description}" name="description">
<meta content="${Bookmark.Header.description|Description}" property="og:description">
</head>
<body class='paradoc-hljs big-h3 large-brief'>
<script>
document.body.style="visibility:hidden"
</script>
<center>
<div id="mock-demo" class="nodisplay-true mock-demo">
<script>
var colors = ['pink', 'purple', 'red', 'yellow', 'green', 'blue', 'br', 'prim', 'prim-desat', 'low', 'low-desat'];
var buttons = [];
for(var k = 0; k < colors.length; k++) {
var color = colors[k];
var swatch = document.createElement('div');
if(color.indexOf('-desat') === -1) {
var button = document.createElement('div');
button.className = 'button ' + (color === 'br' ? '' : color);
button.tabIndex = 0;
button.textContent = (color === 'br' ? 'default' :color);
buttons.push(button);
}
swatch.className = 'swatch';
if(color !== 'br') {
for(var j = 1; j <= 17; j++) {
var clr = document.createElement('div');
clr.className = 'color bg-' + color + '-' + j;
swatch.appendChild(clr);
}
}
window['mock-demo'].appendChild(swatch);
}
var buttonSwatch = document.createElement('div');
buttonSwatch.className = 'swatch';
buttons.forEach(function(btn) {buttonSwatch.appendChild(btn);});
window['mock-demo'].appendChild(swatch);
window['mock-demo'].appendChild(buttonSwatch);
window.addEventListener('keydown', function(e) {
if((e.ctrlKey || e.metaKey) && e.shiftKey && e.keyCode == 'P'.charCodeAt(0)){
e.preventDefault();
var mockDemo = window['mock-demo'];
if(mockDemo.className.indexOf('nodisplay-true') === -1) {
mockDemo.classList.add('nodisplay-true');
} else {
mockDemo.classList.remove('nodisplay-true');
}
}
});
</script>
</div>
</center>
<!-- This is just a dummy resource node so that we substitute templates that
refer to these resources even if the page is compressed/saved as a bundle.
Otherwise, compressers cannot determine that the resource referred to in
the comment needs to be compressed -->
<img id="reasonSiteLogoForTemplate" style="display:none" src="./site/ReasonDocsLogo.svg">
<img id="paradocSiteLogoForTemplate" style="display:none" src="./site/ParadocLogo.svg">
<img id="githubLogoForTemplate" style="display:none" src="./site/githubIcon.svg">
<div class="bookmarkTemplate">
<!--
<div class="display-if-page-number-${Bookmark.Template.Pages.what-and-why.number}-active">
<a href="https://www.github.com/reasonml/reason">
<img style="width:20px;display: block;position: absolute; top: 20px; right: 20px; z-index: 2; opacity: .1" class="logo" alt="Textbook" src="${Bookmark.Template.DomResourcesById.githubLogoForTemplate.src}">
</a>
<div class="title-area title-card" style="height: 1187px;">
<div class="in">
<center style=" ">
<img style="min-width: 200px;max-width: 700px; width:100%;display: block;" class="logo" alt="Textbook" src="${Bookmark.Template.DomResourcesById.reasonSiteLogoForTemplate.src}">
</center>
</div>
</div>
</div>
-->
</div>
<div class="bookmarkTemplate">
<!--
<div class="display-if-page-number-${Bookmark.Template.Pages.readme.number}-active">
<a href="https://www.github.com/jordwalke/paradoc">
<img style="width:20px;display: block;position: absolute; top: 20px; right: 20px; z-index: 2; opacity: .1" class="logo" alt="Textbook" src="${Bookmark.Template.DomResourcesById.githubLogoForTemplate.src}">
</a>
<div class="title-area title-card" style="height: 1187px;">
<div class="in">
<center style=" ">
<img style="min-width: 200px;max-width: 700px; width:100%;display: block;" class="logo" alt="Textbook" src="${Bookmark.Template.DomResourcesById.paradocSiteLogoForTemplate.src}">
</center>
</div>
</div>
</div>
-->
</div>
<div id='bookmark-header' class='bookmark-header'>
<div class="fixedHeaderContainer">
<form data-focused-placeholder=" " data-placeholder=" " id="the-search-input">
<button id="bookmark-version-menu" type="button" class="bookmark-version-menu">v1.0</button>
</form>
<ul class="nav">
<div class="bookmarkTemplateForEachPage">
<!--
<li
class="
site-nav-group-page-index-${Bookmark.Template.ForEachPage.number}
site-nav-group-page-key-${Bookmark.Template.ForEachPage.key}
nodisplay-${Bookmark.Template.ForEachPage.hideInNav}
">
<a href="${Bookmark.Template.ForEachPage.url}" target="_self">
${Bookmark.Template.ForEachPage.linkText}
</a>
</li>
-->
</div>
</ul>
</div>
</div>
<div id="the-search-hits"></div>
<div class='bookmark-content-root'></div>
<!-- Initializer -->
<script class="removeFromRenderedPage">
hljs.registerLanguage('reasonml', reasonmlHighlightJs);
</script>
<script>
Bookmark.go({
stylus: './site/theme.styl.html',
versionPageIs: "VERSIONS",
highlight: function (code, value) {
return hljs.highlight(
value === 'reason' ? 'javascript' :
value === 'json' ? 'javascript' :
value.indexOf('{#') === 0 ? 'javascript' : value,
code
).value;
},
/**
* The default headerConfig. Sidenav requires linkifying and therefore
* will force linkifying if sideNav is true.
*/
slugify: {h0: true, h1: true, h2: true, h3: true, h4: false, h5: false, h6: true},
sidenavify: {h0: true, h1: true, h2: true, h3: true, h4: false, h5: false, h6: true},
slugContributions: {h0: false, h1: false, h2: true, h3: true, h4: true, h5: true, h6: true},
searchFormId: 'the-search-input',
searchHitsId: 'the-search-hits',
versionButtonId: "bookmark-version-menu",
versionContentId: "bookmark-doc-versions",
runPrerenderedInSingleDocsMode: true,
runDevelopmentInSingleDocsMode: true
});
</script>
</body>
</html>
</template>