Skip to content
Snippets Groups Projects
Commit fb77a30c authored by jsg362's avatar jsg362
Browse files

Fixed copy to clipboard border

Changed the border around the hex codes after I merged. There will now be no border
parent 280fe297
Branches
No related tags found
No related merge requests found
...@@ -28,6 +28,8 @@ function copyHex(celement) { ...@@ -28,6 +28,8 @@ function copyHex(celement) {
document.body.removeChild(input); document.body.removeChild(input);
} }
</script> </script>
<div class="text-center"> <div class="text-center">
...@@ -62,7 +64,7 @@ function copyHex(celement) { ...@@ -62,7 +64,7 @@ function copyHex(celement) {
<button id="color6" onclick="copyHex(color6)" class="hexcodeStyle"></button> <button id="color6" onclick="copyHex(color6)" class="hexcodeStyle"></button>
</div> </div>
<canvas width="1000" height="500"></canvas> <canvas width="1000" height="200"></canvas>
</h2> </h2>
<h3> <h3>
<p>View your pallete visualized through AI art:</p> <p>View your pallete visualized through AI art:</p>
......
...@@ -208,6 +208,7 @@ body { ...@@ -208,6 +208,7 @@ body {
text-align: center; text-align: center;
background-color: white; background-color: white;
position: relative; position: relative;
border: white solid 0;
} }
...@@ -239,9 +240,9 @@ body { ...@@ -239,9 +240,9 @@ body {
.hexcodeStyle:active::before{ .hexcodeStyle:active::before{
content: 'Copied!'; content: 'Copied!';
animation-delay: 500ms;
} }
...@@ -18,27 +18,27 @@ const cre = () => { ...@@ -18,27 +18,27 @@ const cre = () => {
document.getElementById("palName").style.fontSize = "xx-large"; document.getElementById("palName").style.fontSize = "xx-large";
color.innerHTML = "#" + ranColor[0]; color.innerHTML = "#" + ranColor[0];
context.fillStyle = '#' +ranColor[0]; context.fillStyle = '#' +ranColor[0];
context.fillRect(0, 0, 166, 500); context.fillRect(0, 0, 166, 200);
document.getElementById("color").style.color = "#" + ranColor[0]; document.getElementById("color").style.color = "#" + ranColor[0];
color2.innerHTML = "#" + ranColor[1]; color2.innerHTML = "#" + ranColor[1];
context.fillStyle = '#' +ranColor[1]; context.fillStyle = '#' +ranColor[1];
context.fillRect(166, 0, 166, 500); context.fillRect(166, 0, 166, 200);
document.getElementById("color2").style.color = "#" + ranColor[1]; document.getElementById("color2").style.color = "#" + ranColor[1];
color3.innerHTML = "#" + ranColor[2]; color3.innerHTML = "#" + ranColor[2];
context.fillStyle = '#' +ranColor[2]; context.fillStyle = '#' +ranColor[2];
context.fillRect(332, 0, 166, 500); context.fillRect(332, 0, 166, 200);
document.getElementById("color3").style.color = "#" + ranColor[2]; document.getElementById("color3").style.color = "#" + ranColor[2];
color4.innerHTML = "#" + ranColor[3]; color4.innerHTML = "#" + ranColor[3];
context.fillStyle = '#' +ranColor[3]; context.fillStyle = '#' +ranColor[3];
context.fillRect(498, 0, 166, 500); context.fillRect(498, 0, 166, 200);
document.getElementById("color4").style.color = "#" + ranColor[3]; document.getElementById("color4").style.color = "#" + ranColor[3];
color5.innerHTML = "#" + ranColor[4]; color5.innerHTML = "#" + ranColor[4];
context.fillStyle = '#' +ranColor[4]; context.fillStyle = '#' +ranColor[4];
context.fillRect(664, 0, 166, 500); context.fillRect(664, 0, 166, 200);
document.getElementById("color5").style.color = "#" + ranColor[4]; document.getElementById("color5").style.color = "#" + ranColor[4];
color6.innerHTML = "#" + ranColor[5]; color6.innerHTML = "#" + ranColor[5];
context.fillStyle = '#' +ranColor[5]; context.fillStyle = '#' +ranColor[5];
context.fillRect(830, 0, 166, 500); context.fillRect(830, 0, 166, 200);
document.getElementById("color6").style.color = "#" + ranColor[5]; document.getElementById("color6").style.color = "#" + ranColor[5];
ailink = "?prompt=flower%20color(" + ranColor[0]+",%20" + ranColor[1]+ ",%20"+ ranColor[2]+ ",%20"+ ranColor[3]+ ",%20"+ ranColor[4]+ ",%20"+ ranColor[5]+ ")%20painting"; ailink = "?prompt=flower%20color(" + ranColor[0]+",%20" + ranColor[1]+ ",%20"+ ranColor[2]+ ",%20"+ ranColor[3]+ ",%20"+ ranColor[4]+ ",%20"+ ranColor[5]+ ")%20painting";
var link = "<a href='https://www.craiyon.com/" + ailink + "' target='_blank'>here</a>"; var link = "<a href='https://www.craiyon.com/" + ailink + "' target='_blank'>here</a>";
...@@ -49,11 +49,4 @@ genNew.addEventListener("click", cre); ...@@ -49,11 +49,4 @@ genNew.addEventListener("click", cre);
cre(); cre();
$(document).ready(function() {
$('.hexcodeStyle').click(function() {
$(this).addClass('active');
setTimeout(function(){
$('.active').removeClass('active');
},2000);
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment