Skip to content

Commit 52e2223

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 0f6d1b8 commit 52e2223

27 files changed

Lines changed: 116 additions & 33 deletions

README.md

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

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

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

@@ -104,48 +96,78 @@ See also our [example recipes][recipes-doc].
10496
<strong> and <a href="https://github.com/cpp-linter/cpp-linter-action/network/dependents">many more</a>.</strong>
10597
</p>
10698
99+
<!-- stop -->
107100
## Example
108101
109102
### Annotations
110103
111-
Using [`file-annotations`][file-annotations]:
104+
Using [`--file-annotations`][file-annotations]:
112105

113106
#### clang-format annotations
114107

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

117114
#### clang-tidy annotations
118115

119-
![clang-tidy annotations][tidy-annotations-preview]
116+
<picture>
117+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/tidy-annotation-dark.png">
118+
<source media="(prefers-color-scheme: light)" srcset="docs/images/tidy-annotation-light.png">
119+
<img alt="tidy-annotation-preview." src="docs/images/tidy-annotation-light.png">
120+
</picture>
120121

121122
### Thread Comment
122123

123-
Using [`thread-comments`][thread-comments]:
124+
Using [`--thread-comments`][thread-comments]:
124125

125-
![sample thread-comment][thread-comment-preview]
126+
<picture>
127+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/thread-comment-dark.png">
128+
<source media="(prefers-color-scheme: light)" srcset="docs/images/thread-comment-light.png">
129+
<img alt="thread-comment-preview." src="docs/images/thread-comment-light.png">
130+
</picture>
126131

127132
### Step Summary
128133

129-
Using [`step-summary`][step-summary]:
134+
Using [`--step-summary`][step-summary]:
130135

131-
![step summary][step-summary-preview]
136+
<picture>
137+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/step-summary-dark.png">
138+
<source media="(prefers-color-scheme: light)" srcset="docs/images/step-summary-light.png">
139+
<img alt="step-summary-preview." src="docs/images/step-summary-light.png">
140+
</picture>
132141

133142
### Pull Request Review
134143

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

137-
Using [`tidy-review`][tidy-review]:
150+
#### clang-tidy suggestion
138151

139-
![sample tidy-review][tidy-review-preview]
152+
Using [`--tidy-review`][tidy-review]:
140153

141-
#### Only clang-format
154+
<picture>
155+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/tidy-review-dark.png">
156+
<source media="(prefers-color-scheme: light)" srcset="docs/images/tidy-review-light.png">
157+
<img alt="tidy-review-preview." src="docs/images/tidy-review-light.png">
158+
</picture>
142159

143-
Using [`format-review`][format-review]:
160+
#### clang-format suggestion
144161

145-
![sample format-review][format-review-preview]
162+
Using [`--format-review`][format-review]:
146163

147-
![sample format-suggestion][format-suggestion-preview]
164+
<picture>
165+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/format-review-dark.png">
166+
<source media="(prefers-color-scheme: light)" srcset="docs/images/format-review-light.png">
167+
<img alt="format-review-preview." src="docs/images/format-review-light.png">
168+
</picture>
148169

170+
<!-- resume -->
149171
## Add C/C++ Linter Action badge in README
150172

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