Skip to content

Commit 5b8997e

Browse files
authored
Merge pull request #74 from cmu-delphi/OKRS24-52-Redesign-Signal-Card
Okrs24 52 redesign signal card
2 parents 321620c + c38a269 commit 5b8997e

File tree

6 files changed

+314
-177
lines changed

6 files changed

+314
-177
lines changed

src/assets/css/custom.css

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,51 +30,60 @@
3030
}
3131
}
3232

33+
.hover-shadow:hover {
34+
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
35+
}
36+
.clickable-card {
37+
cursor: pointer;
38+
}
3339

34-
/* #navbarNav {
40+
#navbarNav {
3541
padding-left: 5%;
3642
}
3743

38-
.navbar-logo {
39-
padding-left: 5%;
44+
.margin-bottom-1rem {
45+
margin-bottom: 1rem;
4046
}
4147

42-
#main {
48+
.margin-top-1rem {
4349
margin-top: 1rem;
4450
}
4551

46-
.no-padding {
47-
padding: 0;
52+
.margin-bottom-0 {
53+
margin-bottom: 0;
4854
}
4955

5056
.no-margin {
5157
margin: 0;
5258
}
5359

54-
.margin-bottom {
55-
margin-bottom: 1rem;
60+
.text-left-center {
61+
display: block;
62+
margin: auto 0;
63+
text-align: left !important;
5664
}
5765

58-
.signals-list {
59-
margin-right: 0.5rem;
66+
.no-padding {
67+
padding: 0;
6068
}
61-
*/
6269

70+
.border-left {
71+
border-left: 1px solid #e4e4e4;
72+
}
6373

64-
.clickable-table-row {
65-
cursor: pointer;
74+
.full-text {
75+
display: none;
6676
}
6777

68-
#navbarNav {
69-
padding-left: 5%;
78+
.hidden {
79+
display: none;
7080
}
7181

72-
.margin-bottom {
73-
margin-bottom: 1rem;
82+
.related-link-card {
83+
margin-right: 1rem;
84+
margin-left: 1rem;
7485
}
7586

76-
.text-left-center {
77-
display: block;
78-
margin: auto 0;
79-
text-align: left !important;
87+
.padding-top-1rem {
88+
padding-top: 1rem;
8089
}

src/base/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class LinkTypeChoices(models.TextChoices):
1818
WAVE_10_REVISION = 'wave_10_revision', _('Wave 10 revision updates')
1919
WAVE_11_REVISION = 'wave_11_revision', _('Wave 11 revision updates')
2020
OTHER = 'other', _('Other')
21+
EXAMPLE_URL = 'example_url', _('Example URL')
2122

2223

2324
class Link(TimeStampedModel):

src/signals/models.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,11 @@ class Signal(TimeStampedModel):
241241
on_delete=models.PROTECT,
242242
)
243243

244+
@property
245+
def example_url(self):
246+
example_url = self.links.filter(link_type="example_url").first()
247+
return example_url.url if example_url else None
248+
244249
class Meta:
245250
unique_together = ['name', 'source']
246251
ordering: list[str] = ["modified"]

src/templates/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
<link href="{% static 'css/style.css' %}" rel="stylesheet" />
3232
<link href="{% static 'css/custom.css' %}" rel="stylesheet" />
3333

34-
<script src="{% static "js/htmx.min.js" %}"></script>
34+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
35+
<script src="{% static 'js/htmx.min.js' %}"></script>
3536
</head>
3637

3738
<body>

0 commit comments

Comments
 (0)