Skip to content

Commit 37c2e32

Browse files
Add trophy case styles
1 parent 10f7919 commit 37c2e32

2 files changed

Lines changed: 46 additions & 8 deletions

File tree

profiles/templates/profiles/profile.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,14 @@
4242
{% endif %}
4343
</div>
4444
</div>
45-
<div class="card mt-3 trophy-case">
46-
<div class="p-3">
47-
<label class="w-100">Hackathon Badges</label>
45+
<div class="card mt-3 trophy-case justify-content-center">
46+
<div class="p-0">
47+
<label class="w-100 text-center p-1" style="font-size: larger; font-weight: 800;">Trophy Case</label>
48+
<hr class="m-0 mb-1">
4849
{% for team in user.get_participated_teams %}
4950
{% if team.hackathon.badge_url %}
50-
51-
<img class="card-img-top profile-image" src="{{ team.hackathon.badge_url }}" alt="Hackathon badge" style="height: 70px; width: 70px;" data-toggle="modal" data-target="#badgeModal" data-badge-url="{{ team.hackathon.badge_url }}">
51+
<img class="card-img-top profile-image hack-badge ml-3" src="{{ team.hackathon.badge_url }}" alt="Hackathon badge" style="height: 75px; width: 75px;" data-toggle="modal" data-target="#badgeModal" data-badge-url="{{ team.hackathon.badge_url }}">
52+
5253
{% endif %}
5354
{% endfor %}
5455
</div>

static/css/profile.css

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ html form label,
7373

7474
.trophy-case {
7575
background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
76-
border: 2px solid #d1d1d1;
76+
border: 2px solid var(--p-orange);
7777
border-radius: 10px;
7878
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
7979
padding: 20px;
8080
margin-top: 20px;
81+
box-shadow: 0 4px 8px darkgray;
8182
position: relative;
83+
overflow: hidden; /* Ensure the shine effect doesn't overflow the card */
8284
}
8385

8486
.trophy-case::before {
@@ -89,7 +91,7 @@ html form label,
8991
transform: translateX(-50%);
9092
width: 60px;
9193
height: 10px;
92-
background: #d1d1d1;
94+
background: var(--p-orange);
9395
border-radius: 5px 5px 0 0;
9496
}
9597

@@ -101,12 +103,47 @@ html form label,
101103
transform: translateX(-50%);
102104
width: 60px;
103105
height: 10px;
104-
background: #d1d1d1;
106+
background: var(--p-orange);
105107
border-radius: 0 0 5px 5px;
106108
}
107109

108110
.trophy-case .card-img-top {
109111
border: 2px solid #d1d1d1;
110112
border-radius: 5px;
111113
margin: 5px;
114+
}
115+
116+
.trophy-case::before,
117+
.trophy-case::after {
118+
transition: all 0.3s ease;
119+
}
120+
121+
.trophy-case:hover::before,
122+
.trophy-case:hover::after {
123+
background: #b0e0e6;
124+
}
125+
126+
.trophy-case::before {
127+
content: '';
128+
position: absolute;
129+
top: 0;
130+
left: -75%;
131+
width: 50%;
132+
height: 100%;
133+
background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1));
134+
transform: skewX(-25deg);
135+
transition: all 0.5s ease;
136+
}
137+
138+
.trophy-case:hover::before {
139+
left: 125%;
140+
transition: all 0.5s ease;
141+
}
142+
143+
.hack-badge {
144+
cursor: pointer;
145+
}
146+
147+
.hack-badge:hover {
148+
box-shadow: 0px 2px 4px 0px darkgray
112149
}

0 commit comments

Comments
 (0)