mirror of
https://github.com/jsiebens/ionscale.git
synced 2026-03-31 15:07:49 +01:00
125 lines
3.1 KiB
Plaintext
125 lines
3.1 KiB
Plaintext
package templates
|
|
|
|
templ Index(version string, revision string) {
|
|
<div style="text-align: center">
|
|
<p><b>ionscale</b></p>
|
|
<p><small>{ version }</small></p>
|
|
<p><small>{ revision }</small></p>
|
|
</div>
|
|
}
|
|
|
|
templ Success() {
|
|
<div style="text-align: center">
|
|
<p><b>Authorization successful</b></p>
|
|
<small>You can now close this window</small>
|
|
</div>
|
|
}
|
|
|
|
templ NewMachine() {
|
|
<div style="text-align: center">
|
|
<p><b>Authentication successful</b></p>
|
|
<small>but this is a <b style="color: blue">new machine</b> and needs to be authorized by your Tailnet admin.</small>
|
|
</div>
|
|
}
|
|
|
|
templ Error() {
|
|
<div style="text-align: center">
|
|
<p><b>An error occurred</b></p>
|
|
</div>
|
|
}
|
|
|
|
templ Unauthorized() {
|
|
<div style="text-align: center">
|
|
<p><b>Authentication successful</b></p>
|
|
<small>but you're <b style="color: red">not</b> authorized to use any network</small>
|
|
</div>
|
|
}
|
|
|
|
templ InvalidAuthKey() {
|
|
<div style="text-align: center">
|
|
<p><b>Authorization failed</b></p>
|
|
<small>the provided auth key is <b style="color: red">invalid</b></small>
|
|
</div>
|
|
}
|
|
|
|
templ NotTagOwner() {
|
|
<div style="text-align: center">
|
|
<p><b>Authentication successful</b></p>
|
|
<small>but you're <b style="color: red">not</b> a valid tag owner for the requested tags</small>
|
|
</div>
|
|
}
|
|
|
|
templ NotMachineOwner() {
|
|
<div style="text-align: center">
|
|
<p><b>Authentication successful</b></p>
|
|
<small>but you're <b style="color: red">not</b> a valid owner of the machine</small>
|
|
</div>
|
|
}
|
|
|
|
templ layout(contents templ.Component) {
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
@heading()
|
|
</head>
|
|
<body>
|
|
<div class="wrapper">
|
|
@contents
|
|
</div>
|
|
</body>
|
|
</html>
|
|
}
|
|
|
|
templ heading() {
|
|
<meta charset="UTF-8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
<style>
|
|
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
font-family: 'Poppins', sans-serif;
|
|
}
|
|
|
|
body {
|
|
width: 100%;
|
|
height: 100vh;
|
|
padding: 10px;
|
|
background: #379683;
|
|
}
|
|
|
|
.wrapper {
|
|
background: #fff;
|
|
max-width: 400px;
|
|
width: 100%;
|
|
margin: 120px auto;
|
|
padding: 25px;
|
|
border-radius: 5px;
|
|
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.selectionList li {
|
|
position: relative;
|
|
list-style: none;
|
|
height: 45px;
|
|
line-height: 45px;
|
|
margin-bottom: 8px;
|
|
background: #f2f2f2;
|
|
border-radius: 3px;
|
|
overflow: hidden;
|
|
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.selectionList li button {
|
|
margin: 0;
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
border: none;
|
|
}
|
|
</style>
|
|
<title>ionscale</title>
|
|
}
|