Notes/src/styles/index.css

731 lines
13 KiB
CSS
Raw Normal View History

2023-09-20 03:38:55 -04:00
* {box-sizing: border-box;}
:root {
--shadow: 0px 24px 32px rgba(0, 0, 0, 0.04), 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04);
--blue: #3E82E5;
--blue-strong: #008CBD;
--gray: gray;
--ck-color-table-caption-text: gray;
--bg-primary: #1E1E1E;
--bg-secondary: #3C3C3C;
--text-primary: #ddd;
--text-heading: #fff;
--bottom-layer: #040405;
--middle-layer: #0C0D10;
--top-layer: #14151B;
--accent-layer: #20212B;
--accent-color: #3E82E5;
--container-width: 1400px /*calc(100% - 10%)*/;
--pane-size: 20%;
scroll-padding-top: calc(72px + 1rem);
}
body {
margin: 0px;
padding: 0px;
background: var(--middle-layer);
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
color: var(--text-primary);
margin-bottom: 200px;
}
a {
text-decoration: none;
color: var(--text-primary);
transition: color 200ms ease;
}
a:hover {
color: var(--accent-color);
}
#main a {
color: var(--accent-color);
}
#main a:hover {
color: var(--text-heading);
}
/* a[href^="https://"]::after {
font-size: smaller;
content: "\2197";
vertical-align: top;
} */
a[href^="https://"] {
display: inline-flex;
align-items: center;
gap: 6px;
}
#main a[href^="https://"] {
padding-right: 6px;
}
a[href^="https://"]::after {
content: "";
background-color: currentcolor;
mask: url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"13.5\" height=\"13.5\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z\"></path></svg>");
-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"13.5\" height=\"13.5\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z\"></path></svg>");
width: 13.5px;
height: 13.5px;
display: inline-flex;
}
/* pre {
overflow: auto;
}
img {
width: auto;
height: auto;
max-width: 100%;
max-height: 100%;
}
iframe {
border: none;
border-radius: 0.25rem;
}
#layout {
display: flex;
flex-flow: row wrap;
justify-content: center;
min-height: 100vh;
max-width: 960px;
}
#main {
contain: content;
background-color: var(--top-layer);
padding: 2rem 3rem 2rem 3rem;
box-shadow: 0 2px 10px rgba(0,0,0,.25)!important;
order: 2;
}
#title {
text-align: center;
margin-block-end: 24px;
font-size: 32px;
line-height: 48px;
letter-spacing: 0.02em;
} */
#content {
font-size: 16px;
font-weight: 400;
-webkit-font-smoothing: subpixel-antialiased;
line-height: 1.5;
overflow-wrap: break-word;
word-wrap: break-word;
hyphens: auto;
letter-spacing: 0.02em;
}
#main h1,
#main h2,
#main h3,
#main h4,
#main h5,
#main h6 {
color: var(--text-heading);
line-height: 36px;
padding: 5px 0px;
letter-spacing: 0.02em;
font-weight: 800;
position: relative;
}
/* #content h2::before,
#content h3::before,
#content h4::before{
content: '#';
color: var(--blue);
position: absolute;
left: -20px;
} */
#main h1 a,
#main h2 a,
#main h3 a,
#main h4 a,
#main h5 a,
#main h6 a {
color: var(--blue);
margin-left: 10px;
}
#content h2 {
font-size: 24px;
}
#content h3 {
font-size: 20px;
}
#content h4 {
font-size: 16px;
}
#content p {
margin-block-start: 12px;
margin-block-end: 12px;
text-align: justify;
overflow: hidden;
}
#content hr {
height: 1px;
}
#content blockquote {
margin-block-start: 12px;
margin-block-end: 24px;
margin-inline-start: 32px;
margin-inline-end: 32px;
padding-block-start: 12px;
padding-block-end: 12px;
padding-inline-start: 16px;
padding-inline-end: 16px;
background-color: hsla(0deg, 0%, 0%, 0.054);
}
#noteClippedFrom {
color: var(--gray);
margin-bottom: 0.5rem;
font-style:italic;
}
.table {
overflow-wrap: anywhere;
}
.pdf-view {
width: 100%;
min-height: 40rem;
}
.type-file > button {
display: block;
margin: 2rem auto;
background-color: var(--blue);
border: none;
color: white;
padding: 1rem 2rem;
text-align: center;
text-decoration: none;
font-size: 1rem;
border-radius: 0.25rem;
box-shadow: var(--shadow);
}
.mermaid {
text-align: center;
}
/* Menu */
#toggleMenuButton {
display: none;
}
/* .showMenu #menu {
display: block;
}
#menu strong{
color: var(--blue-strong);
} */
/* nav.grid ul {
display: flex;
flex-flow: row wrap;
gap: 1rem;
}
nav.list {
line-height: 1.5;
}
nav ul {
list-style-type: none;
padding: 0 1rem;
}
#parentLink {
display: none;
color: var(--gray);
position: relative;
left: -3rem;
top: -1rem;
}
#parentLink::before {
content: "@";
}
input:disabled {
border-radius: 3px;
background-color: #cacaca;
}
.ck-content .table table {
border: 0;
}
.ck-content .table table th {
background: #252526;
word-wrap: normal;
background-clip: padding-box;
}
.ck-content .table table th.empty {
opacity: 0;
border: 0;
}
@media screen and (min-width: 60rem) {
#main {
width: 48rem;
margin-block-start: 6rem;
margin-block-end: 6rem;
box-shadow: var(--shadow);
border-radius: 4px 4px 0px 0px;
}
#toggleMenuButton {
right: 1rem;
top: 1rem;
}
}
@media screen and (max-width: 60rem) {
#main {
width: 100%;
}
#toggleMenuButton {
right: 1rem;
bottom: 1rem;
}
}
@media screen and (max-width: 32rem) {
#main {
padding: 4rem 2rem 2rem 2rem;
}
#content h2::before {
left: 1rem;
}
#parentLink {
left: 0rem;
}
} */
#menu {
display: flex;
position: fixed;
justify-content: space-between;
align-items: center;
top: 0;
left: 0;
right: 0;
width: inherit;
margin: 0 auto;
overflow: visible;
z-index: 10;
background: var(--bottom-layer);
padding: 8px 16px;
}
#menu::before {
content: "";
position: fixed;
left: 0;
right: 0;
background: var(--bottom-layer);
height: 72px;
z-index: -1;
}
#menu > p > a {
display: flex;
white-space: nowrap;
gap: 10px;
align-items: center;
/* color: var(--text-heading); */
}
/* #menu > p > a:hover {
color: var(--accent-color);
} */
/* #menu a {
color: var(--text-heading);
}
#menu a:hover {
color: var(--accent-color);
} */
#menu > p > a::before {
content: "";
display: flex;
background: url("https://raw.githubusercontent.com/zadam/trilium/master/images/icon-color.svg");
height: 40px;
width: 53px;
}
/* #logo {
order: 1;
height: 40px;
} */
/* #menu > p > strong::before {
content: "";
display: flex;
background: url("https://notes.cloud.zerebos.com/assets/v0.60.4/images/icon-black.svg");
} */
#menu ul, #sidebar ul {
list-style: none;
padding: 0;
position: relative;
}
#menu > ul {
margin: 0;
padding: 0;
display: flex;
gap: 30px;
}
#menu > ul > li {
margin: 0;
padding: 0;
position: relative;
}
#menu > ul > li > p > a {
display: flex;
gap: 10px;
align-items: center;
font-weight: 700;
padding: 16px 0;
}
/* #menu > ul > li > p > a::after {
content: '';
border: 4px solid transparent;
border-top: 4px solid white;
display: flex;
align-items: center;
margin-bottom: -8px;
} */
#menu > ul > li.submenu-item > p > a::after {
content: "";
border-color: currentcolor #0000;
border-style: solid;
border-width: .4em .4em 0;
position: relative;
display: flex;
top: 2px;
align-items: center;
/* transform: translateY(-50%); */
}
#menu > ul > li.submenu-item.hidden > ul,
#menu > ul > li.submenu-item.hidden > p > a::after{
display: none;
}
#menu > ul > li > ul {
/* display: none; */
opacity: 0;
pointer-events: none;
position: absolute;
top: 40px;
background: #242526;
border-radius: 6px;
min-width: 150px;
right: 50%;
transform: translateX(50%);
padding: 8px;
transition: top 200ms ease, opacity 200ms ease;
}
#menu > ul > li > ul > li a {
display: flex;
border-radius: 6px;
padding: 3px 6px;
transition: background-color 200ms ease;
}
#menu > ul > li > ul > li a:hover {
background: rgba(255,255,255,0.05);
}
#menu > ul > li > ul > li > ul {
display: none;
}
#menu > ul > li:hover > ul {
/* display: flex; */
top: 50px;
opacity: 1;
pointer-events: initial;
}
body {
display: flex;
justify-content: center;
}
#layout {
display: flex;
flex-direction: row;
width: var(--container-width);
max-width: var(--container-width);
margin-top: calc(72px + 1rem);
position: relative;
height: 100%;
gap: 16px;
}
@media screen and (max-width: 1500px) {
#layout {
width: 1300px;
max-width: 1300px;
}
}
@media screen and (max-width: 1300px) {
#layout {
width: 1100px;
max-width: 1200px;
}
}
#sidebar {
flex: var(--pane-size);
height: fit-content;
position: sticky;
top: calc(72px + 1rem);
}
#main {
flex: 100%;
}
#layout.toc #main,
#sidebar + #main {
flex: calc(100% - var(--pane-size));
}
#layout.toc #sidebar + #main {
flex: calc(100% - (2 * var(--pane-size)));
}
#main {
contain: content;
background-color: var(--top-layer);
padding: 1rem 3rem 2rem 3rem;
box-shadow: 0 2px 10px #00000040;
border-radius: 6px;
}
#sidebar, #sidebar ul {
list-style: none;
padding: 0;
margin: 0;
}
#sidebar {
/* padding-right: 20px; */
}
/* #sidebar .title {
text-transform: uppercase;
text-align: center;
letter-spacing: 5px;
color: #777;
font-weight: 700;
border-bottom: 1px solid #777;
} */
#sidebar p {
display: flex;
margin: 0;
}
#sidebar a {
flex: 1;
padding: 6px 6px 6px 12px;
border-radius: 6px;
transition: color 200ms ease, background-color 200ms ease;
}
#sidebar a:hover {
background: rgba(255,255,255,0.05);
}
#sidebar > li > ul > li.submenu-item > p > a {
text-transform: uppercase;
font-weight: 700;
color: #555;
}
#sidebar li > ul {
margin-top: 5px;
}
#sidebar > li > ul.hasSubmenu,
#sidebar > li > ul > li.submenu-item + li.submenu-item {
margin-top: 20px;
}
/* .ck-content pre {background: none;} */
.ck-content code {
background-color: var(--accent-layer);
border-radius: 6px;
padding: 3px;
}
.ck-content pre {
background: var(--accent-layer);
border-radius: 6px;
border: 0;
box-shadow: 0 2px 4px #0003;
}
#childLinks.list {
display: none;
}
#breadcrumbs {
margin-bottom: 30px;
display: flex;
align-items: center;
list-style: none;
padding: 0;
}
#breadcrumbs li {
display: flex;
align-items: center;
}
#breadcrumbs a {
display: flex;
align-items: center;
padding: 5px 10px;
border-radius: 20px;
transition: color 200ms ease, transform 200ms ease, background-color 200ms ease;
}
#breadcrumbs img {
width: 18px;
filter: invert(100%);
}
#breadcrumbs li:not(:last-child)::after {
background: url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 256 256\"><g><g><polygon points=\"79.093,0 48.907,30.187 146.72,128 48.907,225.813 79.093,256 207.093,128\"/></g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></svg>") center;
content: " ";
display: inline-block;
filter: invert(0.64) sepia(0.11) saturate(0) hue-rotate(149deg) brightness(0.99) contrast(0.95);
height: 8px;
margin: 0 8px;
opacity: .5;
width: 8px;
}
#breadcrumbs li:last-child a,
#breadcrumbs li a:hover {
background: #202127;
}
#breadcrumbs li a:hover {
transform: translateY(-3px);
}
#parentLink {
display: none;
}
#toc {
flex: var(--pane-size);
position: sticky;
top: calc(72px + 1rem);
height: fit-content;
background: var(--top-layer);
margin: 0;
padding: 16px 16px 16px 32px;
border-radius: 6px;
}
#toc, #toc ul {
list-style: none;
}
#toc ul {
padding-left: 16px;
}
#toc li a {
color: var(--text-heading);
transition: color 200ms ease;
}
#toc li a:hover,
#toc li a.active {
color: var(--accent-color);
}
#toc::before {
content: "";
display: block;
position: absolute;
left: 16px;
top: 20px;
width: 2px;
height: calc(100% - 40px);
background: rgba(255, 255, 255, 0.1);
}
#childLinks.grid ul li a {
border: 1px solid rgba(255, 255, 255, 0.1);
}
#childLinks.grid ul li a:hover {
background: rgba(255, 255, 255, 0.1);
}