Patrice Chalin 6d2d52c588 docs(dart): cleanup 'live example' links (#1449)
This fixes various issues such as:
- missing space in Dart version between the live demo and demo source
links.
- Live example link directing to Plunker for Dart.

The main mixins (`liveExampleLink`*) used to support the generation of
links now assume reasonable default values for their arguments, and in
most cases the defaults are used.

* Dart example links: use http vs https

As agree to with @kwalrath.
2016-05-20 16:18:58 -07:00

16 lines
616 B
Plaintext

include ../../../_includes/_util-fns
//- See the _util-fns file included above for a description of the use of these variables.
- var _docsFor = 'ts';
//- Other values match the defaults.
mixin liveExampleLink(linkText, exampleUrlPartName)
- var text = linkText || 'live example';
- var ex = exampleUrlPartName || getExampleName();
- var href = '/resources/live-examples/' + ex + '/ts/plnkr.html';
a(href='#{href}' target="_blank")= text
mixin liveExampleLink2(linkText, exampleUrlPartName)
//- In Dart this gives 2 links: to the demo and to the source.
+liveExampleLink(linkText, exampleUrlPartName)