Calorie counting web application written in the Go language

Index.html 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. {{set . "title" "My Profile"}}
  2. {{template "header.html" .}}
  3. {{append . "moreScripts" "//plus.google.com/js/client:plusone.js"}}
  4. {{append . "moreScripts" "/public/js/Chart.min.js"}}
  5. {{append . "moreScripts" "/public/js/googleplus.js"}}
  6. {{append . "moreScripts" "/public/js/grassfed.js"}}
  7. {{if not .account}}
  8. <div id="authentication" class="row" style="padding: 50px 15px;">
  9. <div class="col-md-offset-4 col-md-4 text-center">
  10. <h1></h1>
  11. <img src="/public/img/signup.png" />
  12. <p style="padding-top: 1em;">
  13. <span id="signinButton">
  14. <span
  15. class="g-signin"
  16. data-callback="onAuthentication"
  17. data-clientid="903785837828-lfsps917vkth7c88em9ieq0l0d0p35kb.apps.googleusercontent.com"
  18. data-cookiepolicy="single_host_origin"
  19. data-requestvisibleactions=""
  20. data-scope="profile">
  21. </span>
  22. </span>
  23. </p>
  24. </div>
  25. </div>
  26. {{end}}
  27. {{if not .account}}
  28. <div id="profile" class="row" style="padding: 50px 15px; display: none;">
  29. {{else}}
  30. <div id="profile" class="row" style="padding: 50px 15px;">
  31. {{end}}
  32. <h1></h1>
  33. <div class="col-md-8">
  34. <form id="entry" action="/me/add" method="post" role="form" class="form-horizontal">
  35. <div class="form-group">
  36. <label for="product" class="col-sm-2 control-label">Consumed</label>
  37. <div class="col-sm-8">
  38. <input name="product" type="text" value="" placeholder="What went down your pie hole?" class="form-control" />
  39. </div>
  40. </div>
  41. <div class="form-group">
  42. <label for="calories" class="col-sm-2 control-label">Calories</label>
  43. <div class="col-sm-3">
  44. <input name="calories" type="number" value="0" class="form-control text-center" min="0" max="10000" />
  45. </div>
  46. </div>
  47. <div class="form-group">
  48. <div class="col-sm-offset-2 col-sm-4">
  49. <input type="submit" value="Add" class="btn btn-primary" />
  50. </div>
  51. </div>
  52. </form>
  53. <div id="history" class="panel-group"></div>
  54. </div>
  55. <div class="col-md-4">
  56. <h3>Daily Goal</h3>
  57. <div class="text-center">
  58. <canvas id="goalChart" width="250" height="250"></canvas>
  59. </div>
  60. <form action="/me/goal" method="post" role="form" class="form-horizontal">
  61. <input name="current" type="hidden" value="0" />
  62. <div class="form-group">
  63. <div class="col-sm-12 text-center">
  64. <input name="calories" type="range" min="1000" max="3000" step="100" value="" class="form-control" />
  65. <p style="padding-top: 0.35em;"><label for="calories">Daily:</label>&nbsp;<span class="goal">2000</span></p>
  66. </div>
  67. </div>
  68. </form>
  69. <h3>Trending</h3>
  70. <div class="text-center">
  71. <canvas id="trendsChart" width="400" height="250"></canvas>
  72. </div>
  73. <form id="recordWeight" action="/me/weight" method="post" role="form" class="form-horizontal">
  74. <div class="form-group">
  75. <div class="col-xs-offset-2 col-xs-3">
  76. <label for="weight" class="form-label">Weight</label>
  77. </div>
  78. <div class="col-xs-5">
  79. <input name="weight" type="number" min="0" max="1000" step="any" value="" class="col-xs-8 form-control" />
  80. </div>
  81. </div>
  82. <div class="form-group">
  83. <div class="col-xs-offset-6 col-xs-4">
  84. <input type="submit" value="Record" class="form-control btn btn-primary" />
  85. </div>
  86. </div>
  87. </form>
  88. <h3>Streak</h3>
  89. <h3 class="streak text-center">0</h3>
  90. <h3 class="streak-units text-center">days</h3>
  91. </div>
  92. </div>
  93. {{template "footer.html" .}}