Skip to content

Commit bc8c65e

Browse files
committed
Fix gallery button on mobile
Signed-off-by: Peter Kos <pkos91@icloud.com>
1 parent 79d8025 commit bc8c65e

2 files changed

Lines changed: 68 additions & 44 deletions

File tree

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ <h2>What is a Hackathon?</h2>
136136
<p>Come spend 24 hours with us at BrickHack and dedicate time to learn, collaborate, build, and innovate.</p>
137137
</div>
138138
<div id="hackathon-buttons">
139-
<a href="https://mlh.io/" id="mlh" target="_blank" rel="noopener noreferrer">
139+
<a href="https://mlh.io/" target="_blank" rel="noopener noreferrer">
140140
<i class="fas fa-arrow-right"></i>
141-
<p>Visit Major League Hacking (MLH)</p>
141+
<p>Visit Major League Hacking</p>
142142
</a>
143-
<a href="javascript:void(0);" id="gallery" rel="noopener noreferrer">
143+
<a href="javascript:void(0);" rel="noopener noreferrer">
144144
<i class="fas fa-tools"></i>
145145
<p>Gallery (coming soon!)</p>
146146
</a>

sass/main.scss

Lines changed: 65 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ nav {
123123
justify-content: space-between;
124124
font-size: $nav-fontsize;
125125
height: $nav-height;
126-
position: fixed;
126+
position: absolute;
127127
top: 0;
128128
left: 0;
129129
right: 0;
@@ -415,28 +415,28 @@ nav {
415415
margin: 0px auto;
416416
align-items: flex-start;
417417

418-
#mlh, #gallery {
418+
a {
419419
@include button;
420420
@include button-effect($light-blue);
421421
display: flex;
422422
align-items: center;
423423
background-color: $light-blue;
424-
margin: 24px 0px;
424+
margin: 20px 0px;
425425
padding: 30px;
426426
border-radius: $img-border-radius;
427427
width: 100%;
428+
}
428429

429-
p {
430-
margin: 0px;
431-
font-size: 1.2em;
432-
font-weight: $font-medium;
433-
}
430+
p {
431+
margin: 0px;
432+
font-size: 1.2em;
433+
font-weight: $font-medium;
434+
}
434435

435-
i.fa-arrow-right, i.fa-tools {
436-
font-size: 1.6em;
437-
color: $red;
438-
padding-right: 10px;
439-
}
436+
i.fa-arrow-right, i.fa-tools {
437+
font-size: 1.6em;
438+
color: $red;
439+
padding-right: 10px;
440440
}
441441
}
442442
}
@@ -796,8 +796,14 @@ footer {
796796
width: 100%;
797797
}
798798

799-
#mlh {
800-
margin-top: 40px;
799+
#hackathon-buttons {
800+
flex-direction: row;
801+
justify-content: center;
802+
width: 70%;
803+
804+
a {
805+
margin: 10px;
806+
}
801807
}
802808
}
803809
}
@@ -823,7 +829,11 @@ footer {
823829
}
824830
}
825831

826-
@media screen and (max-width: 1200px) {
832+
@media screen and (max-width: 1220px) {
833+
834+
#hackathon #hackathon-content #hackathon-buttons {
835+
width: 100%;
836+
}
827837

828838
#leadership #leaders {
829839
grid-template-columns: repeat(4, $leadership-size-mobile);
@@ -879,7 +889,6 @@ footer {
879889
}
880890

881891
#hero {
882-
883892
#hero-content {
884893
height: calc(100vh - #{$nav-height});
885894
}
@@ -910,37 +919,48 @@ footer {
910919
}
911920
}
912921

913-
#hackathon .carousel {
922+
#hackathon {
923+
.carousel {
924+
.slick-list {
925+
margin-top: 0;
926+
}
914927

915-
.slick-list {
916-
margin-top: 0;
917-
}
928+
.slick-slide {
929+
$front-width: 25px;
930+
$back-width: 10px;
931+
$slide-size: 200px;
932+
height: $slide-size;
918933

919-
.slick-slide {
920-
$front-width: 25px;
921-
$back-width: 10px;
922-
$slide-size: 200px;
923-
height: $slide-size;
934+
.front-clip, .back-clip {
935+
top: -50px;
936+
}
924937

925-
.front-clip, .back-clip {
926-
top: -50px;
927-
}
928938

939+
.front-clip {
940+
margin-left: ($slide-size / 2) - ($front-width / 2);
941+
width: $front-width;
942+
height: 70px;
943+
}
944+
945+
.back-clip {
946+
width: $back-width;
947+
margin-left: ($slide-size / 2) - ($front-width / 2) - $back-width; // Peek out from top clip
948+
}
929949

930-
.front-clip {
931-
margin-left: ($slide-size / 2) - ($front-width / 2);
932-
width: $front-width;
933-
height: 70px;
950+
img {
951+
width: $slide-size;
952+
height: $slide-size;
953+
}
934954
}
935955

936-
.back-clip {
937-
width: $back-width;
938-
margin-left: ($slide-size / 2) - ($front-width / 2) - $back-width; // Peek out from top clip
939-
}
956+
}
940957

941-
img {
942-
width: $slide-size;
943-
height: $slide-size;
958+
#hackathon-content #hackathon-buttons {
959+
flex-direction: column;
960+
width: 60%;
961+
962+
a {
963+
margin-left: 0;
944964
}
945965
}
946966
}
@@ -1077,7 +1097,7 @@ footer {
10771097
display: none !important; // Overrides slick.css
10781098
}
10791099

1080-
#hackathon-content #mlh {
1100+
#hackathon-content {
10811101
margin: 0;
10821102
padding: 20px;
10831103

@@ -1088,6 +1108,10 @@ footer {
10881108
p {
10891109
font-size: 1em;
10901110
}
1111+
1112+
#hackathon-buttons {
1113+
width: 100%;
1114+
}
10911115
}
10921116
}
10931117

0 commit comments

Comments
 (0)