Profile: SASS refactor

master
E. Almqvist 3 years ago
parent 6ae324216f
commit 12848dee22
  1. 9
      src/app.rb
  2. 3
      src/views/stylesheets/style.sass
  3. 2
      src/views/user/posts.slim
  4. 3
      src/views/user/profile.slim
  5. 13
      src/views/user/rep.slim

@ -68,6 +68,15 @@ get "/profile" do
end
end
# Posts
get "/profile/:id/posts" do
serve :"user/posts", {user: User.find_by_id(params[:id].to_i)}
end
# Reputation
get "/profile/:id/rep" do
serve :"user/rep", {user: User.find_by_id(params[:id].to_i)}
end
# API stuff
post "/register" do

@ -30,7 +30,7 @@ html
.content-container
display: flex
flex-direction: row
flex-direction: column
justify-content: center
width: auto
height: 90%
@ -207,6 +207,7 @@ ul.button-container
max-width: 70rem
padding: 2rem
padding-bottom: 0
margin: 0 auto
.card-container
padding: 0 1rem

@ -0,0 +1,2 @@
h1 = "#{user.name}'s posts"
h2 Not implemented yet.

@ -1,5 +1,4 @@
#profile-container
aside
#userinfo.card.card-container
h2 = user.name
@ -11,7 +10,7 @@
ul.button-container
a.button href="mailto:#{user.email}"
li Message
a.button href="/profile/#{user.id}/reputation"
a.button href="/profile/#{user.id}/rep"
li Rep
a.button href="/profile/#{user.id}/posts"
li Posts

@ -0,0 +1,13 @@
div
h1 = "#{user.name}'s reputation reviews"
h2 Not implemented yet.
#profile-container
aside
#reputation.card
h2 Reputation
- unless user.has_bad_rep?
h3.green = user.reputation_text
- else
h3.red = user.reputation_text
h4 Based on user reviews
Loading…
Cancel
Save