Skip to content

Commit bc13b5f

Browse files
committed
Fix CSS class for light/dark themes.
1 parent 0f8207c commit bc13b5f

File tree

5 files changed

+21
-17
lines changed

5 files changed

+21
-17
lines changed

bin/docs/build_readme.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,17 @@ def build_installation_md(text: str) -> MarkdownDoc:
5353
def replace(text: str, dest: str) -> str:
5454
# Do some replacements
5555

56-
# Replace canonical links to hurl.dev links
56+
# Replace canonical links to hurl.dev links:
5757
text = re.sub(
5858
r"/docs/(.*)\.md",
5959
r"https://hurl.dev/docs/\1.html",
6060
text,
6161
)
6262

63+
# Change some text snippets for GitHub and crates.io
64+
# - first param: pattern to look for in Markdown file
65+
# - second param: pattern to replace in GitHub README
66+
# - third param: pattern to replace in crates.io README
6367
snippets = [
6468
("blog.md", "https://hurl.dev/blog/", "https://hurl.dev/blog/"),
6569
(
@@ -104,13 +108,13 @@ def replace(text: str, dest: str) -> str:
104108
<source srcset="/docs/assets/img/home-waterfall-light.avif" type="image/avif">
105109
<source srcset="/docs/assets/img/home-waterfall-light.webp" type="image/webp">
106110
<source srcset="/docs/assets/img/home-waterfall-light.png" type="image/png">
107-
<img class="light-img u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/home-waterfall-light.png" width="480" alt="HTML report"/>
111+
<img class="u-theme-light u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/home-waterfall-light.png" width="480" alt="HTML report"/>
108112
</picture>
109113
<picture>
110114
<source srcset="/docs/assets/img/home-waterfall-dark.avif" type="image/avif">
111115
<source srcset="/docs/assets/img/home-waterfall-dark.webp" type="image/webp">
112116
<source srcset="/docs/assets/img/home-waterfall-dark.png" type="image/png">
113-
<img class="dark-img u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/home-waterfall-dark.png" width="480" alt="HTML report"/>
117+
<img class="u-theme-dark u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/home-waterfall-dark.png" width="480" alt="HTML report"/>
114118
</picture>
115119
</div>
116120
""",

docs/home.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ Finally, Hurl is easy to <b>integrate in CI/CD</b>, with text, JUnit, TAP and HT
131131
<source srcset="/docs/assets/img/home-waterfall-light.avif" type="image/avif">
132132
<source srcset="/docs/assets/img/home-waterfall-light.webp" type="image/webp">
133133
<source srcset="/docs/assets/img/home-waterfall-light.png" type="image/png">
134-
<img class="light-img u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/home-waterfall-light.png" width="480" alt="HTML report"/>
134+
<img class="u-theme-light u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/home-waterfall-light.png" width="480" alt="HTML report"/>
135135
</picture>
136136
<picture>
137137
<source srcset="/docs/assets/img/home-waterfall-dark.avif" type="image/avif">
138138
<source srcset="/docs/assets/img/home-waterfall-dark.webp" type="image/webp">
139139
<source srcset="/docs/assets/img/home-waterfall-dark.png" type="image/png">
140-
<img class="dark-img u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/home-waterfall-dark.png" width="480" alt="HTML report"/>
140+
<img class="u-theme-dark u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/home-waterfall-dark.png" width="480" alt="HTML report"/>
141141
</picture>
142142
</div>
143143

docs/response.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ On each response, libcurl response timings are available:
108108
All timings are in microsecond.
109109

110110
<div class="picture">
111-
<img class="light-img u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/timings-light.svg" alt="Response timings explanation"/>
112-
<img class="dark-img u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/timings-dark.svg" alt="Response timings explanation"/>
111+
<img class="u-theme-light u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/timings-light.svg" alt="Response timings explanation"/>
112+
<img class="u-theme-dark u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/timings-dark.svg" alt="Response timings explanation"/>
113113
<a href="https://blog.cloudflare.com/a-question-of-timing/"><small>Courtesy of CloudFlare</small></a>
114114
</div>
115115

docs/tutorial/ci-cd-integration.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,13 @@ to create a [GitHub Action]. You can also see how to integrate your tests in [Gi
216216
<source srcset="/docs/assets/img/github-new-repository-light.avif" type="image/avif">
217217
<source srcset="/docs/assets/img/github-new-repository-light.webp" type="image/webp">
218218
<source srcset="/docs/assets/img/github-new-repository-light.png" type="image/png">
219-
<img class="light-img u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/github-new-repository-light.png" width="680" alt="Create new GitHub repository"/>
219+
<img class="u-theme-light u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/github-new-repository-light.png" width="680" alt="Create new GitHub repository"/>
220220
</picture>
221221
<picture>
222222
<source srcset="/docs/assets/img/github-new-repository-dark.avif" type="image/avif">
223223
<source srcset="/docs/assets/img/github-new-repository-dark.webp" type="image/webp">
224224
<source srcset="/docs/assets/img/github-new-repository-dark.png" type="image/png">
225-
<img class="dark-img u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/github-new-repository-dark.png" width="680" alt="Create new GitHub repository"/>
225+
<img class="u-theme-dark u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/github-new-repository-dark.png" width="680" alt="Create new GitHub repository"/>
226226
</picture>
227227
</div>
228228
@@ -297,13 +297,13 @@ Finally, you can check on GitHub that our action is running:
297297
<source srcset="/docs/assets/img/github-action-light.avif" type="image/avif">
298298
<source srcset="/docs/assets/img/github-action-light.webp" type="image/webp">
299299
<source srcset="/docs/assets/img/github-action-light.png" type="image/png">
300-
<img class="light-img u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/github-action-light.png" width="680" alt="GitHub Action"/>
300+
<img class="u-theme-light u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/github-action-light.png" width="680" alt="GitHub Action"/>
301301
</picture>
302302
<picture>
303303
<source srcset="/docs/assets/img/github-action-dark.avif" type="image/avif">
304304
<source srcset="/docs/assets/img/github-action-dark.webp" type="image/webp">
305305
<source srcset="/docs/assets/img/github-action-dark.png" type="image/png">
306-
<img class="dark-img u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/github-action-dark.png" width="680" alt="GitHub Action"/>
306+
<img class="u-theme-dark u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/github-action-dark.png" width="680" alt="GitHub Action"/>
307307
</picture>
308308
</div>
309309
@@ -316,13 +316,13 @@ Finally, you can check on GitHub that our action is running:
316316
<source srcset="/docs/assets/img/gitlab-new-repository-light.avif" type="image/avif">
317317
<source srcset="/docs/assets/img/gitlab-new-repository-light.webp" type="image/webp">
318318
<source srcset="/docs/assets/img/gitlab-new-repository-light.png" type="image/png">
319-
<img class="light-img u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/gitlab-new-repository-light.png" width="680" alt="Create new GitLab repository"/>
319+
<img class="u-theme-light u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/gitlab-new-repository-light.png" width="680" alt="Create new GitLab repository"/>
320320
</picture>
321321
<picture>
322322
<source srcset="/docs/assets/img/gitlab-new-repository-dark.avif" type="image/avif">
323323
<source srcset="/docs/assets/img/gitlab-new-repository-dark.webp" type="image/webp">
324324
<source srcset="/docs/assets/img/gitlab-new-repository-dark.png" type="image/png">
325-
<img class="dark-img u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/gitlab-new-repository-dark.png" width="680" alt="Create new GitLab repository"/>
325+
<img class="u-theme-dark u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/gitlab-new-repository-dark.png" width="680" alt="Create new GitLab repository"/>
326326
</picture>
327327
</div>
328328
@@ -389,13 +389,13 @@ Finally, you can check on GitLab that our pipeline is running:
389389
<source srcset="/docs/assets/img/gitlab-pipeline-light.avif" type="image/avif">
390390
<source srcset="/docs/assets/img/gitlab-pipeline-light.webp" type="image/webp">
391391
<source srcset="/docs/assets/img/gitlab-pipeline-light.png" type="image/png">
392-
<img class="light-img u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/gitlab-pipeline-light.png" width="680" alt="GitHub Action"/>
392+
<img class="u-theme-light u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/gitlab-pipeline-light.png" width="680" alt="GitHub Action"/>
393393
</picture>
394394
<picture>
395395
<source srcset="/docs/assets/img/gitlab-pipeline-dark.avif" type="image/avif">
396396
<source srcset="/docs/assets/img/gitlab-pipeline-dark.webp" type="image/webp">
397397
<source srcset="/docs/assets/img/gitlab-pipeline-dark.png" type="image/png">
398-
<img class="dark-img u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/gitlab-pipeline-dark.png" width="680" alt="GitHub Action"/>
398+
<img class="u-theme-dark u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/gitlab-pipeline-dark.png" width="680" alt="GitHub Action"/>
399399
</picture>
400400
</div>
401401

docs/tutorial/your-first-hurl-file.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ typing the URL <http://localhost:3000>:
6767
<source srcset="/docs/assets/img/movies-box-light.avif" type="image/avif">
6868
<source srcset="/docs/assets/img/movies-box-light.webp" type="image/webp">
6969
<source srcset="/docs/assets/img/movies-box-light.png" type="image/png">
70-
<img class="light-img u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/movies-box-light.png" width="600" alt="Movies Box home page"/>
70+
<img class="u-theme-light u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/movies-box-light.png" width="600" alt="Movies Box home page"/>
7171
</picture>
7272
<picture>
7373
<source srcset="/docs/assets/img/movies-box-dark.avif" type="image/avif">
7474
<source srcset="/docs/assets/img/movies-box-dark.webp" type="image/webp">
7575
<source srcset="/docs/assets/img/movies-box-dark.png" type="image/png">
76-
<img class="dark-img u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/movies-box-dark.png" width="600" alt="Movies Box home page"/>
76+
<img class="u-theme-dark u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/movies-box-dark.png" width="600" alt="Movies Box home page"/>
7777
</picture>
7878
</div>
7979

0 commit comments

Comments
 (0)