startpage/styles.css
2021-08-03 10:27:55 +07:00

319 lines
5.4 KiB
CSS

@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700");
@import url("https://fonts.googleapis.com/icon?family=Material+Icons+Outlined");
/* META */
* {
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: "Jetbrains Mono", monospace;
color: var(--color-sec);
}
:root {
--color-bg: hsl(206, 40%, 10%);
--color-pri: hsl(206, 40%, 8%);
--color-sec: hsl(196, 18%, 30%);
--color-sec-alt: hsl(196, 18%, 60%);
--shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
}
html {
font-size: 1.25vw;
background: var(--color-bg);
overflow-x: hidden;
}
/* TYPOGRAPHY */
h1 {
font-size: 3em;
}
a {
text-decoration: none;
}
.material-icons-outlined {
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
}
/* ROOT CONTAINER */
div.root {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 100vh;
}
div.root > * {
margin: 1rem;
}
/* HEADER CONTAINERS */
div.header {
display: flex;
align-items: center;
background: var(--color-pri);
padding: 1rem;
border-radius: 0.2rem;
box-shadow: var(--shadow);
}
div.header > * {
margin-left: 0.3rem;
margin-right: 0.3rem;
}
div.header > img {
height: 4em;
width: 4em;
filter: invert(30%) sepia(17%) saturate(530%) hue-rotate(149deg) brightness(97%) contrast(94%);
cursor: pointer;
}
div.subtitle {
display: flex;
justify-content: center;
align-items: center;
margin: 0;
}
div.subtitle > * {
margin-left: 0.5rem;
margin-right: 0.5rem;
}
/* CARD CONTAINERS */
div.cards-container {
display: grid;
gap: 1rem;
grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
justify-content: center;
align-items: stretch;
max-width: 70vw;
}
div.card {
display: flex;
flex-direction: column;
background-color: var(--color-pri);
box-shadow: var(--shadow);
padding: 0.5rem;
}
div.card > h3.title {
background-color: var(--color-bg);
text-align: center;
border-radius: 0.2rem;
padding: 0.3rem;
margin-bottom: 0.5rem;
}
div.card > ul > a > li {
font-size: 0.8em;
list-style-type: none;
transition: 0.3s;
}
div.card > ul > a:hover > li {
font-weight: 700;
color: var(--color-sec-alt);
}
/* SEARCH */
div.search-container {
display: flex;
flex-direction: column;
}
input[type="text"] {
outline: none;
border: none;
border-radius: 0.2rem;
box-shadow: var(--shadow);
background-color: var(--color-pri);
font-size: 1em;
padding: 1em;
width: 50vw;
}
input[type="text"]::placeholder {
color: var(--color-sec);
opacity: 0.5;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
}
div.search-predictions {
display: none;
position: absolute;
border-radius: 0.2rem;
background-color: var(--color-pri);
box-shadow: var(--shadow);
width: 50vw;
max-height: 50vh;
padding: 0.5rem;
top: 50vh;
color: var(--color-sec);
}
div.search-predictions > ul > a > li {
list-style: none;
transition: 0.3s;
}
div.search-predictions > ul > a:hover > li {
font-weight: 700;
color: var(--color-sec-alt);
}
/* OTHERS */
span.settings {
position: fixed;
bottom: 0;
right: 0;
font-size: 2em;
cursor: pointer;
transition: 0.5s;
}
/* RAIN */
.rain {
position: absolute;
left: 0;
width: 100vw;
height: 100vh;
z-index: -1;
}
.rain.back-row {
z-index: -2;
bottom: 1rem;
opacity: 0.5;
}
.drop {
position: absolute;
bottom: 100%;
width: 15px;
height: 120px;
pointer-events: none;
animation: drop 0.5s linear infinite;
}
@keyframes drop {
0% {
transform: translateY(0vh);
}
75% {
transform: translateY(100vh);
}
100% {
transform: translateY(100vh);
}
}
.stem {
width: 1px;
height: 60%;
margin-left: 7px;
background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.25));
animation: stem 0.5s linear infinite;
}
@keyframes stem {
0% {
opacity: 1;
}
65% {
opacity: 1;
}
75% {
opacity: 0;
}
100% {
opacity: 0;
}
}
.splat {
width: 15px;
height: 10px;
border-top: 2px dotted rgba(255, 255, 255, 0.5);
border-radius: 50%;
opacity: 1;
transform: scale(0);
animation: splat 0.5s linear infinite;
}
@keyframes splat {
0% {
opacity: 1;
transform: scale(0);
}
80% {
opacity: 1;
transform: scale(0);
}
90% {
opacity: 0.5;
transform: scale(1);
}
100% {
opacity: 0;
transform: scale(1.5);
}
}
/* KEYFRAMES */
@keyframes logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@keyframes settings-forward {
from {
transform: rotate(0deg);
}
to {
transform: rotate(90deg);
}
}
@keyframes settings-backward {
from {
transform: rotate(90deg);
}
to {
transform: rotate(0deg);
}
}
/* MEDIA QUERIES */
@media (prefers-color-scheme: light) {
:root {
--color-bg: hsl(48, 87%, 88%);
--color-pri: hsl(40, 38%, 73%);
--color-sec: hsl(20, 5%, 22%);
--color-sec-alt: hsl(0, 0%, 16%);
}
}