Progress on clipboard styling

This commit is contained in:
Thomas Smith 2022-10-17 17:16:50 -04:00
parent 069a7e9c57
commit e60183973b
2 changed files with 243 additions and 33 deletions

View file

@ -12,15 +12,18 @@
</section> </section>
<hr> <hr>
<div class="row button-container">
<input class="one-liner" type="text" value="$ sh <(curl tea.xyz) install&nbsp;{{- .Title -}}" id="myInput" readonly>
<!-- The text field --> <!-- The button used to copy the text -->
<code class="one-liner" data-lang="sh">$ sh <(curl tea.xyz) install</code> <button class="clipboard-copy" onclick="myFunction()"><i class="icon-clipboard"></i></button>
</div>
<!-- The button used to copy the text --> <hr>
<button class="clipboard-copy" onclick="myFunction()"><i class="icon-download-arrow"></i></button>
<style> <style>
@media only screen and (min-width: 1200px) {
.one-liner{ .one-liner{
width: 85%; width: 85%;
height: 8.371vw; height: 8.371vw;
@ -30,7 +33,16 @@
font-family: "pp-neue-machina"; font-family: "pp-neue-machina";
color:#4d4d4d; color:#4d4d4d;
font-size: 2.1vw; font-size: 2.1vw;
padding-left: 8.371vw; padding-left: 4.185vw;
border-left: 2px solid #949494;
border-right: 2px solid #949494;
}
.one-liner:focus{
border:none;
outline: none;
border-left: 2px solid #949494;
border-right: 2px solid #949494;
} }
.clipboard-copy{ .clipboard-copy{
@ -42,16 +54,198 @@
float:right; float:right;
background-color: #1a1a1a !important; background-color: #1a1a1a !important;
border: none; border: none;
border-right: 2px solid #949494;
transition: 0.2s linear;
} }
.clipboard-copy:hover{ .clipboard-copy:hover{
background-color: #00ffd0 !important; background-color: #00ffd0 !important;
color: #1a1a1a !important; color: #1a1a1a !important;
box-shadow: inset 0vw 0vw 0vw 0.558vw #1a1a1a !important;
}
}
@media only screen and (min-width: 992px) and (max-width: 1200px) {
.one-liner{
width: 85%;
height: 8.371vw;
border-radius: 0px;
border: none;
background-color: #1a1a1a !important;
font-family: "pp-neue-machina";
color:#4d4d4d;
font-size: 2.1vw;
padding-left: 4.185vw;
border-left: 2px solid #949494;
border-right: 2px solid #949494;
}
.one-liner:focus{
border:none;
outline: none;
border-left: 2px solid #949494;
border-right: 2px solid #949494;
}
.clipboard-copy{
height: 8.371vw;
width: 14%;
font-family: "pp-neue-machina";
color:#4d4d4d;
font-size: 2.1vw;
float:right;
background-color: #1a1a1a !important;
border: none;
border-right: 2px solid #949494;
transition: 0.2s linear;
}
.clipboard-copy:hover{
background-color: #00ffd0 !important;
color: #1a1a1a !important;
box-shadow: inset 0vw 0vw 0vw 0.558vw #1a1a1a !important;
}
}
@media only screen and (min-width: 768px) and (max-width: 992px) {
.one-liner{
width: 85%;
height: 8.371vw;
border-radius: 0px;
border: none;
background-color: #1a1a1a !important;
font-family: "pp-neue-machina";
color:#4d4d4d;
font-size: 2.1vw;
padding-left: 4.185vw;
border-left: 2px solid #949494;
border-right: 2px solid #949494;
}
.one-liner:focus{
border:none;
outline: none;
border-left: 2px solid #949494;
border-right: 2px solid #949494;
}
.clipboard-copy{
height: 8.371vw;
width: 14%;
font-family: "pp-neue-machina";
color:#4d4d4d;
font-size: 2.1vw;
float:right;
background-color: #1a1a1a !important;
border: none;
border-right: 2px solid #949494;
transition: 0.2s linear;
}
.clipboard-copy:hover{
background-color: #00ffd0 !important;
color: #1a1a1a !important;
box-shadow: inset 0vw 0vw 0vw 0.558vw #1a1a1a !important;
}
}
@media only screen and (min-width: 576px) and (max-width: 768px) {
.one-liner{
width: 85%;
height: 8.371vw;
border-radius: 0px;
border: none;
background-color: #1a1a1a !important;
font-family: "pp-neue-machina";
color:#4d4d4d;
font-size: 2.1vw;
padding-left: 4.185vw;
border-left: 2px solid #949494;
border-right: 2px solid #949494;
}
.one-liner:focus{
border:none;
outline: none;
border-left: 2px solid #949494;
border-right: 2px solid #949494;
}
.clipboard-copy{
height: 8.371vw;
width: 14%;
font-family: "pp-neue-machina";
color:#4d4d4d;
font-size: 2.1vw;
float:right;
background-color: #1a1a1a !important;
border: none;
border-right: 2px solid #949494;
transition: 0.2s linear;
}
.clipboard-copy:hover{
background-color: #00ffd0 !important;
color: #1a1a1a !important;
box-shadow: inset 0vw 0vw 0vw 0.558vw #1a1a1a !important;
}
}
@media only screen and (max-width: 576px) {
.one-liner{
width: 85%;
height: 8.371vw;
border-radius: 0px;
border: none;
background-color: #1a1a1a !important;
font-family: "pp-neue-machina";
color:#4d4d4d;
font-size: 2.1vw;
padding-left: 4.185vw;
border-left: 2px solid #949494;
border-right: 2px solid #949494;
}
.one-liner:focus{
border:none;
outline: none;
border-left: 2px solid #949494;
border-right: 2px solid #949494;
}
.clipboard-copy{
height: 8.371vw;
width: 14%;
font-family: "pp-neue-machina";
color:#4d4d4d;
font-size: 2.1vw;
float:right;
background-color: #1a1a1a !important;
border: none;
border-right: 2px solid #949494;
transition: 0.2s linear;
}
.clipboard-copy:hover{
background-color: #00ffd0 !important;
color: #1a1a1a !important;
box-shadow: inset 0vw 0vw 0vw 0.558vw #1a1a1a !important;
}
} }
</style> </style>
<script> <script>
function myFunction() { function myFunction() {
// Get the text field // Get the text field
var copyText = document.getElementById("myInput"); var copyText = document.getElementById("myInput");
@ -66,6 +260,7 @@
// Alert the copied text // Alert the copied text
alert("Copied " + copyText.value + " to clipboard"); alert("Copied " + copyText.value + " to clipboard");
} }
</script> </script>
<section class="teal-bg"> <section class="teal-bg">

View file

@ -1,10 +1,11 @@
<hr> <hr>
<div class="row button-container">
<input class="one-liner" type="text" value="$ sh <(curl tea.xyz) install&nbsp;{{- .Title -}}" id="myInput" readonly>
<!-- The text field --> <!-- The button used to copy the text -->
<input class="one-liner" type="text" value="$ sh <(curl tea.xyz) install {{- .Title -}}" id="myInput"> <button class="clipboard-copy" onclick="myFunction()"><i class="icon-clipboard"></i></button>
</div>
<!-- The button used to copy the text --> <hr>
<button class="clipboard-copy" onclick="myFunction()"><i class="icon-download-arrow"></i></button>
<style> <style>
@ -17,7 +18,16 @@
font-family: "pp-neue-machina"; font-family: "pp-neue-machina";
color:#4d4d4d; color:#4d4d4d;
font-size: 2.1vw; font-size: 2.1vw;
padding-left: 8.371vw; padding-left: 4.185vw;
border-left: 2px solid #949494;
border-right: 2px solid #949494;
}
.one-liner:focus{
border:none;
outline: none;
border-left: 2px solid #949494;
border-right: 2px solid #949494;
} }
.clipboard-copy{ .clipboard-copy{
@ -29,16 +39,20 @@
float:right; float:right;
background-color: #1a1a1a !important; background-color: #1a1a1a !important;
border: none; border: none;
border-right: 2px solid #949494;
transition: 0.2s linear;
} }
.clipboard-copy:hover{ .clipboard-copy:hover{
background-color: #00ffd0 !important; background-color: #00ffd0 !important;
color: #1a1a1a !important; color: #1a1a1a !important;
box-shadow: inset 0vw 0vw 0vw 0.558vw #1a1a1a !important;
} }
</style> </style>
<script> <script>
function myFunction() { function myFunction() {
// Get the text field // Get the text field
var copyText = document.getElementById("myInput"); var copyText = document.getElementById("myInput");
@ -53,4 +67,5 @@
// Alert the copied text // Alert the copied text
alert("Copied " + copyText.value + " to clipboard"); alert("Copied " + copyText.value + " to clipboard");
} }
</script> </script>