German classroom activities: move whole phrases to explain verb position
HTML for this example
Select the code and use your copy shortcut. Changes in this preview are temporary.
<!doctype html>
<html lang="en-US"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>German classroom activities: move whole phrases to explain verb position</title><style>:root{--bg:#f6f0e3;--paper:#fffdf7;--ink:#283f38;--accent:#376548;--tint:#e4efdc;--line:#c3cdbb;--muted:#4c6051;--button:#fff}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:17px/1.55 system-ui,sans-serif}main{max-width:1000px;margin:auto;padding:22px clamp(18px,4vw,42px) 38px}header{border-bottom:2px solid var(--accent);padding-bottom:14px;margin-bottom:18px}h1{font-size:clamp(26px,4vw,36px);line-height:1.15;margin:4px 0 10px}h2{font-size:22px;line-height:1.3;margin:0 0 14px}h3{font-size:19px}p{margin:0 0 14px}.eyebrow{font-size:16px;font-weight:750;color:var(--accent)}.lede{max-width:800px}.panel{background:var(--paper);border:1px solid var(--line);border-radius:9px;padding:20px;margin:18px 0}.workbench{border-top:4px solid var(--accent)}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.grid>*{min-width:0}label{display:block;font-size:16px;font-weight:650;margin:12px 0 6px}input,textarea,select{font:inherit;color:var(--ink);background:var(--paper);border:1px solid #7b8893;border-radius:5px;padding:10px;width:100%;min-width:0}textarea{resize:vertical;line-height:1.45}input[type=checkbox],input[type=radio]{width:21px;height:21px;vertical-align:middle;margin-right:9px}button{font:650 16px/1.4 system-ui,sans-serif;padding:11px 15px;min-height:46px;background:var(--accent);border:2px solid var(--accent);color:var(--button);border-radius:5px;cursor:pointer}button:disabled{opacity:.55;cursor:default}.buttons{display:flex;gap:9px;flex-wrap:wrap;margin:14px 0}.buttons>*{flex:1 1 auto}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #c05b00;outline-offset:3px}.result{font:600 17px/1.6 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--tint);padding:16px;border-left:4px solid var(--accent);min-height:65px;margin:16px 0}.sample{padding:14px 16px;border-left:3px solid var(--accent);background:var(--tint);margin:12px 0}.muted{color:var(--muted)}pre,code{font:16px/1.6 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere}pre{margin:12px 0}table{border-collapse:collapse;width:100%;table-layout:fixed;font-size:16px}th,td{text-align:left;vertical-align:top;padding:10px 8px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}th{background:var(--tint)}svg{max-width:100%;height:auto;display:block}details{margin:20px 0}summary{font-weight:700;cursor:pointer}footer{margin-top:28px;border-top:1px solid var(--line);padding-top:18px;font-size:16px}a{color:var(--accent)}.reading{font-family:Georgia,serif}.codeview{border-radius:0;box-shadow:7px 7px 0 var(--tint)}.token{display:inline-block;padding:8px 12px;margin:4px;border:1px solid var(--line);border-radius:4px;background:var(--paper)}.swatch{min-height:30px}.split{display:grid;grid-template-columns:1.1fr 1fr;gap:22px}ol{padding-left:25px}li{margin:9px 0}@media(max-width:600px){main{padding:16px}.grid,.split{grid-template-columns:1fr}.panel{padding:16px;margin:14px 0}h1{font-size:27px}header{padding-bottom:10px}.buttons{gap:8px}.result{padding:13px}th,td{padding:8px 5px}}</style></head><body><main><header><div class="eyebrow">German phrase laboratory · G1 / G2 / G3</div><h1>A phrase can fill one position</h1><p class="lede">Keep each phrase together. Compare the finite verb’s field with its written-word number.</p></header><pre id="result" class="result" role="status" aria-live="polite" aria-atomic="true">G2 teacher key: <span lang="de">Heute Abend / liest / Mia / ein Buch.</span> Verb field 2; written word 3.</pre><div class="buttons"><button type="button" id="g1">G1 · Subject first</button><button type="button" id="g2">G2 · Time first</button><button type="button" id="g3">G3 · weil clause</button></div><p id="example" lang="de">G2 · Heute Abend liest Mia ein Buch.</p><label for="groups">Whole groups, separated by /</label><textarea id="groups" lang="de" rows="3" >Heute Abend / liest / Mia / ein Buch</textarea><div class="buttons"><button type="button" id="check">Check phrase order</button></div><label for="explanation">Learner explanation (teacher review)</label><textarea id="explanation" rows="3" ></textarea><section class="panel"><h2>Teacher comparison</h2><p lang="de">G1: Mia / liest / heute Abend / ein Buch.</p><p lang="de">G2: Heute Abend / liest / Mia / ein Buch.</p><p lang="de">G3: Mia bleibt zu Hause, <strong>weil / sie / ein Buch / liest.</strong></p></section><footer><p>The checker compares only the three supplied patterns. It is not a general German parser or a measure of mastery.</p><p>Use a prepared HTML explanation in <a href="https://nos-workspace.com/">NOS</a> when reviewing these phrase comparisons. Eligible static instructions can be revised in visual editing mode; dynamic outputs follow their controls.</p></footer></main><script>
(()=>{'use strict';const $=s=>document.querySelector(s);const out=s=>{const region=$('#result');region.replaceChildren();for(const part of s.split(/(Heute Abend|liest|weil)/g)){if(/^(Heute Abend|liest|weil)$/.test(part)){const n=document.createElement('span');n.setAttribute('lang','de');n.textContent=part;region.appendChild(n);}else region.appendChild(document.createTextNode(part));}};const val=id=>$('#'+id).value;const num=id=>{const s=val(id).trim();return s===''?NaN:Number(s);};const on=(id,fn)=>$('#'+id).addEventListener('click',fn);const watch=ids=>{for(const id of ids)for(const event of ['input','change'])$('#'+id).addEventListener(event,()=>out('Inputs changed. Run the action to update this result.'));};const fmt=(n,d=4)=>Math.abs(n)<1e-10?(0).toFixed(d):n.toFixed(d);
const examples={g1:['Mia','liest','heute Abend','ein Buch'],g2:['Heute Abend','liest','Mia','ein Buch'],g3:['weil','sie','ein Buch','liest']};let mode='g2';for(const k of Object.keys(examples))on(k,()=>{mode=k;$('#groups').value='';$('#explanation').value='';$('#example').textContent=k==='g3'?'G3 context: Mia bleibt zu Hause, weil sie ein Buch liest.':k==='g1'?'G1: Mia liest heute Abend ein Buch.':'G2: Heute Abend liest Mia ein Buch.';out('Arrange the supplied groups for '+k.toUpperCase()+'.');});watch(['groups']);on('check',()=>{const a=val('groups').split('/').map(s=>s.trim()),e=examples[mode];if(a.length!==4||new Set(a).size!==4||e.some(s=>!a.includes(s))){out('Check the groups: use each supplied phrase once, intact.');return;}if(a.join('|')===e.join('|')){out(mode==='g3'?'Matches G3: weil clause; finite verb liest is final.':'Matches '+mode.toUpperCase()+': finite verb liest is in field 2.'+(mode==='g2'?' Heute Abend is one phrase; liest is written word 3.':''));return;}const position=a.indexOf('liest')+1,expected=mode==='g3'?4:2;if(position===expected){out('Verb placement matches, but the arrangement differs from the supplied '+mode.toUpperCase()+' pattern. Compare the other phrase positions.');return;}out(mode==='g3'?'Different from G3: keep liest at the end of the weil clause.':'Different from this pattern: liest is in field '+position+', expected field 2.');});
})();
</script></body></html>