Implement "Copy URL to Clipboard"
This commit is contained in:
parent
6cf08248ae
commit
f41af48bb0
2 changed files with 11 additions and 2 deletions
|
|
@ -126,10 +126,15 @@
|
|||
margin-bottom: 0
|
||||
}
|
||||
|
||||
.post ul.controls {
|
||||
.post .controls {
|
||||
margin: 18px 0 0;
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.post .controls .control-element {
|
||||
margin: .24rem;
|
||||
}
|
||||
|
||||
code {
|
||||
|
|
|
|||
|
|
@ -330,7 +330,11 @@
|
|||
[:nav
|
||||
[:ul.controls
|
||||
[:li.control-element.url
|
||||
[:a {:href (:url post) :target "_blank"} "↗ Open original post"]]]]
|
||||
[:a {:href (:url post) :target "_blank"} "↗ Open original post"]]
|
||||
[:li.control-element.clipboard
|
||||
[:a {:href "#" :on-click (fn [e]
|
||||
(.preventDefault e)
|
||||
(js/navigator.clipboard.writeText (:url post)))} "◎ Copy URL to clipboard"]]]]
|
||||
#_[debug post]])
|
||||
|
||||
(defn- refresh-displayed-posts!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue