Skip to content

Commit 062eacd

Browse files
Save of work on igcse/gcse Edexcel
1 parent d352b16 commit 062eacd

7 files changed

Lines changed: 68 additions & 34 deletions

File tree

Edexcel/index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,15 @@ <h1 class="page-title">Edexcel Grade Boundaries</h1>
160160
<button id="theme-toggle" class="absolute top-4 right-4" aria-label="Toggle dark / light mode"></button>
161161
<nav class="mt-4 flex flex-col md:flex-row items-center justify-center gap-2">
162162
<a href="" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">Home</a>
163-
<a href="EdexcelIGCSE" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">Edexcel&nbsp;IGCSE</a>
164-
<a href="EdexcelGCSE" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">Edexcel&nbsp;GCSE</a>
165163
<a href="CIE" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">CIE</a>
166164
<a href="OxfordAqa" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">Oxford&nbsp;AQA</a>
167165
<a href="OCR" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">OCR</a>
168166
</nav>
167+
<div class="qual-tabs">
168+
<a href="Edexcel" class="qual-tab active">A-Level</a>
169+
<a href="EdexcelIGCSE" class="qual-tab">IGCSE</a>
170+
<a href="EdexcelGCSE" class="qual-tab">GCSE</a>
171+
</div>
169172
</header><main class="flex-1 w-full px-4">
170173
<section class="bg-white rounded-lg shadow-md p-6 w-full max-w-7xl mx-auto">
171174
<h2 class="text-2xl font-semibold mb-4">Edexcel Grade Boundaries</h2>

EdexcelGCSE/index.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,15 @@ <h1 class="page-title">Edexcel GCSE Grade Boundaries</h1>
127127
<button id="theme-toggle" class="absolute top-4 right-4" aria-label="Toggle dark / light mode"></button>
128128
<nav class="mt-4 flex flex-col md:flex-row items-center justify-center gap-2">
129129
<a href="" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">Home</a>
130-
<a href="Edexcel" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">Edexcel A-Level</a>
131-
<a href="EdexcelIGCSE" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">Edexcel IGCSE</a>
132130
<a href="CIE" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">CIE</a>
133131
<a href="OxfordAqa" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">Oxford&nbsp;AQA</a>
134132
<a href="OCR" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">OCR</a>
135133
</nav>
134+
<div class="qual-tabs">
135+
<a href="Edexcel" class="qual-tab">A-Level</a>
136+
<a href="EdexcelIGCSE" class="qual-tab">IGCSE</a>
137+
<a href="EdexcelGCSE" class="qual-tab active">GCSE</a>
138+
</div>
136139
</header><main class="flex-1 w-full px-4">
137140
<section class="bg-white rounded-lg shadow-md p-6 w-full max-w-7xl mx-auto">
138141
<h2 class="text-2xl font-semibold mb-4">Edexcel GCSE Grade Boundaries</h2>
@@ -201,6 +204,7 @@ <h2 class="text-2xl font-semibold mb-4">Edexcel GCSE Grade Boundaries</h2>
201204
columns: {
202205
code: 'code',
203206
component: 'papers',
207+
componentLabel: 'Papers',
204208
year: 'year',
205209
session: 'session',
206210
maxMark: 'max_mark',

EdexcelIGCSE/index.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,15 @@ <h1 class="page-title">Edexcel IGCSE Grade Boundaries</h1>
127127
<button id="theme-toggle" class="absolute top-4 right-4" aria-label="Toggle dark / light mode"></button>
128128
<nav class="mt-4 flex flex-col md:flex-row items-center justify-center gap-2">
129129
<a href="" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">Home</a>
130-
<a href="Edexcel" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">Edexcel A-Level</a>
131-
<a href="EdexcelGCSE" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">Edexcel GCSE</a>
132130
<a href="CIE" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">CIE</a>
133131
<a href="OxfordAqa" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">Oxford&nbsp;AQA</a>
134132
<a href="OCR" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">OCR</a>
135133
</nav>
134+
<div class="qual-tabs">
135+
<a href="Edexcel" class="qual-tab">A-Level</a>
136+
<a href="EdexcelIGCSE" class="qual-tab active">IGCSE</a>
137+
<a href="EdexcelGCSE" class="qual-tab">GCSE</a>
138+
</div>
136139
</header><main class="flex-1 w-full px-4">
137140
<section class="bg-white rounded-lg shadow-md p-6 w-full max-w-7xl mx-auto">
138141
<h2 class="text-2xl font-semibold mb-4">Edexcel IGCSE Grade Boundaries</h2>
@@ -201,6 +204,7 @@ <h2 class="text-2xl font-semibold mb-4">Edexcel IGCSE Grade Boundaries</h2>
201204
columns: {
202205
code: 'code',
203206
component: 'papers',
207+
componentLabel: 'Papers',
204208
year: 'year',
205209
session: 'session',
206210
maxMark: 'max_mark',

OCR/index.html

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -143,20 +143,10 @@
143143
<h1 class="page-title">OCR Grade Boundaries</h1>
144144
<button id="theme-toggle" class="absolute top-4 right-4" aria-label="Toggle dark / light mode"></button>
145145
<nav class="mt-4 flex flex-col md:flex-row items-center justify-center gap-2">
146-
<a href="" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition"
147-
>Home</a
148-
>
149-
<a href="CIE" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition"
150-
>CIE</a
151-
>
152-
<a href="Edexcel" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition"
153-
>Edexcel</a
154-
>
155-
<a
156-
href="OxfordAqa"
157-
class="nav-link mx-4 text-base sm:text-lg hover:text-white transition"
158-
>Oxford&nbsp;AQA</a
159-
>
146+
<a href="" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">Home</a>
147+
<a href="CIE" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">CIE</a>
148+
<a href="Edexcel" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">Edexcel</a>
149+
<a href="OxfordAqa" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition">Oxford&nbsp;AQA</a>
160150
</nav>
161151
</header>
162152

dashboard-engine.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ async function initExamDashboard(config) {
4949
dynamicTyping: true,
5050
skipEmptyLines: true,
5151
complete: (results) => {
52-
// Initialize Table and Chart with parsed data
53-
setupDashboard(results.data, csvText, config);
52+
// Pass meta.fields so column order matches the CSV header exactly
53+
setupDashboard(results.data, csvText, config, results.meta.fields);
5454
}
5555
});
5656
} catch (err) {
@@ -60,12 +60,14 @@ async function initExamDashboard(config) {
6060
}
6161
}
6262

