Skip to content

Commit

Permalink
Mobile fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaburke91 committed Sep 6, 2017
1 parent 8825e80 commit b89970e
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 17 deletions.
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@

<body>

<div id="bg"></div>

<div id="header">
<div class="header__left" >
<a id="nts-logo" href="http://www.nts.live" target="_blank"> </a>
Expand Down Expand Up @@ -89,7 +91,6 @@

<div id="app"></div>

<canvas id="collage-canvas"></canvas>

</body>

Expand Down
2 changes: 1 addition & 1 deletion public/css/style.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/css/style.min.css.map

Large diffs are not rendered by default.

Binary file added public/img/bg_mobile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/js/app.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/app.min.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions react/Collage/Collage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class Collage extends React.Component {
renderCanvas() {
console.log("rendering canvas");
let that = this;
$()
this.canvas = new fabric.Canvas('collage-canvas');

/** Handle canvas Resizing **/
Expand All @@ -120,6 +121,8 @@ class Collage extends React.Component {
render() {
return (
<div id="collage">
<canvas id="collage-canvas" > </canvas>

{this.renderCanvas()}
</div>
)
Expand Down
4 changes: 4 additions & 0 deletions react/react-index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ const reactState = {
const store = createStore(reducers, reactState, applyMiddleware(logger, thunk));

class DesktopApp extends React.Component {
componentWillMount() {
$('body').append('<canvas id="collage-canvas"></canvas>');
}

render() {
return (
<div>
Expand Down
42 changes: 30 additions & 12 deletions style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ $text-color: black;
}

body {
}

#bg {
position: fixed;
top: 0; bottom: 0;
left: 0; right: 0;
background: url('../img/bg.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
Expand All @@ -31,16 +37,6 @@ a {
color: $text-color;
text-decoration: none;

//-webkit-transition: opacity 0.15s;
//-moz-transition: opacity 0.15s;
//-ms-transition: opacity 0.15s;
//-o-transition: opacity 0.15s;
//transition: opacity 0.15s;

//&:hover {
// text-decoration: none;
// opacity: 0.7;
//}
&:visited {
color: $text-color;
}
Expand Down Expand Up @@ -281,8 +277,8 @@ $mq-desktop: "(min-width: 1025px) and (max-width: 1499px)";
$mq-lg-desktop: "(min-width: 1500px)";
$mq-md-desktop: "(min-width: 1190px) and (max-width: 1499px)";
$mq-sm-desktop: "(min-width: 1025px) and (max-width: 1190px)";
$mq-tablet: "(min-width: 500px) and (max-width: 1024px)";
$mq-phone: "(max-width: 500px)";
$mq-tablet: "(min-width: 768px) and (max-width: 1024px)";
$mq-phone: "(max-width: 767px)";

img {
max-width: 100%;
Expand Down Expand Up @@ -356,12 +352,34 @@ img {
}

@media #{$mq-phone} {
#bg {
z-index: -1;
background: url('../img/bg_mobile.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
#collage-canvas {
display: none;
}
#header {
display: none;
}

#pre-save-link {
width: 116px;
span {
padding-right: 1px;
padding-bottom: 6px;
}
}
#pre-order-link {
width: 129px;
span {
padding-bottom: 6px;
}
}
}


Expand Down

0 comments on commit b89970e

Please sign in to comment.