goshorly/views/home.html

99 lines
3 KiB
HTML
Raw Permalink Normal View History

2021-12-07 14:49:58 +00:00
<!doctype html>
<html lang="en">
<head>
2021-12-07 19:34:17 +00:00
<title>goshorly</title>
2021-12-07 14:49:58 +00:00
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" rel="stylesheet">
2021-12-07 16:24:24 +00:00
<link href="https://bootswatch.com/4/darkly/bootstrap.min.css" rel="stylesheet">
2021-12-07 14:49:58 +00:00
</head>
2021-12-07 16:24:24 +00:00
<style>
html {
height: 100%;
}
body {
height: 100%;
display: grid;
grid-template-rows: auto 1fr auto;
}
footer {
background-color: #303030;
padding: 10px;
}
</style>
2021-12-07 14:49:58 +00:00
<body>
<br><br>
<div class="container">
2021-12-07 16:24:24 +00:00
<div class="jumbotron">
2021-12-07 19:34:17 +00:00
<h1>goshorly</h1>
2021-12-07 20:49:01 +00:00
<p>An dead simple & fast URL shortener. <br>
All shorten URLs will be available for 30days!
2021-12-07 16:24:24 +00:00
</p>
{{ if and .TotalLinks .TotalViews }}
<p>This Instance has served over {{ .TotalLinks }} URLs and {{ .TotalViews }} total Views!</p>
{{ end }}
2021-12-07 16:24:24 +00:00
<hr>
<form method="post" action="#">
<fieldset>
<input type="text" class="form-control" id="surl" name="surl" placeholder="https://google.de"
required>
<br>
<center>
<button type="submit" class="btn btn-primary btn-lg">Submit</button>
</center>
</fieldset>
</form>
2021-12-07 14:49:58 +00:00
</div>
2021-12-07 16:24:24 +00:00
<!-- URL PASS CHECK -->
{{ if .URL }}
<div style="padding-right: 20px;" class="alert alert-dismissible alert-success">
<input id="foo" class="form-control" value="{{ .URL }}" readonly>
<br>
<center>
<button class="btn-copy btn btn-success" data-clipboard-target="#foo">
Copy to clipboard
</button>
</center>
</div>
{{ end }}
2021-12-07 16:34:44 +00:00
<!-- URL FAIL CHECK -->
{{ if .ERR }}
<div style="padding-right: 20px;" class="alert alert-dismissible alert-danger">
2021-12-07 16:45:22 +00:00
<p style="margin-bottom: 0px;">{{ .ERR }}</p>
2021-12-07 16:34:44 +00:00
</div>
{{ end }}
2021-12-07 14:49:58 +00:00
</div>
2021-12-08 10:04:28 +00:00
<!-- Footer with Build-Check -->
2021-12-07 16:24:24 +00:00
<footer>
<center>
2023-09-04 18:59:51 +00:00
Made with <a href="https://git.hackmi.ch/Phil/goshorly"><i class="fas fa-code-branch"></i>
2021-12-07 19:34:17 +00:00
Phil/goshorly</a>
{{ if .CI_BUILD }}
{{ if .CI_COMMIT_TAG }}
| {{ .CI_COMMIT_TAG }}
{{ else }}
| {{ .CI_COMMIT_SHORT_SHA }}/{{ .CI_COMMIT_BRANCH }}
{{ end }}
2021-12-08 10:04:28 +00:00
{{ end }}
2021-12-07 16:24:24 +00:00
</center>
</footer>
2021-12-07 14:49:58 +00:00
2021-12-07 16:24:24 +00:00
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
<script>
new ClipboardJS('body > div > div.alert.alert-dismissible.alert-success > center > button');
2021-12-07 14:49:58 +00:00
</script>
</body>
2021-12-07 16:24:24 +00:00
2021-12-07 20:49:01 +00:00
</html>