mirror of https://github.com/E-Almqvist/hsf
parent
3fd9f500c4
commit
d15112b3c0
@ -0,0 +1,24 @@ |
|||||||
|
.calc-wrapper |
||||||
|
article.calculator |
||||||
|
h1 Evil Calculator |
||||||
|
|
||||||
|
.calc-equ-wrapper |
||||||
|
form action="/calculate" method="post" |
||||||
|
input type="number" name="number1" placeholder="Number #1" |
||||||
|
select name="op" |
||||||
|
option value="+" selected="selected" = "+" |
||||||
|
option value="-" = "-" |
||||||
|
option value="*" = "*" |
||||||
|
option value="/" = "/" |
||||||
|
input type="number" name="number2" placeholder="Number #2" |
||||||
|
input type="submit" value="Calculate!" |
||||||
|
label = "= #{session[:calc_result]}" |
||||||
|
|
||||||
|
article.history |
||||||
|
- if( session[:history] != nil ) then |
||||||
|
h2 History |
||||||
|
ul |
||||||
|
- session[:history].reverse_each do |c| |
||||||
|
li |
||||||
|
p = "#{c[:number1]} #{c[:op]} #{c[:number2]} = #{c[:result]}" |
||||||
|
|
@ -0,0 +1,10 @@ |
|||||||
|
article |
||||||
|
- if(session[:username] != nil) then |
||||||
|
h1 Logged in as #{session[:username]} |
||||||
|
|
||||||
|
form action="/updateavatar" method="post" |
||||||
|
input type="text" name="avatar_url" placeholder="Picture URL" |
||||||
|
input type="submit" value="Update avatar" |
||||||
|
|
||||||
|
form action="/logout" method="post" |
||||||
|
input type="submit" value="Logout" |
@ -1,6 +1,8 @@ |
|||||||
article |
article |
||||||
|
h1 Register |
||||||
form action="/register" method="post" |
form action="/register" method="post" |
||||||
input type="text" name="username" placeholder="Username" |
input type="text" name="username" placeholder="Username" |
||||||
input type="password" name="password" placeholder="Password" |
input type="password" name="password" placeholder="Password" |
||||||
|
input type="password" name="password2" placeholder="Confirm password" |
||||||
input type="submit" value="Register" |
input type="submit" value="Register" |
||||||
|
|
||||||
|
Loading…
Reference in new issue