dsm-portfolio-theme 0.1.4 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -18
  3. data/_includes/breadcrumbs.html +11 -0
  4. data/_includes/competencies.html +28 -0
  5. data/_includes/navigation.html +42 -0
  6. data/_includes/notice.html +7 -0
  7. data/_includes/project-list.html +65 -21
  8. data/_includes/projects.html +32 -0
  9. data/_includes/scripts.html +5 -1
  10. data/_layouts/default.html +14 -16
  11. data/_layouts/examples/summary-example.md +17 -0
  12. data/_layouts/examples/vignette-example.md +8 -0
  13. data/_layouts/generate/about.html +180 -0
  14. data/_layouts/generate/api/documentation.html +313 -0
  15. data/_layouts/generate/api/v1/competencies.json +4 -0
  16. data/_layouts/generate/api/v1/portfolio.json +24 -0
  17. data/_layouts/generate/api/v1/progression.json +4 -0
  18. data/_layouts/generate/api/v1/projects.json +4 -0
  19. data/_layouts/generate/api/v1/summaries.json +14 -0
  20. data/_layouts/generate/api/v1/vignettes.json +14 -0
  21. data/_layouts/generate/competencies.md +9 -0
  22. data/_layouts/generate/progression.html +95 -0
  23. data/_layouts/generate/projects.md +9 -0
  24. data/_layouts/portfolio.html +28 -24
  25. data/_layouts/summary.html +67 -48
  26. data/_layouts/vignette.html +69 -34
  27. data/assets/scripts/vignette.js +204 -18
  28. data/assets/styles/main.scss +15 -29
  29. metadata +20 -23
  30. data/_includes/anaytics.html +0 -0
  31. data/_includes/footer.html +0 -0
  32. data/_includes/header.html +0 -13
  33. data/_layouts/project.html +0 -5
  34. data/_sass/atoms/_forms.scss +0 -0
  35. data/_sass/atoms/_images.scss +0 -0
  36. data/_sass/atoms/_links.scss +0 -0
  37. data/_sass/atoms/_lists.scss +0 -0
  38. data/_sass/atoms/_tables.scss +0 -0
  39. data/_sass/atoms/_typography.scss +0 -0
  40. data/_sass/base/_colours.scss +0 -0
  41. data/_sass/base/_fonts.scss +0 -0
  42. data/_sass/base/_normalize.scss +0 -0
  43. data/_sass/base/_spacing.scss +0 -0
  44. data/_sass/layouts/_evaluation.scss +0 -0
  45. data/_sass/layouts/_page.scss +0 -0
  46. data/_sass/layouts/_portfolio.scss +0 -0
  47. data/_sass/molecules/_footer.scss +0 -0
  48. data/_sass/molecules/_header.scss +0 -0
  49. data/_sass/organisms/_vignette-blocks.scss +0 -9
  50. data/_sass/organisms/_vignette-tabs.scss +0 -11
