forked from aframevr/a-painter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request aframevr#53 from fernandojsg/style
Added copy to clipboard button with the uploaded url
- Loading branch information
Showing
4 changed files
with
63 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#ui { | ||
font-family: Helvetica, Arial, sans-serif; | ||
position: absolute; | ||
left: 20px; | ||
bottom: 20px; | ||
} | ||
|
||
.button { | ||
background-color: #ef2d5e; | ||
color: #fff; | ||
cursor: pointer; | ||
font-size: 10px; | ||
width: 130px; | ||
text-align: center; | ||
max-width: 115px; | ||
padding: 10px; | ||
} | ||
|
||
.button:hover { | ||
background-color: #e42b5a; | ||
} | ||
|
||
#share { | ||
display: flex; | ||
align-content: center; | ||
} | ||
|
||
#share input { | ||
width: 600px; | ||
color: #333; | ||
text-align: center; | ||
} | ||
|
||
.hide { | ||
display: none !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
window.onload = function(e){ | ||
var shareDiv = document.getElementById('share'); | ||
var shareUrl = document.getElementById('share-url'); | ||
document.addEventListener('drawing-uploaded', function (event) { | ||
shareDiv.classList.remove('hide'); | ||
shareUrl.value = event.detail.url; | ||
}); | ||
|
||
new Clipboard('.button.copy'); | ||
} |