docs: update examples in index

pull/32/head
Amio 2018-07-23 15:39:44 +08:00
rodzic 73375e64bc
commit f309bb35c8
4 zmienionych plików z 28 dodań i 12 usunięć

Wyświetl plik

@ -7,12 +7,12 @@ Fast badge generating service.
## Usage
```
https://badgen.now.sh/badge/:subject/:status/:color
──┬── ───┬─── ──┬─── ──┬──
│ │ │ └─ RGB / Color Name
│ TEXT TEXT ( optional )
"badge" - default(static) badge generator
https://badgen.net/badge/:subject/:status/:color
──┬── ───┬─── ──┬─── ──┬──
│ │ │ └─ RGB / Color Name
│ TEXT TEXT ( optional )
"badge" - default(static) badge generator
```
Available color names:
@ -88,7 +88,8 @@ Available color names:
- `label`: Override default subject text ([URL-Encoding][url-enc-href] needed for spaces or special characters)
- `emoji`: If subject/status text contains emoji, `emoji=1` will make it happy 👻
- `list`: `list=1` will replace `,` to ` | ` in status text
- `style`: Force use flat style with `style=flat`. [e.g.][style-eg-href]
- `list`: `list=1` will replace `,` with ` | ` in status text. [e.g.][list-eg-href]
## About
@ -99,3 +100,5 @@ Made with ❤️ by [Amio](https://github.com/amio)
</span>
[url-enc-href]: https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding
[list-eg-href]: /badge/platform/ios,macos,tvos?list=1
[style-eg-href]: /badge/color/blue/blue?style=flat

Wyświetl plik

@ -9,10 +9,23 @@ module.exports = serveMarked('libs/index.md', {
td { padding: 0 1em 0 0; font-size: 14px; white-space: nowrap; height: 26px }
td img { height: 20px; position: relative; top: 2px }
td a { font: 12px/14px monospace }
pre, code { background-color: #f4f6f9 }
pre, code { background-color: #f4f6f9; font-weight: 400 }
li code { padding: 0.2em 0.4em; display: pre }
li { padding: 0.4em 0 }
h1 + p { letter-spacing: 0.1px }
h1 + p img { margin-top: 1em }
`,
beforeHeadEnd: `<link rel="icon" href="/favicon.svg">`,
beforeBodyEnd: `
<script>
if (window.location.hostname === 'flat.badgen.net') {
const code = document.querySelector('pre code')
code.innerText = code.innerText.replace(
'badgen.net',
'flat.badgen.net'
).replace(/\\n/g, '\\n ')
}
</script>
`,
trackingGA: 'UA-4646421-14'
})

6
package-lock.json wygenerowano
Wyświetl plik

@ -3556,9 +3556,9 @@
"integrity": "sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg=="
},
"serve-marked": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/serve-marked/-/serve-marked-0.2.3.tgz",
"integrity": "sha512-3C5tK85FKQRiTZw+e7JXDfYHVa95ZtP0lSa5gYk2ujj4raAwr7nzC4RV2jGXStCdaI/CjdaaspcWK8nWUg4a3w==",
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/serve-marked/-/serve-marked-0.3.0.tgz",
"integrity": "sha512-/p+Sv2ggQojtqogb0GQOoNGGljl8IlB5Bms8E0HAwGwKQazqn7NygX2uGOh0IJVrnI4rElzL/wnh1EpMzmJynA==",
"requires": {
"marked": "^0.4.0"
}

Wyświetl plik

@ -19,7 +19,7 @@
"micro": "^9.3.2",
"micro-fork": "^0.1.0",
"millify": "^2.0.1",
"serve-marked": "0.2.3"
"serve-marked": "0.3.0"
},
"devDependencies": {
"micro-dev": "^3.0.0",