-
Notifications
You must be signed in to change notification settings - Fork 371
Expand file tree
/
Copy pathtemplate.html
More file actions
81 lines (77 loc) · 3.12 KB
/
Copy pathtemplate.html
File metadata and controls
81 lines (77 loc) · 3.12 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
<!doctype html>
<html lang="en">
<head>
<title>Retrospectives, Standups, Sprint Poker & Team Health Checks | Parabol</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#493272" />
<!-- Dark mode boot: apply .theme-dark before first paint. 'theme' mirrors LocalStorageKey.THEME.
Absent or 'system' follows the OS, matching DEFAULT_THEME_PREFERENCE in themePreference.ts. -->
<script>
try {
var themePref = localStorage.getItem('theme')
if (
themePref === 'dark' ||
(themePref !== 'light' && matchMedia('(prefers-color-scheme: dark)').matches)
) {
document.documentElement.className += ' theme-dark'
var themeMeta = document.querySelector('meta[name="theme-color"]')
if (themeMeta) themeMeta.setAttribute('content', '#2d1d53')
}
} catch (e) {}
</script>
<meta
name="description"
content="Parabol is the open-source workspace for agile teams: run retrospectives, Sprint Poker estimation, check-ins and async standups, then measure team health with anonymous engagement surveys built on psychological safety research. Every score becomes a discussion and a task. Self-hosted or cloud, free to start."
/>
<link href="/manifest.json" rel="manifest" crossorigin="use-credentials" />
<link href="__PUBLIC_PATH__/favicon.ico" rel="shortcut icon" crossorigin="" />
<%=
htmlWebpackPlugin.tags.headTags.map((tag) => {
tag.attributes.crossorigin=''
return tag
}).join('')
%>
<!-- Safari sometimes kills the current service worker before it can load the initial script to load the updated one -->
<script>
if ('serviceWorker' in navigator) {
let loadError = false
let serviceWorkerUpdateFound = false
function unregisterSW(event) {
if (!loadError || !serviceWorkerUpdateFound) return
location.reload()
}
// because the script tag is `defer` we need to attach the handler via script
document.querySelectorAll('script').forEach((script) => {
if (script.src) {
script.onerror = () => {
console.log('Error loading script ', script.src)
loadError = true
unregisterSW()
}
script.onload = () => {
console.log('Load script ', script.src)
loadError = false
script.onerror = null
script.onload = null
}
}
})
// context closed event happens because the old service worker is killed because a new one is found
navigator.serviceWorker.getRegistration().then((reg) => {
if (!reg) return
reg.addEventListener('updatefound', () => {
console.log('Service worker update found')
serviceWorkerUpdateFound = true
unregisterSW()
})
})
}
</script>
<!-- End Safari hack -->
</head>
<body>
<div id="root"></div>
<%= htmlWebpackPlugin.tags.bodyTags %>
</body>
</html>