Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit 99476a8

Browse files
Addresses #68 and beyond
1 parent 55e98a0 commit 99476a8

File tree

5 files changed

+21
-42
lines changed

5 files changed

+21
-42
lines changed

app/frontmatter/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __str__(self):
1717

1818

1919
class LearningObjective(models.Model):
20-
frontmatter = models.ForeignKey(Frontmatter, on_delete=models.CASCADE)
20+
frontmatter = models.ForeignKey(Frontmatter, on_delete=models.CASCADE, related_name="learning_objectives")
2121
label = models.TextField(max_length=500)
2222

2323
def __str__(self):

app/workshop/templates/workshop/___base.html

Lines changed: 0 additions & 34 deletions
This file was deleted.

app/workshop/templates/workshop/frontmatter-elements/hero.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ <h1>{{ workshop.name }}</h1>
55
<div class="lead mt-4">
66
{{ workshop.frontmatter.abstract | markdown | safe }}
77
</div>
8+
9+
10+
{% if frontmatter.learning_objectives %}
11+
<div class="my-5">
12+
<hr class="pt-1" />
13+
<h4>In this workshop, you will learn how to</h4>
14+
{% for objective in frontmatter.learning_objectives.all %}
15+
<li>{{ objective }}</li>
16+
{% endfor %}
17+
</div>
18+
{% endif %}
19+
20+
821
<div class="d-flex align-items-end flex-column">
922
<a href="{% url 'workshop:frontmatter' workshop.slug %}lessons/1" type="button" class="btn btn-success btn-lg text-light">Get started</a>
1023
<span class="align-text-bottom mt-2 text-muted small">This workshop is estimated to take {{ frontmatter.estimated_time }} hours to complete.</span>

app/workshop/templates/workshop/frontmatter.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
{% if frontmatter.prerequisites.count and frontmatter.resources.count %}
2020
<div class="row pt-5">
2121

22-
<div class="col-12">
22+
<div class="col-12 pb-2">
2323
<h3>Before you start</h3>
2424
<div class="lead mt-4">
2525
Here is an introduction to the section "Before you start," and something about what it means.
@@ -51,8 +51,8 @@ <h4>Requirements</h4>
5151
{% endif %}
5252

5353

54-
<div class="row pt-5">
55-
<div class="col-12">
54+
<div class="row pt-5 rounded-sm">
55+
<div class="col-12 pb-2">
5656
<h3>Contexts</h3>
5757
<div class="lead mt-4">
5858
Here is an introduction to the section "Contexts," and something about what it means.
@@ -70,7 +70,7 @@ <h4>Ethical considerations</h4>
7070

7171
{% if frontmatter.readings.count %}
7272
<div class="col-12 col-sm-4 mt-4 mt-md-2 overflow-hidden">
73-
<h4>Readings</h4>
73+
<h4>Readings before you get started</h4>
7474
<hr />
7575
<p style="font-size:1.05rem;">Here is an introductory paragraph about what the following readings are. It might contain <a href="">a link</a> to our "library" for the curriculum website, which can contain all kinds of information.</p>
7676
{% for reading in frontmatter.readings.all %}
@@ -87,7 +87,7 @@ <h4>Readings</h4>
8787

8888
{% if frontmatter.projects.count %}
8989
<div class="col-12 col-sm-4 mt-4 mt-md-2 overflow-hidden">
90-
<h4>Project related to {{ workshop.name }}</h4>
90+
<h4>Projects related to {{ workshop.name }}</h4>
9191
<hr />
9292
<p style="font-size:1.05rem;">Here is an introductory paragraph about what the following projects are and why they are listed here. It might contain <a href="">a link</a> to our "library" for the curriculum website, which can contain all kinds of information.</p>
9393
{% for project in frontmatter.projects.all %}

app/workshop/templates/workshop/workshop-wide-elements/navbar.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<div class="py-4">
44
<nav class="navbar navbar-expand-lg navbar-light bg-light" style="border-radius: 1rem !important;">
5-
<a class="navbar-brand pr-4" href="#">{{ workshop.name }}</a>
5+
<a class="navbar-brand pr-4" href="{% url 'workshop:frontmatter' slug=workshop.slug %}">{{ workshop.name }}</a>
66
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
77
<span class="navbar-toggler-icon"></span>
88
</button>
@@ -41,7 +41,7 @@
4141
</li>
4242
</ul>
4343
<div>
44-
<a href="{% url 'workshop:index' %}">&laquo; Back to all workshops</a>
44+
<a href="{% url 'workshop:index' %}" type="button" class="btn btn-secondary">Back to Workshops</a>
4545
</div>
4646
</div>
4747
</nav>

0 commit comments

Comments
 (0)