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

Commit

Permalink
Addresses #68 and beyond
Browse files Browse the repository at this point in the history
  • Loading branch information
kallewesterling committed Jun 25, 2020
1 parent 55e98a0 commit 99476a8
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 42 deletions.
2 changes: 1 addition & 1 deletion app/frontmatter/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __str__(self):


class LearningObjective(models.Model):
frontmatter = models.ForeignKey(Frontmatter, on_delete=models.CASCADE)
frontmatter = models.ForeignKey(Frontmatter, on_delete=models.CASCADE, related_name="learning_objectives")
label = models.TextField(max_length=500)

def __str__(self):
Expand Down
34 changes: 0 additions & 34 deletions app/workshop/templates/workshop/___base.html

This file was deleted.

13 changes: 13 additions & 0 deletions app/workshop/templates/workshop/frontmatter-elements/hero.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ <h1>{{ workshop.name }}</h1>
<div class="lead mt-4">
{{ workshop.frontmatter.abstract | markdown | safe }}
</div>


{% if frontmatter.learning_objectives %}
<div class="my-5">
<hr class="pt-1" />
<h4>In this workshop, you will learn how to</h4>
{% for objective in frontmatter.learning_objectives.all %}
<li>{{ objective }}</li>
{% endfor %}
</div>
{% endif %}


<div class="d-flex align-items-end flex-column">
<a href="{% url 'workshop:frontmatter' workshop.slug %}lessons/1" type="button" class="btn btn-success btn-lg text-light">Get started</a>
<span class="align-text-bottom mt-2 text-muted small">This workshop is estimated to take {{ frontmatter.estimated_time }} hours to complete.</span>
Expand Down
10 changes: 5 additions & 5 deletions app/workshop/templates/workshop/frontmatter.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{% if frontmatter.prerequisites.count and frontmatter.resources.count %}
<div class="row pt-5">

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


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

{% if frontmatter.readings.count %}
<div class="col-12 col-sm-4 mt-4 mt-md-2 overflow-hidden">
<h4>Readings</h4>
<h4>Readings before you get started</h4>
<hr />
<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>
{% for reading in frontmatter.readings.all %}
Expand All @@ -87,7 +87,7 @@ <h4>Readings</h4>

{% if frontmatter.projects.count %}
<div class="col-12 col-sm-4 mt-4 mt-md-2 overflow-hidden">
<h4>Project related to {{ workshop.name }}</h4>
<h4>Projects related to {{ workshop.name }}</h4>
<hr />
<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>
{% for project in frontmatter.projects.all %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

0 comments on commit 99476a8

Please sign in to comment.