Skip to content

Commit 9695813

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 e1223c4 commit 9695813

27 files changed

+116
-34
lines changed

README.md

Lines changed: 45 additions & 24 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

@@ -71,49 +63,78 @@ For all explanations of our available input parameters and output variables, see
7163
7264
See also our [example recipes][recipes-doc].
7365
66+
<!-- stop -->
7467
## Example
7568
7669
### Annotations
7770
78-
Using [`file-annotations`][file-annotations]:
71+
Using [`--file-annotations`][file-annotations]:
7972

8073
#### clang-format annotations
8174

82-
![clang-format annotations][format-annotations-preview]
75+
<picture>
76+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/format-annotation-dark.png">
77+
<source media="(prefers-color-scheme: light)" srcset="docs/images/format-annotation-light.png">
78+
<img alt="format-annotation-preview." src="docs/images/format-review-light.png">
79+
</picture>
8380

8481
#### clang-tidy annotations
8582

86-
![clang-tidy annotations][tidy-annotations-preview]
83+
<picture>
84+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/tidy-annotation-dark.png">
85+
<source media="(prefers-color-scheme: light)" srcset="docs/images/tidy-annotation-light.png">
86+
<img alt="tidy-annotation-preview." src="docs/images/tidy-review-light.png">
87+
</picture>
8788

8889
### Thread Comment
8990

90-
Using [`thread-comments`][thread-comments]:
91+
Using [`--thread-comments`][thread-comments]:
9192

92-
![sample thread-comment][thread-comment-preview]
93+
<picture>
94+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/thread-comment-dark.png">
95+
<source media="(prefers-color-scheme: light)" srcset="docs/images/thread-comment-light.png">
96+
<img alt="thread-comment-preview." src="docs/images/thread-comment-light.png">
97+
</picture>
9398

9499
### Step Summary
95100

96-
Using [`step-summary`][step-summary]:
101+
Using [`--step-summary`][step-summary]:
97102

98-
![step summary][step-summary-preview]
103+
<picture>
104+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/step-summary-dark.png">
105+
<source media="(prefers-color-scheme: light)" srcset="docs/images/step-summary-light.png">
106+
<img alt="step-summary-preview." src="docs/images/step-summary-light.png">
107+
</picture>
99108

100109
### Pull Request Review
101110

102-
#### Only clang-tidy
103-
104-
Using [`tidy-review`][tidy-review]:
111+
<picture>
112+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/review-summary-dark.png">
113+
<source media="(prefers-color-scheme: light)" srcset="docs/images/review-summary-light.png">
114+
<img alt="review-summary-preview." src="docs/images/review-summary-light.png">
115+
</picture>
105116

106-
![sample tidy-review][tidy-review-preview]
117+
#### clang-tidy suggestion
107118

108-
#### Only clang-format
119+
Using [`--tidy-review`][tidy-review]:
109120

110-
Using [`format-review`][format-review]:
121+
<picture>
122+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/tidy-review-dark.png">
123+
<source media="(prefers-color-scheme: light)" srcset="docs/images/tidy-review-light.png">
124+
<img alt="tidy-review-preview." src="docs/images/tidy-review-light.png">
125+
</picture>
111126

112-
![sample format-review][format-review-preview]
127+
#### clang-format suggestion
113128

114-
![sample format-suggestion][format-suggestion-preview]
129+
Using [`--format-review`][format-review]:
115130

131+
<picture>
132+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/format-review-dark.png">
133+
<source media="(prefers-color-scheme: light)" srcset="docs/images/format-review-light.png">
134+
<img alt="format-review-preview." src="docs/images/format-review-light.png">
135+
</picture>
116136

137+
<!-- resume -->
117138
## Add C/C++ Linter Action badge in README
118139

119140
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

docs/images/format-review-light.png

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)