start page with dynamic URL

This commit is contained in:
Nikurasu 2023-01-29 14:48:10 +00:00
parent 348e20c95b
commit c8d4ed540a
Signed by: Nikurasu
SSH key fingerprint: SHA256:RUpFyiIfP72PGKv4JRZck8yP+JMNsXaPnVyyMK6mM2s
3 changed files with 32 additions and 1 deletions

View file

@ -14,10 +14,16 @@
<h1>You are ready to</h1>
<img src="Go-Logo_Aqua.svg" alt="The Golang logo">
</div>
<p>Now upload some files to <i>Route</i> with a HTTP push request.</p>
<div class="subtext">
<p>Now upload some files to</p>
<pre id="siteURL">Site</pre>
<p>with a HTTP push request.</p>
<p>Click on the link to copy.</p>
</div>
</div>
<img id="gopherImg" src="gopherPride.png" alt="A Golang gopher with a pride shirt">
</div>
<div class="bottomBox"></div>
</body>
<script src="setURL.js"></script>
</html>

View file

@ -0,0 +1,6 @@
let url = document.getElementById('siteURL')
let postURL = `${location.protocol}//${location.host}/api/update`
url.innerText = postURL
url.addEventListener('click', function() {
navigator.clipboard.writeText(postURL)
})

View file

@ -51,6 +51,25 @@ body {
width: 6rem;
}
.subtext {
display: flex;
flex-direction: column;
align-items: center;
cursor: pointer;
}
#siteURL:hover {
text-decoration: underline;
}
#siteURL {
background-color: #222222;
padding: .5rem;
margin: .5rem;
border-radius: 5px;
color: #a1a1a1;
}
#gopherImg {
max-height: 60%;
}