Skip to content

Commit dda3035

Browse files
Polish redesign UI and demo catalog
1 parent d219dff commit dda3035

20 files changed

Lines changed: 1543 additions & 97 deletions

cadmin/templates/cadmin/homework_submissions.html

Lines changed: 205 additions & 18 deletions
Large diffs are not rendered by default.

cadmin/templates/cadmin/project_submissions.html

Lines changed: 326 additions & 19 deletions
Large diffs are not rendered by default.

courses/static/courses.css

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,9 @@ header nav li:not(:last-child) {
207207
}
208208

209209
.breadcrumbs ul li a {
210-
max-width: 200px;
211-
overflow: hidden;
212-
text-overflow: ellipsis;
213210
display: inline-block;
214211
vertical-align: middle;
212+
white-space: normal;
215213
}
216214

217215
/* Add ">" before each li except the first one using a pseudo-element */
@@ -248,19 +246,31 @@ header nav > div:last-child ul li {
248246
/* Questions */
249247
.form-check-label {
250248
display: inline;
251-
color: #57606a;
249+
color: var(--text-primary);
250+
flex: 1;
251+
line-height: 1.35;
252252
}
253253

254254
.form-check {
255255
align-items: flex-start;
256256
display: flex;
257-
gap: 0.5rem;
258-
min-height: 1.5rem;
257+
gap: 0.4rem;
258+
min-height: 2rem;
259259
}
260260

261261
.form-check-input {
262262
flex: 0 0 auto;
263-
margin-top: 0.2rem;
263+
margin-top: 0.15rem;
264+
}
265+
266+
.question .space-y-2 > :not([hidden]) ~ :not([hidden]) {
267+
margin-top: 0.25rem !important;
268+
}
269+
270+
@media (max-width: 640px) {
271+
.form-check {
272+
min-height: 2rem;
273+
}
264274
}
265275

266276
.form-control {
@@ -493,6 +503,36 @@ form select {
493503
font-weight: 500;
494504
}
495505

506+
.course-list-thumb {
507+
align-items: center;
508+
aspect-ratio: 4 / 3;
509+
background:
510+
linear-gradient(135deg, rgba(49, 95, 143, 0.1), rgba(31, 111, 66, 0.1)),
511+
var(--bg-subtle);
512+
color: var(--text-muted);
513+
display: flex;
514+
font-size: 1.5rem;
515+
font-weight: 700;
516+
justify-content: center;
517+
}
518+
519+
.metric-row {
520+
display: grid;
521+
gap: 0.25rem;
522+
grid-template-columns: minmax(0, 1fr) auto;
523+
}
524+
525+
.metric-row + .metric-row {
526+
border-top: 1px solid var(--border-color);
527+
padding-top: 0.75rem;
528+
}
529+
530+
.submission-card-meta {
531+
display: grid;
532+
gap: 0.75rem;
533+
grid-template-columns: repeat(2, minmax(0, 1fr));
534+
}
535+
496536
.cadmin-meta-grid > * {
497537
padding: 0.75rem !important;
498538
}
@@ -762,7 +802,7 @@ body.dark-mode [class*="text-red-700"] {
762802
display: inline-flex;
763803
font-weight: 400;
764804
min-width: 0;
765-
padding: 0.2rem 0;
805+
padding: 0.1rem 0;
766806
}
767807

768808
.option-answer-incorrect {
@@ -774,11 +814,11 @@ body.dark-mode [class*="text-red-700"] {
774814
display: inline-flex;
775815
font-weight: 400;
776816
min-width: 0;
777-
padding: 0.2rem 0;
817+
padding: 0.1rem 0;
778818
}
779819

780820
.option-answer-none {
781-
padding: 0.2rem 0;
821+
padding: 0.1rem 0;
782822
}
783823

784824
.option-answer-correct .form-check-label,

courses/static/local_date.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ document.addEventListener('DOMContentLoaded', function() {
1414
var hours = formattedDate.getHours().toString().padStart(2, '0');
1515
var minutes = formattedDate.getMinutes().toString().padStart(2, '0');
1616

17-
date.textContent = day + ' ' + month + ' ' + year + ', ' + hours + ':' + minutes;
17+
var timezone = '';
18+
if (date.dataset.showTimezone === 'true') {
19+
var timezoneName = formattedDate.toLocaleTimeString(undefined, { timeZoneName: 'short' }).split(' ').pop();
20+
timezone = timezoneName ? ' (' + timezoneName + ')' : '';
21+
}
22+
23+
date.textContent = day + ' ' + month + ' ' + year + ', ' + hours + ':' + minutes + timezone;
1824
date.setAttribute('datetime', originalValue);
1925
});
2026
});
Lines changed: 73 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,73 @@
1-
{% extends 'base.html' %} {% block content %}
2-
<section class="max-w-4xl py-8 md:py-14"> <h1 class="max-w-3xl text-4xl font-semibold leading-tight tracking-normal sm:text-5xl md:text-6xl"> Learn Data Engineering.<br> For Free. Together. </h1> <p class="mt-5 max-w-2xl text-lg leading-7 app-text md:mt-6 md:text-xl md:leading-8"> Free, community-created courses to help you learn modern data skills and build real-world projects. </p> <a href="#courses" class="mt-6 inline-flex items-center text-lg font-medium app-link app-link md:mt-8 md:text-xl"> View all courses <span class="ml-2" aria-hidden="true">&rarr;</span> </a>
3-
</section> {% if SHOW_WRAPPED %}
4-
<section class="mb-12 border-y app-border py-8"> <div class="max-w-3xl"> <h2 class="text-2xl font-semibold">DataTalks.Club Wrapped 2025</h2> <p class="mt-3 text-lg leading-7 app-text"> Check out your year of learning in review: statistics, course progress, and your 2025 leaderboard rank. </p> <a href="{% url 'wrapped' 2025 %}" class="mt-5 inline-flex items-center rounded-md border app-border px-5 py-3 font-medium app-link hover:border-blue-600"> View your 2025 wrapped <span class="ml-2" aria-hidden="true">&rarr;</span> </a> </div>
5-
</section>
6-
{% endif %} <div id="courses" class="space-y-10 border-t app-border pt-9 md:space-y-12 md:pt-12"> <section> <h2 class="text-2xl font-semibold md:text-3xl">Start here</h2> <div class="mt-5 space-y-6 md:mt-6"> {% for course in active_courses %} {% if forloop.first %} <a href="{% url 'course' course.slug %}" class="group block max-w-2xl"> <span class="text-xl font-semibold app-link app-link md:text-2xl"> {{ course.title }} <span class="ml-2" aria-hidden="true">&rarr;</span> </span> <span class="mt-2 block max-w-xl text-base leading-7 app-text md:mt-3 md:text-lg"> {{ course.description|default:"Start learning with practical lessons, homework, projects, and peer review."|truncatewords:24 }} </span> </a> {% endif %} {% empty %} <p class="text-lg app-text">No active courses right now.</p> {% endfor %} </div> </section> <section class="border-t app-border pt-9 md:pt-12"> <h2 class="text-2xl font-semibold md:text-3xl">More courses</h2> <div class="mt-5 space-y-7 md:mt-6 md:space-y-8"> {% for course in active_courses %} {% if not forloop.first %} <a href="{% url 'course' course.slug %}" class="group block max-w-2xl"> <span class="text-xl font-semibold app-link app-link md:text-2xl"> {{ course.title }} <span class="ml-2" aria-hidden="true">&rarr;</span> </span> <span class="mt-2 block text-base leading-7 app-text md:text-lg"> {{ course.description|default:"Learn by building practical course projects."|truncatewords:18 }} </span> </a> {% endif %} {% endfor %} {% for course in finished_courses|slice:":2" %} <a href="{% url 'course' course.slug %}" class="group block max-w-2xl"> <span class="text-xl font-semibold app-link app-link md:text-2xl"> {{ course.title }} <span class="ml-2" aria-hidden="true">&rarr;</span> </span> <span class="mt-2 block text-base leading-7 app-text md:text-lg"> {{ course.description|default:"Course materials remain available for self-paced study."|truncatewords:18 }} </span> </a> {% endfor %} </div> </section> <section class="border-t app-border pt-9 md:pt-12"> <h2 class="text-2xl font-semibold md:text-3xl">All courses</h2> <div class="mt-6 grid gap-x-12 md:mt-8 md:grid-cols-2"> {% for course in active_courses %} <a href="{% url 'course' course.slug %}" class="group flex items-center justify-between border-b app-border py-4 text-lg font-medium app-link app-link md:text-xl"> <span>{{ course.title }}</span> <span aria-hidden="true">&rarr;</span> </a> {% endfor %} {% for course in finished_courses %} <a href="{% url 'course' course.slug %}" class="group flex items-center justify-between border-b app-border py-4 text-lg font-medium app-link app-link md:text-xl"> <span>{{ course.title }}</span> <span aria-hidden="true">&rarr;</span> </a> {% endfor %} </div> </section>
7-
</div> {% endblock %}
1+
{% extends 'base.html' %}
2+
{% block content %}
3+
<section class="max-w-3xl py-6 md:py-10">
4+
<h1 class="text-3xl font-semibold leading-tight tracking-normal sm:text-4xl md:text-5xl">
5+
Learn data skills. For free. Together.
6+
</h1>
7+
<p class="mt-4 max-w-2xl text-base leading-7 app-text md:text-lg md:leading-8">
8+
Free, community-created courses in data, analytics, engineering, machine learning, and practical projects.
9+
</p>
10+
</section>
11+
{% if SHOW_WRAPPED %}
12+
<section class="mb-8 border-y app-border py-6">
13+
<div class="max-w-3xl">
14+
<h2 class="text-xl font-semibold md:text-2xl">DataTalks.Club Wrapped 2025</h2>
15+
<p class="mt-2 text-base leading-7 app-text">
16+
Check out your year of learning in review: statistics, course progress, and your 2025 leaderboard rank.
17+
</p>
18+
<a href="{% url 'wrapped' 2025 %}"
19+
class="mt-4 inline-flex items-center font-medium app-link">
20+
View your 2025 wrapped <span class="ml-2" aria-hidden="true">&rarr;</span>
21+
</a>
22+
</div>
23+
</section>
24+
{% endif %}
25+
<div id="courses" class="border-t app-border pt-8">
26+
<section>
27+
<div class="flex flex-col gap-2 md:flex-row md:items-end md:justify-between">
28+
<div>
29+
<h2 class="text-2xl font-semibold md:text-3xl">Courses</h2>
30+
<p class="mt-1 text-sm app-muted">Browse active courses and the course archive.</p>
31+
</div>
32+
</div>
33+
<div class="mt-6 divide-y app-divide">
34+
{% for course in active_courses %}
35+
<a href="{% url 'course' course.slug %}"
36+
class="group grid gap-4 py-5 md:grid-cols-[minmax(0,1fr)_auto] md:items-start">
37+
<div class="min-w-0">
38+
<div class="flex flex-wrap items-center gap-2">
39+
<h3 class="text-xl font-semibold app-link md:text-2xl">{{ course.title }}</h3>
40+
<span class="inline-flex rounded-md app-badge-success px-2 py-0.5 text-xs font-semibold uppercase">Active</span>
41+
</div>
42+
<p class="mt-2 max-w-3xl text-base leading-7 app-text">
43+
{{ course.description|default:"Practical lessons, homework, projects, and peer review."|truncatewords:30 }}
44+
</p>
45+
</div>
46+
<span class="hidden text-xl app-link md:block" aria-hidden="true">&rarr;</span>
47+
</a>
48+
{% empty %}
49+
<p class="py-5 text-base app-text">No active courses right now.</p>
50+
{% endfor %}
51+
</div>
52+
</section>
53+
{% if finished_courses %}
54+
<section class="mt-8 border-t app-border pt-8">
55+
<h2 class="text-xl font-semibold md:text-2xl">Course archive</h2>
56+
<div class="mt-4 divide-y app-divide">
57+
{% for course in finished_courses %}
58+
<a href="{% url 'course' course.slug %}"
59+
class="group flex items-start justify-between gap-4 py-4">
60+
<div class="min-w-0">
61+
<h3 class="text-lg font-semibold app-link md:text-xl">{{ course.title }}</h3>
62+
<p class="mt-1 max-w-3xl text-sm leading-6 app-text md:text-base">
63+
{{ course.description|default:"Course materials remain available for self-paced study."|truncatewords:24 }}
64+
</p>
65+
</div>
66+
<span class="shrink-0 app-link" aria-hidden="true">&rarr;</span>
67+
</a>
68+
{% endfor %}
69+
</div>
70+
</section>
71+
{% endif %}
72+
</div>
73+
{% endblock %}

0 commit comments

Comments
 (0)