Skip to content

Commit d21a582

Browse files
committed
update preview pictures
Now includes light and dark theme variants of screenshots. The README will only render (on github) the relevant picture based on the user's preference. See [github docs](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#specifying-the-theme-an-image-is-shown-to) Updated mkdocs build similarly, but uses CSS instead of raw HTML.
1 parent 9ca6b67 commit d21a582

27 files changed

+116
-33
lines changed

README.md

Lines changed: 45 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,7 @@
99
[io-doc]: https://cpp-linter.github.io/cpp-linter-action/inputs-outputs
1010
[recipes-doc]: https://cpp-linter.github.io/cpp-linter-action/examples
1111

12-
[format-annotations-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/annotations-clang-format.png
13-
[tidy-annotations-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/annotations-clang-tidy.png
14-
[thread-comment-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/comment.png
15-
[step-summary-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/step-summary.png
16-
[tidy-review-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/tidy-review.png
17-
[format-review-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/format-review.png
18-
[format-suggestion-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/format-suggestion.png
19-
20-
<!--README-start-->
12+
<!-- start -->
2113

2214
# C/C++ Linter Action <sub><sup>| clang-format & clang-tidy</sup></sub>
2315

@@ -100,48 +92,78 @@ See also our [example recipes][recipes-doc].
10092
<strong> and <a href="https://github.com/cpp-linter/cpp-linter-action/network/dependents">many more</a>.</strong>
10193
</p>
10294
95+
<!-- stop -->
10396
## Example
10497
10598
### Annotations
10699
107-
Using [`file-annotations`][file-annotations]:
100+
Using [`--file-annotations`][file-annotations]:
108101

109102
#### clang-format annotations
110103

111-
![clang-format annotations][format-annotations-preview]
104+
<picture>
105+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/format-annotation-dark.png">
106+
<source media="(prefers-color-scheme: light)" srcset="docs/images/format-annotation-light.png">
107+
<img alt="format-annotation-preview." src="docs/images/format-annotation-light.png">
108+
</picture>
112109

113110
#### clang-tidy annotations
114111

115-
![clang-tidy annotations][tidy-annotations-preview]
112+
<picture>
113+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/tidy-annotation-dark.png">
114+
<source media="(prefers-color-scheme: light)" srcset="docs/images/tidy-annotation-light.png">
115+
<img alt="tidy-annotation-preview." src="docs/images/tidy-annotation-light.png">
116+
</picture>
116117

117118
### Thread Comment
118119

119-
Using [`thread-comments`][thread-comments]:
120+
Using [`--thread-comments`][thread-comments]:
120121

121-
![sample thread-comment][thread-comment-preview]
122+
<picture>
123+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/thread-comment-dark.png">
124+
<source media="(prefers-color-scheme: light)" srcset="docs/images/thread-comment-light.png">
125+
<img alt="thread-comment-preview." src="docs/images/thread-comment-light.png">
126+
</picture>
122127

123128
### Step Summary
124129

125-
Using [`step-summary`][step-summary]:
130+
Using [`--step-summary`][step-summary]:
126131

127-
![step summary][step-summary-preview]
132+
<picture>
133+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/step-summary-dark.png">
134+
<source media="(prefers-color-scheme: light)" srcset="docs/images/step-summary-light.png">
135+
<img alt="step-summary-preview." src="docs/images/step-summary-light.png">
136+
</picture>
128137

129138
### Pull Request Review
130139

131-
#### Only clang-tidy
140+
<picture>
141+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/review-summary-dark.png">
142+
<source media="(prefers-color-scheme: light)" srcset="docs/images/review-summary-light.png">
143+
<img alt="review-summary-preview." src="docs/images/review-summary-light.png">
144+
</picture>
132145

133-
Using [`tidy-review`][tidy-review]:
146+
#### clang-tidy suggestion
134147

135-
![sample tidy-review][tidy-review-preview]
148+
Using [`--tidy-review`][tidy-review]:
136149

137-
#### Only clang-format
150+
<picture>
151+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/tidy-review-dark.png">
152+
<source media="(prefers-color-scheme: light)" srcset="docs/images/tidy-review-light.png">
153+
<img alt="tidy-review-preview." src="docs/images/tidy-review-light.png">
154+
</picture>
138155

139-
Using [`format-review`][format-review]:
156+
#### clang-format suggestion
140157

141-
![sample format-review][format-review-preview]
158+
Using [`--format-review`][format-review]:
142159

143-
![sample format-suggestion][format-suggestion-preview]
160+
<picture>
161+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/format-review-dark.png">
162+
<source media="(prefers-color-scheme: light)" srcset="docs/images/format-review-light.png">
163+
<img alt="format-review-preview." src="docs/images/format-review-light.png">
164+
</picture>
144165

166+
<!-- resume -->
145167
## Add C/C++ Linter Action badge in README
146168

147169
You can show C/C++ Linter Action status with a badge in your repository README
-19.9 KB
Binary file not shown.
-23.9 KB
Binary file not shown.

docs/images/comment.png

-22.3 KB
Binary file not shown.
11.1 KB
Loading
11 KB
Loading

docs/images/format-review-dark.png

27.5 KB
Loading
27.6 KB
Loading

docs/images/format-review.png

-26.5 KB
Binary file not shown.

docs/images/format-suggestion.png

-32.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)