Skip to content

Commit 8742f58

Browse files
committed
Allow any kind of staffer metadata
1 parent 2dbbb0b commit 8742f58

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

_layouts/staffer.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ <h3 class="staffer-name" id="{{ page.name | slugify }}">
1616
{%- if page.email -%}
1717
<p><a href="mailto:{{ page.email }}">{{ page.email }}</a></p>
1818
{%- endif -%}
19-
{%- if page.section -%}
20-
<p class="staffer-meta">Quiz Section: {{ page.section | markdownify | strip_html }}</p>
21-
{%- endif -%}
22-
{%- if page.office-hours -%}
23-
<p class="staffer-meta">Office Hours: {{ page.office-hours | markdownify | strip_html }}</p>
19+
{%- if page.meta -%}
20+
<dl class="staffer-meta">
21+
{%- for meta in page.meta -%}
22+
<dt>{{ meta[0] }}</dt>
23+
<dd>{{ meta[1] | markdownify }}</dd>
24+
{%- endfor -%}
25+
</dl>
2426
{%- endif -%}
2527
{{ content }}
2628
</div>

_sass/custom/staffer.scss

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@
3131
}
3232

3333
.staffer-meta {
34-
@extend .text-grey-dk-000;
34+
dt, dd, dd + dt {
35+
margin-top: 0;
36+
}
37+
}
38+
39+
@include mq(sm) {
40+
.staffer-meta {
41+
display: grid;
42+
grid-template-columns: auto 1fr;
43+
}
3544
}
3645
}

0 commit comments

Comments
 (0)