Skip to content

Commit bb15b7c

Browse files
committed
course list composed of proper cards
1 parent 00b3e2f commit bb15b7c

4 files changed

Lines changed: 114 additions & 109 deletions

File tree

‎_includes/course-card.html‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{%- assign slug = include.slug | default: include.title | slugify -%}
2+
{%- comment %}Note .coursecard class also used by buggytrack.js{% endcomment -%}
3+
<div class="coursecard"><a type="button" class="courselink" {% if include.url contains "http" and include.value %}ga-event-value="{{ include.value }}" data-content-authors="{{ include.authors | join: ", " }}"{% endif %} href="{{ include.url }}"><div class="inner-coursecard">
4+
<h3 id="{{ slug }}">{{ include.title }}</h3>
5+
<div class="coursedesc">
6+
<div class="descrow">
7+
<div class="cicon"><i class="{{ include.icon }}"></i></div>
8+
<div class="cdesc">{{ include.description | markdownify }}</div>
9+
<div class="ccredits"><i class="far fa-clock"></i><br>&#126;{{ include.time }} hrs</div>
10+
</div>{% if include.lecturers.size > 0 or include.bauthors.size > 0 %}
11+
<div class="featuringrow">
12+
<div class="flabel"><strong>{% if include.bauthors.size > 0 %}Featuring{% else %}Taught by{% endif %}</strong>:</div>
13+
{% if include.lecturers.size > 0 %}<div class="lecturers"><i class="fas fa-person-chalkboard"></i> {% include_cached content_authors_string.html authors=include.lecturers %}</div>{% endif %}
14+
{% if include.bauthors.size > 0 %}<div class="bauthors"><i class="far fa-address-book"></i> {% include_cached content_authors_string.html authors=include.bauthors %}</div>{% endif %}
15+
</div>{% endif %}
16+
</div>
17+
</div></a></div>
18+

‎assets/css/courselist.scss‎

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,38 @@
33

44
@import "support";
55

