Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Played with making the exercise list into cards #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 42 additions & 10 deletions exercises/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,51 @@ toc: true
permalink: /exercises/
---

<style>
.card {
background: #EEE;
margin: 1%;
border: 1px solid #DDD;
border-radius: 0.25em;
float: left;
width: 47%;
height: 5em;
}

.card > div {
padding: 0.5em;
}

a > .card {
color: #000 !important;
}

a > .card > div > small {
color: #666 !important;
}
</style>

Här är uppgifterna vi börjat jobba på hittils. De kommer i blandad ordning så använd taggarna som står vid sidan om varje uppgift för att hitta rätt!

<ul>
<div>
{% assign sitepages = site.pages | sort: 'title' %}
{% for sitepage in sitepages %}
{% if sitepage.type == 'exercise' %}
<li>
<a href="{{ site.baseurl }}{{ sitepage.url }}">{{ sitepage.title }}</a>

{% if sitepage.tags %}
({{ sitepage.tags | join: ', '}})
{% if sitepage.type == 'exercise' %}
<a href="{{ site.baseurl }}{{ sitepage.url }}">
<div class="card">
<div>
<b>{{ sitepage.title }}</b>
<br>
<small>
<i>
{% if sitepage.tags %}
{{ sitepage.tags | sort | join: ', '}}
{% endif %}
</i>
</small>
</div>
</div>
</a>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
</div>