-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
182 lines (170 loc) · 8.78 KB
/
Copy pathindex.html
File metadata and controls
182 lines (170 loc) · 8.78 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
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>IEQLab tutorial tools</title>
<style>
/* Tutorial tools · unit index · IEQ Lab · rev. 2026-08 */
:root {
color-scheme: light;
--bg: #f4f6f7; --card: #fcfdfd; --ink: #1c2430; --muted: #5a6675;
--line: #dfe4ea; --accent: #0e7c86; --accent-ink: #fbfefe;
/* one radius scale, one shadow — do not add values outside these */
--r-sm: 3px; --r-md: 8px; --r-pill: 999px;
--shadow: 0 3px 8px rgba(20, 38, 46, .12);
/* motion: one easing, one duration; 150ms sits in the 150-250ms band */
--ease-out: cubic-bezier(.2, 0, 0, 1); --dur: 150ms;
/* Type: roles, not values. ~1.15 ratio. */
--t-meta: .78rem; /* badges, footer, unit codes */
--t-label: .875rem; /* card descriptions, back links */
--t-body: 1rem;
--t-lead: 1.125rem;
--t-h2: 1.3rem;
--t-h1: 1.625rem;
/* Space: 4px base. Tight inside a group, generous between groups. */
--s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
--s-5: 20px; --s-6: 24px; --s-8: 32px; --s-12: 48px;
}
/* ---- dark theme ----
JS resolves system/light/dark and writes data-theme on <html> before
first paint, so the dark values live in exactly one place instead of
being duplicated across a media query and a selector. */
:root[data-theme="dark"] {
color-scheme: dark;
--bg: #10151b; --card: #171e27; --ink: #e7ecf2; --muted: #9aa7b6;
--line: #2a3441; --accent: #38b2bd; --accent-ink: #06212a;
--shadow: 0 3px 8px rgba(0, 0, 0, .34);
}
:root[data-theme="dark"] :is(a.unit.u6030) { --accent: #99a4ef; }
/* Light text on a dark surface blooms and reads thinner. Compensate on
all three axes: a little more leading, a little more tracking, and one
step more weight on the low-contrast roles. */
:root[data-theme="dark"] :is(body) { line-height: 1.6; letter-spacing: .004em; }
:root[data-theme="dark"] :is(.lede, .unit p, footer) { font-weight: 450; }
@media (prefers-reduced-motion: reduce) {
* { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
* { box-sizing: border-box; }
body {
margin: 0; background: var(--bg); color: var(--ink);
font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
.wrap { max-width: 760px; margin: 0 auto; padding: var(--s-8) var(--s-4) var(--s-12); }
h1 { font-size: var(--t-h1); margin: 0 0 var(--s-1); letter-spacing: -.018em; }
.lede { color: var(--muted); margin: 0 0 var(--s-8); max-width: 60ch; }
a.unit { display: block; text-decoration: none; color: inherit; background: var(--card);
border: 1px solid var(--line); border-radius: var(--r-md);
padding: var(--s-4) var(--s-5); margin: var(--s-4) 0; transition: border-color var(--dur) var(--ease-out); }
a.unit:hover { border-color: var(--accent); }
/* Each unit keeps its own accent, matching its tool pages. */
a.unit.u6030 { --accent: #4a52b5; }
.unit .code { display: inline-block; font-size: var(--t-meta); letter-spacing: .04em;
text-transform: uppercase; color: var(--accent); font-weight: 600; }
.unit h2 { margin: var(--s-1) 0 var(--s-1); font-size: var(--t-h2); letter-spacing: -.012em; }
.unit p { margin: 0; color: var(--muted); font-size: var(--t-label); max-width: 66ch; }
.count { display: inline-block; font-size: var(--t-meta); color: var(--muted);
border: 1px solid var(--line); border-radius: var(--r-pill);
padding: 0 var(--s-2); margin-left: var(--s-2); vertical-align: middle; }
footer { color: var(--muted); font-size: var(--t-meta); margin-top: var(--s-8);
border-top: 1px solid var(--line); padding-top: var(--s-4); }
footer a { color: var(--accent); }
/* ---- theme control ----
Native radios wearing the same pills as the tabs, so the set keeps one
affordance vocabulary. The span is styled rather than the label, which keeps
the checked state on a plain sibling selector. */
.toprow { display: flex; align-items: center; gap: var(--s-3);
flex-wrap: wrap; margin-bottom: var(--s-4); }
.toprow .home { margin-bottom: 0; }
.themepick { margin-left: auto; border: 0; padding: 0; min-width: 0;
display: inline-flex; gap: var(--s-1); }
.themepick label { margin: 0; }
.themepick input { position: absolute; width: 1px; height: 1px;
opacity: 0; pointer-events: none; }
.themepick span { display: inline-block; cursor: pointer;
border: 1px solid var(--line); border-radius: var(--r-pill);
padding: var(--s-1) var(--s-3); background: var(--field);
color: var(--muted); font-size: var(--t-meta); }
.themepick span:hover { border-color: var(--accent); color: var(--ink); }
.themepick input:checked + span { background: var(--accent);
border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.themepick input:focus-visible + span { outline: 2px solid var(--accent);
outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px;
padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
</style>
<script>
/* Resolve the colour theme before first paint, so a reader who has chosen one
never sees the other flash. Storage is wrapped in try/catch on purpose: a
Canvas iframe with third-party storage blocked will throw here, and the tool
has to keep working when it does — it just forgets the choice. */
(function () {
var pref = "system";
try {
var v = localStorage.getItem("tt-theme");
if (v === "light" || v === "dark") pref = v;
} catch (e) {}
window.__ttPref = pref;
var dark = pref === "dark" ||
(pref === "system" && window.matchMedia("(prefers-color-scheme: dark)").matches);
document.documentElement.setAttribute("data-theme", dark ? "dark" : "light");
})();
</script>
</head>
<body>
<div class="wrap">
<div class="toprow">
<fieldset class="themepick" id="themePick">
<legend class="visually-hidden">Colour theme</legend>
<label><input type="radio" name="theme" value="system"><span>System</span></label>
<label><input type="radio" name="theme" value="light"><span>Light</span></label>
<label><input type="radio" name="theme" value="dark"><span>Dark</span></label>
</fieldset>
</div>
<h1>Tutorial tools</h1>
<p class="lede">Small, self-contained web calculators for University of Sydney units in the School of Architecture, Design and Planning. Each does the routine arithmetic that used to eat tutorial time, so students can spend class on interpretation. Pick a unit.</p>
<a class="unit" href="bpsd5030/index.html">
<span class="code">BPSD5030</span><span class="count">5 tools</span>
<h2>Indoor Environments</h2>
<p>IAQ & ventilation, room acoustics, lighting uniformity, rating systems, and paired-data analysis, arranged by tutorial week.</p>
</a>
<a class="unit u6030" href="bpsd6030/index.html">
<span class="code">BPSD6030</span><span class="count">1 tool</span>
<h2>Building Systems</h2>
<p>HVAC system selection across the Australian commercial families, with a schematic and a decarbonisation pathway to support the design assignments.</p>
</a>
<footer>
Built and maintained by the IEQ Lab, Sydney School of Architecture, Design and Planning, for the units taught there. Each tool is one HTML file that runs offline: self-contained, open-source, no tracking.
Revised August 2026 · <a href="https://github.com/IEQLab/tutorial-tools">source on GitHub</a>.
</footer>
</div>
<script>
/* Theme control. The head script has already resolved and applied the theme;
this only reflects it in the radios and handles changes. */
(function () {
var group = document.getElementById("themePick");
if (!group) return;
var mq = window.matchMedia("(prefers-color-scheme: dark)");
var pref = window.__ttPref || "system";
function apply() {
var dark = pref === "dark" || (pref === "system" && mq.matches);
document.documentElement.setAttribute("data-theme", dark ? "dark" : "light");
/* Canvas and the SVG schematic read their colours from the token block at
draw time, so a theme change has to be redrawn. Pages with no raster
output leave __ttRedraw undefined and restyle through CSS alone. */
if (window.__ttRedraw) window.__ttRedraw();
}
var sel = group.querySelector('input[value="' + pref + '"]');
if (sel) sel.checked = true;
group.addEventListener("change", function (e) {
if (e.target.name !== "theme") return;
pref = e.target.value;
try { localStorage.setItem("tt-theme", pref); } catch (err) {}
apply();
});
/* Following the system means following it live, not only at load. */
mq.addEventListener("change", function () { if (pref === "system") apply(); });
})();
</script>
</body>
</html>