Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
feat: mobile fix, transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
zachferland committed May 21, 2020
1 parent b874f15 commit 03d1169
Show file tree
Hide file tree
Showing 9 changed files with 373 additions and 146 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ workflows:
- deploy-dev:
requires:
- test-and-build
filters:
branches:
only: develop
# filters:
# branches:
# only: develop
- deploy-prod:
requires:
- test-and-build
Expand Down
43 changes: 41 additions & 2 deletions iframe/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,26 @@ button {
}
}

@keyframes slideInFromLeft {
0% {
transform: translateX(100%);
}
100% {
transform: translateX(0);
}

}

@keyframes slideInFromBottom {
0% {
transform: translateY(100%);
}
100% {
transform: translateY(0);
}

}

.card {
width: 420px;
border: 1px solid $borderColor;
Expand All @@ -77,13 +97,32 @@ button {
box-shadow: 0px 4px 10px 1px #00000025;
margin-top: 10px;
margin-left: 10px;
position: absolute;
}

@mixin slide {
animation-duration: 0.7s;
animation-timing-function: ease-out;
animation-delay: 0s;
animation-iteration-count: 1;
}

.slideLeft {
@include slide;
animation-name: slideInFromLeft;
}

.slideBottom {
@include slide;
animation-name: slideInFromBottom;
}


.cardMobile {
width: 85vw !important;
width: 100vw !important;
height: 100vh !important;
justify-content: flex-start !important;
margin-top: 0px !important;
margin-top: 20px !important;
margin-left: 0px !important;
}

Expand Down
2 changes: 1 addition & 1 deletion iframe/html/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const capitalizeFirst = string => string.charAt(0).toUpperCase() + string.slice(
const spaceString = (spaces) => spaces.join(', ')

const template = (data,isMobile) => `
<div class='${style.card} ${isMobile ? style.cardMobile : ''}'>
<div class='${style.card} ${isMobile ? style.cardMobile : ''} ${isMobile && !data.error ? style.slideBottom : !data.error ? style.slideLeft : ''}'>
<div class=${style.controls}>
<div class=${style.controls_logo}>
<a
Expand Down
5 changes: 0 additions & 5 deletions iframe/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ store.remove('error')
* UI Window Functions
*/

window.handleBrokenImage = (image) => {
image.onerror = "";
document.getElementById("siteFavicon").style.display = 'none';
}

const mobileRegex = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i
const checkIsMobile = () => mobileRegex.test(navigator.userAgent)

Expand Down
Loading

0 comments on commit 03d1169

Please sign in to comment.