newtab/static/style.css

184 lines
3 KiB
CSS

*,*::before,*::after {
box-sizing: border-box;
}
:root {
--bg: #0c0917;
--fg: #7d7dc7;
--accent: #9f9ffc;
--strong: #fff;
--black: #04010e;
--magenta: #ff79c6;
background: var(--bg);
color: var(--fg);
font-family: 'DM Sans', sans-serif;
height: 100%;
}
h1 {
line-height: 1;
color: var(--strong);
}
body {
padding: 1rem;
margin: 0;
height: 100%;
}
img {
display: block;
}
.layout {
min-height: 100%;
display: grid;
row-gap: 2rem;
grid-template-rows: 1fr min-content;
justify-items: center;
align-items: center;
}
.image {
user-select: none;
position: absolute;
right: 0;
top: 0;
bottom: 0;
overflow: hidden;
width: calc(50% + 15rem);
max-width: 100%;
clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 20% 100%);
filter: box-shadow(0 0 2rem 0.5rem var(--black));
}
.image img {
image-rendering: pixelated;
width: 100%;
height: 100%;
object-fit: cover;
opacity: 0.4;
}
.page {
position: relative;
z-index: 10;
min-height: 50vh;
width: 100%;
max-width: 60rem;
}
.page .content :first-child {
margin-top: 0;
}
.page .content :last-child {
margin-bottom: 0;
}
.search-form,.heatmap {
width: 100%;
max-width: 26.5em;
}
.search-form {
border-radius: 4px;
display: grid;
background: var(--black);
}
.search-input {
min-width: 0;
border-radius: inherit;
padding: 0.5rem 0.25rem;
color: inherit;
font: inherit;
background: none;
border: none;
}
.search-input:focus-visible {
outline: 1px solid var(--accent);
}
.terminal {
margin: 2rem 0;
font-family: Anonymous Pro, monospace;
line-height: 1;
}
p {
margin: 1rem 0;
}
em {
font: inherit;
color: var(--strong);
}
.accent {
color: var(--accent);
}
.heatmap {
background: var(--black);
display: grid;
grid-auto-flow: column;
grid-template: repeat(7, 1fr) / repeat(53, 1fr);
aspect-ratio: 53/7;
border-radius: 4px;
overflow: hidden;
}
.heatmap li {
display: block;
--v: 0;
background: var(--accent);
opacity: calc(var(--v) / 8);
}
.listening {
position: relative;
justify-self: start;
z-index: 99;
}
.listening .track {
color: var(--strong);
font-size: 0.75rem;
display: grid;
gap: 0.5rem;
grid-template-columns: min-content 1fr;
align-items: center;
}
.listening .details {
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: center;
gap: 0.125rem;
}
.listening .track .song, .listening .track .artist {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.listening .track .artist {
opacity: 0.75;
}
.listening .track .cover {
border-radius: 4px;
user-select: none;
width: 3.5rem;
height: 3.5rem;
}
.notifications {
display: flex;
flex-direction: column-reverse;
gap: 0.5rem;
min-width: 0;
position: absolute;
padding: 1rem;
bottom: 0;
right: 0;
z-index: 20;
}
.notification {
font-size: 0.75rem;
background-color: #090514cd;
border-radius: 4px;
padding: 0.25rem;
user-select: none;
}
.notification .app-name {
font-size: 0.625rem;
margin-block-end: 0.125rem;
}
.notification .message {
white-space: pre-wrap;
width: 16rem;
overflow: hidden;
text-overflow: ellipsis;
}
.hidden {
opacity: 0;
}