mirror of
https://github.com/ivabus/www
synced 2024-11-14 09:15:07 +03:00
Styling for clipboard copy modal
This commit is contained in:
parent
9314568c95
commit
47361e60f0
2 changed files with 55 additions and 3 deletions
|
@ -16,10 +16,12 @@
|
||||||
<input class="one-liner" type="text" value="$ sh <(curl tea.xyz) install {{- .Title -}}" id="myInput" readonly>
|
<input class="one-liner" type="text" value="$ sh <(curl tea.xyz) install {{- .Title -}}" id="myInput" readonly>
|
||||||
|
|
||||||
<!-- The button used to copy the text -->
|
<!-- The button used to copy the text -->
|
||||||
<button class="clipboard-copy" onclick="myFunction()"><i class="icon-clipboard"></i></button>
|
<button class="clipboard-copy" onclick="myFunction()" data-bs-toggle="modal" data-bs-target="#exampleModal"><i class="icon-clipboard"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
{{- partial "clipboard-modal.html" -}}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
@media only screen and (min-width: 768px) {
|
@media only screen and (min-width: 768px) {
|
||||||
|
@ -152,8 +154,8 @@
|
||||||
// Copy the text inside the text field
|
// Copy the text inside the text field
|
||||||
navigator.clipboard.writeText(copyText.value);
|
navigator.clipboard.writeText(copyText.value);
|
||||||
|
|
||||||
// Alert the copied text
|
/* Alert the copied text
|
||||||
alert("Copied " + copyText.value + " to clipboard");
|
alert("Copied " + copyText.value + " to clipboard");*/
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
50
src/layouts/partials/clipboard-modal.html
Normal file
50
src/layouts/partials/clipboard-modal.html
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
<div class="modal-body">
|
||||||
|
<h4><i class="icon-tea-checkmark"></i> Copied to clipboard, enjoy!</h4>
|
||||||
|
<p class="lead">But wait... using tea without authenticating is like buying a video game without the DLC.</p>
|
||||||
|
<p class="modal-text">By authenticating your GitHub, you'll be eligible for a variety of exciting rewards, including minted NFT certificates. Your authentication number is directly tied to the rarity of your certificate, so be sure to take a sip while it's hot!</p>
|
||||||
|
<button class="detail-btn-large" id="modal-cta"><i class="icon-enter-arrow"></i>AUTHENTICATE WITH TEA</button>
|
||||||
|
<div class="small grid-gray">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
#modal-cta{
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 1vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-text{
|
||||||
|
margin-bottom: 2vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-close{
|
||||||
|
position: absolute;
|
||||||
|
right: 1vw;
|
||||||
|
top: 1vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lead{
|
||||||
|
margin-bottom: 1vw !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-content{
|
||||||
|
background-color: #1a1a1a;
|
||||||
|
color:white;
|
||||||
|
font-family: "sono";
|
||||||
|
border-radius: 0px !important;
|
||||||
|
border: 2px solid #949494;
|
||||||
|
padding: 2vw 2vw 5vw 2vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-dialog{
|
||||||
|
max-width: 60%;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
Loading…
Reference in a new issue