doc: update CONTRIBUTING.md.

This commit is contained in:
jaywcjlove 2022-11-02 01:41:57 +08:00
parent 6f2da75d94
commit bd3839f648
2 changed files with 31 additions and 1 deletions

View File

@ -61,6 +61,21 @@ Contributing 贡献
- SVG 图标尺寸 `<svg height="1em" width="1em"`
- SVG 图标颜色使用继承颜色值 `<svg fill="currentColor"`
#### 提示配置
```markdown
[Django](./docs/djiango.md)<!--rehype:style=background: rgb(12 75 51/var(\-\-bg\-opacity));&class=contributing-->
```
添加 `contributing` 类名,会在卡片下方添加 _`👆待完善需要您的参与`_
```markdown
[Django](./docs/djiango.md)<!--rehype:style=background: rgb(12 75 51/var(\-\-bg\-opacity));&class=tag&data-lang=Python-->
```
添加 `class=tag&data-lang=Python` 类名和参数,会在卡片右上角标记 _`Python`_
## 本地开发
```bash

View File

@ -365,7 +365,7 @@ body.home .max-container a.home-button:visited:hover {
gap: 2rem;
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.home-card a.contributing {
.home-card :is(a.contributing, a.tag) {
position: relative;
}
.home-card a.contributing::after {
@ -380,6 +380,21 @@ body.home .max-container a.home-button:visited:hover {
.home-card a.contributing:hover:after {
color: var(--color-fg-muted);
}
.home-card a.tag::before {
content: attr(data-lang);
display: block;
position: absolute;
font-size: 10px;
right: 6px;
top: 6px;
background: rgba(255 255 255 / 0.3);
border-radius: 3px;
padding: 1px 3px 2px 3px;
transition: all 0.3s;
}
.home-card a.tag:hover:before {
background: rgba(255 255 255 / 0.2);
}
[data-color-mode*='light'] body .home-card a {
--text-opacity: 0.75;