Skip to content

Commit 5dd02e6

Browse files
Svg bg in dark mode (#160)
* add semi-transparent background to img in dark mode * add readme comment * change list text color
1 parent 2492d98 commit 5dd02e6

File tree

2 files changed

+25
-13
lines changed

2 files changed

+25
-13
lines changed

README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The used framework to generate docs is [docusaurus](https://docusaurus.io).
5555
In order to not break links of posts, blog articles and shared documents we want to provide full backwards-compatibility.
5656
This means we need to ensure existing links still work with the new documentation.
5757

58-
The file /static/_redirects contains a list of all paths of the old docs-sites. The file is formatted to create server-side-redirects on netlify, following the documentation here: https://docs.netlify.com/routing/redirects/
58+
The file /static/\_redirects contains a list of all paths of the old docs-sites. The file is formatted to create server-side-redirects on netlify, following the documentation here: https://docs.netlify.com/routing/redirects/
5959

6060
## Docs
6161

@@ -71,7 +71,6 @@ slug: /your-doc-url
7171
title: Title of document
7272
position: <Position in sidebar as number>
7373
---
74-
7574
<HERE YOUR DOCS>
7675
```
7776

@@ -87,7 +86,11 @@ This file is used to generate the sidebar.
8786
}
8887
```
8988

90-
## Embedding drawio images
89+
## Images and svgs
90+
91+
When adding images, SVGs, or similar assets, ensure they remain readable in both dark and light mode. For images containing text, consider adding a background to improve contrast and overall readability.
92+
93+
### Embedding drawio images
9194

9295
> ⚠️ referenced `.drawio.svg` images throw **warnings** because of unsupported file-types. We save `.drawio` files separately and export them as `svg`. Issue is also known in [docusaurus](https://github.com/facebook/docusaurus/issues/9715)
9396
@@ -113,10 +116,9 @@ type: "blog"
113116
categories:
114117
- "Conferences"
115118
tags:
116-
- 'News'
117-
- 'Conferences'
119+
- "News"
120+
- "Conferences"
118121
---
119-
120122
<SOME PREVIEW TEXT FOR BLOG LIST VIEW>
121123

122124
<!-- truncate -->
@@ -154,13 +156,13 @@ All components are referenced in the `/scripts/components.json` file. Use this m
154156

155157
```jsonc
156158
{
157-
"name": "metalctl", // name of the component, will appear in the navigation
158-
"releasePath": "binaries.metal-stack.metalctl.version", // json-path of the version or tag in the release-vector
159-
"branch": "main", // branch name. Some old repositories use 'master'
160-
"repo": "metal-stack/metalctl", // component repository,
161-
"tag": "v0.18.1", // latest release tag of the component repository
162-
"position": 1, // use this property to sort the navigation subdirectories
163-
"withDocs": true // set to true to retrieve further .md files from a /docs folder. With false, only the README.md will be retrieved.
159+
"name": "metalctl", // name of the component, will appear in the navigation
160+
"releasePath": "binaries.metal-stack.metalctl.version", // json-path of the version or tag in the release-vector
161+
"branch": "main", // branch name. Some old repositories use 'master'
162+
"repo": "metal-stack/metalctl", // component repository,
163+
"tag": "v0.18.1", // latest release tag of the component repository
164+
"position": 1, // use this property to sort the navigation subdirectories
165+
"withDocs": true // set to true to retrieve further .md files from a /docs folder. With false, only the README.md will be retrieved.
164166
}
165167
```
166168

@@ -187,4 +189,5 @@ To run the synchronization, run the following command:
187189
```bash
188190
bun run create-release-notes
189191
```
192+
190193
If you run this before the build step, also the release notes get indexed.

src/css/custom.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@
5656
html[data-theme="dark"] {
5757
--ifm-background-color: var(--color-neutral-950);
5858
--ifm-background-surface-color: var(--color-neutral-950);
59+
60+
}
61+
62+
html[data-theme="dark"] p img {
63+
background-color:#f5f5f57f;
5964
}
6065

6166
body {
@@ -115,6 +120,10 @@ p {
115120
@apply text-base text-neutral-500 dark:text-neutral-400 leading-relaxed;
116121
}
117122

123+
ul, ol {
124+
@apply text-neutral-500 dark:text-neutral-400 ;
125+
}
126+
118127
a {
119128
@apply text-amber-500;
120129
}

0 commit comments

Comments
 (0)