Skip to content

Commit c7a2598

Browse files
committed
Improve aesthetics of learning resources and labels
1 parent dad5166 commit c7a2598

2 files changed

Lines changed: 23 additions & 17 deletions

File tree

apps/learn/static/learn/css/main.scss

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@ ul {
4343

4444
.learn-resources_by_label {
4545
a.resource {
46+
font-weight: bold;
4647
margin-right: 1rem;
4748
}
4849

49-
ul.resources {
50-
li {
51-
list-style: initial;
52-
margin-left: 20px;
53-
}
50+
a.label {
51+
margin-right: 5px;
52+
}
53+
54+
table.resources {
55+
background-color: initial;
5456
}
5557
}

apps/learn/templates/learn/resources_by_label.html

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,23 @@
1717

1818
<h1 class="title"><i class="fas fa-tag"></i> {{ label }}</h1>
1919

20-
<ul class="resources">
20+
<table class="table resources">
2121
{% for resource in resources %}
22-
<li>
23-
<a class="resource" href="{{ resource.url }}">{{ resource }}</a>
24-
{% for label in resource.labels.all %}
25-
<a class="label"
26-
style="background-color: #{{ label.color }}; color: #{{ label.foreground_color }}"
27-
href="{% url "learn:resources_by_label" label=label %}">
28-
{{ label }}
29-
</a>
30-
{% endfor %}
31-
</li>
22+
<tr>
23+
<td>
24+
<a class="resource" href="{{ resource.url }}">{{ resource }}</a>
25+
</td>
26+
<td>
27+
{% for label in resource.labels.all %}
28+
<a class="label"
29+
style="background-color: #{{ label.color }}; color: #{{ label.foreground_color }}"
30+
href="{% url "learn:resources_by_label" label=label %}">
31+
{{ label }}
32+
</a>
33+
{% endfor %}
34+
</td>
35+
</tr>
3236
{% endfor %}
33-
</ul>
37+
</table>
3438

3539
{% endblock content %}

0 commit comments

Comments
 (0)