-
Notifications
You must be signed in to change notification settings - Fork 12
/
index.html
202 lines (177 loc) · 10.3 KB
/
index.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
<!DOCTYPE html><html lang="en"><head>
<meta charset="utf-8">
<title>NHS England IT Standards</title>
<meta name="description" content="NHS England IT Standards">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="_assets/favicons/favicon.ico" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@latest/dist/css/theme-simple.css">
<!-- Custom theme styles -->
<style>
/**
* https://service-manual.nhs.uk/design-system/styles/typography
* https://jhildenbiddle.github.io/docsify-themeable
*/
@font-face {
font-display: swap;
font-family : "Frutiger W01";
font-style : normal;
font-weight : 400;
src : url(https://assets.nhs.uk/fonts/FrutigerLTW01-55Roman.eot?#iefix);
src : url(https://assets.nhs.uk/fonts/FrutigerLTW01-55Roman.eot?#iefix) format("eot"), url(https://assets.nhs.uk/fonts/FrutigerLTW01-55Roman.woff2) format("woff2"), url(https://assets.nhs.uk/fonts/FrutigerLTW01-55Roman.woff) format("woff"), url(https://assets.nhs.uk/fonts/FrutigerLTW01-55Roman.ttf) format("truetype"), url(https://assets.nhs.uk/fonts/FrutigerLTW01-55Roman.svg#7def0e34-f28d-434f-b2ec-472bde847115) format("svg")
}
@font-face {
font-display: swap;
font-family : "Frutiger W01";
font-style : normal;
font-weight : 600;
src : url(https://assets.nhs.uk/fonts/FrutigerLTW01-65Bold.eot?#iefix);
src : url(https://assets.nhs.uk/fonts/FrutigerLTW01-65Bold.eot?#iefix) format("eot"), url(https://assets.nhs.uk/fonts/FrutigerLTW01-65Bold.woff2) format("woff2"), url(https://assets.nhs.uk/fonts/FrutigerLTW01-65Bold.woff) format("woff"), url(https://assets.nhs.uk/fonts/FrutigerLTW01-65Bold.ttf) format("truetype"), url(https://assets.nhs.uk/fonts/FrutigerLTW01-65Bold.svg#eae74276-dd78-47e4-9b27-dac81c3411ca) format("svg")
}
:root {
--base-font-size: 16px;
--base-font-family: Frutiger W01, Arial, Sans-serif;
/*--sidebar-background: #005EB8;*/
}
.active {
font-weight:900 !important;
font-style: italic !important;
}
#_n4w5lqkr2 > tbody > tr > td:nth-child(1) {
font-style: bold !important;
}
</style>
</head><body>
<div id="app">Loading, please wait ...</div>
<script src="https://cdn.jsdelivr.net/npm/docsify-edit-on-github/index.min.js"></script>
<script>
// https://docsify.js.org/
window.$docsify = {
name: 'NHSE IT Standards',
repo: 'nhsengland/it-standards',
homepage: 'Standards_Catalogue.md',
auto2top: true,
logo: '/_assets/logos/logo-nhs.svg',
themeColor: '#3F51B5',
executeScript: true,
notFoundPage: 'Standards_Catalogue.md', // true, // load _404.md instead of page not found
// loadNavbar: true,
// mergeNavbar: true,
loadSidebar: true,
alias: {
'/.*/_sidebar.md': '/_sidebar.md' // use the same sidebar everywhere
},
// maxLevel: 4,
subMaxLevel: 2,
search: {
depth : 3,
noData : 'No results!',
placeholder: 'Search...'
},
pagination: {
// previousText: '上一章节',
// nextText: '下一章节',
crossChapter: true,
crossChapterText: true,
},
plugins: [
EditOnGithubPlugin.create('https://github.com/nhsengland/it-standards/blob/main/'),
// Custom plugin
function (hook, vm) {
//console.log({hook,vm})
const orgName = 'NHS England'
const orgUrl = 'https://www.england.nhs.uk'
const footer = [
'<hr/>',
'<footer>',
'<span>',
'Copyright © 2021', // per-page - (c) and date
` <a href="${orgUrl}">${orgName}</a>.`,
'', // updated date - {docsify-updated} variable could have been used
'</span> ',
'',
' <span>Published with <a href="https://docsify.js.org/" target="_blank">docsify</a>.</span> ',
'</footer>'
]
const stages = {
'1': '1. Proposal Stage<br>Proposals may be raised via GitHub Issues. Initial discussions will happen under the Issue or offline.',
'2': '2. Response Stage<br>After initial proposal discussion, if accepted, it will move on to the development stage.',
// Would only expect to see 3/4/5 in actual standards documents
'3': '3. Development Stage<br>Development stage documents may be incomplete and in-progress. They are actively looking for feedback.',
'4': '4. Final Approval Stage<br>Once a PR has been issued, a final check will be done and approval will be given or minor changes requested.',
'5': '5. Live<br>Live standards are under change control. Suggested changes must go through the contribution stages again.',
}
// Runs against the raw markdown for each page
hook.beforeEach(function(content) {
// console.log({content})
let strYr = (new Date()).getFullYear()
let mydate = false
let yearFrom = 2020
let yearTo = strYr
footer[5] = ''
if ( vm.frontmatter ) { // fm only exists per page, requires plugin
//#region --- Add front-matter (YAML) standard metadata to each page if present ---
if ( vm.frontmatter.description ) {
content = `${vm.frontmatter.description}\n\n${content}`
}
if ( vm.frontmatter.reviewDate ) {
if ( (new Date()) > (new Date(vm.frontmatter.reviewDate)) )
content = `!> This standard requires a review/update.\n\n${content}`
}
if ( vm.frontmatter.stage ) {
let stage
try {
content = `?> ${stages[Number.parseInt(vm.frontmatter.stage)]}\n\n${content}`
} catch (e) { }
}
if ( vm.frontmatter.title ) {
content = `# ${vm.frontmatter.title}\n\n${content}`
}
//#endregion --- ---
//#region --- Add page specific (c) and last updated date to each page if available from YAML front-matter ---
if ( vm.frontmatter.created ) { // uib docs/Obsidian
mydate = new Date(vm.frontmatter.created)
yearFrom = mydate.getFullYear()
} else if ( vm.frontmatter.date ) { // Hugo
mydate = new Date(vm.frontmatter.date)
yearFrom = mydate.getFullYear()
}
if ( vm.frontmatter.lastUpdated ) { // uib/IT Stds docs
mydate = new Date(vm.frontmatter.lastUpdated)
yearTo = mydate.getFullYear()
} else if ( vm.frontmatter.updated ) { // Obsidian
mydate = new Date(vm.frontmatter.updated)
yearTo = mydate.getFullYear()
} else if ( vm.frontmatter.Lastmod ) { // Hugo
mydate = new Date(vm.frontmatter.Lastmod)
yearTo = mydate.getFullYear()
}
if ( mydate !== false ) {
if ( yearFrom === yearTo && yearFrom !== Number(strYr) ) {
strYr = yearFrom
} else if ( yearFrom !== yearTo ) {
strYr = yearFrom + '-' + yearTo
}
footer[5] = ` Last updated ${mydate.toLocaleString('en-GB', { dateStyle: 'medium', timeStyle: 'short' })}.`
}
//#endregion --- ---
} // ---- End of if front-matter ---- //
footer[3] = `Copyright © ${strYr}`
return content
}) // ------- End of Custom Plugin ------- //
// Runs against the rendered HTML for each page
hook.afterEach(function (html, next) {
next( html + footer.join('') )
})
},
],
}
</script>
<script src="https://cdn.jsdelivr.net/npm/docsify@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify-themeable@latest/dist/js/docsify-themeable.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify@latest/lib/plugins/search.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify@latest/lib/plugins/front-matter.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify-mustache"></script> <!-- https://ppipada.github.io/post/markdown/2020-04-29-docsify-mustache/ -->
<script src="https://cdn.jsdelivr.net/npm/docsify-pagination/dist/docsify-pagination.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify-plugin-flexible-alerts/dist/docsify-plugin-flexible-alerts.min.js">/* https://github.com/fzankl/docsify-plugin-flexible-alerts/ */</script>
<!--<script src="//cdn.jsdelivr.net/npm/vue@2/dist/vue.min.js"></script>-->
</body></html>