@@ -0,0 +1,313 @@
1
+ ---
2
+ layout: post
3
+ permalink: /api/index
4
+ ---
5
+
6
+ <div class="container">
7
+ <div class="row">
8
+ <div class="col-lg-3 mb-4">
9
+ <!-- API Navigation -->
10
+ <div class="row sticky-top t-1" style="top: 1rem">
11
+ <ul id="index" class="list-group container-fluid" style="padding-left: 15px">
12
+ <a href="#v1" class="list-group-item list-group-item-light flex-column align-items-start">
13
+ <div class="d-flex w-100 justify-content-between">
14
+ <h5 class="mb-1">Version 1</h5>
15
+ <small>01/09/2018</small>
16
+ </div>
17
+ <p class="mb-1">Basic dumps of all site data.</p>
18
+ </a>
19
+ <a href="#overview" class="list-group-item">Overview</a>
20
+ <a href="#projects" class="list-group-item">Projects</a>
21
+ <a href="#competencies" class="list-group-item">Competencies</a>
22
+ <a href="#portfolio" class="list-group-item">Portfolio</a>
23
+ <a href="#summaries" class="list-group-item">Summaries</a>
24
+ <a href="#vignettes" class="list-group-item">Vignettes</a>
25
+ <a href="#progression" class="list-group-item">Progression</a>
26
+ </ul>
27
+ </div>
28
+ </div>
29
+ <!-- Request Documentation -->
30
+ <div class="col-lg">
31
+ <div class="row">
32
+ <div class="container" style="margin-bottom: 75vh">
33
+ <div class="row">
34
+ <div class="container">
35
+ <p class="h1" id="v1">Version 1</p>
36
+ </div>
37
+ </div>
38
+ <div class="row">
39
+ <div class="container">
40
+ <p class="h2" id="overview">Overview</p>
41
+ <p>
42
+ The API is enabled by default, and publicly accessible (no key needed). This can be modified in the <code>_config.yml</code>.
43
+ </p>
44
+ <p>
45
+ The request format is a simple GET for each, and the response format is unpaginated <a href="https://en.wikipedia.org/wiki/JSON" target="_blank">JSON</a>,
46
+ meaning everything can be retrieved with one request. For consistency and usability, the data is wrapped in a generic format:
47
+ </p>
48
+ <div class="card mb-4 mt-4">
49
+ <div class="card-header">
50
+ <code class="mr-2">Example Request</code>
51
+ <span class="badge badge-primary">GET</span>
52
+ <span class="badge badge-secondary">ALL</span>
53
+ </div>
54
+ <div class="card-body">
55
+ <pre class="mb-0"><code>{
56
+ "data": [...],
57
+ "last_updated": "...",
58
+ "status": "OK"
59
+ }</code></pre>
60
+ </div>
61
+ </div>
62
+ <p>
63
+ The type of data accessible is split between administrative and user data - this is tagged per endpoint. There is some crossover
64
+ if the user has extended these definitions.
65
+ An index is available <a href="{{ "api/v1" | relative_url }}">here</a>.
66
+ </p>
67
+ </div>
68
+ </div>
69
+ <div class="row">
70
+ <div class="container">
71
+ <p class="h2" id="projects">Projects</p>
72
+ <p>
73
+ Data on projects for the current academic year.
74
+ </p>
75
+ <div class="card mb-4 mt-4">
76
+ <div class="card-header">
77
+ <a href="{{ "api/v1/projects.json" | relative_url }}" class="mr-2"><code>{{ "api/v1/projects.json" | relative_url }}</code></a>
78
+ <span class="badge badge-primary">GET</span>
79
+ <span class="badge badge-secondary">ADMIN</span>
80
+ </div>
81
+ <div class="card-body">
82
+ <pre class="mb-0"><code>{
83
+ "data": [
84
+ {
85
+ "id": 1,
86
+ "title": "Test Project",
87
+ "description": "This is a description of the test project.",
88
+ "deadline": "XX-XX-XXXX",
89
+ "targets": [
90
+ "C1",
91
+ "C2",
92
+ "C3"
93
+ ]
94
+ }
95
+ ],
96
+ "last_updated": "...",
97
+ "status": "OK"
98
+ }</code></pre>
99
+ </div>
100
+ </div>
101
+ </div>
102
+ </div>
103
+ <div class="row">
104
+ <div class="container">
105
+ <p class="h2" id="competencies">Competencies</p>
106
+ <p>
107
+ Data on competencies in the skill-based framework that may be used in vignettes.
108
+ </p>
109
+ <div class="card mb-4 mt-4">
110
+ <div class="card-header">
111
+ <a href="{{ "api/v1/competencies.json" | relative_url }}" class="mr-2"><code>{{ "api/v1/competencies.json" | relative_url }}</code></a>
112
+ <span class="badge badge-primary">GET</span>
113
+ <span class="badge badge-secondary">ADMIN</span>
114
+ </div>
115
+ <div class="card-body">
116
+ <pre class="mb-0"><code>{
117
+ "data": [
118
+ {
119
+ "id": "C1",
120
+ "title": "Example Competency 1",
121
+ "description": "Test description",
122
+ "categories": [
123
+ "Example Category 1"
124
+ ]
125
+ }
126
+ ],
127
+ "last_updated": "...",
128
+ "status": "OK"
129
+ }</code></pre>
130
+ </div>
131
+ </div>
132
+ </div>
133
+ </div>
134
+ <div class="row">
135
+ <div class="container">
136
+ <p class="h2" id="portfolio">Portfolio</p>
137
+ <p>
138
+ All user-submitted project data.
139
+ </p>
140
+ <div class="card mb-4 mt-4">
141
+ <div class="card-header">
142
+ <a href="{{ "api/v1/competencies.json" | relative_url }}" class="mr-2"><code>{{ "api/v1/portfolio.json" | relative_url }}</code></a>
143
+ <span class="badge badge-primary">GET</span>
144
+ <span class="badge badge-secondary">USER</span>
145
+ </div>
146
+ <div class="card-body">
147
+ <pre class="mb-0"><code>{
148
+ "data": [
149
+ {
150
+ "project_title": "Test Project",
151
+ "project_id": "/XXXX/XX/XX/test-project",
152
+ "project_code": "1",
153
+ "date_published": "...",
154
+ "project_urls": {
155
+ "summary": "/XXXX/XX/XX/test-project-one-summary.html",
156
+ "vignette": "/XXXX/XX/XX/test-project-one-vignette.html"
157
+ },
158
+ "items": [
159
+ {..}
160
+ ]
161
+ }
162
+ "last_updated": "...",
163
+ "status": "OK"
164
+ }</code></pre>
165
+ </div>
166
+ </div>
167
+ </div>
168
+ </div>
169
+ <div class="row">
170
+ <div class="container">
171
+ <p class="h2" id="summaries">Summaries</p>
172
+ <p>
173
+ All project summaries.
174
+ </p>
175
+ <div class="card mb-4 mt-4">
176
+ <div class="card-header">
177
+ <a href="{{ "api/v1/summaries.json" | relative_url }}" class="mr-2"><code>{{ "api/v1/summaries.json" | relative_url }}</code></a>
178
+ <span class="badge badge-primary">GET</span>
179
+ <span class="badge badge-secondary">USER</span>
180
+ </div>
181
+ <div class="card-body">
182
+ <pre class="mb-0"><code>{
183
+ "data": [
184
+ {
185
+ "id": "/XXXX/XX/XX/test-project-two/summary",
186
+ "title": "Test Project/summary",
187
+ "content": "...",
188
+ "url": "/XXXX/XX/XX/test-project-summary.html",
189
+ "tags": [...],
190
+ "date": "...",
191
+ "project_code": 1,
192
+ "length": "X Months",
193
+ "notebook_file": "example.ipynb",
194
+ "external_resources": [
195
+ {
196
+ "url": "...",
197
+ "title": "..."
198
+ }
199
+ ]
200
+ }
201
+ ],
202
+ "last_updated": "...",
203
+ "status": "OK"
204
+ }</code></pre>
205
+ </div>
206
+ </div>
207
+ </div>
208
+ </div>
209
+ <div class="row">
210
+ <div class="container">
211
+ <p class="h2" id="vignettes">Vignettes</p>
212
+ <p>
213
+ All project vignettes (and their computed metadata).
214
+ </p>
215
+ <div class="card mb-4 mt-4">
216
+ <div class="card-header">
217
+ <a href="{{ "api/v1/vignettes.json" | relative_url }}" class="mr-2"><code>{{ "api/v1/vignettes.json" | relative_url }}</code></a>
218
+ <span class="badge badge-primary">GET</span>
219
+ <span class="badge badge-secondary">USER</span>
220
+ </div>
221
+ <div class="card-body">
222
+ <pre class="mb-0"><code>{
223
+ "data": [
224
+ {
225
+ "id": "/XXXX/XX/XX/test-project/vignette",
226
+ "title": "Test Project/vignette",
227
+ "content": "...",
228
+ "project_code": 1,
229
+ "url": "/XXXX/XX/XX/test-project-vignette.html",
230
+ "tags": [...],
231
+ "date": "...",
232
+ "vignettes": [
233
+ {
234
+ "competencies": [
235
+ {
236
+ "id": "C1",
237
+ "count": 1,
238
+ "linked": true
239
+ }
240
+ ]
241
+ }
242
+ ],
243
+ "targets": [
244
+ "C1"
245
+ ]
246
+ }
247
+ ],
248
+ "last_updated": "...",
249
+ "status": "OK"
250
+ }</code></pre>
251
+ </div>
252
+ </div>
253
+ </div>
254
+ </div>
255
+ <div class="row">
256
+ <div class="container">
257
+ <p class="h2" id="progression">Progression</p>
258
+ <p>
259
+ Final vignettes marked against academic project targets.
260
+ </p>
261
+ <div class="card mb-4 mt-4">
262
+ <div class="card-header">
263
+ <a href="{{ "api/v1/progression.json" | relative_url }}" class="mr-2"><code>{{ "api/v1/progrssion.json" | relative_url }}</code></a>
264
+ <span class="badge badge-primary">GET</span>
265
+ <span class="badge badge-secondary">ALL</span>
266
+ </div>
267
+ <div class="card-body">
268
+ <pre class="mb-0"><code>{
269
+ "data": [
270
+ {
271
+ "project_rows": [
272
+ {
273
+ "projectId": 1,
274
+ "projectTitle": "Test Project One",
275
+ "deadline": "01-08-2018",
276
+ "submitted": false,
277
+ "competencies": [
278
+ {
279
+ "competencyId": "C1",
280
+ "target": true,
281
+ "included": false
282
+ }
283
+ ],
284
+ "allTargetsHit": false
285
+ }
286
+ ],
287
+ "categories": {
288
+ "Example Category 1": [
289
+ {
290
+ "id": "C1",
291
+ "title": "Example Competency 1",
292
+ "description": "Test description",
293
+ "categories": [
294
+ "Example Category 1"
295
+ ]
296
+ }
297
+ ]
298
+ },
299
+ "num_competencies": 6
300
+ }
301
+ ],
302
+ "last_updated": "...",
303
+ "status": "OK"
304
+ }</code></pre>
305
+ </div>
306
+ </div>
307
+ </div>
308
+ </div>
309
+ </div>
310
+ </div>
311
+ </div>
312
+ </div>
313
+ </div>
@@ -0,0 +1,4 @@
1
+ ---
2
+ ---
3
+
4
+ {{ site.data.competencies | wrap_with_key: "data" | jsonify }}
@@ -0,0 +1,24 @@
1
+ ---
2
+ ---
3
+ {% assign postsByProject = site.posts | group_by_exp: "post", "post.project_id" %}
4
+
5
+ {
6
+ "data": [
7
+ {% for project in postsByProject %}
8
+ {
9
+ "project_title": "{{ project.items[0].project_title }}",
10
+ "project_id": "{{ project.name }}",
11
+ "project_code": "{{ project.items[0].project_code }}",
12
+ "date_published": "{{ project.items[0].date | date_to_rfc822 }}",
13
+ "project_urls": {{ project.items[0].project_urls | jsonify }},
14
+ "items": [
15
+ {% for item in project.items %}
16
+ {{ item | strip_fields_from_document: 'next,previous,output' | jsonify}}{% unless forloop.last %},{% endunless %}
17
+ {% endfor %}
18
+ ]
19
+ }{% unless forloop.last %},{% endunless %}
20
+ {% endfor %}
21
+ ],
22
+ "status": "OK",
23
+ "last_updated": "{{ 'now' | date_to_rfc822 }}"
24
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ ---
3
+
4
+ {{ page.payload | jsonify }}
@@ -0,0 +1,4 @@
1
+ ---
2
+ ---
3
+
4
+ {{ site.data.projects | wrap_with_key: "data" | jsonify }}
@@ -0,0 +1,14 @@
1
+ ---
2
+ ---
3
+
4
+ {
5
+ "data": [
6
+ {% assign summaries = site.posts | where: "type", "summary" %}
7
+ {% for summary in summaries %}
8
+ {{ summary | strip_fields_from_document: 'next,previous,output' | jsonify }}
9
+ {% unless forloop.last %},{% endunless %}
10
+ {% endfor %}
11
+ ],
12
+ "status": "OK",
13
+ "last_updated": "{{ 'now' | date_to_rfc822 }}"
14
+ }
@@ -0,0 +1,14 @@
1
+ ---
2
+ ---
3
+
4
+ {
5
+ "data": [
6
+ {% assign vignettes = site.posts | where: "type", "vignette" %}
7
+ {% for vignette in vignettes %}
8
+ {{ vignette | strip_fields_from_document: 'next,previous,output' | jsonify }}
9
+ {% unless forloop.last %},{% endunless %}
10
+ {% endfor %}
11
+ ],
12
+ "status": "OK",
13
+ "last_updated": "{{ 'now' | date_to_rfc822 }}"
14
+ }
@@ -0,0 +1,9 @@
1
+ ---
2
+ layout: page
3
+ ---
4
+
5
+ # Competencies
6
+
7
+ {% include notice.html %}
8
+
9
+ {% include competencies.html %}
@@ -0,0 +1,95 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <h1>
6
+ Progression
7
+ </h1>
8
+
9
+ {% include notice.html %}
10
+
11
+ {% assign small_table_limit = site.small_table_limit | default: 5 %}
12
+
13
+ <div class="table-responsive">
14
+ <table class="table table-hover {% if page.payload['num_competencies'] > small_table_limit %}table-sm{% endif %}">
15
+ <tr>
16
+ <th>
17
+ Project Id
18
+ </th>
19
+ <th>
20
+ Project Title
21
+ </th>
22
+ <th>
23
+ Project Deadline
24
+ </th>
25
+ {% for category in page.payload['categories'] %}
26
+ <th colspan="{{ category[1].size }}">
27
+ {{ category[0] }}
28
+ </th>
29
+ {% endfor %}
30
+
31
+ <th>
32
+ All Targets Hit
33
+ </th>
34
+ </tr>
35
+ <tr>
36
+ <td></td>
37
+ <td></td>
38
+ <td></td>
39
+ {% for category in page.payload['categories'] %}
40
+ {% for competency in category[1] %}
41
+ <td>
42
+ {{ competency['id'] }}
43
+ </td>
44
+ {% endfor %}
45
+ {% endfor %}
46
+ <td></td>
47
+ </tr>
48
+ {% for project_row in page.payload['project_rows'] %}
49
+
50
+ {% if project_row['deadline'] %}
51
+ {% assign today_date = 'now' | date: '%s' %}
52
+ {% assign pre_date = project_row['deadline'] | date: '%s' %}
53
+ {% if today_date > pre_date %}
54
+ {% assign passed = true %}
55
+ {% else %}
56
+ {% assign passed = false %}
57
+ {% endif %}
58
+ {% else %}
59
+ {% assign passed = false %}
60
+ {% endif %}
61
+
62
+ <tr class="{% if project_row['submitted'] != true and passed %}table-danger{% endif %} {% if project_row['allTargetsHit'] %}table-success{% endif %} {% if project_row['allTargetsHit'] != true and passed %}table-warning{% endif %}">
63
+ <td>
64
+ {{ project_row['projectId'] }}
65
+ </td>
66
+ <td>
67
+ {{ project_row['projectTitle'] }}
68
+ </td>
69
+ <td>
70
+ {{ project_row['deadline'] }}
71
+ </td>
72
+ {% for competency in project_row['competencies'] %}
73
+ <td class="{% if competency['included'] %}included{% endif %} {% if competency['target'] %}target{% endif %}">
74
+ {% if competency['included'] %}
75
+ {% if competency['target'] %}
76
+ <i class="fas fa-check-square"></i>
77
+ {% else %}
78
+ <i class="far fa-check-circle" style="opacity: 0.3"></i>
79
+ {% endif %}
80
+ {% elsif competency['target'] %}
81
+ <i class="far fa-square"></i>
82
+ {% endif %}
83
+ </td>
84
+ {% endfor %}
85
+ <td>
86
+ {% if project_row['allTargetsHit'] %}
87
+ <i class="fas fa-check"></i>
88
+ {% else %}
89
+ <i class="fas fa-times"></i>
90
+ {% endif %}
91
+ </td>
92
+ </tr>
93
+ {% endfor %}
94
+ </table>
95
+ </div>
@@ -0,0 +1,9 @@
1
+ ---
2
+ layout: page
3
+ ---
4
+
5
+ # Projects
6
+
7
+ {% include notice.html %}
8
+
9
+ {% include projects.html %}
@@ -1,32 +1,36 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
- <!-- Main Index Scroll -->
5
- <div>
6
- <div class="">
7
- <h1>
8
- {{ site.full_name }}
9
- </h1>
10
- </div>
11
- <div class="">
12
- <h2>
13
- Contact
14
- </h2>
15
- <!-- TODO: Contact information. -->
16
- {% for link in site.contact_details %}
17
- <li>
18
- <a class="a-link" href="{{ link.url }}" target="_self">
19
- {{ link.title }}
20
- </a>
21
- </li>
22
- {% endfor %}
23
- </div>
24
- <div class="">
25
- <div class="">
26
- {{ content }}
4
+ <div class="jumbotron row">
5
+ <div class="col">
6
+ <div class="row">
7
+ <div class="col">
8
+ <h1>
9
+ {{ site.full_name }}
10
+ </h1>
11
+ </div>
12
+ <div class="col">
13
+ <h2>
14
+ Contact
15
+ </h2>
16
+ {% for link in site.contact_details %}
17
+ <li>
18
+ <a class="a-link" href="{{ link.url | relative_url }}" target="_self">
19
+ {{ link.title }}
20
+ </a>
21
+ </li>
22
+ {% endfor %}
23
+ </div>
24
+ </div>
25
+ <div class="row">
26
+ <div class="col">
27
+ {{ content }}
28
+ </div>
27
29
  </div>
28
30
  </div>
29
- <div class="">
31
+ </div>
32
+ <div class="row">
33
+ <div class="col">
30
34
  {% include project-list.html %}
31
35
  </div>
32
36
  </div>