mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 00:46:28 +03:00
Add CodePen embed mixin
This commit is contained in:
parent
3092efdbeb
commit
bf65d070ef
|
@ -21,7 +21,8 @@
|
|||
"SOCIAL": {
|
||||
"twitter": "spacy_io",
|
||||
"github": "explosion",
|
||||
"reddit": "spacynlp"
|
||||
"reddit": "spacynlp",
|
||||
"codepen": "explosion"
|
||||
},
|
||||
|
||||
"NAVIGATION": {
|
||||
|
|
|
@ -90,6 +90,19 @@ mixin code(label, language)
|
|||
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
|
||||
url - [string] url or path to image
|
||||
width - [integer] image width in px, for better rendering (default: 500)
|
||||
|
|
Loading…
Reference in New Issue
Block a user