169 lines
No EOL
4.3 KiB
CSS
169 lines
No EOL
4.3 KiB
CSS
/* styles.css */
|
|
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
|
|
/* General styling for the body and page layout */
|
|
body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
min-height: 100vh;
|
|
width: 100%;
|
|
margin: 0;
|
|
font-family: 'Poppins', sans-serif; /* Set font family for the entire page */
|
|
background-color: var(--bg); /* Light gray background color */
|
|
}
|
|
.intro {
|
|
position: absolute;
|
|
top: 0;
|
|
z-index: 2;
|
|
background-color: #000;
|
|
width: 100%;
|
|
height: 100vh;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
flex-direction: column;
|
|
}
|
|
.fadeout {
|
|
animation-name: fadeout;
|
|
animation-duration: 1s;
|
|
|
|
}
|
|
@keyframes fadeout {
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateX(-50%);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateX(0);
|
|
}
|
|
}
|
|
.intro h2{
|
|
font-size: 35px;
|
|
font-weight: 600;
|
|
text-align: center;
|
|
color: #fff;
|
|
animation-name: fadeIn;
|
|
animation-duration: .8s;
|
|
}
|
|
|
|
/* Styling for the header section */
|
|
.header {
|
|
margin-bottom: 20px;
|
|
}
|
|
:root {
|
|
--bg: #f0f0f0;
|
|
--text-color: #333;
|
|
--text-color2: #666;
|
|
}
|
|
/* thème sombre */
|
|
@media (prefers-color-scheme: dark){
|
|
:root {
|
|
--bg: #171717;
|
|
--text-color: #fff;
|
|
--text-color2: #eee;
|
|
}
|
|
.navbar .time, i, .brandname, .matiere {
|
|
filter: drop-shadow(1px 1px 2px rgb(0 0 0 / 0.4));
|
|
}
|
|
}
|
|
h1 {
|
|
color: var(--text-color);
|
|
font-size: 30px;
|
|
font-weight: 600;
|
|
text-align: center;
|
|
}
|
|
/* Styling for the pixel count display */
|
|
#pixel-count {
|
|
font-size: 16px;
|
|
color: var(--text-color2);
|
|
text-align: center;
|
|
margin-top: 10px; /* Add spacing above the pixel count */
|
|
}
|
|
|
|
/* Styling for the main container that wraps canvas and color selector */
|
|
.container {
|
|
display: flex;
|
|
flex-wrap: wrap; /* Allow the container to wrap on smaller screens */
|
|
justify-content: center; /* Center the content horizontally */
|
|
align-items: center; /* Center the content vertically */
|
|
background-color: #fffffff3; /* White background color */
|
|
border-radius: 15px; /* Rounded corners for the container */
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
-webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
padding: 20px; /* Add padding inside the container */
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
/* Styling for the canvas where pixels will be placed */
|
|
#canvas {
|
|
padding: 10px;
|
|
overflow-x: scroll;
|
|
width: 95vw;
|
|
height: 95vw;
|
|
display: grid;
|
|
grid-template-columns: repeat(200, 10px); /* Create 50 columns of 10px each */
|
|
grid-template-rows: repeat(200, 10px); /* Create 50 rows of 10px each */
|
|
gap: 0; /* Remove any gap between pixels */
|
|
}
|
|
|
|
/* Styling for individual pixels */
|
|
.pixel {
|
|
width: 10px;
|
|
height: 10px;
|
|
display: inline-block;
|
|
border: .1px solid #ccc; /* Add a 1px border around each pixel */
|
|
}
|
|
|
|
/* Styling for the color selector section */
|
|
.color-selector {
|
|
position: fixed;
|
|
background-color: #fffffff3;
|
|
border-radius: 30px;
|
|
padding: 10px;
|
|
bottom: 0;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center; /* Center color options horizontally */
|
|
margin: 20px; /* Add some space to the left of the color selector */
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
-webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
/* Styling for individual color options */
|
|
.color-option {
|
|
width: 28px;
|
|
height: 28px;
|
|
border-radius: 50%; /* Make the color options circular */
|
|
margin: 5px; /* Add spacing between color options */
|
|
cursor: pointer; /* Show pointer cursor on hover */
|
|
border: 2px solid #ccc; /* Add a 2px border around each color option */
|
|
/* Color options will have their background color set dynamically */
|
|
}
|
|
|
|
/* Styling for the currently selected color option */
|
|
.color-option.selected {
|
|
border-color: #000;
|
|
}
|
|
|
|
|
|
p {
|
|
margin-bottom: 100px;
|
|
}
|
|
|
|
@media screen and (max-width: 520px) {
|
|
.alt {
|
|
display: none;
|
|
}
|
|
|
|
|
|
} |