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
|
<head>
{{ partial "meta" . }}
<link
rel="stylesheet"
href="{{ `/css/bootstrap/bootstrap.min.css` | relURL }}"
/>
<link
rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"
integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU"
crossorigin="anonymous"
/>
<link
rel="stylesheet"
href="https://cdn.rawgit.com/jpswalsh/academicons/master/css/academicons.min.css"
/>
<link
rel="stylesheet"
href="//fonts.googleapis.com/css?family=Didact+Gothic%7CRoboto:400%7CRoboto+Mono"
/>
<link rel="stylesheet" href="{{ `/css/aafu.css` | relURL }}" />
<script>
const colors = {
light: {
primaryBg: "#f8f9fa",
primaryText: "black",
primaryLinks: "#007bff",
secondaryBg: "#fff",
secondaryText: "black",
secondaryLinks: "#007bff",
shadow: "#595659"
},
dark: {
primaryBg: "#2c2b2b",
primaryText: "white",
primaryLinks: "#ffc107",
secondaryBg: "#373737",
secondaryText: "white",
secondaryLinks: "#ffc107",
shadow: "black"
},
pinkish: {
primaryBg: "#f8f9fa",
primaryText: "black",
primaryLinks: "#81415f",
secondaryBg: "#81415f",
secondaryText: "white",
secondaryLinks: "#ffc107",
shadow: "#595659"
}
};
const mainTheme = {{ .Site.Params.theme.mainTheme }};
let currentTheme = mainTheme;
const altTheme = {{ .Site.Params.theme.altTheme }};
const foo = (theme) => {
let thisTheme = colors[theme];
Object.keys(thisTheme).forEach(function(key) {
document.documentElement.style.setProperty(`--${key}`, thisTheme[key]);
});
};
var themeColor = document.querySelector("meta[name=theme-color]");
window.onload = function() {
foo(currentTheme);
const root = document.documentElement;
themeColor.content = getComputedStyle(document.body)["background-color"];
let defaultActivePanel = document.querySelector(".accordion.active")
.nextElementSibling;
defaultActivePanel.style.maxHeight =
defaultActivePanel.scrollHeight + "px";
};
window.onresize = function() {
document.querySelector(".active").nextElementSibling.style.maxHeight =
document.querySelector(".active").nextElementSibling.scrollHeight +
"px";
};
</script>
</head>
|