100 lines
3.0 KiB
Go
100 lines
3.0 KiB
Go
package backend
|
|
|
|
func GetFancyResponse(input, handle string) string {
|
|
var hasHandle string
|
|
if handle != "" {
|
|
hasHandle = `<a class="bottom-right" href="/report?handle=` + handle + `">Report Broken Link</a>`
|
|
}
|
|
return `
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Decoded Binary</title>
|
|
<style>
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background-color:rgb(19, 31, 49);
|
|
margin: 40px;
|
|
color: #333;
|
|
}
|
|
.fancy-box {
|
|
background-color: #000000;
|
|
border: 2px solid #4a90e2;
|
|
border-radius: 12px;
|
|
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
|
|
padding: 30px;
|
|
max-width: auto;
|
|
margin: 0 auto;
|
|
}
|
|
.bottom-right {
|
|
position: absolute;
|
|
bottom: 10px;
|
|
right: 10px;
|
|
margin: 0;
|
|
}
|
|
button {
|
|
background-color: #4a90e2; /* Green background */
|
|
color: white; /* White text */
|
|
border: none;
|
|
padding: 10px 20px;
|
|
text-align: center;
|
|
text-decoration: none;
|
|
display: inline-block;
|
|
font-size: 16px;
|
|
margin-top: 10px;
|
|
cursor: pointer;
|
|
border-radius: 5px;
|
|
transition: background-color 0.3s ease, transform 0.2s ease;
|
|
}
|
|
button:hover {
|
|
background-color: #357abd; /* Darker green on hover */
|
|
transform: scale(1.05); /* Slightly enlarge on hover */
|
|
}
|
|
|
|
/* Active button effect */
|
|
button:active {
|
|
background-color: #2e6c99; /* Even darker green when clicked */
|
|
transform: scale(0.98); /* Slight shrink on click */
|
|
}
|
|
p {
|
|
color: #ffffff;
|
|
font-size: 1.1em;
|
|
}
|
|
</style>
|
|
</head>
|
|
<script>
|
|
function copyText() {
|
|
/* Get the input field */
|
|
var copyText = document.getElementById("fancy-box").innerText;
|
|
|
|
var tempInput = document.createElement("input");
|
|
tempInput.value = copyText;
|
|
|
|
document.body.appendChild(tempInput);
|
|
|
|
/* Select the text field */
|
|
tempInput.select();
|
|
tempInput.setSelectionRange(0, 99999); // For mobile devices
|
|
|
|
/* Copy the text to clipboard */
|
|
document.execCommand("copy");
|
|
|
|
document.body.removeChild(tempInput);
|
|
|
|
/* Alert the copied text */
|
|
alert("Copied the text: " + copyText);
|
|
}
|
|
</script>
|
|
<body>
|
|
<div class="fancy-box" id="fancy-box">
|
|
` + input + `
|
|
</div>
|
|
<button class="button" onclick="copyText()">Copy Text</button>
|
|
` + hasHandle + `
|
|
</body>
|
|
</html>
|
|
`
|
|
}
|