Skip to content

Commit

Permalink
[Resources Page] Updated Island Buttons for Mobile (#199)
Browse files Browse the repository at this point in the history
* update: mobile buttons updated to fit content

* chore: removed unused classes and comments

* update: aligned link icon for buttons

* Changed button text and svg colors to match figma. Also changed font weight for title.
  • Loading branch information
IanWearsHat authored Oct 30, 2024
1 parent e298215 commit 236e1c3
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 56 deletions.
4 changes: 2 additions & 2 deletions apps/site/src/assets/icons/open-new-window.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,75 +2,37 @@
@use "bootstrap-utils" as utils;

.group {
margin-top: 50px;
position: relative;
padding: 1rem 0;
width: 200px;
}

.tape {
background-image: url("~@/assets/images/tape.svg");
width: 238px;
height: 60px;
position: absolute;
top: 3%;
left: 15%;
z-index: 10;
@media screen and (max-width: 400px) {
left: 10%;
}
}

.container {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 10px;
height: 450px;
}

.buttonImage {
width: 50px;
}

.titleLink {
font-family: inherit;
text-decoration: none;
color: inherit;
font-weight: 600;
color: theme.$lighter-black;
:link {
text-decoration: none;
}
}

.tag {
background-image: url("~@/assets/images/resource-link.svg");
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: left;
display: inline-block;
padding: 1rem;
padding-right: 3rem;
margin-left: -6px;
margin-bottom: 0.5rem;
transition:
filter 0.13s ease,
transform 0.13s ease,
filter 0.13s ease;

color: theme.$black;
text-decoration: none;
font-weight: bold;

&:hover,
&:focus {
transform: translateX(-5px) translateZ(0);
filter: drop-shadow(1px 0px 0px black) drop-shadow(-2px 0px 0px black)
drop-shadow(0px 2px 0px black) drop-shadow(0px -2px 0px black);
}
}

.text {
width: 90%;
text-align: center;
font-family: utils.$font-family-base;
.titleLinkIcon {
margin-bottom: 0.2rem;
}

.islandBackground {
Expand All @@ -90,25 +52,43 @@
min-width: 350px;
}

.description {
overflow: auto;
.description > * {
margin: 0;
font-size: 1.05rem;
color: theme.$lighter-black;
}

@include utils.media-breakpoint-up(md) {
.container {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 10px;
height: 450px;
}

.buttonImage {
width: 100px;
}
}

@include utils.media-breakpoint-up(sm) {
.CardContainer {
width: 500px;
min-width: 500px;
}

.islandBackground {
width: 500px;
}

.group {
width: 300px;
}
}

@include utils.media-breakpoint-down(sm) {
.description {
max-height: 100px;
.description > * {
font-size: 24px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default function ResourceCard({
<motion.img
src={stickerSrc}
alt="Resource logo"
width="100"
className={styles.buttonImage}
variants={variant}
/>
)}
Expand All @@ -88,14 +88,15 @@ export default function ResourceCard({
)}{" "}
{links.map(({ text, link }) => (
<motion.a
className="d-inline ms-1 vertical-align-middle"
className={"d-inline ms-1 vertical-align-middle"}
variants={variant}
key={link}
href={link}
target="_blank"
rel="noopener noreferrer"
>
<Image
className={styles.titleLinkIcon}
src={openNewWindow}
width="20"
height="20"
Expand Down

0 comments on commit 236e1c3

Please sign in to comment.