mirror of
https://github.com/offen/website.git
synced 2024-11-22 09:00:28 +01:00
Merge pull request #76 from offen/click-to-copy
Add click to copy for demo commands
This commit is contained in:
commit
46aac03106
24
homepage/theme/static/scripts/NOTICE
Normal file
24
homepage/theme/static/scripts/NOTICE
Normal file
@ -0,0 +1,24 @@
|
||||
clipboard.js
|
||||
Copyright (C) Zeno Rocha
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) Zeno Rocha
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
3
homepage/theme/static/scripts/click-to-copy.js
Normal file
3
homepage/theme/static/scripts/click-to-copy.js
Normal file
@ -0,0 +1,3 @@
|
||||
$(document).ready(function () {
|
||||
var clipboard = new ClipboardJS('.js-click-to-copy')
|
||||
})
|
7
homepage/theme/static/scripts/clipboard.min.js
vendored
Normal file
7
homepage/theme/static/scripts/clipboard.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -199,7 +199,7 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
{% block scripts %}
|
||||
{% assets filters="rjsmin", output="scripts/packed.js", "scripts/jquery-3.4.1.min.js", "scripts/menu.js", "scripts/fade.js" %}
|
||||
{% assets filters="rjsmin", output="scripts/packed.js", "scripts/jquery-3.4.1.min.js", "scripts/menu.js", "scripts/fade.js", "scripts/clipboard.min.js", "scripts/click-to-copy.js" %}
|
||||
<script src="/{{ ASSET_URL }}"></script>
|
||||
{% endassets %}
|
||||
{% endblock %}
|
||||
|
@ -19,7 +19,7 @@
|
||||
</p>
|
||||
<div class="flex flex-column items-center">
|
||||
<div class="w-100 ph4 pv2 mb5 inner-shaddow bg-gray">
|
||||
<code class="ma0 lh-solid word-wrap white">
|
||||
<code class="ma0 lh-solid word-wrap white js-click-to-copy pointer" data-clipboard-text="curl https://demo.offen.dev | bash" title="Click to copy">
|
||||
curl https://demo.offen.dev | bash
|
||||
</code>
|
||||
</div>
|
||||
@ -30,7 +30,7 @@
|
||||
</p>
|
||||
<div class="flex flex-column items-center">
|
||||
<div class="w-100 ph4 pv2 mb5 inner-shaddow bg-gray">
|
||||
<code class="ma0 lh-solid word-wrap white">
|
||||
<code class="ma0 lh-solid word-wrap white js-click-to-copy pointer" data-clipboard-text="docker run --rm -it -p 9876:9876 offen/offen:latest demo -port 9876" title="Click to copy">
|
||||
docker run --rm -it -p 9876:9876 offen/offen:latest demo -port 9876
|
||||
</code>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user