Wiki-tmp/src/data/engagement/interactive/community-educational-function-map.html

src / data / engagement / interactive / community-educational-function-map.html

src/data/engagement/interactive/community-educational-function-map.html · 22.1 KB

<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Community & Educational Function Map</title><link rel="icon" href="data:,"><style>:root{--paper:#fff7e9;--ink:#543c30;--blue:#395d74;--muted:#786854;--line:#ccbaa0;--sky:#dce8ee;--rose:#efd5d9;--sage:#dce6cd}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:15px/1.35 Georgia,'Times New Roman',serif}body:before{content:'';position:fixed;inset:0;pointer-events:none;z-index:9;opacity:.17;background-image:url("https://static.igem.wiki/teams/6056/wiki/files/pages/engagement/education/games/community-educational-function-map-909d7fd86037.svg")}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible{outline:3px solid var(--blue);outline-offset:4px}h1,h2,h3,p{margin:0}.map-shell{max-width:1680px;height:90vh;min-height:620px;margin:3vh auto 0;padding:16px 35px 12px;display:flex;flex-direction:column}header{display:flex;align-items:center;justify-content:space-between;gap:22px}h1{font-size:clamp(22px,2.3vw,35px);font-weight:normal;color:var(--blue);line-height:1.15}header p{font-size:12px;color:var(--muted);flex-shrink:0}.route{font:10px/1.5 'Segoe UI',Arial,sans-serif;color:var(--muted);margin:10px 0 16px;display:flex;gap:11px}.route span{color:#aa8764}.map{position:relative;flex:1;min-height:0;display:grid;grid-template-columns:24% 47% 29%;border-top:1px solid #dacdb9;padding-top:14px}.map section{position:relative;min-width:0}.map h2{font:12px 'Segoe UI',Arial,sans-serif;font-weight:600;color:var(--blue);letter-spacing:1.2px;text-align:center}.map h2 small{font-size:10px;font-weight:normal;letter-spacing:0;color:var(--muted);margin-left:8px}.audiences{height:calc(100% - 28px);display:grid;grid-template-columns:1fr 1fr;grid-template-rows:repeat(3,1fr);padding:7px 25px 0 0;gap:3px 5px}.person{position:relative;isolation:isolate;border:0;background:none;padding:0 3px;display:flex;flex-direction:column;align-items:center;justify-content:center;transition:transform 300ms;min-height:0}.person:before{content:'';position:absolute;inset:25% 1px 3%;background:#e7dcc5;border-radius:45% 48% 20% 13%;opacity:0;z-index:-1;transition:opacity 300ms}.person[aria-pressed=true]:before{opacity:.65}.person[aria-pressed=true]{transform:translateY(-3px)}.person[aria-pressed=true] .name{color:var(--blue);font-weight:bold}.person[aria-pressed=true]:after{content:'✓';position:absolute;right:6%;top:8%;font:700 12px Arial;color:var(--blue)}.person:hover{transform:translateY(-3px)}.person .portrait{width:clamp(66px,7.5vw,112px);height:clamp(66px,7.5vw,112px);max-height:65%;aspect-ratio:1;background-size:300% 200%;background-position:var(--x) var(--y);background-image:none}.person .name{font-size:clamp(11px,1.02vw,15px);line-height:1.18;max-width:145px}.core{display:flex;flex-direction:column;align-items:center}.contexts{width:90%;display:flex;justify-content:center;gap:16px;position:relative;margin-top:8px;min-height:135px;height:28%;max-height:180px}.context{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;width:48%;max-width:220px;border:0;background:transparent;padding:2px 8px 9px;transition:transform 300ms,opacity 300ms}.context:before{content:'';position:absolute;inset:7% 0 0;background:#eee7d6;z-index:-1;border-radius:43% 48% 8% 11%;opacity:.45}.context[aria-pressed=true]:before{background:#eedba6;opacity:.65}.context[aria-pressed=false]{opacity:.62}.context:hover{opacity:1}.context[aria-pressed=true]{transform:translateY(-3px)}.context[aria-pressed=true]:after{content:'';height:2px;width:64%;position:absolute;bottom:0;background:#9b825c;border-radius:50%;transform:rotate(-1deg)}.context .scene{width:96px;height:96px;max-height:72%;aspect-ratio:1}.context-label{font-size:clamp(11px,1.05vw,15px);line-height:1.15;max-width:205px}.scene{background-image:none;background-size:400% 200%;background-position:var(--sx) var(--sy);background-repeat:no-repeat;clip-path:inset(1% 1% 1% 1%)}.function-heading{font:11px 'Segoe UI',Arial,sans-serif;letter-spacing:.7px;color:var(--blue);margin-top:18px}.flower{position:relative;flex:1;min-height:215px;width:min(100%,500px);max-height:340px;margin-top:5px}.petal{position:absolute;width:44%;height:66%;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1.4px solid var(--edge);border-radius:48% 52% 47% 53% / 49% 45% 55% 51%;background:var(--wash);transition:transform 350ms,background 350ms,opacity 350ms,border-width 350ms;transform:scale(.88);opacity:.72;color:var(--tone);z-index:1}.petal.primary{transform:scale(1);border:2.5px solid var(--tone);background:var(--strong);opacity:1;z-index:2}.petal.not-central{opacity:.3;border-style:dashed;transform:scale(.76)}.cognitive{--wash:#e8eef0;--strong:#d0e0e9;--edge:#a9c0cb;--tone:#365d76;left:7%;top:0}.affective{--wash:#f2e5e6;--strong:#edcbd1;--edge:#cfa6ad;--tone:#995965;right:7%;top:0}.experiential{--wash:#e9eddf;--strong:#d6e2c3;--edge:#b4c59c;--tone:#5b7346;left:28%;bottom:0}.petal svg{width:38px;height:38px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linecap:round;stroke-linejoin:round;margin-bottom:5px}.petal h3{font-size:clamp(17px,1.5vw,24px);font-weight:normal}.level{font:10px 'Segoe UI',Arial,sans-serif;margin-top:4px}.primary .level{font-weight:700}.flower-center{position:absolute;top:44%;left:calc(50% - 13px);width:26px;height:26px;background:#fff7e9;border-radius:50%;display:grid;place-items:center;z-index:3;color:#a88e69;font-size:22px}.legend{display:flex;gap:15px;font:9px 'Segoe UI',Arial,sans-serif;color:var(--muted);margin-top:7px}.legend span:before{content:'';display:inline-block;width:7px;height:7px;border:1px solid #8d9b80;border-radius:50%;margin-right:4px}.legend span:first-child:before{background:#9daf8c}.legend span:last-child{opacity:.65}.legend span:last-child:before{border-style:dashed}.insight{height:25px;margin-top:9px;font:italic 11px Georgia,serif;color:#86674c;opacity:0;transition:opacity 250ms;text-align:center}.insight.show{opacity:1}.practice-area{display:flex;flex-direction:column;align-items:center;padding-left:22px}.practice{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;flex:1;width:100%;position:relative;min-height:0;padding-bottom:20px}.practice-image{width:min(100%,340px);aspect-ratio:1;max-height:60%;margin-top:5px}.practice-name{font-size:clamp(22px,2.05vw,32px);line-height:1.1;margin:12px 0 9px;position:relative}.practice-name:after{content:'';position:absolute;left:5%;right:5%;bottom:-5px;height:9px;background:#e9d8b4;opacity:.45;transform:rotate(-1deg);z-index:-1}.category{font:10px/1.4 'Segoe UI',Arial,sans-serif;color:var(--muted);max-width:260px;letter-spacing:.5px;margin-top:4px}#detail-toggle{border:0;background:none;color:var(--blue);font:11px 'Segoe UI',Arial,sans-serif;margin-top:18px;padding:7px;border-bottom:1px dashed #bba88d}#detail-toggle span{margin-left:8px}.detail{position:absolute;bottom:14px;left:2%;right:2%;padding:15px 16px;background:#fffdf6;border:1px solid #d5c4aa;box-shadow:2px 3px 0 #d6c4a52e;font-size:13px;text-align:left;z-index:6;border-radius:3px 8px 4px 3px}.detail:before{content:'';position:absolute;top:-5px;left:25px;background:#e9d9ad99;width:46px;height:10px}.connections{position:absolute;inset:0;overflow:visible;width:100%;height:100%;pointer-events:none}.connections path{fill:none;stroke:#bda88a;stroke-width:1.5;stroke-dasharray:3 5;stroke-linecap:round;transition:d 350ms,stroke 350ms}.connections #context-line{stroke:#9dac9d;stroke-width:1.8}.connections #practice-line{stroke:#b89ea3}.connections.pulse path{animation:draw 350ms ease-out}@keyframes draw{from{opacity:.1;stroke-dashoffset:12}to{opacity:1;stroke-dashoffset:0}}.changed{animation:appear 300ms ease-out}@keyframes appear{from{opacity:.25;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}footer{display:flex;justify-content:space-between;gap:16px;color:var(--muted);font:9px/1.5 'Segoe UI',Arial,sans-serif;padding-top:9px;border-top:1px solid #dacdb9}.sr{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}[hidden]{display:none!important}@media(min-width:1600px){.map-shell{max-height:920px}.contexts{max-height:215px}.context .scene{width:125px;height:125px}.flower{max-height:400px}.petal svg{width:45px;height:45px}.person .portrait{width:130px;height:130px}.person .name{font-size:16px}.function-heading{margin-top:22px}}@media(max-width:1100px) and (min-width:761px){.map-shell{padding:14px 22px;min-height:600px}.audiences{padding-right:15px}.practice-area{padding-left:12px}.context-label{font-size:11px}.contexts{gap:7px}.map h2{font-size:10px;letter-spacing:.6px}.map h2 small{display:block;margin:5px 0 0}.petal h3{font-size:16px}.petal svg{width:28px;height:28px}.insight{font-size:10px}.practice-name{font-size:24px}header p{font-size:10px}.legend{gap:7px;font-size:8px}}@media(max-height:740px) and (min-width:761px){.map-shell{height:94vh;min-height:570px;margin:2vh auto 0}.contexts{min-height:115px;max-height:140px}.context .scene{width:75px;height:75px}.flower{min-height:200px}.petal svg{width:30px;height:30px;margin-bottom:2px}.person .portrait{width:80px;height:80px}.function-heading{margin-top:13px}.practice-image{max-height:55%}.insight{height:20px;margin-top:6px}.route{margin-bottom:11px}}@media(max-width:760px){.map-shell{height:auto;min-height:0;margin:0;padding:22px 18px 15px}header{display:block}h1{font-size:26px}header p{font-size:11px;margin-top:9px}.route{font-size:9px;gap:7px;flex-wrap:wrap;margin-bottom:15px}.map{display:grid;grid-template-columns:1fr;padding-top:15px;gap:22px}.map h2{font-size:12px}.audiences{grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,125px);padding:10px 0 0;gap:7px}.person .portrait{width:83px;height:83px;max-height:none}.person .name{font-size:12px;max-width:125px}.connections{display:none}.contexts{height:150px;min-height:150px;width:100%}.context .scene{width:100px;height:100px}.context-label{font-size:13px}.flower{width:min(100%,430px);height:295px;min-height:295px;flex:none}.petal h3{font-size:20px}.function-heading{margin-top:18px}.insight{font-size:11px;max-width:300px;height:30px}.practice-area{padding:0;border-top:1px dashed #d5c3a7;padding-top:17px}.practice{padding-bottom:20px;min-height:340px}.practice-image{width:225px;height:225px;max-height:none}.practice-name{font-size:28px}.category{font-size:11px}footer{display:block;font-size:9px}footer span{display:block;margin-top:5px}.detail{bottom:3px;font-size:13px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}@media print{.map-shell{height:700px;min-height:0;margin:0}#detail-toggle,.insight{display:none}}
/* Reuse the team's original sheep IP artwork throughout the map. */
.person .portrait{background:none;object-fit:contain}
.context img.scene{background:none;object-fit:contain;clip-path:none}
.practice-image.scene{background:none;clip-path:none;display:flex;align-items:center;justify-content:center}
.practice-image img{width:100%;height:100%;object-fit:contain;display:block}
.cognitive,.affective{padding-bottom:32px}
.flower-center{display:none}
@media(max-width:760px){.cognitive,.affective{padding-bottom:55px}.experiential{padding-top:12px}}
</style></head><body>
<main class="map-shell"><header><h1>Community &amp; Educational Function Map</h1><p>Different people. Different settings.<br>What should education make possible here?</p></header>
<p class="route">Audience <span>→</span> Context <span>→</span> Educational Functions <span>→</span> Practice</p>
<div class="map" id="map"><svg class="connections" id="connections" aria-hidden="true"><path id="audience-line"/><path id="context-line"/><path id="practice-line"/></svg>
<section class="people" aria-labelledby="audience-title"><h2 id="audience-title">Audience</h2><div id="audiences" class="audiences" role="group" aria-label="Choose an audience"></div></section>
<section class="core" aria-labelledby="context-title"><h2 id="context-title">Context <small id="context-hint">Choose a setting</small></h2><div id="contexts" class="contexts" role="group" aria-label="Choose a context"></div>
<div class="function-heading">Educational Functions</div><div class="flower" id="flower"><div class="petal cognitive" id="fn0"><svg viewBox="0 0 48 48" aria-hidden="true"><path d="M6 34V13q9-5 18 0 9-5 18 0v21q-9-5-18 0-9-5-18 0Zm18-21v21M10 18l9 1m-9 5 9 1m10-6 9-1m-9 7 9-1"/></svg><h3>Cognitive</h3><span class="level"></span></div><div class="petal affective" id="fn1"><svg viewBox="0 0 48 48" aria-hidden="true"><path d="M24 39 8 24C-1 12 15 3 24 16 33 3 49 12 40 24Z"/></svg><h3>Affective</h3><span class="level"></span></div><div class="petal experiential" id="fn2"><svg viewBox="0 0 48 48" aria-hidden="true"><path d="M18 5h12m-10 0v14L9 37q-2 5 4 5h23q5 0 2-5L28 19V5M14 31h19m-13 5h1m6-11h1"/></svg><h3>Experiential</h3><span class="level"></span></div><span class="flower-center" aria-hidden="true">✧</span></div>
<p class="legend"><span>Primary</span><span>Supporting</span><span>Not central</span></p><p class="insight" id="insight" aria-hidden="true"></p></section>
<section class="practice-area" aria-labelledby="practice-title"><h2 id="practice-title">Representative Practice</h2><div id="practice" class="practice"><div class="practice-image scene" id="practice-image" aria-hidden="true"></div><div class="practice-name" id="practice-name"></div><p class="category" id="category"></p><button type="button" id="detail-toggle" aria-expanded="false" aria-controls="detail">A closer look <span aria-hidden="true">+</span></button><div id="detail" class="detail" hidden></div></div></section></div>
<footer><span>Functions can coexist; emphasis depends on the context.</span><span>Representative practices are examples rather than an exhaustive list.</span></footer><div class="sr" id="status" role="status" aria-live="polite" aria-atomic="true"></div></main><script>const ART={"\u5c0f\u5b66": "https://static.igem.wiki/teams/6056/wiki/files/pages/engagement/education/games/community-educational-function-map-73642f08fbcc.webp", "\u4e2d\u5b66": "https://static.igem.wiki/teams/6056/wiki/files/pages/engagement/education/games/community-educational-function-map-dddda3937679.webp", "\u6559\u5e08": "https://static.igem.wiki/teams/6056/wiki/files/pages/engagement/education/games/community-educational-function-map-56b9eda954dc.webp", "\u4e2d\u5e74": "https://static.igem.wiki/teams/6056/wiki/files/pages/engagement/education/games/community-educational-function-map-8a32853e6710.webp", "\u5927\u5b66": "https://static.igem.wiki/teams/6056/wiki/files/pages/engagement/education/games/community-educational-function-map-ca3633703563.webp", "\u533b\u751f": "https://static.igem.wiki/teams/6056/wiki/files/pages/engagement/education/games/community-educational-function-map-ddc4e00d6411.webp", "\u79fb\u6db2\u67aa": "https://static.igem.wiki/teams/6056/wiki/files/pages/engagement/education/games/community-educational-function-map-28a6f8bf3245.webp", "\u7a0b\u5e8f\u5458": "https://static.igem.wiki/teams/6056/wiki/files/pages/engagement/education/games/community-educational-function-map-e8b7f3625aed.webp", "\u5ba3\u4f20\u5355": "https://static.igem.wiki/teams/6056/wiki/files/pages/engagement/education/games/community-educational-function-map-77bad1bf80bc.webp", "\u706b\u70ac": "https://static.igem.wiki/teams/6056/wiki/files/pages/engagement/education/games/community-educational-function-map-f8ad55c603de.webp", "\u5409\u4ed6": "https://static.igem.wiki/teams/6056/wiki/files/pages/engagement/education/games/community-educational-function-map-3a47ef84ab63.webp"};
// Canonical mappings: Education (4), p. 8. Levels: 0 not central, 1 supporting, 2 primary.
const audiences=[
{id:'young',name:'Young Learners',asset:'小学',contexts:['primary']},
{id:'secondary',name:'Secondary Students',asset:'中学',contexts:['outreach','course']},
{id:'educators',name:'Learners & Educators',asset:'教师',contexts:['virtual']},
{id:'public',name:'Public Health Communities',asset:'医生',contexts:['health']},
{id:'university',name:'University Students & Young Adults',asset:'大学',contexts:['run','music']},
{id:'readers',name:'Independent Readers',asset:'中年',contexts:['reading']}
];
const settings={
primary:{name:'Guided primary classroom',levels:[1,2,2],practice:'Vaccine Classroom',category:'Classroom & Guided Learning',asset:'教师',detail:'Clue-based group choices connect children’s experience with scientific explanation.'},
outreach:{name:'School outreach / introductory classroom',levels:[2,1,1],practice:'Winter Outreach',category:'Classroom & Guided Learning',asset:'教师',detail:'Scientific foundations open into students’ questions and personal hopes.'},
course:{name:'Structured experimental course',levels:[2,1,2],practice:'Synbio Classroom',category:'Laboratory & Interactive Learning',asset:'移液枪',detail:'Wet lab, process games, plasmid design and guided virtual experimentation.'},
virtual:{name:'Digital experimental environment / self-directed learning',levels:[2,1,2],practice:'Virtual Laboratory',category:'Laboratory & Interactive Learning',asset:'程序员',detail:'Operate, revisit and understand nine connected experiments.'},
health:{name:'Open health outreach / consultation',levels:[1,2,1],practice:'Xinghua Festival',category:'Public Health & Mobile Learning',asset:'宣传单',detail:'Health questions, creative expression and open access to professional consultation.'},
run:{name:'Mobile campus event',levels:[1,2,2],practice:'Health Run',category:'Public Health & Mobile Learning',asset:'火炬',detail:'Health knowledge meets participants at checkpoints along a campus route.'},
music:{name:'Leisure / music setting',levels:[1,2,2],practice:'Music Festival',category:'Creative & Reflective Learning',asset:'吉他',detail:'Rhythm, color and voice offer familiar ways into science.'},
reading:{name:'Narrative / self-directed reading',levels:[1,2,0],practice:'Letters to My Body',category:'Creative & Reflective Learning',asset:'中年',detail:'Literary reflection on the body and self-care, supported by medical footnotes.'}
};
const labels=['Cognitive','Affective','Experiential'],levels=['Not central','Supporting','Primary'];
const $=id=>document.getElementById(id);let audience=audiences[1],context='outreach',timer;
function asset(name){return ART[name]}
function closeDetail(){$('detail').hidden=true;$('detail-toggle').setAttribute('aria-expanded','false')}
function renderPeople(){$('audiences').innerHTML=audiences.map(a=>`<button type="button" class="person" data-audience="${a.id}" aria-pressed="${a.id===audience.id}" title="${a.name}"><img class="portrait" src="${asset(a.asset)}" alt=""><span class="name">${a.name}</span></button>`).join('')}
function renderContexts(){$('contexts').innerHTML=audience.contexts.map(id=>`<button type="button" class="context" data-context="${id}" aria-pressed="${id===context}" title="${settings[id].name}"><img class="scene" src="${asset(settings[id].asset)}" alt=""><span class="context-label">${settings[id].name}</span></button>`).join('');$('context-hint').textContent=audience.contexts.length===2?'Explore both settings':'Selected setting'}
function render(changeContext=false,oldContext=null){const s=settings[context];document.querySelectorAll('[data-audience]').forEach(b=>b.setAttribute('aria-pressed',b.dataset.audience===audience.id));document.querySelectorAll('[data-context]').forEach(b=>b.setAttribute('aria-pressed',b.dataset.context===context));s.levels.forEach((n,i)=>{const el=$('fn'+i);el.classList.toggle('primary',n===2);el.classList.toggle('not-central',n===0);el.querySelector('.level').textContent=levels[n]});$('practice-image').innerHTML=`<img src="${asset(s.asset)}" alt="">`;$('practice-name').textContent=s.practice;$('category').textContent=s.category;$('detail').textContent=s.detail;closeDetail();$('practice').classList.remove('changed');void $('practice').offsetWidth;$('practice').classList.add('changed');clearTimeout(timer);$('insight').classList.remove('show');if(changeContext&&oldContext!==context){const changed=JSON.stringify(settings[oldContext].levels)!==JSON.stringify(s.levels);$('insight').textContent=changed?'Same audience. Different context. Different educational emphasis.':'Same audience. Different setting. Shared educational emphasis.';$('insight').classList.add('show');timer=setTimeout(()=>$('insight').classList.remove('show'),4200)}$('status').textContent=`${audience.name}. ${s.name}. ${labels.map((l,i)=>l+': '+levels[s.levels[i]]).join('. ')}. ${s.practice}.`;requestAnimationFrame(drawLines);$('connections').classList.remove('pulse');void $('connections').offsetWidth;$('connections').classList.add('pulse')}
function drawLines(){if(innerWidth<=760)return;const box=$('map').getBoundingClientRect();const rect=el=>{const r=el.getBoundingClientRect();return{x:r.left-box.left,y:r.top-box.top,w:r.width,h:r.height}};const a=rect(document.querySelector('[data-audience][aria-pressed=true]')),c=rect(document.querySelector('[data-context][aria-pressed=true]')),f=rect($('flower')),p=rect($('practice-image'));const sx=a.x+a.w,sy=a.y+a.h/2,ex=c.x+8,ey=c.y+c.h/2;$('audience-line').setAttribute('d',`M${sx},${sy} C${sx+35},${sy} ${ex-35},${ey} ${ex},${ey}`);$('context-line').setAttribute('d',`M${c.x+c.w/2},${c.y+c.h+3} Q${c.x+c.w/2},${f.y-10} ${f.x+f.w/2},${f.y+8}`);$('practice-line').setAttribute('d',`M${f.x+f.w*.89},${f.y+f.h*.5} C${f.x+f.w+25},${f.y+f.h*.5} ${p.x-22},${p.y+p.h*.55} ${p.x+5},${p.y+p.h*.55}`)}
$('audiences').addEventListener('click',e=>{const b=e.target.closest('[data-audience]');if(!b||b.dataset.audience===audience.id)return;audience=audiences.find(a=>a.id===b.dataset.audience);context=audience.contexts[0];renderContexts();render()});$('contexts').addEventListener('click',e=>{const b=e.target.closest('[data-context]');if(!b)return;const previous=context;context=b.dataset.context;render(true,previous)});$('detail-toggle').addEventListener('click',()=>{const open=$('detail').hidden;$('detail').hidden=!open;$('detail-toggle').setAttribute('aria-expanded',String(open))});document.addEventListener('keydown',e=>{if(e.key==='Escape')closeDetail()});document.addEventListener('click',e=>{if(!e.target.closest('.practice'))closeDetail()});new ResizeObserver(drawLines).observe($('map'));renderPeople();renderContexts();render();window.addEventListener('load',drawLines);
</script></body></html>

← 返回文件树 · 在 GitHub 上查看