forked from ChelseaKR/homeroom
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path57726786056246.en.html
More file actions
296 lines (292 loc) · 13.9 KB
/
Copy path57726786056246.en.html
File metadata and controls
296 lines (292 loc) · 13.9 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ask about Birch Lane Elementary · Homeroom</title>
<meta name="description" content="Type a question about this school's published figures, in English or Spanish. A model reads only what this school's page already shows, answers in short sentences, and every sentence is checked against the published data before it is shown. Nothing you type is stored.">
<meta name="robots" content="noindex">
<link rel="alternate" hreflang="en" href="57726786056246.en.html">
<link rel="alternate" hreflang="es" href="57726786056246.es.html">
<style>
:root {
color-scheme: light;
--surface: #fbfbf8;
--raised: #ffffff;
--note: #f2f2ec;
--rule: #e0e0d6;
--rule-strong: #c4c4b8;
--ink: #191a15;
--ink-2: #4d4e47;
--ink-3: #63645c;
--accent: #17568f;
--zero: #5a3f9c;
--withheld: #8a4210;
--nothing: #55564f;
}
@media (prefers-color-scheme: dark) {
:root {
color-scheme: dark;
--surface: #16171a;
--raised: #1e1f22;
--note: #232427;
--rule: #35363a;
--rule-strong: #4c4d52;
--ink: #f3f3ef;
--ink-2: #c3c4bc;
--ink-3: #a3a49c;
--accent: #8bbcf2;
--zero: #c0aef5;
--withheld: #f0a45f;
--nothing: #a9aaa2;
}
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
margin: 0;
background: var(--surface);
color: var(--ink);
font: 400 17px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.wrap { max-width: 58rem; margin: 0 auto; padding: 0 1.25rem; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.vh {
position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
position: absolute; left: -9999px; top: 0; z-index: 10;
background: var(--raised); color: var(--accent);
padding: .6rem 1rem; border: 1px solid var(--rule-strong);
}
.skip-link:focus { left: .5rem; top: .5rem; }
.site { border-bottom: 1px solid var(--rule); background: var(--raised); }
.bar {
display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
align-items: baseline; justify-content: space-between;
padding-top: .9rem; padding-bottom: .9rem;
}
.brand { margin: 0; }
.brand-name { font-weight: 700; letter-spacing: -.01em; }
.brand-tag { color: var(--ink-2); font-size: .92rem; display: block; }
.eyebrow {
font-size: .76rem; letter-spacing: .12em; text-transform: uppercase;
color: var(--ink-3); margin: 2rem 0 .5rem;
}
h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem); line-height: 1.15; margin: 0 0 1rem; letter-spacing: -.02em; }
h2 { font-size: 1.35rem; margin: 3rem 0 .5rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); letter-spacing: -.01em; }
h3 { font-size: 1.05rem; margin: 2rem 0 .4rem; color: var(--ink-2); }
p { margin: 0 0 1rem; max-width: 44rem; }
.identity { margin: 0 0 1.5rem; display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; max-width: 44rem; }
.identity dt { color: var(--ink-3); font-size: .9rem; }
.identity dd { margin: 0; }
.note { background: var(--note); border: 1px solid var(--rule); padding: 1rem 1.1rem; margin: 0 0 1.5rem; }
.note p:last-child { margin-bottom: 0; }
.note-title { font-weight: 700; }
.states { margin: 1rem 0 0; display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.1rem; align-items: baseline; }
.states dt { white-space: nowrap; }
.states dd { margin: 0; color: var(--ink-2); }
.scroll { overflow-x: auto; margin: 0 0 .6rem; }
table { border-collapse: collapse; width: 100%; min-width: 32rem; }
caption { text-align: left; color: var(--ink-2); font-size: .95rem; padding: 0 0 .6rem; }
th, td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
thead th { border-bottom: 2px solid var(--rule-strong); font-size: .85rem; color: var(--ink-2); font-weight: 600; }
tbody th { font-weight: 400; }
td.count, th.count { text-align: right; font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.state { font-size: .86rem; }
.m-number .num { color: var(--ink); }
.m-zero { border-left: 3px solid var(--zero); }
.m-zero .num, .m-zero .state { color: var(--zero); }
.m-withheld { border-left: 3px solid var(--withheld); }
.m-withheld .state { color: var(--withheld); font-style: italic; }
.m-nothing { border-left: 3px solid var(--nothing); }
.m-nothing .state { color: var(--nothing); }
/* The page is about one school, so its own column stays the loudest of the three.
The separation is weight and a rule, never colour alone: the four cell states
already own the colours, and reusing them here would make a district's withheld
cell and a school's withheld cell say different things in the same hue. */
td.c-district .num, td.c-state .num { font-weight: 400; color: var(--ink-2); }
td.c-district { border-left-color: var(--rule-strong); }
.s-number { font-weight: 600; }
.s-zero { color: var(--zero); }
.s-withheld { color: var(--withheld); font-style: italic; }
.s-nothing { color: var(--nothing); }
.coverage-note { color: var(--ink-2); font-size: .93rem; }
.ask { margin: 0 0 1.5rem; }
.sources dt { font-weight: 600; margin-top: .9rem; }
.sources dd { margin: 0; color: var(--ink-2); }
main { padding-bottom: 3rem; }
footer { border-top: 1px solid var(--rule); background: var(--raised); padding: 1.5rem 0 3rem; }
footer p { color: var(--ink-2); font-size: .92rem; }
@media (max-width: 34rem) {
.identity, .states { grid-template-columns: 1fr; gap: .15rem; }
.states dd { margin-bottom: .6rem; }
}
.ask-form { max-width: 44rem; margin: 1rem 0 2rem; }
.ask-form label { display: block; font-weight: 600; margin-bottom: .4rem; }
.ask-form textarea {
width: 100%; min-height: 6rem; font: inherit; padding: .6rem .7rem;
border: 1px solid var(--rule-strong); border-radius: 3px;
background: var(--raised); color: var(--ink);
}
.ask-form button {
margin-top: .8rem; font: inherit; font-weight: 600; padding: .6rem 1.2rem;
border: 1px solid var(--accent); border-radius: 3px;
background: var(--accent); color: var(--raised); cursor: pointer;
}
.ask-form button[disabled] { opacity: .6; cursor: default; }
.answer { max-width: 44rem; }
.answer ol { padding-left: 1.3rem; }
.answer li { margin: 0 0 1rem; }
.answer .cites { display: block; font-size: .86rem; color: var(--ink-2); margin-top: .25rem; }
.answer blockquote { margin: .5rem 0 0; padding: .4rem .9rem; border-left: 3px solid var(--rule-strong); color: var(--ink-2); font-size: .95rem; }
.answer .label { font-size: .9rem; color: var(--ink-2); }
</style>
</head>
<body>
<a class="skip-link" href="#main">Skip to the main content</a>
<header class="site">
<div class="wrap bar">
<p class="brand"><span class="brand-name">Homeroom</span><span class="brand-tag">California public school data, readable by the families it describes.</span></p>
<nav aria-label="Language">
<a lang="es" hreflang="es" rel="alternate" href="57726786056246.es.html">Español<span class="vh"> Read this page in Spanish</span></a>
</nav>
</div>
</header>
<main id="main" class="wrap">
<p class="eyebrow">Ask about a school</p>
<h1>Ask about Birch Lane Elementary</h1>
<p><a href="../57726786056246.en.html">Back to this school's page, which is complete without this</a></p>
<div class="note">
<p><span class="note-title">What this is.</span> Written by an AI model from this school's published figures. Unofficial. Not a ranking, not a recommendation, and not reviewed by a person. Every sentence shown was checked against the published data; sentences that could not be checked were withheld.</p>
<p>No score, no grade, no ranking. If a figure cannot be shown honestly, it is not shown.</p>
</div>
<p>Type a question about this school's published figures, in English or Spanish. A model reads only what this school's page already shows, answers in short sentences, and every sentence is checked against the published data before it is shown. Nothing you type is stored.</p>
<p>You can ask about total enrollment, enrollment by grade or by student group, chronic absenteeism overall or by student group, how a figure compares with the district or the state, or what a measure means and how it is calculated.</p>
<form id="ask-form" class="ask-form" hidden>
<label for="ask-question">Your question</label>
<textarea id="ask-question" name="question" maxlength="600" required autocomplete="off"></textarea>
<button id="ask-send" type="submit">Ask</button>
</form>
<noscript><p class="note">Sending a question needs JavaScript, which this browser has turned off. The school page, linked above, is complete without it.</p></noscript>
<h2 id="answer-heading" tabindex="-1" hidden>Answer</h2>
<section id="answer" class="answer" aria-live="polite" aria-label="Answer"></section>
</main>
<footer>
<div class="wrap">
<p>No score, no grade, no ranking. If a figure cannot be shown honestly, it is not shown.</p>
<p>Homeroom is not affiliated with, endorsed by, or connected to the California Department of Education, the State of California, or any school district.</p>
</div>
</footer>
<script type="application/json" id="ask-strings">{"cde_page": "CDE page", "cds": "57726786056246", "citations": "Checked against", "endpoint": "https://vlbgna342rtuvkikbuwuwgosuu0jgvdp.lambda-url.us-west-2.on.aws/ask", "fixture": "(test data, not a real school)", "locale": "en", "model": "Model", "on_page": "on this school's page", "school_page": "../57726786056246.en.html", "scope_district": "In this district", "scope_school": "At this school", "scope_state": "In California", "sending": "Asking...", "unavailable": "The answering service is not available right now. The tables on this school's page are complete without it.", "withheld": "Sentences withheld because they could not be verified against the published data: {count}"}</script>
<script>
(function () {
"use strict";
var strings = JSON.parse(document.getElementById("ask-strings").textContent);
var form = document.getElementById("ask-form");
var field = document.getElementById("ask-question");
var button = document.getElementById("ask-send");
var answer = document.getElementById("answer");
var heading = document.getElementById("answer-heading");
if (!form || !field || !button || !answer) { return; }
form.hidden = false;
function el(tag, className, textContent) {
var node = document.createElement(tag);
if (className) { node.className = className; }
if (textContent !== undefined) { node.textContent = textContent; }
return node;
}
function clear(node) { while (node.firstChild) { node.removeChild(node.firstChild); } }
function note(message) {
var box = el("div", "note");
box.appendChild(el("p", null, message));
return box;
}
function citationLink(citation) {
var a = document.createElement("a");
if (citation.type === "passage") {
a.href = citation.url || strings.school_page;
a.rel = "noopener";
a.textContent = strings.cde_page + ": " + (citation.title || citation.label);
} else if (citation.type === "source") {
a.href = strings.school_page + "#sources";
a.textContent = strings.on_page + ": " + citation.label;
} else {
a.href = strings.school_page + "#" + (citation.anchor || "main");
var where = citation.scope === "school" ? strings.scope_school
: citation.scope === "district" ? strings.scope_district : strings.scope_state;
a.textContent = strings.on_page + ": " + citation.label + " (" + where
+ (citation.year ? ", " + citation.year : "") + ")";
}
return a;
}
function show(data) {
clear(answer);
if (data.refusal) { answer.appendChild(note(data.refusal)); }
if (data.intro) { answer.appendChild(el("p", null, data.intro)); }
if (data.claims && data.claims.length) {
var list = el("ol");
data.claims.forEach(function (claim) {
var item = el("li");
item.appendChild(el("span", null, claim.text));
if (claim.quote) { item.appendChild(el("blockquote", null, claim.quote)); }
if (claim.citations && claim.citations.length) {
var cites = el("span", "cites", strings.citations + ": ");
claim.citations.forEach(function (citation, index) {
if (index) { cites.appendChild(document.createTextNode("; ")); }
cites.appendChild(citationLink(citation));
});
item.appendChild(cites);
}
list.appendChild(item);
});
answer.appendChild(list);
}
if (typeof data.withheld === "number" && data.withheld > 0) {
answer.appendChild(el("p", "label", strings.withheld.replace("{count}", String(data.withheld))));
}
if (data.labels) {
answer.appendChild(el("p", "label", data.labels.ai));
answer.appendChild(el("p", "label", data.labels.language));
}
if (data.provenance && data.provenance.model) {
answer.appendChild(el("p", "label", strings.model + ": " + data.provenance.model
+ (data.provenance.is_fixture ? " " + strings.fixture : "")));
}
heading.hidden = false;
heading.focus();
}
form.addEventListener("submit", function (event) {
event.preventDefault();
var question = field.value.trim();
if (!question) { field.focus(); return; }
button.disabled = true;
clear(answer);
answer.appendChild(el("p", "label", strings.sending));
fetch(strings.endpoint, {
method: "POST",
mode: "cors",
credentials: "omit",
cache: "no-store",
headers: { "content-type": "application/json" },
body: JSON.stringify({ cds: strings.cds, locale: strings.locale, question: question })
}).then(function (response) {
return response.json();
}).then(function (data) {
show(data);
}).catch(function () {
clear(answer);
answer.appendChild(note(strings.unavailable));
heading.hidden = false;
heading.focus();
}).then(function () {
button.disabled = false;
});
});
})();
</script>
</body>
</html>