Skip to content

Commit b17abfc

Browse files
authored
Use a local theme. (#4)
The current theme is not dark mode aware. As such it was showing the dark SVG logo on a hard coded light page. This changes it to use a local theme so that it's entirely in the site's control.
1 parent 20ad0d9 commit b17abfc

4 files changed

Lines changed: 49 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
layout: default
3+
permalink: /
4+
---
15
<img alt="WebGPU logo" src="https://raw.githubusercontent.com/gpuweb/gpuweb/cd07d570226c8e4c82a1b616f967fe76f98920a3/logo/webgpu-responsive.svg" width="400">
26

37
<!-- TODO: add a live webgpu test like on https://get.webgl.org -->

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
title: WebGPU
2+
theme: []
3+

_layouts/default.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>{{ page.title | default: site.title }}</title>
7+
<link rel="stylesheet" href="{{ 'assets/css/style.css' | relative_url }}">
8+
</head>
9+
<body>
10+
{{ content }}
11+
</body>
12+
</html>

assets/css/style.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
:root {
2+
color-scheme: light dark;
3+
}
4+
5+
body {
6+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
7+
line-height: 1.5;
8+
max-width: 1012px;
9+
margin: 40px auto;
10+
padding: 0 30px;
11+
background-color: canvas;
12+
color: canvastext;
13+
}
14+
15+
a {
16+
color: accentcolor;
17+
text-decoration: none;
18+
}
19+
20+
pre, code {
21+
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
22+
background-color: rgba(175, 184, 193, 0.2);
23+
padding: 0.2em 0.4em;
24+
border-radius: 6px;
25+
}
26+
27+
h1, h2 {
28+
border-bottom: 1px solid rgba(210, 217, 223, 0.2);
29+
padding-bottom: 0.3em;
30+
}

0 commit comments

Comments
 (0)