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]}" |
||||
|
@ -1,22 +1,38 @@ |
||||
doctype html |
||||
html |
||||
head |
||||
title Evil Info Site |
||||
title E Corp |
||||
meta charset="UTF-8" |
||||
meta name="viewport" content="width=device-width, initial-scale=1.0" |
||||
// meta name="keywords" content="template language" |
||||
// meta name="author" content="author" |
||||
link rel="icon" type="image/png" href="favicon.png" |
||||
link rel="stylesheet" type="text/css" href="css/style.css" |
||||
|
||||
|
||||
body |
||||
h1 Evil Info Site |
||||
h1 E Corp |
||||
h2 A person registry. No we don't care about GDPR. |
||||
a href="/loginpage" Login |
||||
a href="/registerpage" Register |
||||
- if(session[:username] != "") then |
||||
h1 Hello, #{session[:username]} |
||||
- if(session[:msg] != "") then |
||||
h1 = session[:msg] |
||||
|
||||
- if(session[:username] != nil) then |
||||
.user |
||||
img.avatar2 src="#{session[:avatar]}" alt="profile" |
||||
label.logininfo |
||||
|Logged in as |
||||
a href="/profile" = session[:username] |
||||
|
||||
- if(session[:msg] != "" && session[:msg] != nil) then |
||||
p.error = session[:msg] |
||||
nav |
||||
ul |
||||
li |
||||
a.button href="/" Home |
||||
li |
||||
a.button href="/calc" Calculator |
||||
li |
||||
a.button href="/loginpage" Login |
||||
li |
||||
a.button href="/registerpage" Register |
||||
hr |
||||
== yield |
||||
|
||||
|
@ -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 |
||||
h1 Register |
||||
form action="/register" method="post" |
||||
input type="text" name="username" placeholder="Username" |
||||
input type="password" name="password" placeholder="Password" |
||||
input type="password" name="password2" placeholder="Confirm password" |
||||
input type="submit" value="Register" |
||||
|
||||
|
Loading…
Reference in new issue