diff --git a/templates/clipboard.png b/templates/clipboard.png new file mode 100644 index 0000000..0e262fe Binary files /dev/null and b/templates/clipboard.png differ diff --git a/templates/example.tmpl b/templates/example.tmpl index dabad82..2503f29 100644 --- a/templates/example.tmpl +++ b/templates/example.tmpl @@ -28,7 +28,7 @@ {{.DocsRendered}} - {{if .CodeRun}}{{end}} + {{if .CodeRun}}{{end}} {{.CodeRendered}} @@ -44,5 +44,10 @@ by @mmcgrana | feedback | source | license

+ + diff --git a/templates/site.css b/templates/site.css index 4808e32..06d0111 100644 --- a/templates/site.css +++ b/templates/site.css @@ -136,11 +136,14 @@ pre, code { font-size: 14px; line-height: 18px; font-family: 'Menlo', 'Monaco', 'Consolas', 'Lucida Console', monospace; } -img.run { +img.copy, img.run { height: 16px; width: 16px; float: right } +img.copy { + cursor: pointer; +} /* Syntax highlighting */ body .hll { background-color: #ffffcc } diff --git a/templates/site.js b/templates/site.js new file mode 100644 index 0000000..752e656 --- /dev/null +++ b/templates/site.js @@ -0,0 +1,17 @@ +/*! + * clipboard.js v1.5.13 + * https://zenorocha.github.io/clipboard.js + * + * Licensed MIT © Zeno Rocha + */ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t,e,n;return function t(e,n,o){function r(c,a){if(!n[c]){if(!e[c]){var l="function"==typeof require&&require;if(!a&&l)return l(c,!0);if(i)return i(c,!0);var s=new Error("Cannot find module '"+c+"'");throw s.code="MODULE_NOT_FOUND",s}var u=n[c]={exports:{}};e[c][0].call(u.exports,function(t){var n=e[c][1][t];return r(n?n:t)},u,u.exports,t,e,n,o)}return n[c].exports}for(var i="function"==typeof require&&require,c=0;c