Skip to content

Commit 18e340c

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 b533471 commit 18e340c

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

@@ -95,48 +87,78 @@ See also our [example recipes][recipes-doc].
9587
<strong> and <a href="https://github.com/cpp-linter/cpp-linter-action/network/dependents">many more</a>.</strong>
9688
</p>
9789
90+
<!-- stop -->
9891
## Example
9992
10093
### Annotations
10194
102-
Using [`file-annotations`][file-annotations]:
95+
Using [`--file-annotations`][file-annotations]:
10396

10497
#### clang-format annotations
10598

106-
![clang-format annotations][format-annotations-preview]
99+
<picture>
100+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/format-annotation-dark.png">
101+
<source media="(prefers-color-scheme: light)" srcset="docs/images/format-annotation-light.png">
102+
<img alt="format-annotation-preview." src="docs/images/format-annotation-light.png">
103+
</picture>
107104

108105
#### clang-tidy annotations
109106

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

112113
### Thread Comment
113114

114-
Using [`thread-comments`][thread-comments]:
115+
Using [`--thread-comments`][thread-comments]:
115116

116-
![sample thread-comment][thread-comment-preview]
117+
<picture>
118+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/thread-comment-dark.png">
119+
<source media="(prefers-color-scheme: light)" srcset="docs/images/thread-comment-light.png">
120+
<img alt="thread-comment-preview." src="docs/images/thread-comment-light.png">
121+
</picture>
117122

118123
### Step Summary
119124

120-
Using [`step-summary`][step-summary]:
125+
Using [`--step-summary`][step-summary]:
121126

122-
![step summary][step-summary-preview]
127+
<picture>
128+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/step-summary-dark.png">
129+
<source media="(prefers-color-scheme: light)" srcset="docs/images/step-summary-light.png">
130+
<img alt="step-summary-preview." src="docs/images/step-summary-light.png">
131+
</picture>
123132

124133
### Pull Request Review
125134

126-
#### Only clang-tidy
135+
<picture>
136+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/review-summary-dark.png">
137+
<source media="(prefers-color-scheme: light)" srcset="docs/images/review-summary-light.png">
138+
<img alt="review-summary-preview." src="docs/images/review-summary-light.png">
139+
</picture>
127140

128-
Using [`tidy-review`][tidy-review]:
141+
#### clang-tidy suggestion
129142

130-
![sample tidy-review][tidy-review-preview]
143+
Using [`--tidy-review`][tidy-review]:
131144

132-
#### Only clang-format
145+
<picture>
146+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/tidy-review-dark.png">
147+
<source media="(prefers-color-scheme: light)" srcset="docs/images/tidy-review-light.png">
148+
<img alt="tidy-review-preview." src="docs/images/tidy-review-light.png">
149+
</picture>
133150

134-
Using [`format-review`][format-review]:
151+
#### clang-format suggestion
135152

136-
![sample format-review][format-review-preview]
153+
Using [`--format-review`][format-review]:
137154

138-
![sample format-suggestion][format-suggestion-preview]
155+
<picture>
156+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/format-review-dark.png">
157+
<source media="(prefers-color-scheme: light)" srcset="docs/images/format-review-light.png">
158+
<img alt="format-review-preview." src="docs/images/format-review-light.png">
159+
</picture>
139160

161+
<!-- resume -->
140162
## Add C/C++ Linter Action badge in README
141163

142164
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)