-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Add flat-square action badge style #34062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
wxiaoguang
merged 8 commits into
go-gitea:main
from
bytedream:action-badge-style-flat-square
Apr 1, 2025
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
fddb66d
Add badge flat-square style
bytedream 8a210af
Add devtest for new style
bytedream ad7e126
Fix endpoint style switch
bytedream 1d846b9
Add global slice with all styles
bytedream ad0f9e2
optimize, lazy init, default style fallback
wxiaoguang 3da42bc
add comment for style
wxiaoguang 23de9d0
Merge branch 'main' into action-badge-style-flat-square
wxiaoguang ed20f51
Update modules/badge/badge.go
wxiaoguang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="{{.Badge.Width}}" height="20" | ||
role="img" aria-label="{{.Badge.Label.Text}}: {{.Badge.Message.Text}}"> | ||
<title>{{.Badge.Label.Text}}: {{.Badge.Message.Text}}</title> | ||
<g shape-rendering="crispEdges"> | ||
<rect width="{{.Badge.Label.Width}}" height="20" fill="#555" /> | ||
<rect x="{{.Badge.Label.Width}}" width="{{.Badge.Message.Width}}" height="20" fill="{{.Badge.Color}}" /> | ||
</g> | ||
<g fill="#fff" text-anchor="middle" font-family="{{.Badge.FontFamily}}" | ||
text-rendering="geometricPrecision" font-size="{{.Badge.FontSize}}"> | ||
<text x="{{.Badge.Label.X}}" y="140" | ||
transform="scale(.1)" fill="#fff" textLength="{{.Badge.Label.TextLength}}">{{.Badge.Label.Text}}</text> | ||
<text x="{{.Badge.Message.X}}" y="140" transform="scale(.1)" fill="#fff" | ||
textLength="{{.Badge.Message.TextLength}}">{{.Badge.Message.Text}}</text> | ||
</g> | ||
</svg> |
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.