s1llyw0rdz/web/handler/html/current_status.html

66 lines
1.9 KiB
HTML
Raw Normal View History

2021-11-28 21:38:08 +00:00
{{ define "content" }}
2021-11-30 20:50:10 +00:00
<style>
#statuscafe {
padding: .5em;
2021-12-04 15:22:30 +00:00
background-color: azure;
border: 1px solid midnightblue;
2021-11-30 20:50:10 +00:00
}
2021-12-04 15:22:30 +00:00
2021-11-30 20:50:10 +00:00
#statuscafe-username {
margin-bottom: .5em;
}
2021-12-04 15:22:30 +00:00
2021-11-30 20:50:10 +00:00
#statuscafe-content {
margin: 0 1em 0.5em 1em;
}
2021-12-04 15:22:30 +00:00
@media (min-width: 650px) {
.cols {
grid-template-columns: 1fr 1fr;
grid-gap: 2em;
}
}
2021-11-30 20:50:10 +00:00
</style>
2021-12-04 15:22:30 +00:00
2021-11-28 21:38:08 +00:00
<div class="cols">
2021-12-04 15:22:30 +00:00
<div>
<h1>Status widget</h1>
2021-11-28 21:38:08 +00:00
<form method="get" action="/current-status">
<table>
<tr>
<td>name:</td>
<td><input type="text" name="name" id="name" value="{{ .name }}"/></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="create HTML"/></td>
</tr>
</table>
</form>
<p>Past this code into your HTML file:</p>
2022-05-21 12:22:20 +00:00
<textarea style="width: 100%; max-width: 500px; height: 75px;"><div id="statuscafe"><div id="statuscafe-username"></div><div id="statuscafe-content"></div></div><script src="https://status.cafe/current-status.js?name={{ .name }}" defer></script></textarea>
2021-11-30 20:50:10 +00:00
<p>Past this code into your CSS file:</p>
2021-12-04 15:22:30 +00:00
<textarea style="width: 100%; max-width: 500px; height: 175px;">#statuscafe {
2021-11-30 20:50:10 +00:00
padding: .5em;
2021-12-04 15:22:30 +00:00
background-color: azure;
border: 1px solid midnightblue;
2021-11-30 20:50:10 +00:00
}
#statuscafe-username {
margin-bottom: .5em;
}
#statuscafe-content {
margin: 0 1em 0.5em 1em;
2021-12-04 15:22:30 +00:00
}</textarea>
2021-11-30 20:50:10 +00:00
<p>Make it your own! The CSS above is only an example. Tweak it so that it integrates well with your sites's colors.</p>
2021-12-04 15:22:30 +00:00
</div>
<div>
2021-11-28 21:38:08 +00:00
<h2>Preview</h2>
{{ if .name }}
<script src="https://status.cafe/current-status.js?name={{ .name }}"></script>
{{ else }}
<p>Add your name and click "generate HTML" to see a preview.</p>
{{ end }}
2021-12-04 15:22:30 +00:00
</div>
2021-11-28 21:38:08 +00:00
</div>
2021-12-04 15:22:30 +00:00
{{ end }}