Skip to content

Commit ac9c38e

Browse files
committed
Sponsor page dynamic sizing
1 parent 459a1bf commit ac9c38e

File tree

3 files changed

+46
-25
lines changed

3 files changed

+46
-25
lines changed

_includes/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<section class="section has-text-justified has-background-black-bis" id="about">
22
<div class="container">
33
<h2 class="title has-text-left has-text-white-ter is-size-2 has-text-weight-bold mgb-medium">
4-
Hi
4+
About Us
55
</h2>
66
<p>
77
We are the Cabrillo Robotics Club (CRC), a student-led organization based at Cabrillo College in Aptos,

_layouts/sponsors.html

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ <h1 class="title has-text-left is-size-1 has-text-weight-bold mgb-medium">
1919
</h1>
2020
<p class="description">
2121
Cabrillo Robotics Club depends on the generous support of our sponsors to continue our work in
22-
creating and improving robotic technology. We give our sincerest gratitude to the organizations who have
23-
supported us.
22+
creating and improving robotic technology. We give our sincerest gratitude to the organizations who
23+
have
24+
supported us.
2425
</p>
2526
</div>
2627

@@ -30,12 +31,16 @@ <h2 class="title has-text-left is-size-2 has-text-weight-bold mgb-medium" style=
3031
</h2>
3132
</div>
3233

33-
<div class="sponsor-thing">
34+
<div class="sponsor-grid">
3435
{% for sponsor in site.data.sponsors %}
3536
{% if sponsor.level == "lazer" %}
36-
<a href="{{sponsor.website}}">
37-
<img src="{{sponsor.logo}}" alt="{{sponsor.name}}" style="width:25%">
38-
</a>
37+
<div class="column">
38+
<div class="sponsor-card">
39+
<a href="{{sponsor.website}}">
40+
<img src="{{sponsor.logo}}" alt="{{sponsor.name}}">
41+
</a>
42+
</div>
43+
</div>
3944
{% endif %}
4045
{% endfor %}
4146
</div>
@@ -46,12 +51,16 @@ <h2 class="title has-text-left is-size-2 has-text-weight-bold mgb-medium" style=
4651
</h2>
4752
</div>
4853

49-
<div class="sponsor-thing">
54+
<div class="sponsor-grid">
5055
{% for sponsor in site.data.sponsors %}
5156
{% if sponsor.level == "diamond" %}
52-
<a href="{{sponsor.website}}">
53-
<img src="{{sponsor.logo}}" alt="{{sponsor.name}}" style="width:25%">
54-
</a>
57+
<div class="column">
58+
<div class="sponsor-card">
59+
<a href="{{sponsor.website}}">
60+
<img src="{{sponsor.logo}}" alt="{{sponsor.name}}">
61+
</a>
62+
</div>
63+
</div>
5564
{% endif %}
5665
{% endfor %}
5766
</div>
@@ -62,12 +71,16 @@ <h2 class="title has-text-left is-size-2 has-text-weight-bold mgb-medium" style=
6271
</h2>
6372
</div>
6473

65-
<div class="sponsor-thing">
74+
<div class="sponsor-grid">
6675
{% for sponsor in site.data.sponsors %}
6776
{% if sponsor.level == "gold" %}
68-
<a href="{{sponsor.website}}">
69-
<img src="{{sponsor.logo}}" alt="{{sponsor.name}}" style="width:25%">
70-
</a>
77+
<div class="column">
78+
<div class="sponsor-card">
79+
<a href="{{sponsor.website}}">
80+
<img src="{{sponsor.logo}}" alt="{{sponsor.name}}">
81+
</a>
82+
</div>
83+
</div>
7184
{% endif %}
7285
{% endfor %}
7386
</div>
@@ -78,15 +91,20 @@ <h2 class="title has-text-left is-size-2 has-text-weight-bold mgb-medium" style=
7891
</h2>
7992
</div>
8093

81-
<div class="sponsor-thing">
94+
<div class="sponsor-grid">
8295
{% for sponsor in site.data.sponsors %}
8396
{% if sponsor.level == "silver" %}
84-
<a href="{{sponsor.website}}">
85-
<img src="{{sponsor.logo}}" alt="{{sponsor.name}}" style="width:25%">
86-
</a>
97+
<div class="column">
98+
<div class="sponsor-card">
99+
<a href="{{sponsor.website}}">
100+
<img src="{{sponsor.logo}}" alt="{{sponsor.name}}">
101+
</a>
102+
</div>
103+
</div>
87104
{% endif %}
88105
{% endfor %}
89106
</div>
107+
90108
<p class="your-name-here">
91109
Want your name here?
92110
</p>

assets/css/style.scss

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,13 +1436,16 @@ br { margin-bottom: 20px; }
14361436
}
14371437

14381438
#sponsors {
1439-
#sponsor-thing {
1440-
display: flex;
1439+
.sponsor-grid {
1440+
display: grid;
1441+
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
14411442
align-items: center;
1442-
.img {
1443-
display: block;
1444-
float: left;
1445-
}
1443+
}
1444+
.sponsor-card {
1445+
transition: all 0.25s ease;
1446+
}
1447+
.sponsor-card:hover {
1448+
transform: scale(1.01);
14461449
}
14471450
.description {
14481451
text-align: justify;

0 commit comments

Comments
 (0)