psdi-data-conversion 0.1.7__py3-none-any.whl → 0.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- psdi_data_conversion/app.py +5 -408
- psdi_data_conversion/constants.py +12 -8
- psdi_data_conversion/converter.py +41 -28
- psdi_data_conversion/converters/base.py +18 -13
- psdi_data_conversion/database.py +292 -88
- psdi_data_conversion/gui/__init__.py +5 -0
- psdi_data_conversion/gui/accessibility.py +51 -0
- psdi_data_conversion/gui/env.py +239 -0
- psdi_data_conversion/gui/get.py +53 -0
- psdi_data_conversion/gui/post.py +176 -0
- psdi_data_conversion/gui/setup.py +102 -0
- psdi_data_conversion/main.py +70 -13
- psdi_data_conversion/static/content/convert.htm +105 -74
- psdi_data_conversion/static/content/convertato.htm +36 -26
- psdi_data_conversion/static/content/convertc2x.htm +39 -26
- psdi_data_conversion/static/content/download.htm +5 -5
- psdi_data_conversion/static/content/feedback.htm +2 -2
- psdi_data_conversion/static/content/header-links.html +2 -2
- psdi_data_conversion/static/content/index-versions/header-links.html +2 -2
- psdi_data_conversion/static/content/index-versions/psdi-common-header.html +9 -12
- psdi_data_conversion/static/content/psdi-common-header.html +9 -12
- psdi_data_conversion/static/javascript/accessibility.js +88 -61
- psdi_data_conversion/static/javascript/data.js +1 -3
- psdi_data_conversion/static/javascript/load_accessibility.js +50 -33
- psdi_data_conversion/static/styles/format.css +72 -18
- psdi_data_conversion/templates/accessibility.htm +274 -0
- psdi_data_conversion/templates/documentation.htm +6 -6
- psdi_data_conversion/templates/index.htm +73 -56
- psdi_data_conversion/{static/content → templates}/report.htm +28 -10
- psdi_data_conversion/testing/conversion_test_specs.py +26 -6
- psdi_data_conversion/testing/utils.py +6 -6
- {psdi_data_conversion-0.1.7.dist-info → psdi_data_conversion-0.2.1.dist-info}/METADATA +9 -3
- {psdi_data_conversion-0.1.7.dist-info → psdi_data_conversion-0.2.1.dist-info}/RECORD +36 -30
- psdi_data_conversion/static/content/accessibility.htm +0 -255
- {psdi_data_conversion-0.1.7.dist-info → psdi_data_conversion-0.2.1.dist-info}/WHEEL +0 -0
- {psdi_data_conversion-0.1.7.dist-info → psdi_data_conversion-0.2.1.dist-info}/entry_points.txt +0 -0
- {psdi_data_conversion-0.1.7.dist-info → psdi_data_conversion-0.2.1.dist-info}/licenses/LICENSE +0 -0
@@ -5,8 +5,10 @@
|
|
5
5
|
<div class="header-left">
|
6
6
|
<div class="navbar__brand">
|
7
7
|
<a class="navbar__logo" href="https://psdi.ac.uk/">
|
8
|
-
<img src="../img/psdi-logo-darktext.png" alt="PSDI logo"
|
9
|
-
|
8
|
+
<img src="../img/psdi-logo-darktext.png" alt="PSDI logo"
|
9
|
+
class="lm-only">
|
10
|
+
<img src="../img/psdi-logo-lighttext.png" alt="PSDI logo"
|
11
|
+
class="dm-only">
|
10
12
|
</a>
|
11
13
|
<a class="navbar__title" href="../../">
|
12
14
|
<h5>Data Conversion Service</h5>
|
@@ -14,18 +16,13 @@
|
|
14
16
|
</div>
|
15
17
|
</div>
|
16
18
|
<div class="navbar__items navbar__items--right">
|
17
|
-
<!-- This file contains the links that will appear in the top-right of the header bar for .html files in this directory. -->
|
18
|
-
<a href="../../" class="navbar__item navbar__link">Home</a> <a href="report.htm"
|
19
|
-
class="navbar__item navbar__link">Report Missing Format/Conversion</a> <a href="feedback.htm"
|
20
|
-
class="navbar__item navbar__link">Provide Feedback</a> <a href="../../documentation.htm"
|
21
|
-
class="navbar__item navbar__link">Documentation</a> <a href="download.htm"
|
22
|
-
class="navbar__item navbar__link service-only">Download</a> <a href="accessibility.htm"
|
23
|
-
class="navbar__item navbar__link">Accessibility</a> <a href="mailto:support@psdi.ac.uk"
|
24
|
-
class="navbar__item navbar__link" id="mail">Contact Us</a>
|
19
|
+
<!-- This file contains the links that will appear in the top-right of the header bar for .html files in this directory. --> <a href="../../" class="navbar__item navbar__link">Home</a> <a href="../../report.htm" class="navbar__item navbar__link">Report Missing Format/Conversion</a> <a href="feedback.htm" class="navbar__item navbar__link">Provide Feedback</a> <a href="../../documentation.htm" class="navbar__item navbar__link">Documentation</a> <a href="download.htm" class="navbar__item navbar__link service-only">Download</a> <a href="../../accessibility.htm" class="navbar__item navbar__link">Accessibility</a> <a href="mailto:support@psdi.ac.uk" class="navbar__item navbar__link" id="mail">Contact Us</a>
|
25
20
|
<button class="clean-btn color-mode-toggle" title="Switch between dark and light mode"
|
26
21
|
aria-label="Lightmode/darkmode toggle button">
|
27
|
-
<img src="../img/colormode-toggle-lm.svg" alt="Lightmode toggle icon"
|
28
|
-
|
22
|
+
<img src="../img/colormode-toggle-lm.svg" alt="Lightmode toggle icon"
|
23
|
+
class="lm-only">
|
24
|
+
<img src="../img/colormode-toggle-dm.svg" alt="Darkmode toggle icon"
|
25
|
+
class="dm-only">
|
29
26
|
</button>
|
30
27
|
</div>
|
31
28
|
</div>
|
@@ -12,27 +12,27 @@ const LIGHT_MODE = "light";
|
|
12
12
|
const DARK_MODE = "dark";
|
13
13
|
|
14
14
|
function toggleMode() {
|
15
|
-
|
16
|
-
|
15
|
+
let currentMode = document.documentElement.getAttribute("data-theme");
|
16
|
+
let new_mode;
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
if (currentMode == DARK_MODE) {
|
19
|
+
new_mode = LIGHT_MODE;
|
20
|
+
} else {
|
21
|
+
new_mode = DARK_MODE;
|
22
|
+
}
|
23
23
|
|
24
|
-
|
25
|
-
|
24
|
+
document.documentElement.setAttribute("data-theme", new_mode);
|
25
|
+
sessionStorage.setItem("mode", new_mode);
|
26
26
|
}
|
27
27
|
|
28
28
|
function loadOption(jsName, cssSelector, changeFunc) {
|
29
|
-
const opt = sessionStorage.getItem(jsName+"Opt");
|
30
|
-
if (opt!=null)
|
29
|
+
const opt = sessionStorage.getItem(jsName + "Opt");
|
30
|
+
if (opt != null)
|
31
31
|
$(cssSelector).val(opt).change();
|
32
32
|
$(cssSelector).change(changeFunc);
|
33
33
|
}
|
34
34
|
|
35
|
-
$(document).ready(function() {
|
35
|
+
$(document).ready(function () {
|
36
36
|
|
37
37
|
loadOption("font", "#font", changeFont);
|
38
38
|
loadOption("size", "#size", changeFontSize);
|
@@ -45,7 +45,7 @@ $(document).ready(function() {
|
|
45
45
|
loadOption("darkBack", "#dark-background", changeDarkBackground);
|
46
46
|
|
47
47
|
$("#resetButton").click(resetSelections);
|
48
|
-
$("#
|
48
|
+
$("#saveButton").click(saveSettings);
|
49
49
|
});
|
50
50
|
|
51
51
|
// Changes the font for accessibility purposes
|
@@ -53,9 +53,9 @@ function changeFont(event) {
|
|
53
53
|
const fontSelection = $("#font").find(":selected");
|
54
54
|
const font = fontSelection.text().trim();
|
55
55
|
|
56
|
-
if (font=="Default") {
|
57
|
-
r.style.setProperty('--ifm-font-family-base',
|
58
|
-
r.style.setProperty('--ifm-heading-font-family',
|
56
|
+
if (font == "Default") {
|
57
|
+
r.style.setProperty('--ifm-font-family-base', sessionStorage.getItem('psdi-default-font'));
|
58
|
+
r.style.setProperty('--ifm-heading-font-family', sessionStorage.getItem('psdi-default-heading-font'));
|
59
59
|
} else {
|
60
60
|
// To avoid duplication of font settings, we retrieve the style to apply from what's applied to the font in the
|
61
61
|
// selection box
|
@@ -70,18 +70,18 @@ function changeLetterSpacing(event) {
|
|
70
70
|
const space = $("#letter").find(":selected").text();
|
71
71
|
|
72
72
|
if (space == "Default") {
|
73
|
-
r.style.setProperty('--psdi-letter-spacing-base',
|
73
|
+
r.style.setProperty('--psdi-letter-spacing-base', sessionStorage.getItem('psdi-default-letter-spacing'));
|
74
74
|
} else {
|
75
|
-
r.style.setProperty('--psdi-letter-spacing-base', space+"px");
|
75
|
+
r.style.setProperty('--psdi-letter-spacing-base', space + "px");
|
76
76
|
}
|
77
77
|
}
|
78
78
|
|
79
79
|
// Changes the line spacing for accessibility purposes.
|
80
80
|
function changeLineSpacing(event) {
|
81
81
|
const space = $("#line").find(":selected").text();
|
82
|
-
|
83
|
-
if (space=="Default") {
|
84
|
-
r.style.setProperty('--ifm-line-height-base',
|
82
|
+
|
83
|
+
if (space == "Default") {
|
84
|
+
r.style.setProperty('--ifm-line-height-base', sessionStorage.getItem('psdi-default-line-height'));
|
85
85
|
} else {
|
86
86
|
r.style.setProperty('--ifm-line-height-base', space);
|
87
87
|
}
|
@@ -91,10 +91,10 @@ function changeLineSpacing(event) {
|
|
91
91
|
function changeFontSize(event) {
|
92
92
|
const size = $("#size").find(":selected").text();
|
93
93
|
|
94
|
-
if (size=="Default") {
|
95
|
-
r.style.setProperty('--ifm-font-size-base',
|
94
|
+
if (size == "Default") {
|
95
|
+
r.style.setProperty('--ifm-font-size-base', sessionStorage.getItem('psdi-default-font-size'));
|
96
96
|
} else {
|
97
|
-
r.style.setProperty('--ifm-font-size-base', size+"px");
|
97
|
+
r.style.setProperty('--ifm-font-size-base', size + "px");
|
98
98
|
}
|
99
99
|
}
|
100
100
|
|
@@ -102,8 +102,8 @@ function changeFontSize(event) {
|
|
102
102
|
function changeFontWeight(event) {
|
103
103
|
const weight = $("#weight").find(":selected").text();
|
104
104
|
|
105
|
-
if (weight=="Default") {
|
106
|
-
r.style.setProperty('--ifm-font-weight-base',
|
105
|
+
if (weight == "Default") {
|
106
|
+
r.style.setProperty('--ifm-font-weight-base', sessionStorage.getItem('psdi-default-font-weight'));
|
107
107
|
} else {
|
108
108
|
r.style.setProperty('--ifm-font-weight-base', weight.toLowerCase());
|
109
109
|
}
|
@@ -119,18 +119,18 @@ function changeFontColourLight(event) {
|
|
119
119
|
return changeFontColour(event, "light");
|
120
120
|
}
|
121
121
|
|
122
|
-
function changeFontColour(event, lightOrDark="dark") {
|
123
|
-
|
124
|
-
const colour = $("#"+lightOrDark+"-colour").find(":selected").text();
|
122
|
+
function changeFontColour(event, lightOrDark = "dark") {
|
123
|
+
|
124
|
+
const colour = $("#" + lightOrDark + "-colour").find(":selected").text();
|
125
125
|
|
126
|
-
if (colour==='Default') {
|
127
|
-
r.style.setProperty('--psdi-'+lightOrDark+'-text-color-body',
|
128
|
-
|
129
|
-
r.style.setProperty('--psdi-'+lightOrDark+'-text-color-heading',
|
130
|
-
|
126
|
+
if (colour === 'Default') {
|
127
|
+
r.style.setProperty('--psdi-' + lightOrDark + '-text-color-body',
|
128
|
+
sessionStorage.getItem('psdi-default-' + lightOrDark + '-text-color-body'));
|
129
|
+
r.style.setProperty('--psdi-' + lightOrDark + '-text-color-heading',
|
130
|
+
sessionStorage.getItem('psdi-default-' + lightOrDark + '-text-color-heading'));
|
131
131
|
} else {
|
132
|
-
r.style.setProperty('--psdi-'+lightOrDark+'-text-color-body', colour);
|
133
|
-
r.style.setProperty('--psdi-'+lightOrDark+'-text-color-heading', colour);
|
132
|
+
r.style.setProperty('--psdi-' + lightOrDark + '-text-color-body', colour);
|
133
|
+
r.style.setProperty('--psdi-' + lightOrDark + '-text-color-heading', colour);
|
134
134
|
}
|
135
135
|
}
|
136
136
|
|
@@ -138,8 +138,8 @@ function changeFontColour(event, lightOrDark="dark") {
|
|
138
138
|
function changeLightBackground(event) {
|
139
139
|
const colour = $("#light-background").find(":selected").text();
|
140
140
|
|
141
|
-
if (colour=="Default") {
|
142
|
-
r.style.setProperty('--ifm-background-color',
|
141
|
+
if (colour == "Default") {
|
142
|
+
r.style.setProperty('--ifm-background-color', sessionStorage.getItem('psdi-default-background-color'));
|
143
143
|
} else {
|
144
144
|
r.style.setProperty('--ifm-background-color', colour);
|
145
145
|
}
|
@@ -149,8 +149,8 @@ function changeLightBackground(event) {
|
|
149
149
|
function changeDarkBackground(event) {
|
150
150
|
const colour = $("#dark-background").find(":selected").text();
|
151
151
|
|
152
|
-
if (colour=="Default") {
|
153
|
-
r.style.setProperty('--ifm-color-primary',
|
152
|
+
if (colour == "Default") {
|
153
|
+
r.style.setProperty('--ifm-color-primary', sessionStorage.getItem('psdi-default-color-primary'));
|
154
154
|
} else {
|
155
155
|
r.style.setProperty('--ifm-color-primary', colour);
|
156
156
|
}
|
@@ -160,37 +160,64 @@ function changeDarkBackground(event) {
|
|
160
160
|
function resetSelections(event) {
|
161
161
|
["#font", "#size", "#weight", "#letter", "#line", "#dark-colour", "#light-colour", "#light-background",
|
162
162
|
"#dark-background"].forEach(function (selector) {
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
163
|
+
// Don't trigger a change event if it's already on Default
|
164
|
+
if ($(selector).find(":selected").val() != "Default")
|
165
|
+
$(selector).val("Default").change();
|
166
|
+
});
|
167
167
|
}
|
168
168
|
|
169
169
|
// Save a setting for one accessibility option to sessionStorage
|
170
|
-
function applySetting(jsName, cssSelector, cssVar) {
|
170
|
+
function applySetting(jsName, cssSelector, cssVar, settingsData) {
|
171
171
|
|
172
172
|
// Check if set to default and not previously set, in which case don't save anything to storage
|
173
173
|
let selectedVal = $(cssSelector).find(":selected").val();
|
174
|
-
|
174
|
+
|
175
|
+
let val = s.getPropertyValue(cssVar);
|
176
|
+
|
177
|
+
settingsData[jsName] = val;
|
178
|
+
settingsData[jsName + "Opt"] = selectedVal;
|
179
|
+
|
180
|
+
if (selectedVal == "Default" && sessionStorage.getItem(jsName) == null)
|
175
181
|
return;
|
176
182
|
|
177
|
-
sessionStorage.setItem(jsName,
|
178
|
-
sessionStorage.setItem(jsName+"Opt", selectedVal);
|
183
|
+
sessionStorage.setItem(jsName, val);
|
184
|
+
sessionStorage.setItem(jsName + "Opt", selectedVal);
|
185
|
+
|
179
186
|
}
|
180
187
|
|
181
188
|
// Applies accessibility settings to the entire website.
|
182
|
-
function
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
applySetting("
|
187
|
-
applySetting("
|
188
|
-
applySetting("
|
189
|
-
applySetting("
|
190
|
-
applySetting("
|
191
|
-
applySetting("
|
192
|
-
applySetting("
|
193
|
-
|
194
|
-
|
189
|
+
function saveSettings(event) {
|
190
|
+
|
191
|
+
let settingsData = new Object();
|
192
|
+
|
193
|
+
applySetting("font", "#font", "--ifm-font-family-base", settingsData);
|
194
|
+
applySetting("hfont", "#font", "--ifm-heading-font-family", settingsData);
|
195
|
+
applySetting("size", "#size", "--ifm-font-size-base", settingsData);
|
196
|
+
applySetting("weight", "#weight", "--ifm-font-weight-base", settingsData);
|
197
|
+
applySetting("letter", "#letter", "--psdi-letter-spacing-base", settingsData);
|
198
|
+
applySetting("line", "#line", "--ifm-line-height-base", settingsData);
|
199
|
+
applySetting("darkColour", "#dark-colour", "--psdi-dark-text-color-body", settingsData);
|
200
|
+
applySetting("lightColour", "#light-colour", "--psdi-light-text-color-body", settingsData);
|
201
|
+
applySetting("lightBack", "#light-background", "--ifm-background-color", settingsData);
|
202
|
+
applySetting("darkBack", "#dark-background", "--ifm-color-primary", settingsData);
|
203
|
+
|
204
|
+
$.post(`/save_accessibility/`, {
|
205
|
+
'data': JSON.stringify(settingsData)
|
206
|
+
})
|
207
|
+
.done(() => {
|
208
|
+
alert("Your accessibility settings have been saved. If you accidentally save settings which are " +
|
209
|
+
"unreadable and can't find the \"Reset\" button, you can restore the default settings by deleting " +
|
210
|
+
"this site's cookie in your browser's settings.");
|
211
|
+
})
|
212
|
+
.fail(function (e) {
|
213
|
+
alert("ERROR: Could not save accessibility settings. Your settings should still persist for this " +
|
214
|
+
"session, but will not be restored for future sessions. Please use the \"Contact\" link in the " +
|
215
|
+
"header to report this error to us.");
|
216
|
+
|
217
|
+
// For debugging
|
218
|
+
console.error("Error saving accessibility settings", e.status, e.responseText);
|
219
|
+
});
|
220
|
+
|
221
|
+
|
195
222
|
}
|
196
223
|
|
@@ -1,10 +1,8 @@
|
|
1
1
|
// data.js
|
2
2
|
|
3
|
-
const response = await fetch("/static/data/data.json");
|
4
|
-
|
5
3
|
let data = null;
|
6
4
|
try {
|
7
|
-
data = JSON.parse(await
|
5
|
+
data = JSON.parse(await $.get(`/database/`));
|
8
6
|
} catch (err) {
|
9
7
|
console.log("ERROR: Database could not be loaded, error: " + err)
|
10
8
|
}
|
@@ -2,8 +2,8 @@ const r = document.querySelector(':root');
|
|
2
2
|
const s = getComputedStyle(document.documentElement);
|
3
3
|
|
4
4
|
function setDefault(default_varname, current_varname) {
|
5
|
-
if (
|
6
|
-
|
5
|
+
if (sessionStorage.getItem(default_varname) != null) {
|
6
|
+
sessionStorage.setItem(default_varname, s.getPropertyValue('--' + current_varname))
|
7
7
|
}
|
8
8
|
}
|
9
9
|
|
@@ -27,7 +27,7 @@ setDefault("psdi-default-background-color", "ifm-background-color");
|
|
27
27
|
setDefault("psdi-default-color-primary", "ifm-color-primary");
|
28
28
|
|
29
29
|
// Load values from session storage
|
30
|
-
|
30
|
+
let font = sessionStorage.getItem("font"),
|
31
31
|
hfont = sessionStorage.getItem("hfont"),
|
32
32
|
size = sessionStorage.getItem("size"),
|
33
33
|
weight = sessionStorage.getItem("weight"),
|
@@ -45,45 +45,62 @@ function loadProperty(current_varname, value) {
|
|
45
45
|
}
|
46
46
|
}
|
47
47
|
|
48
|
-
|
49
|
-
loadProperty("ifm-heading-font-family", hfont);
|
48
|
+
function applyStoredAccessibility() {
|
50
49
|
|
51
|
-
loadProperty("ifm-font-
|
50
|
+
loadProperty("ifm-font-family-base", font);
|
51
|
+
loadProperty("ifm-heading-font-family", hfont);
|
52
52
|
|
53
|
-
loadProperty("ifm-font-
|
53
|
+
loadProperty("ifm-font-size-base", size);
|
54
54
|
|
55
|
-
loadProperty("
|
55
|
+
loadProperty("ifm-font-weight-base", weight);
|
56
56
|
|
57
|
-
loadProperty("psdi-
|
58
|
-
loadProperty("psdi-dark-text-color-heading", darkColour);
|
59
|
-
loadProperty("psdi-light-text-color-body", lightColour);
|
60
|
-
loadProperty("psdi-light-text-color-heading", lightColour);
|
57
|
+
loadProperty("psdi-letter-spacing-base", letter);
|
61
58
|
|
62
|
-
loadProperty("
|
59
|
+
loadProperty("psdi-dark-text-color-body", darkColour);
|
60
|
+
loadProperty("psdi-dark-text-color-heading", darkColour);
|
61
|
+
loadProperty("psdi-light-text-color-body", lightColour);
|
62
|
+
loadProperty("psdi-light-text-color-heading", lightColour);
|
63
63
|
|
64
|
-
loadProperty("ifm-
|
65
|
-
loadProperty("ifm-color-primary", darkBack);
|
64
|
+
loadProperty("ifm-line-height-base", line);
|
66
65
|
|
67
|
-
|
68
|
-
|
69
|
-
r.style.setProperty('--ifm-font-family-base', font);
|
70
|
-
r.style.setProperty('--ifm-heading-font-family', hfont);
|
71
|
-
|
72
|
-
r.style.setProperty('--ifm-font-size-base', size);
|
73
|
-
|
74
|
-
r.style.setProperty('--ifm-font-weight-base', weight);
|
75
|
-
|
76
|
-
r.style.setProperty('--psdi-letter-spacing-base', letter);
|
66
|
+
loadProperty("ifm-background-color", lightBack);
|
67
|
+
loadProperty("ifm-color-primary", darkBack);
|
77
68
|
|
78
|
-
|
79
|
-
r.style.setProperty('--psdi-dark-text-color-heading', darkColour);
|
80
|
-
r.style.setProperty('--psdi-light-text-color-body', lightColour);
|
81
|
-
r.style.setProperty('--psdi-light-text-color-heading', lightColour);
|
82
|
-
|
83
|
-
r.style.setProperty('--ifm-line-height-base', line);
|
69
|
+
}
|
84
70
|
|
85
|
-
|
86
|
-
|
71
|
+
if (font != null) {
|
72
|
+
applyStoredAccessibility();
|
87
73
|
}
|
88
74
|
|
75
|
+
$.get(`/load_accessibility/`)
|
76
|
+
.done((data) => {
|
77
|
+
|
78
|
+
const oData = JSON.parse(data);
|
79
|
+
|
80
|
+
function getAndSave(key) {
|
81
|
+
let value = oData[key];
|
82
|
+
if (value != null) {
|
83
|
+
sessionStorage.setItem(key, value);
|
84
|
+
sessionStorage.setItem(key + "Opt", oData[key + "Opt"]);
|
85
|
+
return value;
|
86
|
+
} else {
|
87
|
+
return sessionStorage.getItem(key);
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
font = getAndSave("font");
|
92
|
+
hfont = getAndSave("hfont");
|
93
|
+
size = getAndSave("size");
|
94
|
+
weight = getAndSave("weight");
|
95
|
+
letter = getAndSave("letter");
|
96
|
+
line = getAndSave("line");
|
97
|
+
darkColour = getAndSave("darkColour");
|
98
|
+
lightColour = getAndSave("lightColour");
|
99
|
+
lightBack = getAndSave("lightBack");
|
100
|
+
darkBack = getAndSave("darkBack");
|
101
|
+
mode = getAndSave("mode");
|
102
|
+
|
103
|
+
applyStoredAccessibility();
|
104
|
+
});
|
105
|
+
|
89
106
|
document.documentElement.setAttribute("data-theme", mode);
|
@@ -21,27 +21,13 @@ form {
|
|
21
21
|
/* Width management for select boxes and forms */
|
22
22
|
|
23
23
|
.med-width {
|
24
|
-
width:
|
25
|
-
|
26
|
-
|
27
|
-
@media (max-width: 25rem) {
|
28
|
-
.med-width {
|
29
|
-
width: 100%
|
30
|
-
}
|
24
|
+
width : 100%;
|
25
|
+
max-width: 25rem;
|
31
26
|
}
|
32
27
|
|
33
28
|
.large-width {
|
34
|
-
width:
|
35
|
-
|
36
|
-
|
37
|
-
@media (max-width: 50rem) {
|
38
|
-
.large-width {
|
39
|
-
width: 100%
|
40
|
-
}
|
41
|
-
|
42
|
-
input.large-width {
|
43
|
-
width: calc(100% - 0.5rem)
|
44
|
-
}
|
29
|
+
width : 100%;
|
30
|
+
max-width: 50rem;
|
45
31
|
}
|
46
32
|
|
47
33
|
/* Invalid input fields switch to alternate background */
|
@@ -56,6 +42,11 @@ input:invalid {
|
|
56
42
|
display: none
|
57
43
|
}
|
58
44
|
|
45
|
+
/* File upload prompt */
|
46
|
+
input#fileToUpload {
|
47
|
+
margin-right: 0.25rem;
|
48
|
+
}
|
49
|
+
|
59
50
|
/* Buttons that are initially disabled */
|
60
51
|
input.button.init-disabled {
|
61
52
|
background-color: var(--psdi-bg-color-secondary);
|
@@ -77,6 +68,64 @@ input.button.init-disabled {
|
|
77
68
|
padding: 8rem;
|
78
69
|
}
|
79
70
|
|
71
|
+
/* Flex styling for pages */
|
72
|
+
.flex-panel-display {
|
73
|
+
display : flex;
|
74
|
+
flex-direction : row;
|
75
|
+
align-items : flex-start;
|
76
|
+
justify-content: space-between;
|
77
|
+
}
|
78
|
+
|
79
|
+
.flex-panel-display:has(.instructions-panel) {
|
80
|
+
border : 1px solid black;
|
81
|
+
border-radius: 1rem;
|
82
|
+
margin-bottom: 2rem;
|
83
|
+
}
|
84
|
+
|
85
|
+
@media (max-width: 700px) {
|
86
|
+
.flex-panel-display {
|
87
|
+
display: block;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
.flex-panel {
|
92
|
+
flex : 1 1 50%;
|
93
|
+
padding: 1rem;
|
94
|
+
}
|
95
|
+
|
96
|
+
.instructions-panel {
|
97
|
+
flex : 1 1 35%;
|
98
|
+
margin: 0;
|
99
|
+
}
|
100
|
+
|
101
|
+
.flex-panel-display hr {
|
102
|
+
margin : -0.5rem 25% 0.5rem 25%;
|
103
|
+
height : 1px;
|
104
|
+
border-top-style : none;
|
105
|
+
border-bottom-style: solid;
|
106
|
+
border-bottom-width: 1px;
|
107
|
+
}
|
108
|
+
|
109
|
+
/* Control for elements to only appear on big/small screens */
|
110
|
+
.big-screen-only {
|
111
|
+
display: block;
|
112
|
+
}
|
113
|
+
|
114
|
+
.small-screen-only {
|
115
|
+
display: none;
|
116
|
+
}
|
117
|
+
|
118
|
+
@media (max-width: 700px) {
|
119
|
+
|
120
|
+
.big-screen-only {
|
121
|
+
display: none;
|
122
|
+
}
|
123
|
+
|
124
|
+
.small-screen-only {
|
125
|
+
display: block;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
|
80
129
|
/* Grid for textarea label/elements. */
|
81
130
|
.access-options {
|
82
131
|
display : grid;
|
@@ -133,6 +182,11 @@ select#dark-background option {
|
|
133
182
|
color : var(--psdi-light-text-color-body);
|
134
183
|
}
|
135
184
|
|
185
|
+
/* Classes to force specific styling for exceptional cases */
|
186
|
+
.no-left-margin {
|
187
|
+
margin-left: 0 !important;
|
188
|
+
}
|
189
|
+
|
136
190
|
/* We use the service-mode variable to control whether elements with the "service-only" or "local-only" class are shown
|
137
191
|
*/
|
138
192
|
[service-mode=True] .local-only {
|