parent
46501c3681
commit
e9ebeda3c0
@ -1,22 +1,23 @@ |
||||
#auctions |
||||
aside |
||||
h2 Search Filters |
||||
.form-container |
||||
form action="/auctions" method="get" |
||||
label Keywords |
||||
input type="search" name="title" placeholder="Keywords (ex: computer, teapot)" |
||||
.content-container |
||||
#auctions |
||||
aside |
||||
h2 Search Filters |
||||
.form-container |
||||
form action="/auctions" method="get" |
||||
label Keywords |
||||
input type="search" name="title" placeholder="Keywords (ex: computer, teapot)" |
||||
|
||||
label Price range |
||||
input type="range" name="price_rng" |
||||
label Price range |
||||
input type="range" name="price_rng" |
||||
|
||||
label Is Open? |
||||
input type="checkbox" name="isopen" value="1" |
||||
label Is Open? |
||||
input type="checkbox" name="isopen" value="1" |
||||
|
||||
input type="submit" value="Search" |
||||
article |
||||
h2 Results |
||||
input type="submit" value="Search" |
||||
article |
||||
h2 Results |
||||
|
||||
ul |
||||
- auctions.each do |auction| |
||||
li |
||||
| #{auction["title"]} |
||||
ul |
||||
- auctions.each do |auction| |
||||
li |
||||
| #{auction["title"]} |
||||
|
@ -1,21 +1,22 @@ |
||||
h1 Post Auction |
||||
.form-container#auction_new |
||||
form action="/auctions" method="post" enctype="multipart/form-data" |
||||
input type="file" name="image" accept="image" |
||||
.content-container |
||||
h1 Post Auction |
||||
.form-container#auction_new |
||||
form action="/auctions" method="post" enctype="multipart/form-data" |
||||
input type="file" name="image" accept="image" |
||||
|
||||
label Title |
||||
input type="text" name="title" placeholder="Title" pattern="#{TITLE_REGEX_STR}" |
||||
label Title |
||||
input type="text" name="title" placeholder="Title" pattern="#{TITLE_REGEX_STR}" |
||||
|
||||
label = "Initial Price #{COINS_PREFIX} #{COINS_SUFFIX}" |
||||
input type="number" name="init_price" value="#{MIN_INIT_PRICE}" min="#{MIN_INIT_PRICE}" |
||||
label = "Initial Price #{COINS_PREFIX} #{COINS_SUFFIX}" |
||||
input type="number" name="init_price" value="#{MIN_INIT_PRICE}" min="#{MIN_INIT_PRICE}" |
||||
|
||||
label Auction duration (hours) |
||||
input type="number" name="delta_time" value="1" min="1" |
||||
label Auction duration (hours) |
||||
input type="number" name="delta_time" value="1" min="1" |
||||
|
||||
textarea name="description" cols="20" rows="5" title="Content length must be between #{MIN_DESC_LEN} and #{MAX_DESC_LEN} characters" pattern="#{DESC_REGEX_STR}" maxlength="#{MAX_DESC_LEN}" placeholder="Description" |
||||
textarea name="description" cols="20" rows="5" title="Content length must be between #{MIN_DESC_LEN} and #{MAX_DESC_LEN} characters" pattern="#{DESC_REGEX_STR}" maxlength="#{MAX_DESC_LEN}" placeholder="Description" |
||||
|
||||
label Categories |
||||
- Category.get_all.each do |category| |
||||
input type="checkbox" name="category-#{category.id}" value="#{category.id}" = category.name |
||||
label Categories |
||||
- Category.get_all.each do |category| |
||||
input type="checkbox" name="category-#{category.id}" value="#{category.id}" = category.name |
||||
|
||||
input type="submit" value="Post" |
||||
input type="submit" value="Post" |
||||
|
@ -1,2 +1,3 @@ |
||||
h1 = auction.title |
||||
h2 = auction.description |
||||
.content-container |
||||
h1 = auction.title |
||||
h2 = auction.description |
||||
|
@ -1,13 +1,14 @@ |
||||
article.index |
||||
h1.tcenter The Auction House |
||||
p.tcenter |
||||
| Welcome to the Auction House! With our convenient online auction platform, you can easily browse through listings and find great deals on everything from clothes to electronics. |
||||
ul.button-container |
||||
li.em |
||||
a.button href="/auctions" = "Browse Auctions" |
||||
li |
||||
a.button href="/auctions/new" = "Post Auction" |
||||
.content-container |
||||
article.index |
||||
h1.tcenter The Auction House |
||||
p.tcenter |
||||
| Welcome to the Auction House! With our convenient online auction platform, you can easily browse through listings and find great deals on everything from clothes to electronics. |
||||
ul.button-container |
||||
li.em |
||||
a.button href="/auctions" = "Browse Auctions" |
||||
li |
||||
a.button href="/auctions/new" = "Post Auction" |
||||
|
||||
article.index |
||||
h1.tcenter.title |
||||
| Recent posts |
||||
article.index |
||||
h1.tcenter.title |
||||
| Recent posts |
||||
|
@ -1,48 +1,49 @@ |
||||
#profile-container |
||||
aside |
||||
#userinfo.card.card-container |
||||
h2 = user.name |
||||
h3 = user.role |
||||
.content-container |
||||
#profile-container |
||||
aside |
||||
#userinfo.card.card-container |
||||
h2 = user.name |
||||
h3 = user.role |
||||
|
||||
.avatar-container |
||||
img.avatar src="#{user.avatar}" alt="#{user.name}'s avatar" |
||||
.avatar-container |
||||
img.avatar src="#{user.avatar}" alt="#{user.name}'s avatar" |
||||
|
||||
h4 = user.bio_text |
||||
h4 = user.bio_text |
||||
|
||||
ul.button-container |
||||
- unless user.id == session[:userid] |
||||
a.button href="mailto:#{user.email}" |
||||
li Email |
||||
a.button href="/profile/#{user.id}/rep" |
||||
li Review user |
||||
- else |
||||
a.button href="/settings" |
||||
li Edit profile |
||||
ul.button-container |
||||
- unless user.id == session[:userid] |
||||
a.button href="mailto:#{user.email}" |
||||
li Email |
||||
a.button href="/profile/#{user.id}/rep" |
||||
li Review user |
||||
- else |
||||
a.button href="/settings" |
||||
li Edit profile |
||||
|
||||
- if user.roles.length >= 1 |
||||
#roles.card |
||||
h2 Roles |
||||
.card-container |
||||
ul.button-container |
||||
- user.roles.each do |role| |
||||
li |
||||
label style="color: #{role.color};" = role.name |
||||
- if user.roles.length >= 1 |
||||
#roles.card |
||||
h2 Roles |
||||
.card-container |
||||
ul.button-container |
||||
- user.roles.each do |role| |
||||
li |
||||
label style="color: #{role.color};" = role.name |
||||
|
||||
#reputation.card |
||||
h2 Reputation |
||||
- if user.rep_score == GOOD_REP |
||||
h3.green = user.reputation_text |
||||
- elsif user.rep_score == BAD_REP |
||||
h3.red = user.reputation_text |
||||
- else |
||||
h3.gray = user.reputation_text |
||||
h4 Based on user reviews |
||||
a.button href="/profile/#{user.id}/rep" |
||||
| + Write a review |
||||
#reputation.card |
||||
h2 Reputation |
||||
- if user.rep_score == GOOD_REP |
||||
h3.green = user.reputation_text |
||||
- elsif user.rep_score == BAD_REP |
||||
h3.red = user.reputation_text |
||||
- else |
||||
h3.gray = user.reputation_text |
||||
h4 Based on user reviews |
||||
a.button href="/profile/#{user.id}/rep" |
||||
| + Write a review |
||||
|
||||
#posts.card |
||||
h2 Recent posts |
||||
.card-container |
||||
//== user.bio_html |
||||
|
||||
#posts.card |
||||
h2 Recent posts |
||||
.card-container |
||||
//== user.bio_html |
||||
|
||||
|
||||
|
@ -1,14 +1,15 @@ |
||||
#settings |
||||
h1.tcenter = "#{session_user.name}'s Settings" |
||||
.form-container |
||||
form action="/user/update" method="post" enctype="multipart/form-data" |
||||
img.avatar_big src="#{session_user.avatar_url}" alt="Your avatar" |
||||
label Change avatar |
||||
input type="file" name="image" accept="image" |
||||
.content-container |
||||
#settings |
||||
h1.tcenter = "#{session_user.name}'s Settings" |
||||
.form-container |
||||
form action="/user/update" method="post" enctype="multipart/form-data" |
||||
img.avatar_big src="#{session_user.avatar_url}" alt="Your avatar" |
||||
label Change avatar |
||||
input type="file" name="image" accept="image" |
||||
|
||||
label Display name |
||||
input type="text" oninput="this.reportValidity()" title="May only contain alphabetical characters and must be between #{MIN_NAME_LEN} and #{MAX_NAME_LEN} characters long" maxlength="#{MAX_NAME_LEN}" name="displayname" value="#{session_user.name}" pattern="#{NAME_REGEX_STR}" |
||||
label Display name |
||||
input type="text" oninput="this.reportValidity()" title="May only contain alphabetical characters and must be between #{MIN_NAME_LEN} and #{MAX_NAME_LEN} characters long" maxlength="#{MAX_NAME_LEN}" name="displayname" value="#{session_user.name}" pattern="#{NAME_REGEX_STR}" |
||||
|
||||
label Biography |
||||
textarea name="bio" cols="20" rows="5" title="Content length must be between #{MIN_BIO_LEN} and #{MAX_BIO_LEN} characters" pattern="#{BIO_REGEX_STR}" maxlength="#{MAX_BIO_LEN}" placeholder="Tell us about yourself!" value="#{session_user.bio_text}" = session_user.bio_text |
||||
input type="submit" value="Update" |
||||
label Biography |
||||
textarea name="bio" cols="20" rows="5" title="Content length must be between #{MIN_BIO_LEN} and #{MAX_BIO_LEN} characters" pattern="#{BIO_REGEX_STR}" maxlength="#{MAX_BIO_LEN}" placeholder="Tell us about yourself!" value="#{session_user.bio_text}" = session_user.bio_text |
||||
input type="submit" value="Update" |
||||
|
Loading…
Reference in new issue