Skip to content

Commit

Permalink
feat: categories shortcuts for mobile (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
melniiv committed Feb 17, 2023
1 parent 2103f2a commit 1a4457a
Show file tree
Hide file tree
Showing 15 changed files with 68 additions and 26 deletions.
2 changes: 1 addition & 1 deletion apps/events-helsinki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"react-content-loader": "^6.2.0",
"react-datepicker": "^4.8.0",
"react-dom": "18.2.0",
"react-helsinki-headless-cms": "1.0.0-alpha110",
"react-helsinki-headless-cms": "1.0.0-alpha111",
"react-i18next": "11.18.6",
"react-scroll": "^1.8.7",
"react-toastify": "^9.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ exports[`matches snapshot 1`] = `
</g>
</svg>
</span>
text
<span>
text
</span>
<span
aria-hidden="true"
class="LinkBase-module_verticalAlignSmallOrMediumIcon__0SjrX LinkBase_vertical-align-small-or-medium-icon__wxjmq"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
height: 100%;
min-height: 64px;

@include respond-below(m) {
width: 100%;
min-height: auto;
}

a {
display: flex;
align-items: center;
Expand Down Expand Up @@ -46,6 +51,9 @@
span {
text-align: left;
text-overflow: ellipsis;
&:nth-child(2) {
width: 100%;
}
}

&:focus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@
height: fit-content;
align-items: center;

@include respond-below(s) {
display: none;
@include respond-below(m) {
display: flex;
flex-direction: column;
padding-top: 0;
grid-gap: 0;
padding-bottom: 2rem;
}

@include respond-above(s) {
padding-top: 12rem;
padding-top: 7rem;
}

@include respond-above(m) {
Expand Down
2 changes: 1 addition & 1 deletion apps/hobbies-helsinki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"react-content-loader": "^6.2.0",
"react-datepicker": "^4.8.0",
"react-dom": "18.2.0",
"react-helsinki-headless-cms": "1.0.0-alpha110",
"react-helsinki-headless-cms": "1.0.0-alpha111",
"react-i18next": "11.18.6",
"react-scroll": "^1.8.7",
"react-toastify": "^9.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ exports[`matches snapshot 1`] = `
</g>
</svg>
</span>
text
<span>
text
</span>
<span
aria-hidden="true"
class="LinkBase-module_verticalAlignSmallOrMediumIcon__0SjrX LinkBase_vertical-align-small-or-medium-icon__wxjmq"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
height: 100%;
min-height: 64px;

@include respond-below(m) {
width: 100%;
min-height: auto;
}

a {
display: flex;
align-items: center;
Expand Down Expand Up @@ -46,6 +51,9 @@
span {
text-align: left;
text-overflow: ellipsis;
&:nth-child(2) {
width: 100%;
}
}

&:focus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@
height: fit-content;
align-items: center;

@include respond-below(s) {
display: none;
@include respond-below(m) {
display: flex;
flex-direction: column;
padding-top: 0;
grid-gap: 0;
padding-bottom: 2rem;
}

@include respond-above(s) {
padding-top: 12rem;
padding-top: 7rem;
}

@include respond-above(m) {
Expand Down
2 changes: 1 addition & 1 deletion apps/sports-helsinki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"react-content-loader": "^6.2.0",
"react-datepicker": "^4.8.0",
"react-dom": "18.2.0",
"react-helsinki-headless-cms": "1.0.0-alpha110",
"react-helsinki-headless-cms": "1.0.0-alpha111",
"react-i18next": "11.18.6",
"react-leaflet": "4.2.0",
"react-scroll": "^1.8.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ exports[`matches snapshot 1`] = `
</g>
</svg>
</span>
text
<span>
text
</span>
<span
aria-hidden="true"
class="LinkBase-module_verticalAlignSmallOrMediumIcon__0SjrX LinkBase_vertical-align-small-or-medium-icon__wxjmq"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
height: 100%;
min-height: 64px;

@include respond-below(m) {
width: 100%;
min-height: auto;
}

a {
display: flex;
align-items: center;
Expand Down Expand Up @@ -46,6 +51,9 @@
span {
text-align: left;
text-overflow: ellipsis;
&:nth-child(2) {
width: 100%;
}
}

&:focus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@
height: fit-content;
align-items: center;

@include respond-below(s) {
display: none;
@include respond-below(m) {
display: flex;
flex-direction: column;
padding-top: 0;
grid-gap: 0;
padding-bottom: 2rem;
}

@include respond-above(s) {
padding-top: 12rem;
padding-top: 7rem;
}

@include respond-above(m) {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"react-content-loader": "6.2.0",
"react-datepicker": "4.8.0",
"react-dom": ">=17.0.2",
"react-helsinki-headless-cms": "1.0.0-alpha110",
"react-helsinki-headless-cms": "1.0.0-alpha111",
"react-i18next": "11.18.6",
"react-leaflet": "4.2.0",
"react-toastify": "^9.0.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/utils/headless-cms/service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const getAllArticles = async (
locale: node.language.code.toLowerCase(),
slug: node.slug,
});
node.translations?.forEach((translation) => {
node.translations?.forEach((translation: PageType['translations']) => {
if (
translation?.uri &&
translation.slug &&
Expand Down Expand Up @@ -88,7 +88,7 @@ export const getAllPages = async (
locale: node.language.code.toLowerCase(),
slug: node.slug,
});
node.translations?.forEach((translation) => {
node.translations?.forEach((translation: PageType['translations']) => {
if (
translation?.uri &&
translation.slug &&
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14861,7 +14861,7 @@ __metadata:
react-content-loader: "npm:6.2.0"
react-datepicker: "npm:4.8.0"
react-dom: "npm:>=17.0.2"
react-helsinki-headless-cms: "npm:1.0.0-alpha110"
react-helsinki-headless-cms: "npm:1.0.0-alpha111"
react-i18next: "npm:11.18.6"
react-leaflet: "npm:4.2.0"
react-toastify: "npm:^9.0.3"
Expand Down Expand Up @@ -15117,7 +15117,7 @@ __metadata:
react-content-loader: "npm:^6.2.0"
react-datepicker: "npm:^4.8.0"
react-dom: "npm:18.2.0"
react-helsinki-headless-cms: "npm:1.0.0-alpha110"
react-helsinki-headless-cms: "npm:1.0.0-alpha111"
react-i18next: "npm:11.18.6"
react-scroll: "npm:^1.8.7"
react-toastify: "npm:^9.0.3"
Expand Down Expand Up @@ -17330,7 +17330,7 @@ __metadata:
react-content-loader: "npm:^6.2.0"
react-datepicker: "npm:^4.8.0"
react-dom: "npm:18.2.0"
react-helsinki-headless-cms: "npm:1.0.0-alpha110"
react-helsinki-headless-cms: "npm:1.0.0-alpha111"
react-i18next: "npm:11.18.6"
react-scroll: "npm:^1.8.7"
react-toastify: "npm:^9.0.3"
Expand Down Expand Up @@ -25688,9 +25688,9 @@ __metadata:
languageName: node
linkType: hard

"react-helsinki-headless-cms@npm:1.0.0-alpha110":
version: 1.0.0-alpha110
resolution: "react-helsinki-headless-cms@npm:1.0.0-alpha110"
"react-helsinki-headless-cms@npm:1.0.0-alpha111":
version: 1.0.0-alpha111
resolution: "react-helsinki-headless-cms@npm:1.0.0-alpha111"
dependencies:
hds-design-tokens: "npm:^2.3.0"
html-react-parser: "npm:^1.4.8"
Expand All @@ -25704,7 +25704,7 @@ __metadata:
peerDependenciesMeta:
"@apollo/client":
optional: true
checksum: e0801d9e4e30292543e0d841a7ef0267be7f837ba3e38e307154692b0c539a3ed187037ed9b5c52816d3ea402c9a589d2284a3ae32e956dee1c87f1d05edbd7e
checksum: 63fb37406b2becb82318b9ab707d7fe8da56d8a26197e8ebdc3b78350143598317f54b303b20922d498d7b669f881e5fa2f7605db88facb9c5bd06161223f761
languageName: node
linkType: hard

Expand Down Expand Up @@ -28092,7 +28092,7 @@ __metadata:
react-content-loader: "npm:^6.2.0"
react-datepicker: "npm:^4.8.0"
react-dom: "npm:18.2.0"
react-helsinki-headless-cms: "npm:1.0.0-alpha110"
react-helsinki-headless-cms: "npm:1.0.0-alpha111"
react-i18next: "npm:11.18.6"
react-leaflet: "npm:4.2.0"
react-scroll: "npm:^1.8.7"
Expand Down

0 comments on commit 1a4457a

Please sign in to comment.