diff options
Diffstat (limited to 'views')
| -rw-r--r-- | views/archive/item.php | 9 | ||||
| -rw-r--r-- | views/img/link.svg | 1 | ||||
| -rw-r--r-- | views/styles.css | 4 |
3 files changed, 13 insertions, 1 deletions
diff --git a/views/archive/item.php b/views/archive/item.php index 5609a31..cff2f92 100644 --- a/views/archive/item.php +++ b/views/archive/item.php @@ -18,7 +18,14 @@ <input type="hidden" name="url" value="<?= $page->URL ?>"> <button><?php include $VIEWS_DIR . '/img/pdf-export.svg' ?></button> </form> - <span></span> + <button id="copy-to-clipboard" title="Copy to clipboard!"><?php include $VIEWS_DIR . '/img/link.svg' ?></button> + <script type="text/javascript"> + const ctc = document.getElementById('copy-to-clipboard'); + ctc.onclick = function () { + navigator.clipboard.writeText('<?= getenv("HTTP_HOST") . "/archives/" . $page->WID . "/index.php" ?>'); + alert("Copied to clipboard!"); + }; + </script> </section> <section name="itemButton" hidden> <form action="/list/add" method="GET"> diff --git a/views/img/link.svg b/views/img/link.svg new file mode 100644 index 0000000..7449f18 --- /dev/null +++ b/views/img/link.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-link-plus"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 15l6 -6" /><path d="M11 6l.463 -.536a5 5 0 0 1 7.072 0a4.993 4.993 0 0 1 -.001 7.072" /><path d="M12.603 18.534a5.07 5.07 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463" /><path d="M16 19h6" /><path d="M19 16v6" /></svg>
\ No newline at end of file diff --git a/views/styles.css b/views/styles.css index 3817e0e..7bfc7fd 100644 --- a/views/styles.css +++ b/views/styles.css @@ -81,6 +81,10 @@ input[type=submit]:hover, button:hover, select:hover { display: none !important; } +script { + display: none !important; +} + /* Generic */ .float-right { |
