feat: design
This commit is contained in:
@ -14,10 +14,16 @@
|
||||
<meta name="theme-color" content="white" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Ceiba App</h1>
|
||||
|
||||
<header class="header">
|
||||
<h1>Ceiba App</h1>
|
||||
<h2>{{ .Title }}</h2>
|
||||
</header>
|
||||
{{ partial "scores" . }}
|
||||
|
||||
{{/* safeHTML `
|
||||
<div id="app"></div>
|
||||
` */}}
|
||||
|
||||
{{ $js := resources.Get "js/sw.js" }}
|
||||
{{ with $js }}
|
||||
{{ $secureJS := . | js.Build }}
|
||||
@ -30,5 +36,7 @@
|
||||
<script src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
|
||||
{{ end }}
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
41
layouts/home.html
Normal file
41
layouts/home.html
Normal file
@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Hello World</title>
|
||||
<link rel="apple-touch-icon" href="images/pwa-icon-256.png" />
|
||||
{{ $style := resources.Get "styles/main.sass" }}
|
||||
{{ with $style }}
|
||||
{{ $styleCSS := . | toCSS }}
|
||||
<link rel="stylesheet" href="{{ $styleCSS.Permalink }}">
|
||||
{{ end }}
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="theme-color" content="white" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Ceiba App</h1>
|
||||
</header>
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ $js := resources.Get "js/sw.js" }}
|
||||
{{ with $js }}
|
||||
{{ $secureJS := . | js.Build }}
|
||||
<!--script src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script-->
|
||||
{{ end }}
|
||||
|
||||
{{ $js := resources.Get "js/main.js" }}
|
||||
{{ with $js }}
|
||||
{{ $secureJS := . | js.Build }}
|
||||
<script src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
|
||||
{{ end }}
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,21 +1,23 @@
|
||||
{{ $formId := .Params.id }}
|
||||
<div class="forms">
|
||||
<h2>{{ .Title }}</h2>
|
||||
<form class="form" data-id="{{ $formId }}">
|
||||
{{ range .Params.questions }}
|
||||
<fieldset>
|
||||
<form class="form" id="fullpage" data-id="{{ $formId }}">
|
||||
{{ range $index, $question := .Params.questions }}
|
||||
{{ with $question }}
|
||||
<div class="section section{{ $index }}">
|
||||
<legend>{{ .title }}</legend>
|
||||
{{ $questionId := .id }}
|
||||
{{ range .answers }}
|
||||
<div>
|
||||
<div class="choice">
|
||||
<label>
|
||||
<input type="radio" name="form_{{ $formId }}-question_{{ $questionId }}" value="{{ .weight }}"> {{ .title }}
|
||||
<input type="radio" name="form_{{ $formId }}-question_{{ $questionId }}" value="{{ .weight }}" onclick="setTimeout(function(){fullpage_api.moveSectionDown()}, 300)"> {{ .title }}
|
||||
</label>
|
||||
</div>
|
||||
{{ end }}
|
||||
</fieldset>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<div class="scores section section{{ len .Params.questions }}">
|
||||
{{ range .Params.results }}
|
||||
<div class="score" data-min="{{ .min }}" data-max="{{ .max }}">
|
||||
Score : <span class="score_{{ $formId }}"></span><br>
|
||||
@ -25,5 +27,6 @@
|
||||
PdE QTRA : {{ .pde_qtra }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user