34 lines
1.5 KiB
Cheetah
34 lines
1.5 KiB
Cheetah
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Foodoles written in Go</title>
|
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.css">
|
|
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.js"></script>
|
|
<style type="text/css"> h2 { margin: 2em 0em; } .ui.container { padding-top: 5em; padding-bottom: 5em; } </style>
|
|
<script type="text/javascript">function vote(option){$.post( "/", {option}, ( data ) => { $('.mini.modal').modal('show');});}</script>
|
|
</head>
|
|
<body>
|
|
<div class="ui container">
|
|
<h1 class="ui header">Foodoles - {{.Date}}</h1><br/>
|
|
<h2 class="ui header">Pick Your Preferred Lunch's Food For Today</h2><br/>
|
|
<div class="ui four column grid link cards">
|
|
{{ range .Foods }}
|
|
<div onclick="vote('{{ .Title }}')">
|
|
<div class="ui massive label"> {{ .Icon }}</div>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
<div class="ui modal mini">
|
|
<div class="header">Foodoles</div>
|
|
<div class="content">
|
|
<p>Vote sent <strong>successfully</strong>, <a href="/results"> check results !</a></p>
|
|
</div>
|
|
<div class="actions">
|
|
<div class="ui cancel button blue">Close</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |