Skip to content

Commit

Permalink
Updated View
Browse files Browse the repository at this point in the history
  • Loading branch information
khagwal committed Aug 19, 2018
1 parent 0aa3b3a commit c2177d2
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 120 deletions.
147 changes: 45 additions & 102 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,122 +13,64 @@ body {
-webkit-font-smoothing: subpixel-antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: 'Source Sans Pro', sans-serif;
margin: 0;
}

a {
color: #2750C4;
text-decoration: none;
}

a:hover {
text-decoration: underline;
}

.ch-sidebar {
width: 85px;
padding: 10px;
position: absolute;
left: 0;
top: 0;
bottom: 0;
border-right: solid 1px #E5E5E5;
.ch-topbar {
width: 100%;
border-bottom: solid 1px #E5E5E5;
background: #FFFFFF;
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.08);
z-index: 300;
}

.ch-sidebar img {
display: block;
margin: 0 auto;
}

.ch-share {
width: 32px;
height: 32px;
margin-top: 32px;
display: block;
margin: 15px auto;
opacity: .75;
transition: .25s ease-in;
position: relative;
}

.ch-share:first-of-type {
margin-top: 25px;
font-size: 0;
}

.ch-share:hover {
opacity: 1;
}

.ch-share:after {
font-size: 14px;
left: 34px;
top: 0px;
position: absolute;
padding: 3px 15px 5px;
border-radius: 15px;
color: #534e5c;
background: #FFFFFF;
box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.1);
opacity: 0;
transition: .25s ease-in;
margin-top: 3px;
transform: translateX(-2px);
}

.ch-share:hover:after {
opacity: 1;
transform: translateX(2px);
}

.ch-share.twitter:after {
content: "Tweet";
}

.ch-share.facebook:after {
content: "Share";
.ch-topbar .grid-lt {
width: 25%;
display: inline-block;
vertical-align: middle;
padding: 10px;
}

.ch-share.github:after {
content: "Star";
.ch-topbar .grid-rt {
width: 75%;
display: inline-block;
text-align: right;
vertical-align: middle;
padding: 0 10px;
}

.ch-starcount {
display: block;
text-align: center;
margin-top: -12px;
.ch-devmode {
display: inline-block;
vertical-align: middle;
color: #534e5c;
}

.twitter {
background-image: url("../images/icon-twitter.svg");
}

.facebook {
background-image: url("../images/icon-facebook.svg");
}

.github {
background-image: url("../images/icon-github.svg");
font-size: 15px;
margin-left: 3px;
background: #f2f2f2;
border-radius: 15px;
padding: 2px 10px 4px 10px;
}

p {
text-align: left;
font-size: 18px;
color: #929197;
padding: 15px 25px;
}

.ch-paper {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
padding: 20px 20px 20px 105px;
text-align: left;
overflow: auto;
width: 100%;
max-width: 1600px;
text-align: center;
margin: 20px auto;
}

.ch-footer {
text-align: center;
padding: 0 0 25px 0;
}

.ch-gradient-brick {
Expand Down Expand Up @@ -237,7 +179,6 @@ p {
right: 0;
z-index: 500;
text-align: right;
overflow: none;
}

.ch-notify {
Expand All @@ -257,9 +198,9 @@ p {
}

.ch-distro {
position: absolute;
position: fixed;
z-index: 50;
left: 15px;
right: 15px;
bottom: 15px;
min-width: 200px;
max-width: 100%;
Expand All @@ -270,7 +211,7 @@ p {
height: 50px;
border-radius: 50%;
position: absolute;
left: 0px;
right: 0px;
bottom: 0px;
background-color: #FFFFFF;
background-image: url("../images/coolhue-sprite.svg");
Expand Down Expand Up @@ -312,7 +253,6 @@ p {
font-size: 17px;
background-position: left center;
background-repeat: no-repeat;
vertical-align: middle;
}

.ch-distro-type:hover {
Expand Down Expand Up @@ -419,12 +359,15 @@ noscript {
}
}

@media screen and (max-width: 600px) {
.ch-paper {
text-align: center;
@media screen and (max-width:480px) {
.ch-share-brick {
margin: 0;
}
.ch-gradient-brick {
display: block;
margin: 35px auto;
.ch-share-brick:hover {
box-shadow: none;
}
.ch-share-text,
.ch-starcount {
display: none;
}
}
39 changes: 26 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>

<head>
<title>CoolHue 2.0 - Coolest Gradient Hues and Swatches</title>
<script src="scripts/script.js" type="text/javascript"></script>
Expand All @@ -11,32 +12,44 @@
</head>

<body>
<!-- Sidebar -->
<div class="ch-sidebar">
<img src="images/coolhue-logo.png" title="CoolHue" alt="CoolHue" width="64"/>
<!--Distro-->
<div class="ch-distro">
<div class="ch-distro-icon"></div>
<div class="ch-distro-wrapper ch-distro-wrapper-flap-up">
<a class="ch-distro-type" href="http://bit.ly/coolhue-sketch" target="_blank">Sketch Palette</a>
<a class="ch-distro-type" href="http://bit.ly/coolhue-ps" target="_blank">Photoshop Palette</a>
<a class="ch-distro-type" href="http://bit.ly/coolhue-dev" target="_blank">Customize Palette</a>
</div>
<!-- Topbar -->
<div class="ch-topbar">
<div class="grid-lt">
<img src="images/coolhue-logo.png" title="CoolHue" alt="CoolHue" width="64" />
</div>
<div class="grid-rt">
<span class="ch-devmode">Dev Mode</span>
</div>
<!--//Distro-->
</div>
<!-- /Sidebar -->
<!-- /Topbar -->

<!--Paper-->
<div class="ch-paper">
<noscript>We are sorry but we can't help it, unless your browser supports Javascript.</noscript>
</div>
<!--//Paper-->

<!-- Footer -->
<div>
<p class="ch-footer">&copy; Copyright
<a href="https://webkul.com" target="_blank" rel="noopener">Webkul Software</a>, All rights reserved.</p>
</div>
<!-- //Footer -->

<!--Notification-->
<div class="ch-notify-plank">
</div>
<!--Notification-->
<!--Distro-->
<div class="ch-distro">
<div class="ch-distro-icon"></div>
<div class="ch-distro-wrapper ch-distro-wrapper-flap-up">
<a class="ch-distro-type" href="http://bit.ly/coolhue-sketch" target="_blank">Sketch Palette</a>
<a class="ch-distro-type" href="http://bit.ly/coolhue-ps" target="_blank">Photoshop Palette</a>
<a class="ch-distro-type" href="http://bit.ly/coolhue-dev" target="_blank">Customize Palette</a>
</div>
</div>
<!--//Distro-->
</body>

</html>
6 changes: 1 addition & 5 deletions scripts/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ document.addEventListener("DOMContentLoaded", function () {
var gradientStart = " 10%, ";
var gradientEnd = " 100%)";
var colorData;
var chStarCount = document.querySelector(".ch-starcount");

var xhr = new XMLHttpRequest();
xhr.open("GET", "scripts/coolhue.json", true);
Expand Down Expand Up @@ -78,11 +79,6 @@ document.addEventListener("DOMContentLoaded", function () {
nodeGradientBrick.appendChild(nodeColors);
chPaper.appendChild(nodeGradientBrick);
}
var footerWrapper = document.createElement("div");
var para = document.createElement("p");
para.innerHTML = "&copy; Copyright <a href=\"https://webkul.com\" target=\"_blank\" rel=\"noopener\">Webkul Software</a>, All rights reserved.";
footerWrapper.appendChild(para);
chPaper.appendChild(footerWrapper);
}

var coolHueAction = function (event) {
Expand Down

0 comments on commit c2177d2

Please sign in to comment.