scaffolding_types = {
const width = 1100;
const height = 390;
const colors = {
surface: "#EDE7DA",
border: "#C8C2B8",
text: "#1A1714",
muted: "#6E6560",
navy: "#1E3A5F",
navyFill: "#E5E9EC",
paper: "#FBFAF7"
};
const svg = d3.create("svg")
.attr("role", "img")
.attr("aria-label", "Vier Formen von Scaffolding für dieselbe Aufgabe. Ein Hinweis hebt nur den nächsten Schritt hervor: relevante Angaben auswählen. Teilschritte gliedern den gesamten Bearbeitungsweg in Angaben auswählen, mögliche Erklärungen prüfen und die Schlussfolgerung begründen. Eine Vorlage stellt leere Felder für relevante Angaben, eine mögliche Erklärung und eine begründete Schlussfolgerung bereit. Ein Worked Example zeigt eine vollständig bearbeitete ähnliche Aufgabe mit erklärten Schritten. Die Formen können einzeln oder kombiniert eingesetzt werden.")
.attr("viewBox", `0 0 ${width} ${height}`)
.attr("width", "100%")
.style("max-width", "1000px")
.style("height", "auto")
.style("display", "block")
.style("margin", "0 auto")
.style("font-family", '"Space Grotesk", sans-serif');
const addText = (group, lines, {
x,
y,
size = 15,
weight = 400,
fill = colors.text,
lineHeight = 18,
anchor = "middle"
} = {}) => {
const text = group.append("text")
.attr("x", x)
.attr("y", y)
.attr("text-anchor", anchor)
.attr("font-size", size)
.attr("font-weight", weight)
.attr("fill", fill);
lines.forEach((line, index) => {
text.append("tspan")
.attr("x", x)
.attr("dy", index === 0 ? 0 : lineHeight)
.text(line);
});
};
const top = svg.append("g");
top.append("rect")
.attr("x", 65)
.attr("y", 2)
.attr("width", 970)
.attr("height", 48)
.attr("rx", 11)
.attr("fill", colors.navyFill)
.attr("stroke", colors.navy)
.attr("stroke-width", 1.8);
top.append("text")
.attr("x", 550)
.attr("y", 22)
.attr("text-anchor", "middle")
.attr("font-size", 15)
.attr("font-weight", 700)
.attr("fill", colors.navy)
.text("Dieselbe Aufgabe");
top.append("text")
.attr("x", 550)
.attr("y", 41)
.attr("text-anchor", "middle")
.attr("font-size", 14)
.attr("fill", colors.text)
.text("Angaben auswählen → mögliche Erklärungen prüfen → Schlussfolgerung begründen");
const cardY = 62;
const cardW = 257;
const cardH = 292;
const cardXs = [18, 287, 556, 825];
const card = (x, title, subtitle) => {
const group = svg.append("g");
group.append("rect")
.attr("x", x)
.attr("y", cardY)
.attr("width", cardW)
.attr("height", cardH)
.attr("rx", 12)
.attr("fill", colors.paper)
.attr("stroke", colors.navy)
.attr("stroke-width", 2);
group.append("text")
.attr("x", x + cardW / 2)
.attr("y", cardY + 27)
.attr("text-anchor", "middle")
.attr("font-size", 17)
.attr("font-weight", 700)
.attr("fill", colors.navy)
.text(title);
group.append("line")
.attr("x1", x + 18)
.attr("x2", x + cardW - 18)
.attr("y1", cardY + 42)
.attr("y2", cardY + 42)
.attr("stroke", colors.border)
.attr("stroke-width", 1.3);
addText(group, subtitle, {
x: x + cardW / 2,
y: cardY + 63,
size: 13,
weight: 600,
fill: colors.muted,
lineHeight: 15
});
return group;
};
const hint = card(cardXs[0], "Hinweis", ["hebt den nächsten", "Schritt hervor"]);
hint.append("rect")
.attr("x", cardXs[0] + 25)
.attr("y", cardY + 103)
.attr("width", cardW - 50)
.attr("height", 55)
.attr("rx", 9)
.attr("fill", colors.navyFill)
.attr("stroke", colors.navy)
.attr("stroke-width", 1.8);
addText(hint, ["Als Nächstes:", "relevante Angaben auswählen"], {
x: cardXs[0] + cardW / 2,
y: cardY + 124,
size: 13.5,
weight: 700,
lineHeight: 18
});
[176, 211, 246].forEach((offset, index) => {
hint.append("rect")
.attr("x", cardXs[0] + 35)
.attr("y", cardY + offset)
.attr("width", cardW - 70)
.attr("height", 22)
.attr("rx", 6)
.attr("fill", index === 0 ? colors.surface : "none")
.attr("stroke", index === 0 ? colors.navy : colors.border)
.attr("stroke-width", index === 0 ? 1.5 : 1.2)
.attr("stroke-dasharray", index === 0 ? null : "4 4");
});
const steps = card(cardXs[1], "Teilschritte", ["gliedern den", "Bearbeitungsweg"]);
const stepData = [
["Angaben", "auswählen"],
["Erklärungen", "prüfen"],
["Schluss", "begründen"]
];
stepData.forEach((lines, index) => {
const y = cardY + 105 + index * 55;
if (index < stepData.length - 1) {
steps.append("line")
.attr("x1", cardXs[1] + 48)
.attr("x2", cardXs[1] + 48)
.attr("y1", y + 34)
.attr("y2", y + 55)
.attr("stroke", colors.navy)
.attr("stroke-width", 1.7);
}
steps.append("circle")
.attr("cx", cardXs[1] + 48)
.attr("cy", y + 17)
.attr("r", 17)
.attr("fill", colors.navyFill)
.attr("stroke", colors.navy)
.attr("stroke-width", 1.8);
steps.append("text")
.attr("x", cardXs[1] + 48)
.attr("y", y + 22)
.attr("text-anchor", "middle")
.attr("font-size", 14)
.attr("font-weight", 700)
.attr("fill", colors.navy)
.text(index + 1);
addText(steps, lines, {
x: cardXs[1] + 82,
y: y + 12,
size: 13.5,
weight: 650,
lineHeight: 16,
anchor: "start"
});
});
const template = card(cardXs[2], "Vorlage", ["strukturiert das", "eigene Produkt"]);
["Relevante Angaben", "Mögliche Erklärung", "Schlussfolgerung"].forEach((label, index) => {
const y = cardY + 103 + index * 57;
template.append("rect")
.attr("x", cardXs[2] + 24)
.attr("y", y)
.attr("width", cardW - 48)
.attr("height", 44)
.attr("rx", 7)
.attr("fill", "none")
.attr("stroke", colors.navy)
.attr("stroke-width", 1.5);
template.append("text")
.attr("x", cardXs[2] + 36)
.attr("y", y + 16)
.attr("font-size", 12.5)
.attr("font-weight", 700)
.attr("fill", colors.navy)
.text(label);
template.append("line")
.attr("x1", cardXs[2] + 36)
.attr("x2", cardXs[2] + cardW - 36)
.attr("y1", y + 32)
.attr("y2", y + 32)
.attr("stroke", colors.border)
.attr("stroke-width", 1.2);
});
const example = card(cardXs[3], "Worked Example", ["zeigt und erklärt einen", "ähnlichen Lösungsweg"]);
const exampleData = [
["Angaben ausgewählt", "passen zur Frage"],
["Erklärung geprüft", "passt zu den Angaben"],
["Schluss begründet", "folgt aus den Angaben"]
];
exampleData.forEach(([label, reason], index) => {
const y = cardY + 103 + index * 57;
example.append("rect")
.attr("x", cardXs[3] + 24)
.attr("y", y)
.attr("width", cardW - 48)
.attr("height", 46)
.attr("rx", 7)
.attr("fill", colors.navyFill)
.attr("stroke", colors.navy)
.attr("stroke-width", 1.5);
example.append("text")
.attr("x", cardXs[3] + 39)
.attr("y", y + 20)
.attr("font-size", 14)
.attr("font-weight", 700)
.attr("fill", colors.navy)
.text("✓");
example.append("text")
.attr("x", cardXs[3] + 62)
.attr("y", y + 18)
.attr("font-size", 11.8)
.attr("font-weight", 700)
.attr("fill", colors.text)
.text(label);
example.append("text")
.attr("x", cardXs[3] + 62)
.attr("y", y + 35)
.attr("font-size", 10.5)
.attr("font-weight", 500)
.attr("fill", colors.muted)
.text(reason);
});
svg.append("text")
.attr("x", 550)
.attr("y", 382)
.attr("text-anchor", "middle")
.attr("font-size", 14)
.attr("font-weight", 650)
.attr("fill", colors.muted)
.text("Die Formen können einzeln oder kombiniert eingesetzt werden.");
return svg.node();
}