Skip to content

Commit 246fe01

Browse files
committed
Use dark theme
1 parent 1c06292 commit 246fe01

4 files changed

Lines changed: 26 additions & 9 deletions

File tree

src/css/floating-action-button.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ div#floating-action-button {
2020
}
2121

2222
div#floating-action-button div {
23-
color: var(--color-action-btn);
23+
color: black;
2424
font-size: 24px;
2525
width: 60px;
2626
height: 60px;

src/css/style.css

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
:root {
22
--color-link: hsl(0, 0%, 21%);
3-
--color-action-btn: hsl(0, 0%, 27%);
43
--color-loader: hsl(0, 0%, 86%);
54
--color-link-blue: hsl(212, 97%, 43%);
65

6+
--color-gray80: hsl(0, 0%, 80%);
7+
--color-gray50: hsl(0, 0%, 50%);
8+
79
--bg-color: hsl(0, 0%, 100%);
810
--bg-color-code: hsl(0, 0%, 94%);
911
--bg-color-footer: hsl(0, 0%, 96%);
@@ -14,19 +16,21 @@
1416
--header-shadow: hsl(0, 0%, 92%);
1517

1618
@media (prefers-color-scheme: dark) {
17-
/* --bg-color: hsl(0, 0%, 0%);
19+
--bg-color: hsl(0, 0%, 0%);
1820
--color-link: hsl(0, 0%, 79%);
19-
--color-action-btn: hsl(0, 0%, 63%);
2021
--color-loader: hsl(0, 0%, 14%);
2122
--color-link-blue: hsl(212, 97%, 67%);
2223

24+
--color-gray80: hsl(0, 0%, 20%);
25+
--color-gray50: hsl(0, 0%, 50%);
26+
2327
--bg-color-code: hsl(0, 0%, 6%);
2428
--bg-color-footer: hsl(0, 0%, 4%);
2529

2630
--sponsor-bg: hsl(210, 25%, 2%);
2731
--sponsor-color: hsl(0, 0%, 58%);
2832

29-
--header-shadow: hsl(0, 0%, 8%); */
33+
--header-shadow: hsl(0, 0%, 8%);
3034
}
3135
}
3236

@@ -175,7 +179,12 @@ ul {
175179
code {
176180
background-color: var(--bg-color-code);
177181
font-size: 16px;
178-
padding: 2px 4px;
182+
padding: 2px 4px !important;
183+
}
184+
code.hljs {
185+
border: 1px var(--color-gray80) solid;
186+
border-radius: 4px;
187+
padding: 16px !important;
179188
}
180189

181190
a {

src/docs.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
@@ -20,7 +20,14 @@
2020

2121
<script SSROnly src="//cdn.jsdelivr.net/npm/marked@3/lib/marked.min.js"></script>
2222

23-
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/styles/github.min.css" />
23+
<script>
24+
const darkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
25+
const highlightTheme = darkMode ? 'github-dark.min.css' : 'github.min.css'
26+
const link = document.createElement('link')
27+
link.rel = 'stylesheet'
28+
link.href = '//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/' + highlightTheme
29+
document.head.appendChild(link)
30+
</script>
2431
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/highlight.min.js"></script>
2532
</head>
2633

src/docs/Collisions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ blueBox.body.on.collision((otherObject, event) => {
1212
```
1313

1414
```javascript
15-
// collision between blueBox and redBox (will set body.checkCollisions = true, on the blueBox and the redBox)
15+
// collision between blueBox and redBox//
16+
// (will set body.checkCollisions = true, on the blueBox and the redBox)
1617
physics.add.collider(blueBox, redBox, event => {
1718
console.log(`blueBox and redBox: ${event}`)
1819
})

0 commit comments

Comments
 (0)