Repository navigation
Expand file tree
/
Copy pathsailing.js
More file actions
101 lines (88 loc) · 5.19 KB
/
Copy pathsailing.js
File metadata and controls
101 lines (88 loc) · 5.19 KB
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
// The Sailing Codex Markdeep theme
// This file's own directory, for the links and images in the content below.
// Everything the stylesheet names resolves against the stylesheet instead.
const codex = document.currentScript.src.replace(/[^/]*$/, '');
( window.markdeepOptions ||=[] ).push({
stylesheets: {sailing: 'sailing.css'},
favicon: 'compass-rose-32x32.png',
// The banner and heading face, vendored beside the theme. The renderer
// must know the face exists before it emits anything that uses it, so it is
// declared here. An @font-face in the stylesheet resolves its src against
// the stylesheet. `src` here resolves against the theme's own directory
//.
fontFaces: [{fontFamily: 'header', src: 'Oxygen-Regular.ttf'}],
site_header: {content: `[The Sailing Codex](${codex}index.md.html)`,
// The banner spans the page; its title starts at the article's left edge,
// with the compass rose hanging to the left of it (sailing.css). The image
// URL is absolute because a style option is injected into the document,
// which lives in a subdirectory, so a relative URL resolves against the
// document.
style: {
height: 'var(--banner-height)',
lineHeight: 'var(--banner-height)',
backgroundImage: `url(${codex}header.jpg)`,
backgroundRepeat: 'repeat no-repeat',
backgroundSize: 'cover',
textShadow: '#2EB3AA 0px 0px 6px',
paddingLeft: 'calc(var(--article-padding) + max(0px, (100% - var(--content-max-width)) / 2))'
}},
main_nav: {align: 'inset'},
// The Codex omits section numbers. Readers find sections by name.
showSectionNumbers: false,
showLinkPreviews: false,
// Everything here has a name in the published style vocabulary.
// sailing.css contains the rest: the custom properties, the banner title
// with its compass rose, and the header classes without numbering.
style: {
// The Codex sets only this colour; Markdeep supplies the others.
// The dark arm is `auto`, so the renderer derives it from the light one
// and the reader's scheme control works.
body: {fontFamily: 'Georgia', lineHeight: '175%',
color: 'light-dark(#333, auto)',
// Markdeep justifies prose by default; the Codex is set
// ragged right.
textAlign: 'left'},
a: {fontFamily: 'Georgia'},
heading: {fontFamily: 'header'},
// The publication dates under a title. They are metadata, shown as one
// line of prose, so the block is laid out inline and not as the default
// grid (sailing.css supplies the separator).
metadata: {display: 'block',
marginTop: '0', marginRight: '0',
marginBottom: '0', marginLeft: '0'},
// No space under the title: the dates sit directly beneath it.
h1: {textAlign: 'left', fontSize: '35px', marginBottom: '0'},
h2: {fontSize: '30px'},
h3: {fontSize: '26px'},
h4: {fontSize: '24px'},
h5: {fontSize: '22px'}
},
main_footer: {content: `
<div style="border-top: solid 1px; padding-top:10px">
<table><tr valign=top><td width=300px>
<img src="${codex}portrait.jpg" width=250px>
</td><td width=30px> </td><td><i style="font-size:95%">
This article is part of Morgan's <a href="${codex}index.md.html">Sailing Codex</a> collection of notes.
<br>
<br>© 2022-2026 <a href="https://casual-effects.com">Morgan McGuire</a>.
The work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>,
excepting portions credited to other sources. <a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/80x15.png" /></a>
</i>
</td></tr></table>
<p style="font-size: 60%; line-height: 110%">
<b>DISCLAIMER</b>. The contents of these articles are presented as information only, and Morgan McGuire (the Author) makes
no claims, promises, or guarantees about the accuracy, completeness, adequacy, or
applicability of the procedures, instructions, and opinions herein. The Author
expressly disclaims liability for errors and omissions that any readers
might declare to exist in the information presented. No liability exists or can be
ascribed to the Author in the event of any accident, loss, or injury that might
occur as a result of errors or improper application or understanding of
the information provided. Use at your own risk.
Regulations vary with region and municipality. Research and obey all regulations and laws.
Confirm information with multiple sources, local experts, and your own experimentation. Be aware
of your environment and conditions. Adapt your techniques appropriately to each situation.
</p>
</div>`}
});
// Mandatory activation line. DO NOT MODIFY OR RELOCATE
((d,o)=>d.head.appendChild(((m)=>{m.dataset.theme=d.currentScript.src;return m;})(Object.assign(d.createElement('script'),{src:o.find((e)=>e.markdeepPath)?.markdeepPath??d.currentScript.src.replace(/[^/]*$/,'markdeep2.min.js')}))))(document,window.markdeepOptions);