diff --git a/App/schueler.html b/App/schueler.html
index a535fec..3bb86c3 100644
--- a/App/schueler.html
+++ b/App/schueler.html
@@ -24,7 +24,7 @@
/* Tabs */
.tabs{display:flex;gap:0;margin-bottom:1.2rem;border-radius:10px;overflow:hidden;border:1.5px solid rgba(0,0,0,.06);background:#fff}
- .tab{flex:1;padding:.6rem;text-align:center;font-size:.78rem;font-weight:700;cursor:pointer;color:#8a8a8a;transition:all .15s;border:none;background:transparent}
+ .tab{flex:1;padding:.6rem;text-align:center;font-size:.78rem;font-weight:700;cursor:pointer;color:#8a8a8a;transition:all .15s;border:none;background:transparent;text-decoration:none}
.tab.on{background:#4a7c8a;color:#fff}
/* Module grid */
@@ -99,9 +99,10 @@
-
Meine Module
-
Meine Erfolge
-
Profil
+
Module
+
Erfolge
+
Schulbuch
+
Profil
@@ -140,9 +141,8 @@ async function api(endpoint, data) {
function logout() { api('auth', {action:'logout'}).then(function() { location.href = 'index.html'; }); }
function switchTab(tab) {
- document.querySelectorAll('.tab').forEach(function(t, i) {
- var tabs = ['modules','achievements','profile'];
- t.classList.toggle('on', tabs[i] === tab);
+ document.querySelectorAll('.tab[data-tab]').forEach(function(t) {
+ t.classList.toggle('on', t.getAttribute('data-tab') === tab);
});
document.getElementById('tab-modules').classList.toggle('hidden', tab !== 'modules');
document.getElementById('tab-achievements').classList.toggle('hidden', tab !== 'achievements');
@@ -196,6 +196,12 @@ function buildModuleUrl(mod) {
return url;
}
+// Module mit Schulbuch-Kapitel (pages/buch-
.php). klima-3d teilt sich das Klima-Kapitel.
+var BUCH_KAP = {tourismustal:1,tourismusregion:1,kofferdetektiv:1,busfahrt:1,logistik:1,
+ weltkueche:1,farmer:1,klima:1,'klima-3d':'klima',fluss:1,energiemanager:1,heli:1,
+ sonnensystem:1,'eu-werkstatt':1};
+function buchKapitel(id){ var t = BUCH_KAP[id]; if (!t) return null; return 'buch-' + (t === 1 ? id : t); }
+
async function renderModules() {
var html = '';
var modList = [];
@@ -237,6 +243,7 @@ async function renderModules() {
var moduleId = m.id;
var infoHref = 'modul-' + moduleId;
var glossarHref = 'glossar?module=' + moduleId;
+ var buchHref = buchKapitel(moduleId);
var cls = isComing ? 'coming' : (isLocked ? 'locked' : 'spielbar');
var s = '';
@@ -259,6 +266,7 @@ async function renderModules() {
if (isSpielbar) s += '
▶ Starten';
s += '
📖 Infos';
if (!isComing) s += '
📚 Glossar';
+ if (buchHref) s += '
📘 Schulbuch';
s += '
';
s += ' ';
return s;
@@ -324,7 +332,7 @@ async function renderAchievements() {
// Modul-Erfolge-Liste
html += 'Was du in den Modulen geschafft hast
';
if (allProgress.length === 0) {
- html += 'Noch keine Module gespielt. Geh auf Meine Module und starte einen Durchgang.
';
+ html += 'Noch keine Module gespielt. Geh auf Module und starte einen Durchgang.
';
} else {
html += '';
allProgress.forEach(function(p) {