Skip to content

Commit

Permalink
Merge branch 'main' into feat/view-transition
Browse files Browse the repository at this point in the history
  • Loading branch information
HEIGE-PCloud authored May 18, 2024
2 parents 9e1f8f2 + 5789c9b commit f7524e3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
18 changes: 18 additions & 0 deletions assets/css/_partial/_single/_code.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,24 @@ pre,
background-color: $code-background-color !important;
}

code:not(.chroma) {
/* Inline code blocks */
background-color: var(--inline-code-background-color) !important;
border-radius: 6px;
padding: .2em .4em;
font-size: 85%;
line-height: 1.5;
color: var(--global-font-color);
}

a > code:not(.chroma) {
/* Inline code blocks inside links */
color: var(--single-link-color);
text-decoration: underline;
text-underline-offset: .2rem;
}


.highlight,
.gist {
font-family: $code-font-family;
Expand Down
3 changes: 3 additions & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ ul {
--code-color: #e74c3c;
/* Color of the code background */
--code-background-color: #f5f5f5;
--inline-code-background-color: var(--bgColor-neutral-muted);
--code-header-color: #ededed;
--code-background-color-darken-5: #e8e8e8;
--code-background-color-darken-6: #e6e6e6;
Expand Down Expand Up @@ -587,6 +588,7 @@ ul {
--bgColor-secondary: #ededed;
--bgColor-accent-emphasis: #6bd6fd;
--bgColor-accent-muted: #388bfd1a;
--bgColor-neutral-muted: #afb8c133;
--borderColor-default: #f0f0f0;
--selection-bgColor: #35a6f740;
--button-default-bgColor-rest: #f0f0f0;
Expand All @@ -608,6 +610,7 @@ html.dark {
--bgColor-accent-emphasis: #1f6feb;
--bgColor-accent-muted: #388bfd1a;
--borderColor-default: #30363d;
--bgColor-neutral-muted: #6e768166;
--selection-bgColor: #1f6febb3;
--button-default-bgColor-rest: #21262d;
--button-default-bgColor-hover: #292e36;
Expand Down
3 changes: 3 additions & 0 deletions assets/css/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
--code-color: #e74c3c;
/* Color of the code background */
--code-background-color: #f5f5f5;
--inline-code-background-color: var(--bgColor-neutral-muted);

--code-header-color: #ededed;
--code-background-color-darken-5: #e8e8e8;
Expand Down Expand Up @@ -139,6 +140,7 @@
--bgColor-secondary: #ededed;
--bgColor-accent-emphasis: #6bd6fd;
--bgColor-accent-muted: #388bfd1a;
--bgColor-neutral-muted: #afb8c133;
--borderColor-default: #f0f0f0;
--selection-bgColor: #35a6f740;
--button-default-bgColor-rest: #f0f0f0;
Expand All @@ -158,6 +160,7 @@
--bgColor-accent-emphasis: #1f6feb;
--bgColor-accent-muted: #388bfd1a;
--borderColor-default: #30363d;
--bgColor-neutral-muted: #6e768166;
--selection-bgColor: #1f6febb3;
--button-default-bgColor-rest: #21262d;
--button-default-bgColor-hover: #292e36;
Expand Down
2 changes: 1 addition & 1 deletion assets/js/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ function initCodeblocks() {

// handle copying code to clipboard
copyCodeButton?.addEventListener("click", () => {
navigator.clipboard.writeText(chroma.innerText);
navigator.clipboard.writeText(chroma.textContent);
// toggle icons
copyIcon.style.display = "none";
checkIcon.style.display = "block";
Expand Down

0 comments on commit f7524e3

Please sign in to comment.