Skip to content

Commit

Permalink
Add basic highlighting for diffs and change code colours
Browse files Browse the repository at this point in the history
  • Loading branch information
bmndc authored Jul 26, 2024
1 parent 0037571 commit 2629c9c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
12 changes: 7 additions & 5 deletions _sass/no-style-please.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
--bg-color: black;
--link-color: lightblue;
--highlight-color: blue;
--code-color: rgba(255, 255, 255, 0.05);
}

:root {
Expand All @@ -36,6 +37,7 @@
--bg-color: white;
--link-color: #4c566a;
--highlight-color: yellow;
--code-color: rgba(0, 0, 0, 0.05);
}

body[a="dark"] {
Expand Down Expand Up @@ -130,14 +132,14 @@ table, th, td {
padding: 0.4rem; // Add content spacing for readability
}

code {
:not(pre) > code {
// Add visual colours for <code> to differentiate from surrounding paragraphs
color: var(--bg-color);
background: var(--text-color);
// color: var(--bg-color);
background: var(--code-color);
}

div.highlighter-rouge code {
display: block; // Codeblocks should be displayed in... block, not inline;
pre {
background: var(--code-color);
overflow-x: auto;
white-space: pre; // Allow code in codeblocks to be scrollable on smaller screens. Default is "pre-wrap"
padding: 1rem; // Add spacing for content in codeblocks
Expand Down
9 changes: 9 additions & 0 deletions assets/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
// overflow: hidden; // Don't show anything after ellipsis
// }

.language-diff {
.gd {
background-color: color-mix(in srgb, coral, transparent 75%);
}
.gi {
background-color: color-mix(in srgb, teal, transparent 75%);
}
}

.leo {
margin: 0 0 1rem 1rem;
}
Expand Down
2 changes: 1 addition & 1 deletion root.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ git clone https://gitlab.com/suborg/8k-boot-patcher.git && cd 8k-boot-patcher &&
- Windows: `docker run --rm -it -v %cd%/Desktop:/image 8kbootpatcher`
- macOS/Linux: `docker run --rm -it -v ~/Desktop:/image 8kbootpatcher`

```
```console
$ docker run --rm -it -v ~/Desktop:/image 8kbootpatcher
Boot image found, patching...
writing boot image config in bootimg.cfg
Expand Down

0 comments on commit 2629c9c

Please sign in to comment.