63-
function setupDashboard(data, rawCsv, config) {
63+
function setupDashboard(data, rawCsv, config, csvFields) {
6464
const { dom, columns, chart: chartConfig } = config;
6565
const $table = $(dom.table);
6666

6767
// --- A. Setup DataTable ---
68-
const headers = Object.keys(data[0] || {});
68+
// Use csvFields (PapaParse meta.fields) to preserve CSV column order.
69+
// Object.keys() on parsed rows hoists numeric-looking keys (grades 9,8,7…) first.
70+
const headers = csvFields || Object.keys(data[0] || {});
6971
// Filter out columns if needed (e.g., hiding internal codes), currently showing all
7072
const dtColumns = headers.map(h => ({ data: h, title: h }));
7173

@@ -83,16 +85,17 @@ function setupDashboard(data, rawCsv, config) {
8385
autoWidth: false
8486
});
8587

86-
// Inject "Component" Filter into Table Controls (Only if component col exists)
88+
// Inject component filter into Table Controls (Only if component col exists)
8789
if (columns.component) {
8890
const compColIdx = headers.indexOf(columns.component);
8991
if (compColIdx > -1) {
9092
const uniqueComps = new Set(data.map(r => r[columns.component]).filter(Boolean));
9193
const filterId = `dt-filter-${Math.random().toString(36).substr(2,5)}`;
92-
94+
const compLabel = columns.componentLabel || 'Component';
95+
9396
// Append generic filter input to DataTables wrapper
9497
$(dom.table + '_filter').append(`
95-
<label class="ml-4 font-semibold text-sm">Component:
98+
<label class="ml-4 font-semibold text-sm">${compLabel}:
9699
<input id="${filterId}" list="${filterId}-list" class="border rounded px-2 py-1 ml-1 w-24 sm:w-32 bg-gray-50 dark:bg-gray-700 dark:border-gray-600" placeholder="Filter">
97100
</label>
98101
<datalist id="${filterId}-list"></datalist>

index.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,10 @@
132132
<header class="text-white text-center py-6 shadow-lg">
133133
<h1 class="page-title">Grade Boundaries</h1>
134134
<nav class="mt-4 flex flex-col md:flex-row items-center justify-center gap-2" aria-label="Primary">
135-
<a href="Edexcel" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition" title="Edexcel A-Level grade boundaries 2015-2026">Edexcel</a>
136-
<a href="EdexcelIGCSE" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition" title="Edexcel IGCSE grade boundaries">Edexcel IGCSE</a>
137-
<a href="EdexcelGCSE" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition" title="Edexcel GCSE grade boundaries">Edexcel GCSE</a>
138-
<a href="CIE" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition" title="CIE (Cambridge International) A-Level grade boundaries">CIE</a>
139-
<a href="OxfordAqa" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition" title="Oxford AQA A-Level grade boundaries 2020-2026">Oxford AQA</a>
140-
<a href="OCR" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition" title="OCR A-Level grade boundaries 2015-2025">OCR</a>
135+
<a href="Edexcel" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition" title="Edexcel grade boundaries">Edexcel</a>
136+
<a href="CIE" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition" title="CIE A-Level grade boundaries">CIE</a>
137+
<a href="OxfordAqa" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition" title="Oxford AQA A-Level grade boundaries">Oxford AQA</a>
138+
<a href="OCR" class="nav-link mx-4 text-base sm:text-lg hover:text-white transition" title="OCR A-Level grade boundaries">OCR</a>
141139
</nav>
142140
</header>
143141

style.css

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,39 @@ header{border-bottom-left-radius:10px;border-bottom-right-radius:10px;box-shadow
128128

129129
nav a {
130130
text-decoration: none;
131-
border-bottom: 2px solid var(--border-default); /* if you still want a bottom border “line” */
131+
border-bottom: 2px solid var(--border-default);
132+
}
133+
134+
/* ── Qualification tab-strip (Edexcel A-Level / IGCSE / GCSE) ── */
135+
.qual-tabs {
136+
display: flex;
137+
justify-content: center;
138+
gap: .5rem;
139+
flex-wrap: wrap;
140+
padding: .75rem 1rem 0;
141+
}
142+
143+
.qual-tab {
144+
padding: .35rem 1.1rem;
145+
border-radius: 999px;
146+
font-size: .9rem;
147+
font-weight: 600;
148+
color: var(--text-link);
149+
background: rgba(255,255,255,.15);
150+
border: 2px solid rgba(255,255,255,.25);
151+
text-decoration: none;
152+
transition: background .2s, border-color .2s;
153+
}
154+
155+
.qual-tab:hover {
156+
background: rgba(255,255,255,.28);
157+
color: #fff;
158+
}
159+
160+
.qual-tab.active {
161+
background: #fff;
162+
color: var(--brand-600);
163+
border-color: #fff;
132164
}
133165

134166
/* On hover, swap in the underline (or change the border-bottom color, if you want that style instead) */

0 commit comments

Comments
 (0)