main site css link
This commit is contained in:
parent
2a07aca10a
commit
9aa20b0da0
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -1,3 +1,3 @@
|
||||
{
|
||||
"liveServer.settings.port": 5501
|
||||
"liveServer.settings.port": 5502
|
||||
}
|
||||
BIN
assets/logo/BeachPartyBalloons-logo.webp
Normal file
BIN
assets/logo/BeachPartyBalloons-logo.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
BIN
assets/pictures/asfalt-dark.png
Normal file
BIN
assets/pictures/asfalt-dark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
538
color.css
Normal file
538
color.css
Normal file
@ -0,0 +1,538 @@
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
/* font-family: sans-serif; */
|
||||
font-family: "Autour One", serif;
|
||||
background-color: #c2c2c2;
|
||||
background-image: url("assets/pictures/asfalt-dark.png");
|
||||
/* This is mostly intended for prototyping; please download the pattern and re-host for production environments. Thank you! */
|
||||
}
|
||||
#main-header {
|
||||
text-align: center;
|
||||
padding: 20px 10px;
|
||||
background: #ffffffdd;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||
border-radius: 12px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#main-header h1 {
|
||||
font-size: 2rem;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#main-header p {
|
||||
font-size: 1rem;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#selected-palette {
|
||||
position: sticky;
|
||||
top: 60px; /* Adjusted top position for better spacing */
|
||||
max-width: 85%;
|
||||
margin: auto;
|
||||
padding: 10px;
|
||||
background-color: #e8e8e8;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/asfalt-light.png");
|
||||
border: 2px solid #ccc;
|
||||
border-radius: 10px;
|
||||
z-index: 1;
|
||||
|
||||
/* Flexbox settings */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
|
||||
/* ✨ Sizing and Scrolling Fix */
|
||||
max-height: 50vh; /* Keep your max-height */
|
||||
min-height: 0; /* Add this to allow flex children to shrink */
|
||||
}
|
||||
|
||||
/* Strong shadow when stuck */
|
||||
#selected-palette.stuck {
|
||||
box-shadow: 16px 16px 15px rgba(0, 0, 0, 0.25);
|
||||
border: 1px solid rgb(0, 0, 0);
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#palette-colors {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
padding: 10px;
|
||||
|
||||
/* ✨ Scrolling Fix */
|
||||
overflow-y: auto; /* Change from 'visible' to 'auto' for vertical scroll */
|
||||
flex-grow: 1; /* Allow this container to fill available space */
|
||||
}
|
||||
|
||||
|
||||
#clear-palette {
|
||||
margin-top: 20px;
|
||||
padding: 8px 12px;
|
||||
font-size: 0.9rem;
|
||||
background: #8ae7db;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 15px;
|
||||
cursor: pointer;
|
||||
margin: auto;
|
||||
|
||||
}
|
||||
|
||||
#color-families {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
font-family: "Autour One", serif;
|
||||
|
||||
}
|
||||
|
||||
@keyframes fadeInUp {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(10px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
footer {
|
||||
text-align: center;
|
||||
font-size: 0.9rem;
|
||||
color: #777;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.color-name {
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
#main-header h1 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
.color-family {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding-bottom: 20px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
animation: fadeInUp 0.5s ease;
|
||||
font-family: "Autour One", serif;
|
||||
|
||||
}
|
||||
.swatch-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 10px 20px; /* add horizontal AND vertical gaps */
|
||||
}
|
||||
|
||||
.color-family h3 {
|
||||
text-align: center;
|
||||
margin: 10px 0 5px;
|
||||
font-size: 1rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.swatch-wrapper {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
/* width: 60px; */
|
||||
/* margin: 0 5px; */
|
||||
/* padding: 10px; */
|
||||
max-width: min-content;
|
||||
position: relative;
|
||||
overflow-wrap: break-word;
|
||||
transition: filter 0.3s ease;
|
||||
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25));
|
||||
|
||||
}
|
||||
|
||||
.palette-header-row {
|
||||
display: flex;
|
||||
justify-content: space-between; /* Pushes title and buttons apart */
|
||||
align-items: center; /* Vertically centers them */
|
||||
width: 100%; /* Makes the row fill the container */
|
||||
padding: 0 10px; /* Adds some horizontal spacing */
|
||||
margin: auto
|
||||
}
|
||||
|
||||
/* Remove the default margins from your title */
|
||||
#selected-palette h2 {
|
||||
margin: 0;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
|
||||
.metallic-element[data-color="#FFD700"] {
|
||||
background: linear-gradient(to bottom, #B88606, #79550E);
|
||||
box-shadow:
|
||||
inset 0 0 0 0 rgba(255, 255, 255, 0.3),
|
||||
inset 0 0 0 1px rgba(0, 0, 0, 0.3),
|
||||
inset 0 0 10px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
|
||||
.color-swatch {
|
||||
width: 100px;
|
||||
height: 136px;
|
||||
position: relative;
|
||||
background: #ccc; /* fallback */
|
||||
transition: transform 0.3s ease;
|
||||
z-index: 1;
|
||||
background: radial-gradient(circle at 30% 30%, #fff5, transparent 60%), #ddd;
|
||||
|
||||
-webkit-mask-image: url('images/balloon-mask.svg');
|
||||
-webkit-mask-size: contain;
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
-webkit-mask-position: center;
|
||||
|
||||
mask-image: url('images/balloon-mask.svg');
|
||||
mask-size: contain;
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: center;
|
||||
font-family: "Autour One", serif;
|
||||
|
||||
}
|
||||
|
||||
.color-shine.has-halo {
|
||||
filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.4));
|
||||
}
|
||||
|
||||
.color-swatch:hover,
|
||||
.color-swatch:active {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
|
||||
/* Adjust shine for chosen state if necessary */
|
||||
|
||||
.color-background {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
border: 2px solid rgba(0, 0, 0, 0.1); /* Light gray border */
|
||||
box-shadow: 1 1 1;
|
||||
}
|
||||
.color-shine {
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
left: 45%;
|
||||
width: 70px;
|
||||
opacity: 0.6;
|
||||
z-index: 100; /* make this high enough */
|
||||
pointer-events: none;
|
||||
transform: translate(-50%, -50%);
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.color-name {
|
||||
font-size: 0.85rem;
|
||||
text-align: center;
|
||||
margin-top: 5px;
|
||||
word-break: keep-all; /* Prevent breaking long words */
|
||||
/* white-space: nowrap; Keep names on a single line */
|
||||
/* overflow: hidden; /*Hide overflow text if necessary */
|
||||
text-overflow: ellipsis; /* Add ... when text is too long */
|
||||
max-width: 100%;
|
||||
/* background-color: #e8e8e8; */
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 600px) {
|
||||
|
||||
.swatch-wrapper {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.color-name {
|
||||
font-size: 0.65rem;
|
||||
max-width: 50px;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#selected-palette h2 {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.color-name {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.color-name.highlighted-name {
|
||||
text-decoration:underline;
|
||||
font-weight: bold;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
@keyframes pop {
|
||||
0% { transform: scale(1); }
|
||||
50% { transform: scale(1.2); }
|
||||
100% { transform: scale(1); }
|
||||
}
|
||||
|
||||
.color-background.pop {
|
||||
animation: pop 0.25s ease;
|
||||
}
|
||||
|
||||
.chosen{
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.color-swatch.chosen {
|
||||
outline: 3px solid #333;
|
||||
outline-offset: 1px;
|
||||
width: 90px; /* Keep these specific dimensions for chosen state */
|
||||
height: 126px; /* Keep these specific dimensions for chosen state */
|
||||
z-index: 10;
|
||||
/* IMPORTANT: Re-apply the complex shadow from the base .color-swatch,
|
||||
and add the extra glow/shadow you want for the chosen state.
|
||||
This ensures depth is maintained. */
|
||||
box-shadow:
|
||||
inset 2px 2px 6px rgba(255, 255, 255, 0.6), /* Retain inner highlight for depth */
|
||||
0 8px 16px rgba(0, 0, 0, 0.3), /* Slightly larger/darker outer shadow for more pop */
|
||||
0 0 15px rgba(0, 0, 0, 0.4); /* More pronounced glow for chosen state */
|
||||
}
|
||||
|
||||
/* Shared metallic style */
|
||||
.metallic {
|
||||
position: relative;
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
/* box-shadow: inset 1px 1px 4px rgba(255, 255, 255, 0.6),
|
||||
0 2px 4px rgba(0, 0, 0, 0.3); */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Highlight overlay */
|
||||
.metallic1::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 15%;
|
||||
left: 15%;
|
||||
width: 70%;
|
||||
height: 70%;
|
||||
background: radial-gradient(circle at top left, rgba(255,255,255,0.3), transparent 70%);
|
||||
transform: rotate(-20deg);
|
||||
pointer-events: none;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* Specific chrome variants */
|
||||
.chrome-gold {
|
||||
background: linear-gradient(145deg, #fefcea, #b69978, #a18b67, #806748);
|
||||
}
|
||||
|
||||
.chrome-silver {
|
||||
background: linear-gradient(145deg, #e0e0e0, #a9a9a9, #808080, #e0e0e0);
|
||||
}
|
||||
|
||||
.chrome-rosegold {
|
||||
background: linear-gradient(145deg, #fbe3dc, #e6b7a9, #d19387, #fbe3dc);
|
||||
}
|
||||
|
||||
.chrome-champagne {
|
||||
background: linear-gradient(145deg, #fff2cc, #f2e6b6, #d9c08e, #fff2cc);
|
||||
}
|
||||
|
||||
.chrome-blue {
|
||||
background: linear-gradient(145deg, #d0f0ff, #4d7995, #2d576f, #d0f0ff);
|
||||
}
|
||||
|
||||
.chrome-purple {
|
||||
background: linear-gradient(145deg, #e0ccff, #b08be1, #915bc4, #e0ccff);
|
||||
}
|
||||
|
||||
.chrome-green {
|
||||
background: linear-gradient(145deg, #e2ffe2, #457066, #5c877d, #e2ffe2);
|
||||
}
|
||||
|
||||
|
||||
@keyframes balloonFloat {
|
||||
0%, 100% { transform: translateY(0) rotate(-4deg); }
|
||||
50% { transform: translateY(-25px) rotate(4deg); }
|
||||
}
|
||||
|
||||
.balloon-float {
|
||||
animation-name: balloonFloat;
|
||||
animation-timing-function: 4s ease-in-out;
|
||||
animation-iteration-count: infinite;
|
||||
transform-origin: bottom center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.color-background {
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
/* --- SVG Balloon String --- */
|
||||
.balloon-string-svg {
|
||||
position: absolute;
|
||||
top: 82px; /* match .color-swatch height */
|
||||
left: 45%;
|
||||
transform: translateX(-50%);
|
||||
width: 20px;
|
||||
height: 40px;
|
||||
z-index: -4;
|
||||
pointer-events: none;
|
||||
overflow: visible;
|
||||
transform-origin: top center;
|
||||
animation: svgWiggle 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
|
||||
.balloon-float-group {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
animation-name: balloonFloat;
|
||||
animation-duration: 4s;
|
||||
animation-timing-function: ease-in-out;
|
||||
animation-iteration-count: infinite;
|
||||
transform-origin: bottom center;
|
||||
}
|
||||
|
||||
.wiggle-path {
|
||||
stroke: #727171;
|
||||
stroke-width: 2;
|
||||
fill: none;
|
||||
stroke-linecap: round;
|
||||
stroke-dasharray: 1, 2;
|
||||
}
|
||||
|
||||
@keyframes svgWiggle {
|
||||
0%, 100% {
|
||||
transform: translateX(-50%) rotate(0deg);
|
||||
}
|
||||
25% {
|
||||
transform: translateX(-50%) rotate(2deg);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(-50%) rotate(-2.5deg);
|
||||
}
|
||||
75% {
|
||||
transform: translateX(-50%) rotate(1.5deg);
|
||||
}
|
||||
}
|
||||
|
||||
#palette-controls {
|
||||
position: static;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
z-index: 200;
|
||||
}
|
||||
/* Toggle Switch Styling */
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
}
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0; left: 0;
|
||||
right: 0; bottom: 0;
|
||||
background-color: #ccc;
|
||||
transition: 0.4s;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 14px;
|
||||
width: 14px;
|
||||
left: 3px;
|
||||
bottom: 3px;
|
||||
background-color: white;
|
||||
transition: 0.4s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
input:checked + .slider {
|
||||
background-color: #4caf50;
|
||||
}
|
||||
input:checked + .slider:before {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
/* Shuffle Button */
|
||||
#shuffle-palette {
|
||||
font-size: 16px;
|
||||
padding: 4px 8px;
|
||||
border: none;
|
||||
background: #f0f0f0;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.palette-modal-backdrop {
|
||||
position: fixed;
|
||||
top: 0; left: 0;
|
||||
width: 100vw; height: 100vh;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
display: none; /* Default is hidden */
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.palette-modal-backdrop .palette-modal {
|
||||
background: white;
|
||||
padding: 20px;
|
||||
border-radius: 12px;
|
||||
max-width: 90%;
|
||||
width: 400px;
|
||||
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Styling for the share link input field inside the modal */
|
||||
#share-link-input {
|
||||
display: block;
|
||||
width: 90%;
|
||||
padding: 8px;
|
||||
margin: 15px auto 0;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
font-size: 0.9rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Styling for the copy button inside the modal */
|
||||
#copy-link-button {
|
||||
margin-top: 15px;
|
||||
padding: 10px 20px;
|
||||
font-size: 1rem;
|
||||
font-weight: bold;
|
||||
background-color: #4CAF50; /* Green */
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
#copy-link-button:hover {
|
||||
background-color: #45a049;
|
||||
}
|
||||
87
index.html
87
index.html
@ -6,16 +6,82 @@
|
||||
<title>Beach Party Balloons Color Palette Picker</title>
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Autour+One&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1.0.2/css/bulma.min.css">
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Beach Party Balloons Color Palette Picker</title>
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Autour+One&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1.0.2/css/bulma.min.css">
|
||||
|
||||
<link rel="stylesheet" href="../style.css">
|
||||
<link rel="stylesheet" href="color.css">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="../assets/favicon/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="../assets/favicon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../assets/favicon/favicon-16x16.png">
|
||||
<link rel="manifest" href="../assets/favicon/site.webmanifest">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" integrity="sha512-Evv84Mr4kqVGRNSgIGL/F/aIDqQb7xQ2vcrdIwxfjThSH8CSR7PBEakCr51Ck+w+/U6swU2Im1vVX0SVk9ABhg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<header id="main-header">
|
||||
<h1>🎈 Color Balloon Picker</h1>
|
||||
<p>Select and float your favorite shades</p>
|
||||
</header>
|
||||
<nav class="navbar is-info is-spaced has-shadow" role="navigation" aria-label="main navigation">
|
||||
<div class="navbar-brand is-size-1">
|
||||
<a class="navbar-item" href="/">
|
||||
<img style="background-color: white;" src="assets/logo/BeachPartyBalloons-logo.webp" alt="Beach Party Balloons logo">
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div id="navbarBasicExample" class="navbar-menu has-text-right">
|
||||
<div class="navbar-end">
|
||||
<a class="navbar-item is-tab" href="/">
|
||||
Home
|
||||
</a>
|
||||
|
||||
<a class="navbar-item" href="about/">
|
||||
About Us
|
||||
</a>
|
||||
<a class="navbar-item" href="faq/">
|
||||
FAQ
|
||||
</a>
|
||||
<a class="navbar-item" href="terms/">
|
||||
Terms
|
||||
</a>
|
||||
<!-- <div class="navbar-item "> -->
|
||||
<a class="navbar-item" href="gallery/">
|
||||
Gallery
|
||||
</a>
|
||||
<a class="navbar-item" href="contact/">
|
||||
Contact
|
||||
</a>
|
||||
<a class="navbar-item" href="color/">
|
||||
Colors
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="navbar-end">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<div id="selected-palette">
|
||||
<div class="palette-header-row">
|
||||
<h2>Your Palette</h2>
|
||||
<h2 class="has-text-dark">Your Palette</h2>
|
||||
<div id="palette-controls">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="toggle-animation" checked>
|
||||
@ -25,14 +91,13 @@
|
||||
<button id="share-palette" title="Share Palette">🔗</button>
|
||||
</div>
|
||||
</div> <div id="palette-colors"></div>
|
||||
<button id="clear-palette">Clear Palette</button>
|
||||
<button id="clear-palette" class="has-text-dark">Clear Palette</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-backdrop">
|
||||
<div class="modal">
|
||||
<div class="palette-modal-backdrop">
|
||||
<div class="palette-modal">
|
||||
<h3>Share Your Palette</h3>
|
||||
<div id="modal-color-list">
|
||||
</div>
|
||||
<div id="modal-color-list"></div>
|
||||
<button id="close-modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
66
script.js
66
script.js
@ -23,6 +23,7 @@ fetch('colors.json')
|
||||
data.forEach(family => {
|
||||
const familyDiv = document.createElement('div');
|
||||
familyDiv.classList.add('color-family');
|
||||
familyDiv.classList.add('has-text-dark');
|
||||
familyDiv.innerHTML = `<h3>${family.family}</h3>`;
|
||||
|
||||
const swatchContainer = document.createElement('div');
|
||||
@ -37,7 +38,6 @@ fetch('colors.json')
|
||||
swatch.dataset.color = color.hex;
|
||||
swatch.style.color = color.hex;
|
||||
|
||||
|
||||
const backgroundDiv = document.createElement('div');
|
||||
backgroundDiv.classList.add('color-background');
|
||||
|
||||
@ -77,7 +77,6 @@ fetch('colors.json')
|
||||
selectedPalette.push(color);
|
||||
}
|
||||
|
||||
// Add a 'pop' animation on click
|
||||
backgroundDiv.classList.add('pop');
|
||||
backgroundDiv.addEventListener('animationend', () => {
|
||||
backgroundDiv.classList.remove('pop');
|
||||
@ -96,20 +95,23 @@ fetch('colors.json')
|
||||
colorFamiliesContainer.appendChild(familyDiv);
|
||||
});
|
||||
|
||||
// Initial renders after setting up the page
|
||||
renderSelectedPalette();
|
||||
updateSwatchHighlights();
|
||||
|
||||
// Check if a palette was shared in the URL (will override Local Storage)
|
||||
loadPaletteFromURL(data);
|
||||
// Initialize the palette, checking for shared links or local versions
|
||||
initializePaletteOnLoad(data);
|
||||
})
|
||||
.catch(error => console.error('Error loading colors:', error));
|
||||
|
||||
/**
|
||||
* Saves the current 'selectedPalette' array to the browser's Local Storage.
|
||||
* We also save the URL params that would be generated from this palette.
|
||||
*/
|
||||
function savePaletteToLocalStorage() {
|
||||
localStorage.setItem('userPalette', JSON.stringify(selectedPalette));
|
||||
|
||||
// Generate the canonical URL parameter string for the CURRENT palette
|
||||
const currentPaletteParams = selectedPalette.map(c => c.hex.substring(1)).join(',');
|
||||
|
||||
// Always save this as the source, so we can detect incoming new links
|
||||
localStorage.setItem('paletteSourceUrl', currentPaletteParams);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -166,8 +168,6 @@ function renderSelectedPalette() {
|
||||
const svgNS = "http://www.w3.org/2000/svg";
|
||||
const stringSVG = document.createElementNS(svgNS, "svg");
|
||||
stringSVG.setAttribute("class", "balloon-string-svg");
|
||||
stringSVG.setAttribute("width", "20");
|
||||
stringSVG.setAttribute("height", "60");
|
||||
stringSVG.setAttribute("viewBox", "0 0 20 60");
|
||||
const path = document.createElementNS(svgNS, "path");
|
||||
path.setAttribute("d", "M10 0 C8 10, 12 20, 10 30 C8 40, 12 50, 10 60");
|
||||
@ -185,7 +185,6 @@ function renderSelectedPalette() {
|
||||
colorName.textContent = color.name;
|
||||
swatchWrapper.appendChild(colorName);
|
||||
|
||||
// Click to remove a color from the selected palette
|
||||
swatch.addEventListener('click', () => {
|
||||
selectedPalette = selectedPalette.filter(c => c.hex !== color.hex);
|
||||
renderSelectedPalette();
|
||||
@ -195,7 +194,6 @@ function renderSelectedPalette() {
|
||||
paletteColorsContainer.appendChild(swatchWrapper);
|
||||
});
|
||||
|
||||
// Save the state to Local Storage whenever the palette is re-rendered
|
||||
savePaletteToLocalStorage();
|
||||
}
|
||||
|
||||
@ -226,6 +224,7 @@ function updateSwatchHighlights() {
|
||||
* @returns {boolean} - True if the color is light, false otherwise.
|
||||
*/
|
||||
function isLightColor(hex) {
|
||||
if (!hex) return false;
|
||||
const rgb = hex.replace('#', '').match(/.{1,2}/g).map(x => parseInt(x, 16));
|
||||
const brightness = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;
|
||||
return brightness > 220;
|
||||
@ -245,55 +244,67 @@ function shuffleArray(array) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks the URL for a 'colors' parameter and loads the corresponding palette.
|
||||
* Initializes the palette on page load, prioritizing a new shared URL
|
||||
* over existing local storage.
|
||||
* @param {Array} allColorData - The entire array of color families from colors.json.
|
||||
*/
|
||||
function loadPaletteFromURL(allColorData) {
|
||||
function initializePaletteOnLoad(allColorData) {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const colorsFromURL = params.get('colors');
|
||||
const savedSourceUrl = localStorage.getItem('paletteSourceUrl');
|
||||
|
||||
if (colorsFromURL) {
|
||||
// Case 1: A new shared link has been clicked.
|
||||
// The URL has colors, and they are different from the source of the currently saved palette.
|
||||
if (colorsFromURL && colorsFromURL !== savedSourceUrl) {
|
||||
console.log("Loading palette from new share link...");
|
||||
const flatColorList = allColorData.flatMap(family => family.colors);
|
||||
const hexCodesFromURL = colorsFromURL.split(',');
|
||||
|
||||
// Find the full color object for each hex code in the URL
|
||||
const paletteFromURL = hexCodesFromURL.map(hex => {
|
||||
// The URL stores hex codes without the '#', so we add it back for the comparison
|
||||
return flatColorList.find(color => color.hex === `#${hex}`);
|
||||
}).filter(Boolean); // Filter out any invalid colors
|
||||
}).filter(Boolean);
|
||||
|
||||
// If we found valid colors from the URL, it overrides Local Storage
|
||||
if (paletteFromURL.length > 0) {
|
||||
selectedPalette = paletteFromURL;
|
||||
}
|
||||
|
||||
// "Claim" this URL by saving it, then clean the address bar.
|
||||
savePaletteToLocalStorage();
|
||||
history.replaceState(null, '', window.location.pathname);
|
||||
}
|
||||
// Case 2: The user is just reloading a page. Default to local storage.
|
||||
else {
|
||||
console.log("Loading palette from Local Storage.");
|
||||
// No action needed; palette is already loaded from local storage at the top.
|
||||
}
|
||||
|
||||
// Finally, render whatever palette was decided upon.
|
||||
renderSelectedPalette();
|
||||
updateSwatchHighlights();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- Event Listeners for Palette Controls ---
|
||||
// --- Event Listeners ---
|
||||
|
||||
document.getElementById('clear-palette').addEventListener('click', () => {
|
||||
selectedPalette = [];
|
||||
localStorage.removeItem('paletteSourceUrl'); // Also clear the source
|
||||
renderSelectedPalette();
|
||||
updateSwatchHighlights();
|
||||
});
|
||||
|
||||
document.getElementById('toggle-animation').addEventListener('click', () => {
|
||||
animationsEnabled = !animationsEnabled;
|
||||
document.getElementById('toggle-animation').addEventListener('click', (e) => {
|
||||
animationsEnabled = e.target.checked;
|
||||
renderSelectedPalette();
|
||||
});
|
||||
|
||||
document.getElementById('shuffle-palette').addEventListener('click', () => {
|
||||
selectedPalette = shuffleArray(selectedPalette);
|
||||
renderSelectedPalette();
|
||||
updateSwatchHighlights();
|
||||
});
|
||||
|
||||
// --- Modal Functionality ---
|
||||
|
||||
const shareButton = document.getElementById('share-palette');
|
||||
const modalBackdrop = document.querySelector('.modal-backdrop');
|
||||
const modalBackdrop = document.querySelector('.palette-modal-backdrop');
|
||||
const closeModalButton = document.getElementById('close-modal');
|
||||
const modalColorList = document.getElementById('modal-color-list');
|
||||
|
||||
@ -315,7 +326,6 @@ shareButton.addEventListener('click', () => {
|
||||
|
||||
document.getElementById('copy-link-button').addEventListener('click', () => {
|
||||
const linkInput = document.getElementById('share-link-input');
|
||||
|
||||
navigator.clipboard.writeText(linkInput.value).then(() => {
|
||||
const copyButton = document.getElementById('copy-link-button');
|
||||
copyButton.textContent = 'Copied! ✅';
|
||||
|
||||
812
style.css
812
style.css
@ -1,535 +1,305 @@
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
/* font-family: sans-serif; */
|
||||
font-family: "Autour One", serif;
|
||||
background-color: #c2c2c2;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/asfalt-dark.png");
|
||||
/* This is mostly intended for prototyping; please download the pattern and re-host for production environments. Thank you! */
|
||||
}
|
||||
#main-header {
|
||||
text-align: center;
|
||||
padding: 20px 10px;
|
||||
background: #ffffffdd;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||
border-radius: 12px;
|
||||
margin-bottom: 20px;
|
||||
:root {
|
||||
/* --bulma-primary-h: ; */
|
||||
--bulma-primary-l: 47%;
|
||||
--bulma-info-h: 175deg;
|
||||
--bulma-info-s: 88%;
|
||||
--bulma-info-l: 42%;
|
||||
--bulma-navbar-item-img-max-height: 200px;
|
||||
}
|
||||
|
||||
#main-header h1 {
|
||||
font-size: 2rem;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#main-header p {
|
||||
font-size: 1rem;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#selected-palette {
|
||||
position: sticky;
|
||||
top: 10px;
|
||||
background: #fff;
|
||||
z-index: 100;
|
||||
padding: 10px;
|
||||
border: 2px solid #ccc;
|
||||
border-radius: 10px;
|
||||
transition: box-shadow 0.3s ease;
|
||||
max-width: 80%;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
|
||||
gap: 15px;
|
||||
background-color: #e8e8e8;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/asfalt-light.png");
|
||||
/* This is mostly intended for prototyping; please download the pattern and re-host for production environments. Thank you! */
|
||||
}
|
||||
|
||||
/* Strong shadow when stuck */
|
||||
#selected-palette.stuck {
|
||||
box-shadow: 16px 16px 15px rgba(0, 0, 0, 0.25);
|
||||
border: 1px solid rgb(0, 0, 0);
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#palette-colors {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
overflow: visible;
|
||||
padding: 10px;
|
||||
/* transition: padding 0.3s ease; */
|
||||
transition: max-height 0.3s ease, padding 0.3s ease;
|
||||
}
|
||||
|
||||
|
||||
#clear-palette {
|
||||
margin-top: 20px;
|
||||
padding: 8px 12px;
|
||||
font-size: 0.9rem;
|
||||
background: #8ae7db;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 15px;
|
||||
cursor: pointer;
|
||||
margin: auto;
|
||||
|
||||
}
|
||||
|
||||
#color-families {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
|
||||
}
|
||||
|
||||
@keyframes fadeInUp {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(10px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
footer {
|
||||
text-align: center;
|
||||
font-size: 0.9rem;
|
||||
color: #777;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.color-name {
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
#main-header h1 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
.color-family {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding-bottom: 20px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
animation: fadeInUp 0.5s ease;
|
||||
|
||||
}
|
||||
.swatch-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 10px 20px; /* add horizontal AND vertical gaps */
|
||||
}
|
||||
|
||||
.color-family h3 {
|
||||
text-align: center;
|
||||
margin: 10px 0 5px;
|
||||
font-size: 1rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.swatch-wrapper {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
/* width: 60px; */
|
||||
/* margin: 0 5px; */
|
||||
/* padding: 10px; */
|
||||
max-width: min-content;
|
||||
position: relative;
|
||||
overflow-wrap: break-word;
|
||||
transition: filter 0.3s ease;
|
||||
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25));
|
||||
|
||||
}
|
||||
|
||||
.palette-header-row {
|
||||
display: flex;
|
||||
justify-content: space-between; /* Pushes title and buttons apart */
|
||||
align-items: center; /* Vertically centers them */
|
||||
width: 100%; /* Makes the row fill the container */
|
||||
padding: 0 10px; /* Adds some horizontal spacing */
|
||||
margin: auto
|
||||
}
|
||||
|
||||
/* Remove the default margins from your title */
|
||||
#selected-palette h2 {
|
||||
margin: 0;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
|
||||
.metallic-element[data-color="#FFD700"] {
|
||||
background: linear-gradient(to bottom, #B88606, #79550E);
|
||||
box-shadow:
|
||||
inset 0 0 0 0 rgba(255, 255, 255, 0.3),
|
||||
inset 0 0 0 1px rgba(0, 0, 0, 0.3),
|
||||
inset 0 0 10px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
|
||||
.color-swatch {
|
||||
width: 100px;
|
||||
height: 136px;
|
||||
position: relative;
|
||||
background: #ccc; /* fallback */
|
||||
transition: transform 0.3s ease;
|
||||
z-index: 1;
|
||||
background: radial-gradient(circle at 30% 30%, #fff5, transparent 60%), #ddd;
|
||||
|
||||
-webkit-mask-image: url('images/balloon-mask.svg');
|
||||
-webkit-mask-size: contain;
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
-webkit-mask-position: center;
|
||||
|
||||
mask-image: url('images/balloon-mask.svg');
|
||||
mask-size: contain;
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: center;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.color-shine.has-halo {
|
||||
filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.4));
|
||||
}
|
||||
|
||||
.color-swatch:hover,
|
||||
.color-swatch:active {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
|
||||
/* Adjust shine for chosen state if necessary */
|
||||
|
||||
.color-background {
|
||||
width: 100%;
|
||||
html {
|
||||
background-color: #e7e6dd;
|
||||
font-family: "Autour One", serif; /* font-family: "Playwrite AU SA", serif; */
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
border: 2px solid rgba(0, 0, 0, 0.1); /* Light gray border */
|
||||
box-shadow: 1 1 1;
|
||||
}
|
||||
.color-shine {
|
||||
|
||||
body {
|
||||
font-family: "Autour One", serif;
|
||||
color:#363636;
|
||||
}
|
||||
|
||||
|
||||
nav {
|
||||
font-family: "Autour One", serif;
|
||||
}
|
||||
.update{
|
||||
height: 50px;
|
||||
width:100%;
|
||||
/* background-color: #deb0f0; */
|
||||
text-align: center;
|
||||
margin: auto;
|
||||
overflow: hidden;
|
||||
background-color: #fef6e4;
|
||||
padding: 10px 0;
|
||||
/* border-top: 2px solid #94d601;; */
|
||||
/* border-bottom: 2px solid #94d601;; */
|
||||
position: relative;
|
||||
}
|
||||
#message{
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
padding-left: 100%; /* Start off-screen */
|
||||
animation: scroll-left 25s linear infinite;
|
||||
font-size: 1.2rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
@keyframes scroll-left {
|
||||
0% {
|
||||
transform: translateX(0%);
|
||||
}
|
||||
100% {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.update-carousel {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
background-color: #fef6e4;
|
||||
border-top: 2px solid #ffd100;
|
||||
border-bottom: 2px solid #ffd100;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 1.1rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.message-text {
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
left: 45%;
|
||||
width: 70px;
|
||||
opacity: 0.6;
|
||||
z-index: 100; /* make this high enough */
|
||||
pointer-events: none;
|
||||
left: 100%;
|
||||
animation: slide-left 8s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes slide-left {
|
||||
0% {
|
||||
left: 100%;
|
||||
}
|
||||
10% {
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
90% {
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
100% {
|
||||
left: -100%;
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
color: antiquewhite;
|
||||
}
|
||||
|
||||
.centerimg {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 4em;
|
||||
}
|
||||
|
||||
#heroImg {
|
||||
position: absolute; /* height: 600px; */
|
||||
}
|
||||
|
||||
.navbar-item img, .navbar-item svg {
|
||||
max-height: 1.30em;
|
||||
}
|
||||
|
||||
.is-overlay {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.padding{
|
||||
padding: 1.2rem;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Centered text */
|
||||
.text-on-image {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.image-container {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.image-container img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.color-name {
|
||||
font-size: 0.85rem;
|
||||
.overlay {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background: rgba(0, 0, 0, 0.5); /* Optional: adds background for better readability */
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
margin-top: 5px;
|
||||
word-break: keep-all; /* Prevent breaking long words */
|
||||
/* white-space: nowrap; Keep names on a single line */
|
||||
/* overflow: hidden; /*Hide overflow text if necessary */
|
||||
text-overflow: ellipsis; /* Add ... when text is too long */
|
||||
max-width: 100%;
|
||||
/* background-color: #e8e8e8; */
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 600px) {
|
||||
|
||||
.swatch-wrapper {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.color-name {
|
||||
font-size: 0.65rem;
|
||||
max-width: 50px;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#selected-palette h2 {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.color-name {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.color-name.highlighted-name {
|
||||
text-decoration:underline;
|
||||
font-weight: bold;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
@keyframes pop {
|
||||
0% { transform: scale(1); }
|
||||
50% { transform: scale(1.2); }
|
||||
100% { transform: scale(1); }
|
||||
}
|
||||
|
||||
.color-background.pop {
|
||||
animation: pop 0.25s ease;
|
||||
}
|
||||
|
||||
.chosen{
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.color-swatch.chosen {
|
||||
outline: 3px solid #333;
|
||||
outline-offset: 1px;
|
||||
width: 90px; /* Keep these specific dimensions for chosen state */
|
||||
height: 126px; /* Keep these specific dimensions for chosen state */
|
||||
z-index: 10;
|
||||
/* IMPORTANT: Re-apply the complex shadow from the base .color-swatch,
|
||||
and add the extra glow/shadow you want for the chosen state.
|
||||
This ensures depth is maintained. */
|
||||
box-shadow:
|
||||
inset 2px 2px 6px rgba(255, 255, 255, 0.6), /* Retain inner highlight for depth */
|
||||
0 8px 16px rgba(0, 0, 0, 0.3), /* Slightly larger/darker outer shadow for more pop */
|
||||
0 0 15px rgba(0, 0, 0, 0.4); /* More pronounced glow for chosen state */
|
||||
}
|
||||
|
||||
/* Shared metallic style */
|
||||
.metallic {
|
||||
position: relative;
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
/* box-shadow: inset 1px 1px 4px rgba(255, 255, 255, 0.6),
|
||||
0 2px 4px rgba(0, 0, 0, 0.3); */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Highlight overlay */
|
||||
.metallic1::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 15%;
|
||||
left: 15%;
|
||||
width: 70%;
|
||||
height: 70%;
|
||||
background: radial-gradient(circle at top left, rgba(255,255,255,0.3), transparent 70%);
|
||||
transform: rotate(-20deg);
|
||||
pointer-events: none;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* Specific chrome variants */
|
||||
.chrome-gold {
|
||||
background: linear-gradient(145deg, #fefcea, #b69978, #a18b67, #806748);
|
||||
}
|
||||
|
||||
.chrome-silver {
|
||||
background: linear-gradient(145deg, #e0e0e0, #a9a9a9, #808080, #e0e0e0);
|
||||
}
|
||||
|
||||
.chrome-rosegold {
|
||||
background: linear-gradient(145deg, #fbe3dc, #e6b7a9, #d19387, #fbe3dc);
|
||||
}
|
||||
|
||||
.chrome-champagne {
|
||||
background: linear-gradient(145deg, #fff2cc, #f2e6b6, #d9c08e, #fff2cc);
|
||||
}
|
||||
|
||||
.chrome-blue {
|
||||
background: linear-gradient(145deg, #d0f0ff, #4d7995, #2d576f, #d0f0ff);
|
||||
}
|
||||
|
||||
.chrome-purple {
|
||||
background: linear-gradient(145deg, #e0ccff, #b08be1, #915bc4, #e0ccff);
|
||||
}
|
||||
|
||||
.chrome-green {
|
||||
background: linear-gradient(145deg, #e2ffe2, #457066, #5c877d, #e2ffe2);
|
||||
}
|
||||
|
||||
|
||||
@keyframes balloonFloat {
|
||||
0%, 100% { transform: translateY(0) rotate(-4deg); }
|
||||
50% { transform: translateY(-25px) rotate(4deg); }
|
||||
}
|
||||
|
||||
.balloon-float {
|
||||
animation-name: balloonFloat;
|
||||
animation-timing-function: 4s ease-in-out;
|
||||
animation-iteration-count: infinite;
|
||||
transform-origin: bottom center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.color-background {
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
/* --- SVG Balloon String --- */
|
||||
.balloon-string-svg {
|
||||
position: absolute;
|
||||
top: 82px; /* match .color-swatch height */
|
||||
left: 45%;
|
||||
transform: translateX(-50%);
|
||||
width: 20px;
|
||||
height: 40px;
|
||||
z-index: -4;
|
||||
pointer-events: none;
|
||||
overflow: visible;
|
||||
transform-origin: top center;
|
||||
animation: svgWiggle 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
|
||||
.balloon-float-group {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
animation-name: balloonFloat;
|
||||
animation-duration: 4s;
|
||||
animation-timing-function: ease-in-out;
|
||||
animation-iteration-count: infinite;
|
||||
transform-origin: bottom center;
|
||||
}
|
||||
|
||||
.wiggle-path {
|
||||
stroke: #727171;
|
||||
stroke-width: 2;
|
||||
fill: none;
|
||||
stroke-linecap: round;
|
||||
stroke-dasharray: 1, 2;
|
||||
}
|
||||
|
||||
@keyframes svgWiggle {
|
||||
0%, 100% {
|
||||
transform: translateX(-50%) rotate(0deg);
|
||||
}
|
||||
25% {
|
||||
transform: translateX(-50%) rotate(2deg);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(-50%) rotate(-2.5deg);
|
||||
}
|
||||
75% {
|
||||
transform: translateX(-50%) rotate(1.5deg);
|
||||
}
|
||||
}
|
||||
|
||||
#palette-controls {
|
||||
position: static;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
z-index: 200;
|
||||
}
|
||||
/* Toggle Switch Styling */
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
}
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0; left: 0;
|
||||
right: 0; bottom: 0;
|
||||
background-color: #ccc;
|
||||
transition: 0.4s;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 14px;
|
||||
width: 14px;
|
||||
left: 3px;
|
||||
bottom: 3px;
|
||||
background-color: white;
|
||||
transition: 0.4s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
input:checked + .slider {
|
||||
background-color: #4caf50;
|
||||
}
|
||||
input:checked + .slider:before {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
/* Shuffle Button */
|
||||
#shuffle-palette {
|
||||
font-size: 16px;
|
||||
padding: 4px 8px;
|
||||
border: none;
|
||||
background: #f0f0f0;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.modal-backdrop {
|
||||
position: fixed;
|
||||
top: 0; left: 0;
|
||||
width: 100vw; height: 100vh;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
display: none; /* Start hidden */
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.modal {
|
||||
background: white;
|
||||
padding: 20px;
|
||||
border-radius: 12px;
|
||||
max-width: 90%;
|
||||
width: 400px;
|
||||
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Styling for the share link input field inside the modal */
|
||||
#share-link-input {
|
||||
display: block;
|
||||
width: 90%;
|
||||
padding: 8px;
|
||||
margin: 15px auto 0;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
font-size: 0.9rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Styling for the copy button inside the modal */
|
||||
#copy-link-button {
|
||||
margin-top: 15px;
|
||||
padding: 10px 20px;
|
||||
font-size: 1rem;
|
||||
font-weight: bold;
|
||||
background-color: #4CAF50; /* Green */
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
.lightbox .close {
|
||||
pointer-events: auto;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
#copy-link-button:hover {
|
||||
background-color: #45a049;
|
||||
h1 label button{color: #363636}
|
||||
|
||||
form{
|
||||
background-color: rgb(231, 230, 221);
|
||||
font-family: "Autour One", serif; /* font-family: "Playwrite AU SA", serif; */
|
||||
color:#363636;
|
||||
|
||||
}
|
||||
|
||||
#top {
|
||||
font-family: "Autour One", serif; /* font-family: "Playwrite AU SA", serif; */
|
||||
|
||||
display: none; /* Hidden by default */
|
||||
position: fixed; /* Fixed/sticky position */
|
||||
bottom: 12px; /* Place the button at the bottom of the page */
|
||||
right: 10px; /* Place the button 30px from the right */
|
||||
z-index: 99; /* Make sure it does not overlap */
|
||||
border: none; /* Remove borders */
|
||||
outline: none; /* Remove outline */
|
||||
background-color: #94d601; /* Set a background color */
|
||||
cursor: pointer; /* Add a mouse pointer on hover */
|
||||
padding: 15px; /* Some padding */
|
||||
border-radius: 10px; /* Rounded corners */
|
||||
font-size: 18px; /* Increase font size */
|
||||
border:solid 1px #363636;
|
||||
box-shadow: 3px 3px 3px #363636 ;
|
||||
}
|
||||
|
||||
#top:hover {
|
||||
background-color: #aedad3; /* Add a dark-grey background on hover */
|
||||
}
|
||||
|
||||
#status{
|
||||
color: rgb(221, 74, 214);
|
||||
margin-bottom: 1rem;;
|
||||
}
|
||||
|
||||
.neonTextOpen {
|
||||
color: #fff;
|
||||
text-shadow:
|
||||
0 0 7px #fff,
|
||||
0 0 10px #fff,
|
||||
0 0 21px #fff,
|
||||
0 0 42px #bc13fe,
|
||||
0 0 82px #bc13fe,
|
||||
0 0 92px #bc13fe,
|
||||
0 0 102px #bc13fe,
|
||||
0 0 151px #bc13fe;
|
||||
animation: pulsateOpen 1.5s infinite alternate;
|
||||
max-width: fit-content;
|
||||
margin: auto;
|
||||
border: 0.1rem solid #fff;
|
||||
border-radius: 2rem;
|
||||
padding: 0.4em;
|
||||
margin-bottom: 1rem;
|
||||
box-shadow:
|
||||
0 0 0.2rem #fff,
|
||||
0 0 0.2rem #fff,
|
||||
0 0 2rem #bc13fe,
|
||||
0 0 0.8rem #bc13fe,
|
||||
inset 0 0 1.3rem #bc13fe;
|
||||
}
|
||||
|
||||
.neonTextClosed {
|
||||
color: #fff;
|
||||
text-shadow:
|
||||
0 0 7px #fff,
|
||||
0 0 10px #fff,
|
||||
0 0 21px #fff,
|
||||
0 0 42px #11c9f7,
|
||||
0 0 82px #11c9f7,
|
||||
0 0 92px #11c9f7,
|
||||
0 0 102px #11c9f7,
|
||||
0 0 151px #11c9f7;
|
||||
animation: pulsateClosed 1.5s infinite alternate;
|
||||
max-width: fit-content;
|
||||
margin: auto;
|
||||
border: 0.1rem solid #fff;
|
||||
border-radius: 2rem;
|
||||
padding: 0.4em;
|
||||
margin-bottom: 1rem;
|
||||
box-shadow:
|
||||
0 0 0.2rem #fff,
|
||||
0 0 0.2rem #fff,
|
||||
0 0 2rem #11c9f7,
|
||||
0 0 0.8rem #11c9f7,
|
||||
inset 0 0 1.3rem #11c9f7;
|
||||
}
|
||||
|
||||
@keyframes pulsateOpen {
|
||||
|
||||
100% {
|
||||
text-shadow:
|
||||
0 0 4px #fff,
|
||||
0 0 11px #fff,
|
||||
0 0 19px #fff,
|
||||
0 0 40px #bc13fe,
|
||||
0 0 80px #bc13fe,
|
||||
0 0 90px #bc13fe,
|
||||
0 0 100px #bc13fe,
|
||||
0 0 150px #bc13fe;
|
||||
}
|
||||
|
||||
0% {
|
||||
text-shadow:
|
||||
0 0 2px #fff,
|
||||
0 0 4px #fff,
|
||||
0 0 6px #fff,
|
||||
0 0 10px #bc13fe,
|
||||
0 0 45px #bc13fe,
|
||||
0 0 55px #bc13fe,
|
||||
0 0 70px #bc13fe,
|
||||
0 0 80px #bc13fe;
|
||||
}
|
||||
|
||||
@keyframes pulsateClosed {
|
||||
|
||||
100% {
|
||||
text-shadow:
|
||||
0 0 4px #fff,
|
||||
0 0 11px #fff,
|
||||
0 0 19px #fff,
|
||||
0 0 40px #11c9f7,
|
||||
0 0 80px #11c9f7,
|
||||
0 0 90px #11c9f7,
|
||||
0 0 100px #11c9f7,
|
||||
0 0 150px #11c9f7;
|
||||
}
|
||||
|
||||
0% {
|
||||
text-shadow:
|
||||
0 0 2px #fff,
|
||||
0 0 4px #fff,
|
||||
0 0 6px #fff,
|
||||
0 0 10px #11c9f7,
|
||||
0 0 45px #11c9f7,
|
||||
0 0 55px #11c9f7,
|
||||
0 0 70px #11c9f7,
|
||||
0 0 80px #11c9f7;
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user