Merge branch 'fix-theme' of https://github.com/AprilNEA/ChatGPT-Next-Web into fix-theme

This commit is contained in:
AprilNEA
2023-03-27 17:05:15 +08:00
21 changed files with 288 additions and 77 deletions

View File

@@ -213,3 +213,36 @@ div.math {
text-decoration: underline;
}
}
pre {
position: relative;
&:hover .copy-code-button {
pointer-events: all;
transform: translateX(0px);
opacity: 0.5;
}
.copy-code-button {
position: absolute;
right: 10px;
cursor: pointer;
padding: 0px 5px;
background-color: var(--black);
color: var(--white);
border: var(--border-in-light);
border-radius: 10px;
transform: translateX(10px);
pointer-events: none;
opacity: 0;
transition: all ease 0.3s;
&:after {
content: "copy";
}
&:hover {
opacity: 1;
}
}
}

View File

@@ -1,4 +1,9 @@
.markdown-body {
pre {
background: #282a36;
color: #f8f8f2;
}
code[class*="language-"],
pre[class*="language-"] {
color: #f8f8f2;
@@ -116,32 +121,32 @@
}
}
@mixin light {
.markdown-body pre[class*="language-"] {
filter: invert(1) hue-rotate(50deg) brightness(1.3);
}
}
// @mixin light {
// .markdown-body pre[class*="language-"] {
// filter: invert(1) hue-rotate(50deg) brightness(1.3);
// }
// }
@mixin dark {
.markdown-body pre[class*="language-"] {
filter: none;
}
}
// @mixin dark {
// .markdown-body pre[class*="language-"] {
// filter: none;
// }
// }
:root {
@include light();
}
// :root {
// @include light();
// }
.light {
@include light();
}
// .light {
// @include light();
// }
.dark {
@include dark();
}
// .dark {
// @include dark();
// }
@media (prefers-color-scheme: dark) {
:root {
@include dark();
}
}
// @media (prefers-color-scheme: dark) {
// :root {
// @include dark();
// }
// }