add frontend code

This commit is contained in:
2024-08-27 21:24:24 +02:00
commit 52a5fc0f3c
7 changed files with 138 additions and 0 deletions

View File

@ -0,0 +1,22 @@
{{define "base" }}
<!doctype html>
<html lang="en">
{{template "header" .}}
<body>
{{block "content" .}}
{{end}}
{{block "js" .}}
{{end}}
{{template "footer" .}}
</body>
</html>
{{end}}

View File

@ -0,0 +1,10 @@
{{define "footer"}}
<div class="container">
<div class="row">
<div class="col text-center">
<hr>
<small class="text-muted">Copyright &copy; GoCode.ca</small>
</div>
</div>
</div>
{{end}}

View File

@ -0,0 +1,13 @@
{{define "header"}}
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Microservices in Go</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
</head>
{{end}}

View File

@ -0,0 +1,36 @@
{{template "base" .}}
{{define "content" }}
<div class="container">
<div class="row">
<div class="col">
<h1 class="mt-5">Test microservices</h1>
<hr>
<div id="output" class="mt-5" style="outline: 1px solid silver; padding: 2em;">
<span class="text-muted">Output shows here...</span>
</div>
</div>
</div>
<div class="row">
<div class="col">
<h4 class="mt-5">Sent</h4>
<div class="mt-1" style="outline: 1px solid silver; padding: 2em;">
<pre id="payload"><span class="text-muted">Nothing sent yet...</span></pre>
</div>
</div>
<div class="col">
<h4 class="mt-5">Received</h4>
<div class="mt-1" style="outline: 1px solid silver; padding: 2em;">
<pre id="received"><span class="text-muted">Nothing received yet...</span></pre>
</div>
</div>
</div>
</div>
{{end}}
{{define "js"}}
<script>
</script>
{{end}}