PracowniaProgramowania/trening-planer/wyniki.html

130 lines
4.0 KiB
HTML

{{ define "Index" }}
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Rejestracja</title><link rel="Shortcut icon" href="img/logo2.jpg" />
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link rel="Stylesheet" type="text/css" href="/static/css_moje/style_moje.css" />
<link href="http://fonts.googleapis.com/css?family=Roboto:400,700,400italic,500italic&subset=latin,latin-ext" rel="stylesheet">
<style>
body {
font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
}</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script>
</head>
<body>
<div class="row">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed"
data-toggle="collapse"
data-target="#mainmenu"
aria-expanded="false">
<span class="sr-only">Przełącznik nawigacji</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse navbar-right mainmenu" id="mainmenu">
<ul class="nav navbar-nav">
<li><a class="nav-link" href="/logowanie/">Logowanie</a>
<li><a class="nav-link" href="/planer/">Zaplanuj nowy trening</a>
<li><a class="nav-link" href="/wypisz/">Twoj trening</a>
<li><a class="btn btn-default" href="/wyniki/">Wyniki</a>
<li><a class="nav-link" href="/dodajcwiczenie/">Dodaj ćwiczenie</a>
<li><a class="nav-link" href="/dodajcwiczenie/">Ustawienia</a>
</ul>
</div>
</div>
</nav>
</div>
<br>
<br>
<div class="container" style="margin-top:100px;">
<div class="row">
<div class="rejestracja col-lg-12">
<span style="font-size: 18px">{{range.}}{{.Nazwa}}{{end}}
</span>
<canvas id="{{range.}}{{.NumerCwiczenia}}{{end}}" width="400" height="150"></canvas>
<script>
var ctx = document.getElementById("{{range.}}{{.NumerCwiczenia}}{{end}}");
var myChart = new Chart(ctx, {
type: 'line',
data: {
labels: ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"],
datasets: [{
label: 'Twoje wyniki',
data: [
{{range.}}
{{range .Wyniki}}
{{.Ciezar_rzecz}},
{{end}} {{end}}
],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
],
borderColor: [
'rgba(255,99,132,1)',
],
borderWidth: 1
},
{
label: 'Twój cel',
data: [{{range.}}
{{range .Wyniki}}
{{.Ciezar_cel}},
{{end}} {{end}} ],
backgroundColor: [
'rgba(65, 99, 132, 0.2)',
],
borderColor: [
'rgba(65,99,132,1)',
],
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero:true
}
}]
}
}
});
</script>
</div> </div>
<div class="collapse navbar-collapse navbar-right form-horizontal"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>
{{end}}