Skip to content

Commit

Permalink
Merge pull request #47 from data-preservation-programs/feat-mobile-ex…
Browse files Browse the repository at this point in the history
…perience

feat: mobile experience improvements
  • Loading branch information
orvn authored Sep 28, 2023
2 parents baaec89 + 8824479 commit 97ddb60
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 10 deletions.
7 changes: 7 additions & 0 deletions assets/scss/core/utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
@return math.div($value, $baseFontSize) + rem;
}

/**
* Calculate vw based on expected element size at $x-large breakpoint ($base-vw)
*/
@function vw($px-vw, $base-vw: 1440px) {
@return math.div($px-vw * 100vw, $base-vw);
}

// ////////////////////////////////////////////////////////////////////// Mixins
// -----------------------------------------------------------------------------
// =================================================================== Animation
Expand Down
5 changes: 4 additions & 1 deletion components/card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ const iconComponent = computed(() => {
display: flex;
align-items: center;
@include large {
margin-bottom: 1rem;
margin-bottom: 1rem;
}
@include mini {
margin-bottom: 0;
}
}
Expand Down
5 changes: 1 addition & 4 deletions components/site-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,8 @@ const handleNavClick = () => {
path {
transition: 250ms ease;
}
@include mini {
max-width: toRem(205);
}
@include tiny {
max-width: toRem(150);
max-width: clamp(toRem(150), vw(180px, 415px), toRem(180));
}
}
}
Expand Down
26 changes: 21 additions & 5 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,25 @@ onBeforeUnmount(() => {
@include mini {
margin-right: 0;
margin-bottom: toRem(23);
.button-row {
display: flex;
justify-content: flex-end;
}
.theme__primary:first-child {
margin-right: 0;
}
}
@include tiny {
.theme__primary:first-child{
margin-right: 1.6rem;
}
}
.heading {
@include medium {
margin-bottom: toRem(17);
}
}
.description {
padding-right: toRem(50);
margin-bottom: toRem(43);
@include medium {
margin-bottom: toRem(27);
Expand Down Expand Up @@ -165,13 +176,18 @@ onBeforeUnmount(() => {
.code-block {
margin-bottom: toRem(48);
@include medium {
margin-bottom: toRem(27);
margin-bottom: toRem(34);
}
}
.card-list-block {
.card.type__logo {
@include tiny {
transform: scale(0.9);
.card-wrapper {
@include mini {
margin-bottom: 1rem;
&:nth-child(1),
&:nth-child(2),
&:nth-child(3) {
margin-bottom: 1.5rem;
}
}
}
}
Expand Down

0 comments on commit 97ddb60

Please sign in to comment.