Skip to content

Commit

Permalink
fix: reduce main logo size on small screens
Browse files Browse the repository at this point in the history
  • Loading branch information
tjorbo committed Dec 28, 2023
1 parent 3e92e04 commit 89cef40
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ $dark: $gray-very-dark;

// breakpoints
$breakpoint-xs: 0;
$breakpoint-logo-xs: 360px;
$breakpoint-sm: 576px;
$breakpoint-md: 768px;
$breakpoint-lg: 992px;
$breakpoint-xl: 1200px;

//grid options
/* $grid-columns: 12;
$grid-gutter-width: 30px; */

// set internal breakpoints for b-components
$grid-breakpoints: (
xs: $breakpoint-xs,
Expand Down
21 changes: 17 additions & 4 deletions src/views/details/Details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</b-nav-item>
</template>
<template class="d-flex" #right>
<b-button pill class="labeled-button mr-1" @click="onFavoriteClick">
<b-button pill class="labeled-button pr-0" @click="onFavoriteClick">
<icon-base
:title="$t('navbar.saveAsFavorite')"
color="#003064"
Expand Down Expand Up @@ -613,8 +613,8 @@ export default {
},
isIOSWebAppWrongVersion() {
// getUserMedia only works as iOS-PWA with iOS 13.4.1 and higher
const iOS = !!window.navigator.userAgent.match(/iPad/i) ||
!!window.navigator.userAgent.match(/iPhone/i)
const iOS = !!RegExp(/iPad/i).exec(window.navigator.userAgent) ||
!!RegExp(/iPhone/i).exec(window.navigator.userAgent)
return iOS &&
window.matchMedia('(display-mode: standalone)').matches &&
lt(this.detectRTC.osVersion, '13.4.1')
Expand Down Expand Up @@ -658,7 +658,8 @@ export default {
openingTimeDay = this.institution.openingTimes.week.sat
} else if (day === 0) {
openingTimeDay = this.institution.openingTimes.week.sun
} return openingTimeDay || null
}
return openingTimeDay || null
},
getCurrentOpeningState() {
Expand Down Expand Up @@ -825,6 +826,18 @@ export default {
</script>

<style lang="scss" scoped>
.logo {
@media (max-width: $breakpoint-logo-xs) {
width: 120px;
height: auto;
}
@media (min-width: $breakpoint-logo-xs) {
width: auto;
height: 40px;
}
}
input[type=submit] {
font-size: inherit;
}
Expand Down

0 comments on commit 89cef40

Please sign in to comment.