250 lines
5.4 KiB
CSS
250 lines
5.4 KiB
CSS
body {
|
|
background-color: var(--primary-background-color);
|
|
color: var(--primary-font-color);
|
|
font-family: var(--font-monospace);
|
|
font-size: var(--font-size-body);
|
|
}
|
|
|
|
main {
|
|
align-items: center;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
#traichu {
|
|
display: flex;
|
|
flex: 1 1 auto;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
padding: var(--spacing-l) var(--spacing-m) var(--spacing-m) var(--spacing-m);
|
|
row-gap: var(--spacing-l);
|
|
width: 20rem;
|
|
}
|
|
|
|
header {
|
|
animation: fade 1s ease-in;
|
|
display: none;
|
|
flex: 0 1 auto;
|
|
flex-direction: row;
|
|
justify-content: center;
|
|
padding: var(--spacing-m) var(--spacing-m) 0 var(--spacing-m);
|
|
position: absolute;
|
|
top: 0;
|
|
width: 100%;
|
|
}
|
|
|
|
#date-time,
|
|
#weather { flex: 1 1 auto; }
|
|
|
|
#weather { text-align: right; }
|
|
|
|
#weather img {
|
|
display: inline-flex;
|
|
margin-right: var(--spacing-xs);
|
|
width: 1.5rem;
|
|
}
|
|
|
|
#date,
|
|
#location {
|
|
color: var(--primary-link-hover-color);
|
|
font-weight: 700;
|
|
}
|
|
|
|
#time,
|
|
#details {
|
|
color: var(--primary-link-color);
|
|
text-transform: capitalize;
|
|
}
|
|
|
|
#details {
|
|
align-items: center;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.separator { margin: 0 var(--spacing-xs); }
|
|
|
|
aside {
|
|
display: flex;
|
|
justify-content: space-around;
|
|
}
|
|
|
|
aside img,
|
|
aside svg { height: 4.5rem; }
|
|
|
|
#dock ul {
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
list-style-type: none;
|
|
column-gap: var(--spacing-m);
|
|
row-gap: var(--spacing-m);
|
|
padding: 0;
|
|
}
|
|
|
|
#dock a {
|
|
display: block;
|
|
fill: var(--primary-link-color);
|
|
transition: fill 0.125s ease-in-out;
|
|
}
|
|
|
|
#dock a:focus,
|
|
#dock a:hover {
|
|
animation: slime 0.75s cubic-bezier(0.455, 0.030, 0.515, 0.955) both;
|
|
fill: var(--primary-link-hover-color);
|
|
outline: none;
|
|
}
|
|
|
|
#dock li:nth-child(1) a:focus,
|
|
#dock li:nth-child(1) a:hover { fill: hsl(5, 81%, 56%); } /* Gmail */
|
|
#dock li:nth-child(2) a:focus,
|
|
#dock li:nth-child(2) a:hover { fill: hsl(217, 89%, 61%); } /* Google Calendar */
|
|
#dock li:nth-child(3) a:focus,
|
|
#dock li:nth-child(3) a:hover { fill: hsl(44, 100%, 50%); } /* Google Keep */
|
|
#dock li:nth-child(4) a:focus,
|
|
#dock li:nth-child(4) a:hover { fill: var(--primary-link-hover-color); } /* Notion */
|
|
#dock li:nth-child(5) a:focus,
|
|
#dock li:nth-child(5) a:hover { fill: hsl(102, 53%, 52%); } /* Github */
|
|
#dock li:nth-child(6) a:focus,
|
|
#dock li:nth-child(6) a:hover { fill: hsl(14, 89%, 53%); } /* Figma */
|
|
|
|
#dock svg { height: 1.5rem; }
|
|
|
|
#search {
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
|
|
#search form {
|
|
flex: 1 1 auto;
|
|
width: 100%;
|
|
}
|
|
|
|
#search input {
|
|
background-color: transparent;
|
|
background-position: right 1.25rem center;
|
|
background-repeat: no-repeat;
|
|
background-size: 1.5rem 1.5rem;
|
|
border-radius: 0.5rem;
|
|
color: var(--primary-font-color);
|
|
font-family: var(--font-sans-serif);
|
|
line-height: 1.5;
|
|
outline: 0.25rem solid transparent;
|
|
padding: var(--spacing-m);
|
|
width: 100%;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
#search input {
|
|
background-image: var(--svg-search-gray);
|
|
border: 0.125rem solid hsl(var(--color-white-hsl) / 0.25);
|
|
}
|
|
|
|
#search input:hover { border-color: hsl(var(--color-white-hsl) / 0.5); }
|
|
|
|
#bookmarks a:focus,
|
|
#bookmarks a:hover { background-color: hsl(var(--color-white-hsl) / 0.05); }
|
|
}
|
|
|
|
@media (prefers-color-scheme: light) {
|
|
#weather img { filter: drop-shadow(0 0 0 hsl(var(--color-black-hsl) / 0.75)); }
|
|
|
|
#search input {
|
|
background-image: var(--svg-search-light-gray);
|
|
border: 0.125rem solid hsl(var(--color-black-hsl) / 0.25);
|
|
}
|
|
|
|
#search input:hover { border-color: hsl(var(--color-black-hsl) / 0.5); }
|
|
|
|
#bookmarks a:focus,
|
|
#bookmarks a:hover { background-color: hsl(var(--color-black-hsl) / 0.05); }
|
|
}
|
|
|
|
#search input:focus {
|
|
background-color: hsl(var(--color-white-hsl) / 0.025);
|
|
border-color: var(--color-orange);
|
|
outline-color: hsl(var(--color-orange-hsl) / 0.25);
|
|
}
|
|
|
|
#bookmarks {
|
|
align-items: flex-start;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-around;
|
|
}
|
|
|
|
#bookmarks ul {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-around;
|
|
list-style-type: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
#bookmarks li {
|
|
align-items: center;
|
|
display: flex;
|
|
flex-direction: row;
|
|
line-height: 1;
|
|
margin-bottom: var(--spacing-xs);
|
|
}
|
|
|
|
.favicon {
|
|
margin-right: var(--spacing-s);
|
|
height: 1rem;
|
|
}
|
|
|
|
#bookmarks a {
|
|
align-items: center;
|
|
border-radius: 0.25rem;
|
|
display: flex;
|
|
color: var(--primary-link-color);
|
|
padding: var(--spacing-s);
|
|
text-decoration: none;
|
|
}
|
|
|
|
#bookmarks a:focus,
|
|
#bookmarks a:hover {
|
|
color: var(--primary-link-hover-color);
|
|
outline: none;
|
|
}
|
|
|
|
/*
|
|
Accessible hiding for screen readers
|
|
https://webaim.org/techniques/css/invisiblecontent/#techniques
|
|
*/
|
|
.sr-only {
|
|
height: 1px;
|
|
left: -10000px;
|
|
overflow: hidden;
|
|
position: absolute;
|
|
top: auto;
|
|
width: 1px;
|
|
}
|
|
|
|
/* Responsive Media Queries */
|
|
@media screen and (min-width: 48em) {
|
|
header { display: flex; }
|
|
|
|
#traichu {
|
|
padding: 0;
|
|
width: 45rem; /* 720px */
|
|
}
|
|
|
|
aside img,
|
|
aside svg { height: 7.5rem; }
|
|
|
|
#dock ul {
|
|
column-gap: 0;
|
|
justify-content: space-around;
|
|
padding: 0;
|
|
}
|
|
|
|
#bookmarks { flex-direction: row; }
|
|
}
|