Skip to content

Commit d74ce45

Browse files
ErnestoRmichaeltintiuc
authored andcommitted
Feature/-iPhone X/Xs/X-Max/XR support (#96)
* Added media queries for landscape * Fixed iphone X pages * Cleaned styles * More cleanup
1 parent 6ce4a67 commit d74ce45

7 files changed

+58
-33
lines changed

src/components/HashProtectedModal.vue

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<modal>
3-
<div class="content">
3+
<div>
44
<h1 class="hash-protected">
55
<img class="hash-protected-img" src="../images/Icon-Hash-Protected.svg" alt="Hash protected"/>
66
<span>Hash Protected</span>
@@ -27,10 +27,6 @@ export default {
2727
</script>
2828

2929
<style scoped>
30-
.content {
31-
padding: 5vh 20px;
32-
}
33-
3430
p {
3531
color: var(--beep-light-dark);
3632
font-size: 14px;

src/components/HowDoesItWorkModal.vue

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<modal>
3-
<div class="content">
3+
<div>
44
<p>
55
Every day, over 4 million online data records are stolen or lost.
66
Beep tells you if your online accounts have been stolen in any of these data breaches.
@@ -49,10 +49,6 @@ export default {
4949
</script>
5050

5151
<style scoped>
52-
.content {
53-
padding: 5vh 20px;
54-
}
55-
5652
.bee {
5753
width: 100%;
5854
}

src/components/Modal.vue

+17-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
</ion-buttons>
1616
</ion-toolbar>
1717
</ion-header>
18-
<ion-content
19-
class="content"
20-
padding>
21-
<slot/>
18+
<ion-content padding>
19+
<div class="modal-content">
20+
<slot/>
21+
</div>
2222
</ion-content>
2323
</div>
2424
</template>
@@ -38,6 +38,19 @@ export default {
3838
</script>
3939

4040
<style scoped>
41+
.modal-content {
42+
padding: 5vh 20px;
43+
}
44+
45+
/* iPhone X, Xs, X-MAX, XR */
46+
@media only screen and (min-device-width: 375px) and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 3) and (orientation: landscape),
47+
only screen and (min-device-width: 414px) and (max-device-width: 896px) and (-webkit-min-device-pixel-ratio: 3) and (orientation: landscape) {
48+
.modal-content {
49+
padding-right: env(safe-area-inset-right);
50+
padding-left: env(safe-area-inset-left);
51+
}
52+
}
53+
4154
ion-toolbar {
4255
--ion-color-base: var(--beep-light);
4356
}

src/components/WhatShouldYouDoModal.vue

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<modal>
3-
<div class="content">
3+
<div>
44
<h1>What Should You Do?</h1>
55
<p>
66
We recommend changing your password on any sites where you used the password you entered.
@@ -36,10 +36,6 @@ export default {
3636
</script>
3737

3838
<style scoped>
39-
.content {
40-
padding: 5vh 20px;
41-
}
42-
4339
p,
4440
ul {
4541
color: var(--beep-light-dark);

src/theme/common.css

+11-8
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
--ion-padding: 0;
1212
}
1313

14-
:root[mode=md] {
14+
:root[mode='md'] {
1515
--ion-font-family: Arial, sans-serif;
1616
}
1717

18-
:root[mode=ios] {
18+
:root[mode='ios'] {
1919
--ion-font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Roboto', sans-serif;
2020
}
2121

@@ -46,7 +46,7 @@ input:invalid {
4646
}
4747

4848
#lottie {
49-
position:relative;
49+
position: relative;
5050
width: 100%;
5151
height: 300px;
5252
}
@@ -60,13 +60,16 @@ div[style].cloned-input {
6060
width: 1.25rem;
6161
}
6262

63-
body, html {
63+
body,
64+
html {
6465
height: 100vh;
6566
}
6667

67-
/* Iphone X */
68-
@media screen and (min-height : 800px) and (max-height : 820px) {
69-
html.plt-ios.plt-hybrid, html.plt-ios.plt-pwa {
70-
--ion-statusbar-padding: 30px;
68+
/* Iphone X, Xs, X-MAX, XR */
69+
@media only screen and (min-device-width: 375px) and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 3),
70+
only screen and (min-device-width: 414px) and (max-device-width: 896px) and (-webkit-min-device-pixel-ratio: 3) {
71+
html.plt-ios.plt-hybrid,
72+
html.plt-ios.plt-pwa {
73+
--ion-statusbar-padding: env(safe-area-inset-top);
7174
}
7275
}

src/views/Breach.vue

+13-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
</ion-buttons>
88
</ion-toolbar>
99
</ion-header>
10-
<ion-content
11-
padding
12-
class="content">
10+
<ion-content padding>
1311
<ion-list>
1412
<ion-item>
1513
<ion-avatar slot="start">
@@ -202,4 +200,16 @@ h2 {
202200
.info-date {
203201
color: var(--beep-light-dark);
204202
}
203+
204+
/* iPhone X, Xs, X-MAX and XR*/
205+
@media only screen and (min-device-width: 375px) and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 3) and (orientation: landscape),
206+
only screen and (min-device-width: 414px) and (max-device-width: 896px) and (-webkit-min-device-pixel-ratio: 3) and (orientation: landscape) {
207+
ion-list {
208+
padding-right: env(safe-area-inset-right);
209+
padding-left: env(safe-area-inset-left);
210+
}
211+
.information-content {
212+
padding: 20px env(safe-area-inset-right) 20px env(safe-area-inset-left);
213+
}
214+
}
205215
</style>

src/views/Breaches.vue

+14-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
type="email"
1313
@ionChange="filterChanged"/>
1414
</ion-header>
15-
<ion-content
16-
padding
17-
class="content">
15+
<ion-content padding>
1816
<div class="counter">{{ breaches.length }} results found</div>
1917
<ion-list>
2018
<breach-item
@@ -112,4 +110,17 @@ ion-back-button {
112110
line-height: 17px;
113111
padding: 7px 10px;
114112
}
113+
114+
/* iPhone X, Xs, X-MAX and XR*/
115+
@media only screen and (min-device-width: 375px) and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 3) and (orientation: landscape),
116+
only screen and (min-device-width: 414px) and (max-device-width: 896px) and (-webkit-min-device-pixel-ratio: 3) and (orientation: landscape) {
117+
ion-list,
118+
ion-searchbar {
119+
padding-right: env(safe-area-inset-right);
120+
padding-left: env(safe-area-inset-left);
121+
}
122+
.counter {
123+
padding: 7px env(safe-area-inset-right) 7px env(safe-area-inset-left);
124+
}
125+
}
115126
</style>

0 commit comments

Comments
 (0)