Skip to content

Commit

Permalink
feat: updated index page mobile styling
Browse files Browse the repository at this point in the history
  • Loading branch information
timelytree committed Feb 29, 2024
1 parent a99b691 commit 7b72db2
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,6 @@ sw.*
# Storybook
.nuxt-storybook
storybook-static

# rclone filter rules
open-panda-dataset-meta-bk__filter.txt
8 changes: 5 additions & 3 deletions packages/fe/assets/scss/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $letterSpacing_Large: 0.03em;
@mixin fontSize_16 { font-size: clamp(toRem(14), vw(16px), toRem(16)) }
@mixin fontSize_17 { font-size: toRem(17) }
@mixin fontSize_18 { font-size: clamp(toRem(14), vw(18px), toRem(18)) }
@mixin fontSize_20 { font-size: clamp(toRem(14), vw(20px), toRem(20)) }
@mixin fontSize_20 { font-size: clamp(toRem(16), vw(20px), toRem(20)) }
@mixin fontSize_24 { font-size: clamp(toRem(20), vw(24px), toRem(24)) }
@mixin fontSize_28 { font-size: clamp(toRem(20), vw(28px), toRem(28)) }
@mixin fontSize_32 { font-size: toRem(32) }
Expand All @@ -41,7 +41,8 @@ $letterSpacing_Large: 0.03em;
@include fontWeight_Bold;
font-family: $font_Primary;
@include fontSize_65;
line-height: leading(75, 65);
// line-height: leading(75, 65);
line-height: 150%;
}

@mixin h2 {
Expand Down Expand Up @@ -83,7 +84,8 @@ $letterSpacing_Large: 0.03em;
@include fontWeight_Regular;
font-family: $font_Primary;
@include fontSize_20;
line-height: leading(30, 20);
// line-height: leading(30, 20);
line-height: 150%;
}

@mixin p2 {
Expand Down
5 changes: 3 additions & 2 deletions packages/fe/components/blocks/category-slider-block.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,10 @@ export default {
}
:deep(.slider-controls) {
position: absolute;
// position: absolute;
width: 100%;
transform: translateY(74px);
margin-top: -1rem;
// transform: translateY(74px);
@include small {
transform: none;
display: flex;
Expand Down
5 changes: 4 additions & 1 deletion packages/fe/components/category-ticker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ export default {
// ///////////////////////////////////////////////////////////////////// General
:deep(.filters) {
margin-bottom: toRem(20);
@include tiny {
margin-bottom: toRem(39);
}
}
.inner-content {
Expand All @@ -134,7 +137,7 @@ export default {
.text-wrapper {
display: flex;
position: absolute;
bottom: 20%;
bottom: 25%;
}
.ticker {
Expand Down
2 changes: 1 addition & 1 deletion packages/fe/components/page-home/toolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export default {
max-width: none;
}
@include mini {
margin-bottom: toRem(10);
// margin-bottom: toRem(10);
}
}
Expand Down
12 changes: 6 additions & 6 deletions packages/fe/components/site-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default {
padding-top: toRem(50);
padding-bottom: toRem(70);
@include medium {
padding-top: toRem(10);
padding-top: toRem(31);
padding-bottom: toRem(27);
}
&.singular-page {
Expand Down Expand Up @@ -197,7 +197,7 @@ export default {
display: none;
}
@include medium {
width: toRem(121);
width: toRem(137);
display: inline-block;
}
}
Expand All @@ -211,16 +211,16 @@ export default {
right: -3px;
}
@include medium {
right: 0.4vw;
top: calc(100% - 7px);
right: 5px;
top: calc(100% - 10px);
}
&:hover {
transform: scale(1.1);
}
}
.alpha-tag {
width: toRem(55);
width: toRem(40);
}
.hamburger-c {
Expand All @@ -241,7 +241,7 @@ export default {
height: 18px;
top: -3px;
transition-duration: 150ms;
margin-left: toRem(15);
margin-left: toRem(19);
position: relative;
.hamburger-icon {
Expand Down
12 changes: 11 additions & 1 deletion packages/fe/content/pages/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,17 @@
"props": {
"block": {
"src": "/images/index-hero-right.png"
}
},
"class": "desktop-only"
}
},
"image2": {
"name": "ImageBlock",
"props": {
"block": {
"src": "/images/index-hero-right-mobile.png"
},
"class": "mobile-only"
}
},
"heading": {
Expand Down
18 changes: 17 additions & 1 deletion packages/fe/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export default {
margin-top: toRem(90);
@include medium {
margin-left: 0;
margin-top: toRem(20);
margin-top: toRem(35);
}
}
}
Expand All @@ -208,6 +208,19 @@ export default {
display: none;
}
}
.image-block {
&.desktop-only {
@include tiny {
display: none;
}
}
&.mobile-only {
display: none;
@include tiny {
display: block;
}
}
}
}
:deep(.home-slider) {
Expand All @@ -217,6 +230,9 @@ export default {
// ///////////////////////////////////////////////////////////////////// Toolbar
#section-toolbar {
margin-bottom: toRem(55);
@include tiny {
margin-bottom: toRem(24);
}
}
// ////////////////////////////////////////////////////////////////// No results
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7b72db2

Please sign in to comment.