start page with dynamic URL
This commit is contained in:
parent
348e20c95b
commit
c8d4ed540a
3 changed files with 32 additions and 1 deletions
|
@ -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>
|
6
dev/docker/images/production/html/setURL.js
Normal file
6
dev/docker/images/production/html/setURL.js
Normal 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)
|
||||
})
|
|
@ -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%;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue