You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2022/07/07 20:29:10 UTC

[airavata-admin-user-docs] branch main updated: Adding copy to clipboard buttons

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airavata-admin-user-docs.git


The following commit(s) were added to refs/heads/main by this push:
     new 8bc71f8  Adding copy to clipboard buttons
8bc71f8 is described below

commit 8bc71f8fe356a868b2fc8f56d94cc6151c257d15
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Jul 7 16:29:02 2022 -0400

    Adding copy to clipboard buttons
---
 docs/js/clipboard.min.js             |  7 +++++++
 docs/js/clipboard_init.js            |  1 +
 docs/user-documentation/tutorials.md | 20 ++++++++++++++++----
 mkdocs.yml                           |  4 ++++
 4 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/docs/js/clipboard.min.js b/docs/js/clipboard.min.js
new file mode 100644
index 0000000..54b3c46
--- /dev/null
+++ b/docs/js/clipboard.min.js
@@ -0,0 +1,7 @@
+/*!
+ * clipboard.js v2.0.8
+ * https://clipboardjs.com/
+ *
+ * Licensed MIT © Zeno Rocha
+ */
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return o}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),c=n.n(e);function a(t){try{return document.execCommand(t)}catch(t){return}}var f=function(t){t=c()(t);return a("cut"),t};var l=function(t){var  [...]
\ No newline at end of file
diff --git a/docs/js/clipboard_init.js b/docs/js/clipboard_init.js
new file mode 100644
index 0000000..64fbda4
--- /dev/null
+++ b/docs/js/clipboard_init.js
@@ -0,0 +1 @@
+new ClipboardJS(".btn[data-clipboard-target]");
diff --git a/docs/user-documentation/tutorials.md b/docs/user-documentation/tutorials.md
index a8ba5ad..1a430f8 100644
--- a/docs/user-documentation/tutorials.md
+++ b/docs/user-documentation/tutorials.md
@@ -53,7 +53,11 @@ Image: Application Details Tab
     - _Required_: `True`
     - _Required on Command Line_: `True`
     - _metadata_: 
-<div id="target_id">
+
+<button class="btn" data-clipboard-target="#symptoms_exist">
+    Copy to clipboard
+</button>
+<div id="symptoms_exist">
 ```json    
 {
     "editor": {
@@ -92,7 +96,11 @@ Image: Application Details Tab
        - _Required_: `True`
        - _Required on Command Line_: `True`
        - _Metadata_
-<div id="target_id">
+
+<button class="btn" data-clipboard-target="#last_location">
+    Copy to clipboard
+</button>
+<div id="last_location">
 ```json
 {
     "editor": {
@@ -127,7 +135,11 @@ Image: Application Details Tab
        - _Required_: `True`
        - _Required on Command Line_: `True`
        - _Metadata_
-<div id="target_id">
+
+<button class="btn" data-clipboard-target="#crowd_size">
+    Copy to clipboard
+</button>
+<div id="crowd_size">
 ```json 
 {
     "editor": {
@@ -153,4 +165,4 @@ Image: Application Details Tab
 
 2. Fro this tutorial, In the Deployment tab, as the _executable path_ add `\executable path`
 
-3. NOTE: This application is purely to demonstrate the application input options and not to actually submit and run on a resource. 
\ No newline at end of file
+3. NOTE: This application is purely to demonstrate the application input options and not to actually submit and run on a resource. 
diff --git a/mkdocs.yml b/mkdocs.yml
index 09843b7..9b5ca7c 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -28,6 +28,10 @@ theme: readthedocs
 extra_css:
   - css/extra.css
 
+extra_javascript:
+  - js/clipboard.min.js
+  - js/clipboard_init.js
+
 markdown_extensions:
   - toc:
      permalink: 