parent
46501c3681
commit
e9ebeda3c0
@ -1,22 +1,23 @@ |
|||||||
#auctions |
.content-container |
||||||
aside |
#auctions |
||||||
h2 Search Filters |
aside |
||||||
.form-container |
h2 Search Filters |
||||||
form action="/auctions" method="get" |
.form-container |
||||||
label Keywords |
form action="/auctions" method="get" |
||||||
input type="search" name="title" placeholder="Keywords (ex: computer, teapot)" |
label Keywords |
||||||
|
input type="search" name="title" placeholder="Keywords (ex: computer, teapot)" |
||||||
|
|
||||||
label Price range |
label Price range |
||||||
input type="range" name="price_rng" |
input type="range" name="price_rng" |
||||||
|
|
||||||
label Is Open? |
label Is Open? |
||||||
input type="checkbox" name="isopen" value="1" |
input type="checkbox" name="isopen" value="1" |
||||||
|
|
||||||
input type="submit" value="Search" |
input type="submit" value="Search" |
||||||
article |
article |
||||||
h2 Results |
h2 Results |
||||||
|
|
||||||
ul |
ul |
||||||
- auctions.each do |auction| |
- auctions.each do |auction| |
||||||
li |
li |
||||||
| #{auction["title"]} |
| #{auction["title"]} |
||||||
|
@ -1,21 +1,22 @@ |
|||||||
h1 Post Auction |
.content-container |
||||||
.form-container#auction_new |
h1 Post Auction |
||||||
form action="/auctions" method="post" enctype="multipart/form-data" |
.form-container#auction_new |
||||||
input type="file" name="image" accept="image" |
form action="/auctions" method="post" enctype="multipart/form-data" |
||||||
|
input type="file" name="image" accept="image" |
||||||
|
|
||||||
label Title |
label Title |
||||||
input type="text" name="title" placeholder="Title" pattern="#{TITLE_REGEX_STR}" |
input type="text" name="title" placeholder="Title" pattern="#{TITLE_REGEX_STR}" |
||||||
|
|
||||||
label = "Initial Price #{COINS_PREFIX} #{COINS_SUFFIX}" |
label = "Initial Price #{COINS_PREFIX} #{COINS_SUFFIX}" |
||||||
input type="number" name="init_price" value="#{MIN_INIT_PRICE}" min="#{MIN_INIT_PRICE}" |
input type="number" name="init_price" value="#{MIN_INIT_PRICE}" min="#{MIN_INIT_PRICE}" |
||||||
|
|
||||||
label Auction duration (hours) |
label Auction duration (hours) |
||||||
input type="number" name="delta_time" value="1" min="1" |
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 |
label Categories |
||||||
- Category.get_all.each do |category| |
- Category.get_all.each do |category| |
||||||
input type="checkbox" name="category-#{category.id}" value="#{category.id}" = category.name |
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 |
.content-container |
||||||
h2 = auction.description |
h1 = auction.title |
||||||
|
h2 = auction.description |
||||||
|
@ -1,13 +1,14 @@ |
|||||||
article.index |
.content-container |
||||||
h1.tcenter The Auction House |
article.index |
||||||
p.tcenter |
h1.tcenter The Auction House |
||||||
| 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. |
p.tcenter |
||||||
ul.button-container |
| 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. |
||||||
li.em |
ul.button-container |
||||||
a.button href="/auctions" = "Browse Auctions" |
li.em |
||||||
li |
a.button href="/auctions" = "Browse Auctions" |
||||||
a.button href="/auctions/new" = "Post Auction" |
li |
||||||
|
a.button href="/auctions/new" = "Post Auction" |
||||||
|
|
||||||
article.index |
article.index |
||||||
h1.tcenter.title |
h1.tcenter.title |
||||||
| Recent posts |
| Recent posts |
||||||
|
@ -1,48 +1,49 @@ |
|||||||
#profile-container |
.content-container |
||||||
aside |
#profile-container |
||||||
#userinfo.card.card-container |
aside |
||||||
h2 = user.name |
#userinfo.card.card-container |
||||||
h3 = user.role |
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] |
ul.button-container |
||||||
a.button href="mailto:#{user.email}" |
- unless user.id == session[:userid] |
||||||
li Email |
a.button href="mailto:#{user.email}" |
||||||
a.button href="/profile/#{user.id}/rep" |
li Email |
||||||
li Review user |
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 |
||||||
|
|
||||||
|
#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 |
- else |
||||||
a.button href="/settings" |
h3.gray = user.reputation_text |
||||||
li Edit profile |
h4 Based on user reviews |
||||||
|
a.button href="/profile/#{user.id}/rep" |
||||||
- if user.roles.length >= 1 |
| + Write a review |
||||||
#roles.card |
|
||||||
h2 Roles |
#posts.card |
||||||
.card-container |
h2 Recent posts |
||||||
ul.button-container |
.card-container |
||||||
- user.roles.each do |role| |
//== user.bio_html |
||||||
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 |
|
||||||
|
|
||||||
#posts.card |
|
||||||
h2 Recent posts |
|
||||||
.card-container |
|
||||||
//== user.bio_html |
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,14 +1,15 @@ |
|||||||
#settings |
.content-container |
||||||
h1.tcenter = "#{session_user.name}'s Settings" |
#settings |
||||||
.form-container |
h1.tcenter = "#{session_user.name}'s Settings" |
||||||
form action="/user/update" method="post" enctype="multipart/form-data" |
.form-container |
||||||
img.avatar_big src="#{session_user.avatar_url}" alt="Your avatar" |
form action="/user/update" method="post" enctype="multipart/form-data" |
||||||
label Change avatar |
img.avatar_big src="#{session_user.avatar_url}" alt="Your avatar" |
||||||
input type="file" name="image" accept="image" |
label Change avatar |
||||||
|
input type="file" name="image" accept="image" |
||||||
|
|
||||||
label Display name |
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}" |
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 |
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 |
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" |
input type="submit" value="Update" |
||||||
|
Loading…
Reference in new issue