mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +03:00
Add CodePen embed mixin
This commit is contained in:
parent
3092efdbeb
commit
bf65d070ef
|
@ -21,7 +21,8 @@
|
||||||
"SOCIAL": {
|
"SOCIAL": {
|
||||||
"twitter": "spacy_io",
|
"twitter": "spacy_io",
|
||||||
"github": "explosion",
|
"github": "explosion",
|
||||||
"reddit": "spacynlp"
|
"reddit": "spacynlp",
|
||||||
|
"codepen": "explosion"
|
||||||
},
|
},
|
||||||
|
|
||||||
"NAVIGATION": {
|
"NAVIGATION": {
|
||||||
|
|
|
@ -90,6 +90,19 @@ mixin code(label, language)
|
||||||
block
|
block
|
||||||
|
|
||||||
|
|
||||||
|
//- CodePen embed
|
||||||
|
slug - [string] ID of CodePen demo (taken from URL)
|
||||||
|
height - [integer] height of demo embed iframe
|
||||||
|
default_tab - [string] code tab(s) visible on load (default: "result")
|
||||||
|
|
||||||
|
mixin codepen(slug, height, default_tab)
|
||||||
|
figure.o-block(style="min-height: #{height}px")&attributes(attributes)
|
||||||
|
.codepen(data-height=height data-theme-id="26467" data-slug-hash=slug data-default-tab=(default_tab || "result") data-embed-version="2" data-user=SOCIAL.codepen)
|
||||||
|
+a("https://codepen.io/" + SOCIAL.codepen + "/" + slug) View on CodePen
|
||||||
|
|
||||||
|
script(async src="https://assets.codepen.io/assets/embed/ei.js")
|
||||||
|
|
||||||
|
|
||||||
//- Images / figures
|
//- Images / figures
|
||||||
url - [string] url or path to image
|
url - [string] url or path to image
|
||||||
width - [integer] image width in px, for better rendering (default: 500)
|
width - [integer] image width in px, for better rendering (default: 500)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user