improve ui

This commit is contained in:
Matthieu Lamalle 2019-11-28 10:46:32 +01:00
parent d53fd64121
commit 7bf6ffd417
1 changed files with 4 additions and 4 deletions

View File

@ -1,12 +1,12 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8">
<title>Foodoles written in Go</title> <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"> <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://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> <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> <style type="text/css">body { font-family: arial } h2 { margin: 2em 0em; } .ui.container { padding-top: 5em; padding-bottom: 5em; } </style>
<script type="text/javascript"> <script type="text/javascript">
function vote(option){$.post( "/", {option}, ( data ) => { $('.modal').modal('show');});} function vote(option){$.post( "/", {option}, ( data ) => { $('.modal').modal('show');});}
function reload(){document.location.reload(true);} function reload(){document.location.reload(true);}
@ -16,9 +16,9 @@
<div class="ui container"> <div class="ui container">
<h1 class="ui header">Foodoles - {{.Foods.Date}}</h1><br/> <h1 class="ui header">Foodoles - {{.Foods.Date}}</h1><br/>
<h2 class="ui header">Pick Your Preferred Lunch's Food For Today</h2><br/> <h2 class="ui header">Pick Your Preferred Lunch's Food For Today</h2><br/>
<div class="ui compact menu"> <div class="ui ">
{{ range .Foods.Foods }} {{ range .Foods.Foods }}
<a onclick="vote('{{ .Title }}')" class="ui item label massive"> <a onclick="vote('{{ .Title }}')" class="ui label massive" data-tooltip="{{ .Title }}" data-variation="basic" data-position="bottom left">
{{$cur := .Title}} {{$cur := .Title}}
{{ .Icon }} {{ .Icon }}
{{ range $.Votes.Votes }} {{ range $.Votes.Votes }}