-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompetencies.html
More file actions
172 lines (142 loc) · 5.62 KB
/
Copy pathcompetencies.html
File metadata and controls
172 lines (142 loc) · 5.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Competencies — Systems Thinking Competency Explorer</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header class="navbar" id="main-nav"></header>
<div id="page-header" class="page-header">
<h1>Competencies</h1>
<p>Browse the ten core systems thinking competencies across three layers: Seeing, Doing and Being.</p>
</div>
<div class="container">
<!-- List view -->
<div id="list-view">
<div class="card-grid" id="competency-grid"></div>
</div>
<!-- Detail view -->
<div id="detail-view" style="display:none">
<a href="#" class="back-link" onclick="showList(); return false;">← Back to all competencies</a>
<div class="detail-panel" id="competency-detail"></div>
</div>
</div>
<footer class="footer" id="main-footer"></footer>
<script src="js/shared.js"></script>
<script>
createNavbar('competencies');
createFooter();
let allData = {};
async function init() {
allData = await loadAllData();
const id = getURLParam('id');
if (id) {
showDetail(id);
} else {
showList();
}
}
function showList() {
document.getElementById('list-view').style.display = '';
document.getElementById('detail-view').style.display = 'none';
history.replaceState(null, '', 'competencies.html');
const grid = document.getElementById('competency-grid');
grid.innerHTML = allData.competencies.map(c => `
<div class="card layer-${c.layer.toLowerCase()}" onclick="showDetail('${c.id}')">
<span class="layer-badge ${c.layer.toLowerCase()}">${c.layer}</span>
<h3>${c.name}</h3>
<p>${c.definition}</p>
</div>
`).join('');
}
function showDetail(id) {
const c = getCompetencyById(allData.competencies, id);
if (!c) return showList();
document.getElementById('list-view').style.display = 'none';
document.getElementById('detail-view').style.display = '';
history.replaceState(null, '', `competencies.html?id=${id}`);
const relComps = c.related_competencies
.map(rid => getCompetencyById(allData.competencies, rid))
.filter(Boolean)
.map(rc => `<span class="tag" onclick="showDetail('${rc.id}')">${rc.name}</span>`)
.join('');
const relConcepts = c.related_concepts
.map(name => {
const concept = getConceptByName(allData.concepts, name.replace('_', ' '));
if (concept) return `<a class="tag" href="concepts.html?id=${concept.id}">${concept.name}</a>`;
return `<span class="tag">${name}</span>`;
})
.join('');
const relTools = c.tools
.map(tid => getToolById(allData.tools, tid))
.filter(Boolean)
.map(t => `<a class="tag" href="tools.html?id=${t.id}">${t.name}</a>`)
.join('');
const evidence = c.evidence.map(e => `<span class="tag">${e}</span>`).join('');
// Framework basis section
const sourceFrameworks = (c.source_frameworks || [])
.map(sid => getSourceById(allData.sources, sid))
.filter(Boolean)
.map(s => `<a class="tag" href="sources.html" target="_blank" rel="noopener noreferrer">${s.short_name}</a>`)
.join('');
const sourceLinks = (c.source_links || [])
.map(sid => getSourceById(allData.sources, sid))
.filter(Boolean)
.map(s => `<li><a href="${s.url}" target="_blank" rel="noopener noreferrer">${s.name}</a></li>`)
.join('');
const frameworkBasis = (c.source_frameworks && c.source_frameworks.length > 0) ? `
<div class="framework-basis">
<h3>Framework Basis for This Competency</h3>
<div class="detail-section">
<h4>Source Frameworks</h4>
<div class="tag-list">${sourceFrameworks}</div>
</div>
<div class="detail-section">
<h4>Why This Competency Is Included</h4>
<p style="color:var(--text-light)">${c.why_included || ''}</p>
</div>
${c.common_confusions ? `
<div class="detail-section">
<h4>Common Confusions</h4>
<p style="color:var(--text-light)">${c.common_confusions}</p>
</div>` : ''}
<div class="detail-section">
<h4>Source Links</h4>
<ul class="source-ref-list">${sourceLinks}</ul>
</div>
<p style="margin-top:1rem"><a href="sources.html" class="sources-page-link">View all sources and methodology →</a></p>
</div>
` : '';
document.getElementById('competency-detail').innerHTML = `
<span class="layer-badge ${c.layer.toLowerCase()}">${c.layer}</span>
<h2>${c.name}</h2>
<p style="margin-top:0.5rem">${c.definition}</p>
<div class="detail-section">
<h4>Why It Matters</h4>
<p style="color:var(--text-light)">${c.why_it_matters}</p>
</div>
<div class="detail-section">
<h4>Related Concepts</h4>
<div class="tag-list">${relConcepts}</div>
</div>
<div class="detail-section">
<h4>Related Competencies</h4>
<div class="tag-list">${relComps}</div>
</div>
<div class="detail-section">
<h4>Supporting Tools</h4>
<div class="tag-list">${relTools}</div>
</div>
<div class="detail-section">
<h4>Evidence Examples</h4>
<div class="tag-list">${evidence}</div>
</div>
${frameworkBasis}
`;
}
init();
</script>
</body>
</html>