Skip to content

Commit a360689

Browse files
authored
Merge pull request #148 from pre-commit-ci/status-css
properly display status icons on lite-status
2 parents f69ad61 + 511a314 commit a360689

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

bin/make-page

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ class Renderer(markdown_code_blocks.CodeRenderer):
130130
elif info == 'address':
131131
return _render_address(code)
132132
elif info is not None and info.startswith('status '):
133-
_, status = info.split()
133+
_, status_id, status_class = info.split()
134134
return (
135-
f'<div class="status" id="{status}">'
135+
f'<div class="status {status_class}" id="{status_id}">'
136136
f' <div class="container run"></div>'
137137
f' <div class="container bg-light text-dark py-5">'
138138
f' {md(code)}'

content/lite_status.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
```status status-running
1+
```status status-running status-running
22
**pre-commit.ci lite is currently applying the change...**
33
```
44

5-
```status status-done
5+
```status status-done status-done
66
**pre-commit.ci lite successfully applied the change to the pull request!**
77
```
88

9-
```status status-push-failed-protection
9+
```status status-push-failed-protection status-failed
1010
**pre-commit.ci lite was unable to push due to branch protection rules**
1111
```
1212

13-
```status status-push-failed-organization
13+
```status status-push-failed-organization status-failed
1414
**pre-commit.ci lite was unable to push -- permission was denied --
1515
perhaps the pr was made from an organization?**
1616
```
1717

18-
```status status-push-failed-permission
18+
```status status-push-failed-permission status-failed
1919
**pre-commit.ci lite was unable to push -- permission was denied --
2020
perhaps the "Allow edits by maintainers" box was unchecked?**
2121
```
2222

23-
```status status-push-failed-workflow
23+
```status status-push-failed-workflow status-failed
2424
**GitHub prevented pre-commit.ci lite from pushing to this pr due to
2525
changes to a workflow file (.github/workflows/...)**
2626
```
2727

28-
```status status-push-failed
28+
```status status-push-failed status-failed
2929
**pre-commit.ci lite was unable to push to the branch -- branch missing?**
3030
```

tmpl/lite_status.html.tmpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,29 +82,29 @@
8282
font-weight: bold;
8383
}
8484

85-
#status-done .run {
85+
.status-done .run {
8686
color: #33a310;
8787
background-color: #33a310;
8888
}
89-
#status-done .run::after {
89+
.status-done .run::after {
9090
content: '✓';
9191
border-color: #33a310;
9292
}
9393

94-
#status-push-failed .run {
94+
.status-failed .run {
9595
color: #c40e0e;
9696
background-color: #c40e0e;
9797
}
98-
#status-push-failed .run::after {
98+
.status-failed .run::after {
9999
content: '✗';
100100
border-color: #c40e0e;
101101
}
102102

103-
#status-running .run {
103+
.status-running .run {
104104
color: #e8cb25;
105105
background-color: #e8cb25;
106106
}
107-
#status-running .run::after {
107+
.status-running .run::after {
108108
content: '⋯';
109109
border-color: #e8cb25;
110110
}

0 commit comments

Comments
 (0)