Skip to content

Commit

Permalink
Fix ui.js thingy ✨ and add info message on the demo page
Browse files Browse the repository at this point in the history
  • Loading branch information
LukyVj committed Dec 22, 2015
1 parent 5883dc7 commit d0fd16a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 1 deletion.
5 changes: 4 additions & 1 deletion demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ <h2>Demos</h2>
<li>Manipulates color</li>
</ul>


<div class="alert">
<p>It happens that this page <strong>needs a refresh</strong> in order to get the colorify.js script working.</p>
<p>There is a lot of images to process on this demo page, and sometimes, the script cannot perform the operations as fast as an image processing on a server would do.</p>
</div>

<section id="demoDefault" class="demo">
<div class="sample">
Expand Down
6 changes: 6 additions & 0 deletions scripts/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ window.onload = function(e) {
isSmall()
}

window.addEventListener('resize', isSmall, false);

function isSmall(){
var w = document.documentElement.clientWidth;
if(w<=768){
document.querySelector('nav').classList.add('closed')
document.querySelector('#closeNav .icon').classList.add('flip')
}
if(w>=768){
document.querySelector('nav').classList.remove('closed')
document.querySelector('#closeNav .icon').classList.remove('flip')
}
}

document.getElementById('closeNav').addEventListener('click', function(){
Expand Down
4 changes: 4 additions & 0 deletions styles/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ nav .hero-header {
z-index: 3;
top: 0;

@media (max-width: 768px) {
border-right: 1px solid #CCC;
}



[class$="-block"] {
Expand Down
4 changes: 4 additions & 0 deletions styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ nav .hero-header {
background-image: linear-gradient(to right, #f19c40 20%, #e2544b 20%, #e2544b 40%, #b455b5 40%, #b455b5 60%, #3993e2 60%, #3993e2 80%, #11c966 80%, #11c966 100%);
z-index: 3;
top: 0; }
@media (max-width: 768px) {
header#header,
nav .hero-header {
border-right: 1px solid #CCC; } }
header#header [class$="-block"],
nav .hero-header [class$="-block"] {
display: block;
Expand Down

0 comments on commit d0fd16a

Please sign in to comment.