6-
h3.courselink {
6+
.coursecard {
7+
margin-bottom: 2rem;
8+
}
9+
10+
a.courselink {
11+
color: $text-color;
12+
box-shadow: 6px 6px 10px rgba($banner-color, 0.2);
13+
}
14+
15+
a.courselink:hover {
16+
text-decoration: none;
17+
transform: scale3d(1.01, 1.01, 1.01) translate3d(0.1rem, -0.25rem, 20rem);
18+
box-shadow: 3px 11px 10px rgba($banner-color, 0.25);
19+
transition: all 0.15s cubic-bezier(0, 0, 0.5, 1) 0s;
20+
}
21+
22+
.courselink h3 {
723
margin-bottom: 0;
824
background-color: $banner-color;
925
color: white;
10-
padding: 0;
1126
letter-spacing: 3px;
12-
a {
13-
display: inline-block;
14-
height: 100%;
15-
width: 100%;
16-
padding: 1rem;
17-
color: white;
18-
text-decoration: underline;
19-
text-underline-offset: 2px;
20-
text-decoration-thickness: 1px;
21-
}
22-
a:visited {
23-
color: white;
24-
}
27+
display: inline-block;
28+
height: 100%;
29+
width: 100%;
30+
padding: 1rem;
31+
text-decoration: underline;
32+
text-underline-offset: 2px;
33+
text-decoration-thickness: 1px;
2534
}
2635

2736
div.coursedesc {
2837
border: solid 1px $banner-color;
29-
margin-bottom: 2rem;
30-
box-shadow: 6px 6px 10px rgba($banner-color, 0.22);
3138
padding-right: 10px;
3239
padding-top: 15px;
3340
}

‎assets/js/buggytrack.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const BuggyTracker = function (d) {
6262
m=l.match(journalr);
6363
if(m) return p.tagName=='H3'?['journals',m[1],'html']:['Generic Links',m[1]];
6464
if(l=='/courses/'){
65-
if(p.className=='courselink') return ['courses', 'external_courses'];
65+
if(p.className=='coursecard') return ['courses', 'external_courses'];
6666
if(link.className=='f3') return ['courses', 'mit_courses', 'html'];
6767
return ['Generic Links','courses'];
6868
}

‎courses.md‎

Lines changed: 71 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ big_height: 1896
1818
banner_info: <a href="https://commons.wikimedia.org/wiki/File:Zhaya_Theingyi-Sagaing-Myanmar-02-gje.jpg">Gerd Eichmann</a>, <a href="https://creativecommons.org/licenses/by-sa/3.0">BY-SA 3.0</a>
1919
---
2020

21-
<script>
22-
function goto(u) {
23-
document.querySelector('a[href="'+u+'"]').click();
24-
}
25-
</script>
26-
2721
The Open Buddhist University organizes [content from across the Web]({% link library.md %}) into free, self-directed syllabi on a variety of topics in Buddhist Studies.
2822

2923
## About Our Courses
@@ -51,98 +45,84 @@ This site may use cookies to enhance your experience, but you can turn this off
5145
{% assign course = site.courses | find: "slug", cslug %}
5246
{% assign courseware = site.content | where: "course", cslug %}
5347
{% assign booklets = courseware | where: "category", "booklets" %}
54-
{% assign textbooks = courseware | where: "category", "monographs" | concat: booklets %}
48+
{% assign textbooks = courseware | where: "category", "monographs" | concat: booklets | sort: "course_mins", "first" | reverse %}
5549
{% assign bauthors = '' | split: '' %}
56-
{% for b in textbooks %}{% assign tbas = b.authors %}{% unless tbas.size > 3%}{% for tba in tbas %}{% unless bauthors contains tba %}{% assign bauthors = bauthors | push: tba %}{% endunless %}{% endfor %}{% endunless %}{% endfor %}
50+
{% for b in textbooks %}{% assign tbas = b.authors %}{% unless tbas.size > 3%}{% for tba in tbas %}{% unless bauthors contains tba %}{% assign bauthors = bauthors | push: tba %}{% break %}{% endunless %}{% endfor %}{% endunless %}{% endfor %}
51+
{% if bauthors.size >= 5 %}{% assign bauthors = bauthors | slice: 0, 3 | push: "others" %}{% endif %}
5752
{% capture onclick %}onclick="location.href='{{ course.url }}'"{% endcapture %}
58-
<h3 id="{{ course.slug }}" class="courselink"><a href="{{ course.url }}">{{ course.title }}</a></h3>
59-
<div class="coursedesc">
60-
<div class="descrow">
61-
<div {{onclick}} class="cicon"><i class="{{ course.icon }}"></i></div>
62-
<div class="cdesc">{{ course.description | markdownify }}</div>
63-
<div class="ccredits"><i class="far fa-clock"></i><br>&#126;{{ courseware | map: "course_mins" | sum | times: course.course_time_multiplier | divided_by: 600.0 | round | times: 10 }} hrs</div>
64-
</div>
65-
<div class="featuringrow">
66-
<div class="flabel"><strong>Featuring</strong>:</div>
67-
{% if course.lecturers %}<div class="lecturers"><i class="fas fa-person-chalkboard"></i> {% include_cached content_authors_string.html link=true authors=course.lecturers %}</div>{% endif %}
68-
{% if bauthors.size > 0 %}<div class="bauthors"><i class="far fa-address-book"></i> {% include_cached content_authors_string.html link=true authors=bauthors %}</div>{% endif %}
69-
</div>
70-
</div>
71-
53+
{% assign time = courseware | map: "course_mins" | sum | times: course.course_time_multiplier | divided_by: 600.0 | round | times: 10 %}
54+
{% include course-card.html slug=course.slug url=course.url title=course.title icon=course.icon description=course.description time=time lecturers=course.lecturers bauthors=bauthors %}
7255
{% endfor %}
7356

7457
## External Courses
7558

7659
Courses hosted on other websites.
77-
{% comment %}Note that the .courselink classes below are used by buggytrack.js{% endcomment %}
78-
### [The Arahant and the Four Noble Truths](https://agamaresearch.dila.edu.tw/wp-content/uploads/2014/06/lectures2012.htm){:ga-event-value="0.6" data-content-authors="analayo"}
79-
{:.courselink}
80-
81-
<div class="coursedesc">
82-
<div class="descrow">
83-
<div onclick="goto('https://agamaresearch.dila.edu.tw/wp-content/uploads/2014/06/lectures2012.htm')" class="cicon"><i class="fas fa-mountain"></i></div>
84-
<div class="cdesc">The prequel course to Ven. Analayo's <i>Tranquility and Insight</i> course above, this 11 lecture series covers Madhyama-āgama Chapters 3 and 4, centering on the Venerable Arahants at the time of the Buddha.</div>
85-
<div class="ccredits"><i class="far fa-clock"></i><br> ~20 hrs</div>
86-
</div>
87-
</div>
88-
89-
### [An Introduction to Classical Tibetan](https://www.nettletibetan.ca/){:ga-event-value="0.5" data-content-authors="Frances Garrett"}
90-
{:.courselink}
91-
92-
<div class="coursedesc">
93-
<div class="descrow">
94-
<div onclick="goto('https://www.nettletibetan.ca/')" class="cicon"><i class="fas fa-cable-car"></i></div>
95-
<div class="cdesc">Two courses introducing the Tibetan Language courtesy of the University of Toronto, taking you from identifying words all the way up to translating your first Buddhist text. <b>Note</b>: This class assumes prior comfort with <a target="_blank" href="https://en.wikipedia.org/wiki/Tibetan_script">the Tibetan script</a>. If that's not you, see e.g. <i>Translating Buddhism from Tibetan</i> Ch.1–8 before taking this course.</div>
96-
<div class="ccredits"><i class="far fa-clock"></i><br> ~160 hrs</div>
97-
</div>
98-
</div>
99-
100-
101-
### [Shin Buddhism in Modern Culture](https://bschawaii.org/shindharmanet/course/){:ga-event-value="1.5"}
102-
{:.courselink}
103-
104-
<div class="coursedesc">
105-
<div class="descrow">
106-
<div onclick="goto('https://bschawaii.org/shindharmanet/course/')" class="cicon"><i class="fas fa-street-view"></i></div>
107-
<div class="cdesc">A short, interactive overview of Jodo Shinshu, from Shinran's life to Japanese Buddhism in the modern United States.</div>
108-
<div class="ccredits"><i class="far fa-clock"></i><br> ~30 hrs</div>
109-
</div>
110-
</div>
111-
112-
### [Human Behavioral Biology](https://youtube.com/playlist?list=PL848F2368C90DDC3D){:ga-event-value="3" data-content-authors="Robert Sapolsky"}
113-
{:.courselink}
114-
115-
<div class="coursedesc">
116-
<div class="descrow">
117-
<div onclick="goto('https://youtube.com/playlist?list=PL848F2368C90DDC3D')" class="cicon"><i class="fas fa-person-circle-exclamation"></i></div>
118-
<div class="cdesc">Robert Sapolsky's classic Stanford course explains what makes people tick and should be considered required watching for anyone who interacts with humans. This lecture series would go on to become the 2017 NYT best-seller, <i>Behave: The Biology of Humans at Our Best and Worse</i>.</div>
119-
<div class="ccredits"><i class="far fa-clock"></i><br> ~40 hrs</div>
120-
</div>
121-
</div>
122-
123-
### [Modern and Contemporary American Poetry](https://www.coursera.org/learn/modpo){:ga-event-value="3" data-content-authors="Al Filreis"}
124-
{:.courselink}
125-
126-
<div class="coursedesc">
127-
<div class="descrow">
128-
<div onclick="goto('https://www.coursera.org/learn/modpo')" class="cicon"><i class="fas fa-feather-alt"></i></div>
129-
<div class="cdesc">An excellent introduction to 20th Century, American poetry from the University of Pennsylvania's graduate school, "ModPo" teaches you not just the history of the poems, but how to read them.
130-
This course is highly recommended for anyone who likes poetry, but who never "got" that modern stuff.</div>
131-
<div class="ccredits"><i class="far fa-clock"></i><br> ~90 hrs</div>
132-
</div>
133-
</div>
134-
135-
### [The Making of Modern Ukraine](https://youtube.com/playlist?list=PLh9mgdi4rNewfxO7LhBoz_1Mx1MaO6sw_){:ga-event-value="2" data-content-authors="Timothy Snyder"}
136-
{:.courselink}
137-
138-
<div class="coursedesc">
139-
<div class="descrow">
140-
<div onclick="goto('https://youtube.com/playlist?list=PLh9mgdi4rNewfxO7LhBoz_1Mx1MaO6sw_')" class="cicon"><i class="fac-ukraine"></i></div>
141-
<div class="cdesc">Professor Timothy Snyder gives the deep history of Eastern Europe and the formation of the Ukrainian nation, discussing along the way the big question of why we should study history at all.
142-
Be sure to check out <a href="https://snyder.substack.com/p/syllabus-of-my-ukraine-lecture-class" target="_blank">the course syllabus too</a> as the readings are an important part of the course.</div>
143-
<div class="ccredits"><i class="far fa-clock"></i><br> ~40 hrs</div>
144-
</div>
145-
</div>
60+
{% assign authors = "analayo" | split: "," %}
61+
{% include course-card.html
62+
url="https://agamaresearch.dila.edu.tw/wp-content/uploads/2014/06/lectures2012.htm"
63+
value="0.6"
64+
title="The Arahant and the Four Noble Truths"
65+
icon="fas fa-mountain"
66+
description="The prequel course to Ven. Analayo's <i>Tranquility and Insight</i> course above, this 11 lecture series covers Madhyama-āgama Chapters 3 and 4, centering on the Venerable Arahants at the time of the Buddha."
67+
time="20"
68+
lecturers=authors
69+
%}
70+
71+
{% assign authors = "Frances Garret" | split: "," %}
72+
{% include course-card.html
73+
url="https://www.nettletibetan.ca/"
74+
value="0.5"
75+
title="An Introduction to Classical Tibetan"
76+
icon="fas fa-cable-car"
77+
description='Two courses introducing the Tibetan Language courtesy of the University of Toronto, taking you from identifying words all the way up to translating your first Buddhist text. <b>Note</b>: This class assumes prior comfort with the Tibetan script. If that\'s not you, see e.g. <i>Translating Buddhism from Tibetan</i> Ch.1–8 before taking this course.'
78+
time="160"
79+
lecturers=authors
80+
%}
81+
82+
{% include course-card.html
83+
url="https://bschawaii.org/shindharmanet/course/"
84+
value="0.5"
85+
title="Shin Buddhism in Modern Culture"
86+
icon="fas fa-street-view"
87+
description="A short, interactive overview of Jodo Shinshu, from Shinran's life to Japanese Buddhism in the modern United States."
88+
time="30"
89+
%}
90+
91+
92+
{% assign authors = "Robert Sapolsky" | split: "," %}
93+
{% include course-card.html
94+
url="https://youtube.com/playlist?list=PL848F2368C90DDC3D"
95+
value="3"
96+
title="Human Behavioral Biology"
97+
icon="fas fa-person-circle-exclamation"
98+
description="Robert Sapolsky's classic Stanford course explains what makes people tick and should be considered required watching for anyone who interacts with humans. This lecture series would go on to become the 2017 NYT best-seller, <i>Behave: The Biology of Humans at Our Best and Worse</i>."
99+
time="40"
100+
lecturers=authors
101+
%}
102+
103+
104+
{% assign authors = "Al Filreis" | split: "," %}
105+
{% include course-card.html
106+
url="https://www.coursera.org/learn/modpo"
107+
value="3"
108+
title="Modern and Contemporary American Poetry"
109+
icon="fas fa-feather-alt"
110+
description='An excellent introduction to 20th Century, American poetry from the University of Pennsylvania graduate school, "ModPo" teaches you not just the history of the poems, but how to read them. This course is highly recommended for anyone who likes poetry, but who never "got" that modern stuff.'
111+
time="90"
112+
lecturers=authors
113+
%}
114+
115+
116+
{% assign authors = "Timothy Snyder" | split: "," %}
117+
{% include course-card.html
118+
url="https://youtube.com/playlist?list=PLh9mgdi4rNewfxO7LhBoz_1Mx1MaO6sw_"
119+
value="2"
120+
title="The Making of Modern Ukraine"
121+
icon="fac-ukraine"
122+
description='Professor Timothy Snyder gives the deep history of Eastern Europe and the formation of the Ukrainian nation, discussing along the way the big question of why we should study history at all. Be sure to check out the course syllabus in addition to the lectures as the readings are an important part of the course.'
123+
time="40"
124+
lecturers=authors
125+
%}
146126

147127
## Open Courseware @MIT
148128

0 commit comments

Comments
 (0)