mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 02:06:31 +03:00
Allow desctiption, group help, fix help icon and add style option to commands
This commit is contained in:
parent
f56cdf4ed1
commit
0864a8ddd8
|
@ -91,14 +91,18 @@ mixin permalink(id)
|
||||||
groups - [object] option groups, uses global variable QUICKSTART
|
groups - [object] option groups, uses global variable QUICKSTART
|
||||||
headline - [string] optional text to be rendered as widget headline
|
headline - [string] optional text to be rendered as widget headline
|
||||||
|
|
||||||
mixin quickstart(groups, headline)
|
mixin quickstart(groups, headline, description)
|
||||||
.c-quickstart.o-block#qs
|
.c-quickstart.o-block-small#qs
|
||||||
.c-quickstart__content
|
.c-quickstart__content
|
||||||
if headline
|
if headline
|
||||||
+h(2)=headline
|
+h(2)=headline
|
||||||
|
if description
|
||||||
|
p=description
|
||||||
for group in groups
|
for group in groups
|
||||||
.c-quickstart__group.u-text-small(data-qs-group=group.id)
|
.c-quickstart__group.u-text-small(data-qs-group=group.id)
|
||||||
.c-quickstart__legend=group.title
|
.c-quickstart__legend=group.title
|
||||||
|
if group.help
|
||||||
|
| #[+help(group.help)]
|
||||||
.c-quickstart__fields
|
.c-quickstart__fields
|
||||||
for option in group.options
|
for option in group.options
|
||||||
input.c-quickstart__input(class="c-quickstart__input--" + (group.multiple ? "check" : "radio") type=group.multiple ? "checkbox" : "radio" name=group.id id=option.id value=option.id checked=option.checked)
|
input.c-quickstart__input(class="c-quickstart__input--" + (group.multiple ? "check" : "radio") type=group.multiple ? "checkbox" : "radio" name=group.id id=option.id value=option.id checked=option.checked)
|
||||||
|
@ -106,7 +110,7 @@ mixin quickstart(groups, headline)
|
||||||
if option.meta
|
if option.meta
|
||||||
| #[span.c-quickstart__label__meta (#{option.meta})]
|
| #[span.c-quickstart__label__meta (#{option.meta})]
|
||||||
if option.help
|
if option.help
|
||||||
| #[+help(option.help).c-quickstart__label__meta]
|
| #[+help(option.help)]
|
||||||
|
|
||||||
pre.c-code-block
|
pre.c-code-block
|
||||||
code.c-code-block__content.c-quickstart__code(data-qs-results="")
|
code.c-code-block__content.c-quickstart__code(data-qs-results="")
|
||||||
|
@ -119,11 +123,11 @@ mixin quickstart(groups, headline)
|
||||||
//- Quickstart code item
|
//- Quickstart code item
|
||||||
data [object] - Rendering conditions (keyed by option group ID, value: option)
|
data [object] - Rendering conditions (keyed by option group ID, value: option)
|
||||||
|
|
||||||
mixin qs(data)
|
mixin qs(data, style)
|
||||||
- args = {}
|
- args = {}
|
||||||
for value, setting in data
|
for value, setting in data
|
||||||
- args['data-qs-' + setting] = value
|
- args['data-qs-' + setting] = value
|
||||||
span.c-quickstart__line&attributes(args)
|
span.c-quickstart__line(class="c-quickstart__line--#{style || 'bash'}")&attributes(args)
|
||||||
block
|
block
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user