From dc33273d8a9b881a38870d59cc9a576a1e65d68f Mon Sep 17 00:00:00 2001 From: julien Date: Tue, 3 Jan 2017 17:50:49 +0100 Subject: [PATCH] added clipboard functionality with your comments --- templates/clipboard.png | Bin 0 -> 488 bytes templates/example.tmpl | 7 ++++++- templates/site.css | 5 ++++- templates/site.js | 17 +++++++++++++++++ tools/generate.go | 8 +++++++- 5 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 templates/clipboard.png create mode 100644 templates/site.js diff --git a/templates/clipboard.png b/templates/clipboard.png new file mode 100644 index 0000000000000000000000000000000000000000..0e262fec70a6efb70c8c03c67e4cfea0b230d5ab GIT binary patch literal 488 zcmVP)vs0+u6@oUjF!il?f%*EGIz@kHuY0Jz-x!^TP`0I+j#4M3yOun`C$0GLY;0}N!> z@?HR!^uMdY?T0(;4FS(8K`+4e{$(p$r=i9GO#pFzR`vm!Q+6ka*jT(SNo?u|Lt!d6 zSGM3_C`@*F72plf0fhAVfD0h{U)v;(fF70L6Q}@Ds{#v|#T@yq_0~Ezo&p%OgcqtH ze?6R7A=SQhZwYS^XuznG2EkC6sp+&;0f49d3Xi}@mm2i7x*%siPzKUY8ptjfQgpvc zU|4PGLW39J38<u`lTp#J+Cizm8Ecyw8bkh1}(e_fNd33!{0 eZzG - {{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