Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Commit

Permalink
feat: highlight projects and copy btn
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Apr 17, 2018
1 parent 4b58c20 commit c266085
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion www/layouts/page/projects.html
Expand Up @@ -3,7 +3,17 @@
{{ range sort .Site.Data.projects "path" "asc" }}
<div class="Page">
<h1><a href="https://{{.path}}">{{ .path }}</a></h1>
<pre><code>curl -sfL https://install.goreleaser.com/{{ .path }}.sh | bash</code></pre>
{{ $cmd := delimit (slice "curl -sfL https://install.goreleaser.com/" .path ".sh | bash") "" }}
{{ highlight $cmd "bash" "" }}
<a href="javascript:void(0);" data-clipboard-text="{{ $cmd }}" class="btn-clip">Copy to clipboard</a>
</div>
{{ end }}

<script src="https://unpkg.com/clipboard@2.0.0/dist/clipboard.min.js"></script>
<script>
new ClipboardJS('.btn-clip');
</script>
<style>
a.btn-clip { float: right; }
</style>
{{ end }}

0 comments on commit c266085

Please sign in to comment.