First try

This commit is contained in:
Dan Dobos
2021-11-01 09:14:39 +01:00
parent 7062f79255
commit 43380ec064
15 changed files with 1195 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
{{define "components/Footer.gohtml"}}
</body>
</html>
{{end}}
+17
View File
@@ -0,0 +1,17 @@
{{define "components/Head.gohtml"}}
<!DOCTYPE html>
<html lang="en" style="scroll-behavior: smooth;">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="icon" href="https://raw.githubusercontent.com/diaid83/details/master/favicon.ico" type="image/x-icon" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<title>Pokemon Go Templates</title>
</head>
<body >
{{end}}
+25
View File
@@ -0,0 +1,25 @@
{{define "components/Navbar.gohtml"}}
<nav class="navbar navbar-expand-lg fixed-top navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="#">Pokemon Go Templates</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
{{range .}}
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="{{.Link}}">{{.Title}}</a>
</li>
{{end}}
</ul>
<form class="d-flex" onsubmit="document.getElementById(document.getElementById('search').value).scrollIntoView();return false">
<input class="form-control me-2" type="search" id="search" name="search" placeholder="Pokemon Name" aria-label="Search">
<button class="btn btn-outline-success" type="submit">Search</button>
</form>
</div>
</div>
</nav>
{{ end }}
+12
View File
@@ -0,0 +1,12 @@
{{define "views/CustomPokemons.gohtml"}}
{{template "components/Head.gohtml"}}
{{template "components/Navbar.gohtml" .NavigationLinks}}
<div class="container-xxl pt-5">
<h1>views/CustomPokemons.gohtml</h1>
</div>
{{template "components/Footer.gohtml"}}
{{end}}
+56
View File
@@ -0,0 +1,56 @@
{{define "views/Pokemons.gohtml"}}
{{template "components/Head.gohtml"}}
{{template "components/Navbar.gohtml" .NavigationLinks}}
<div class="container-fluid bg-light bg-gradient">
<div class="container-xxl pt-5">
<div class="row row-cols-auto g-2 mt-5">
{{range .Data}}
<div class="col-xl-3 col-lg-4 col-md-6 col-sm-12" align="center" id="{{.Name}}">
<div class="card m-1" style="width: 18rem;" onMouseOver="this.style.transform = ('scale(1.1)');this.style.transition='0.3s';"
onMouseOut="this.style.transform = ('scale(1)');this.style.transition='0.3s';" align="start">
<img src="{{.Image}}" class="card-img-top" alt="{{.Name}}">
<div class="card-body">
<h5 class="card-title">
<span>Name: </span>
<span>{{.Name}}</span>
</h5>
<p class="card-text">
<div class="row">
<div class="col-6">
<strong>Weight: </strong>
<span>{{.Weight}}</span>
</div>
<div class="col-6">
<strong>Height:</strong>
<span>{{.Height}}</span>
</div>
</div>
<div class="row">
<div class="col">
<strong>Types: </strong>
<span>{{.Types}}</span>
</div>
</div>
<div class="row">
<div class="col">
<strong>Moves: </strong>
<p>{{.Moves}}</p>
</div>
</div>
</p>
</div>
</div>
</div>
{{end}}
</div>
</div>
</div>
{{template "components/Footer.gohtml"}}
{{end}}