Skip to content

Commit e19dd94

Browse files
Aesthetic improvements: cards, urgency colours, gradient strip, toggle buttons (#16)
- Conference entries now render as white cards with a subtle border, border-radius, and hover lift (box-shadow + translateY) for depth - Timer colour reflects urgency: red < 7 days, amber < 30 days, green otherwise - Top strip replaced with a blue-to-purple gradient for a modern look - Sort buttons styled as a connected toggle group (shared border, rounded ends) - Conf title font weight bumped to 600, border-bottom removed, blue hover colour
1 parent 14aa08d commit e19dd94

3 files changed

Lines changed: 67 additions & 6 deletions

File tree

static/css/deadlines.css

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ body *::selection {
5050
}
5151

5252
.top-strip {
53-
background-color: #333;
54-
height: 0.25em;
53+
background: linear-gradient(90deg, #007bff 0%, #6610f2 100%);
54+
height: 4px;
5555
width: 100%;
5656
}
5757

@@ -140,9 +140,33 @@ footer {
140140
margin-bottom: 5px;
141141
}
142142

143+
.conf {
144+
background: #fff;
145+
border: 1px solid #e8ecf0;
146+
border-radius: 8px;
147+
padding: 14px 18px 6px;
148+
margin-bottom: 10px;
149+
transition: box-shadow 0.18s ease, transform 0.18s ease;
150+
}
151+
152+
.conf:hover {
153+
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.09);
154+
transform: translateY(-1px);
155+
}
156+
157+
.conf hr {
158+
display: none;
159+
}
160+
143161
.conf-title {
144-
font-size: 16px;
145-
font-weight: 500;
162+
font-size: 17px;
163+
font-weight: 600;
164+
border-bottom: none;
165+
transition: color 0.15s ease;
166+
}
167+
168+
.conf-title:hover {
169+
color: #007bff;
146170
}
147171

148172
.tagtitle {
@@ -230,6 +254,18 @@ footer {
230254
font-weight: 500;
231255
}
232256

257+
.timer.urgent {
258+
color: #dc3545;
259+
}
260+
261+
.timer.warning {
262+
color: #fd7e14;
263+
}
264+
265+
.timer.ok {
266+
color: #28a745;
267+
}
268+
233269
#conf-timer {
234270
font-size: 72px;
235271
color: #444;

static/css/styles.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,24 @@ h2 .evtname {
1717
vertical-align: middle;
1818
}
1919

20+
.sort-btn {
21+
border-radius: 0 !important;
22+
margin-left: -1px;
23+
}
24+
25+
.sort-btn[data-sort="deadline"] {
26+
border-radius: 4px 0 0 4px !important;
27+
margin-left: 0;
28+
}
29+
30+
.sort-btn[data-sort="event-date"] {
31+
border-radius: 0 4px 4px 0 !important;
32+
}
33+
2034
.sort-btn.active-sort {
2135
background-color: #337ab7;
2236
color: #fff;
2337
border-color: #2e6da4;
38+
z-index: 1;
39+
position: relative;
2440
}

static/js/main.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,18 @@ $(function() {
5757
if (confDeadline) {
5858
function make_update_countdown_fn(confDeadline) {
5959
return function(event) {
60-
diff = moment() - confDeadline
60+
diff = moment() - confDeadline;
6161
if (diff <= 0) {
62-
$(this).html(event.strftime('%D days %Hh %Mm %Ss'));
62+
$(this).html(event.strftime('%D days %Hh %Mm %Ss'));
63+
var daysLeft = -diff / 86400000;
64+
$(this).removeClass('urgent warning ok');
65+
if (daysLeft < 7) {
66+
$(this).addClass('urgent');
67+
} else if (daysLeft < 30) {
68+
$(this).addClass('warning');
69+
} else {
70+
$(this).addClass('ok');
71+
}
6372
} else {
6473
$(this).html(confDeadline.fromNow());
6574
}

0 commit comments

Comments
 (0)