diff --git a/src/app.rb b/src/app.rb index 3303c90..9b31a0e 100755 --- a/src/app.rb +++ b/src/app.rb @@ -78,6 +78,11 @@ get "/profile/:id/rep" do serve :"user/rep", {user: User.find_by_id(params[:id].to_i)} end +# Settings +get "/settings" do + serve :"user/settings", {user: User.find_by_id(params[:id].to_i)} +end + # API stuff post "/register" do email = params[:email] diff --git a/src/public/icons/settings.svg b/src/public/icons/settings.svg new file mode 100644 index 0000000..9d6f27a --- /dev/null +++ b/src/public/icons/settings.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/views/layout.slim b/src/views/layout.slim index 4210c28..46093da 100644 --- a/src/views/layout.slim +++ b/src/views/layout.slim @@ -20,6 +20,9 @@ html lang="en" a.button#login href="/login" target="_self" | Log in - else + li + a.inlbutton href="/settings" target="_self" + img.icon src="/icons/settings.svg" alt="cog" li a href="/profile" target="_self" img.avatar src="#{session_user.avatar}" alt="Your avatar" diff --git a/src/views/stylesheets/style.sass b/src/views/stylesheets/style.sass index 5698951..fbe9245 100644 --- a/src/views/stylesheets/style.sass +++ b/src/views/stylesheets/style.sass @@ -11,7 +11,7 @@ $fg_clr: #fff $fg_alt_clr: #eee $fg_error: #f77 -$shadow_clr: #4b5263 +$shadow_clr: $bg_alt_clr $green_clr: #5cb85c $red_clr: #de2a1d @@ -94,6 +94,9 @@ body justify-content: flex-end li + display: flex + flex-direction: column + justify-content: center margin: 0 8px // General @@ -115,6 +118,7 @@ a.button transition: opacity .2s a.button:hover + cursor: pointer opacity: .6 label.error_msg @@ -129,6 +133,12 @@ img.avatar border-radius: 50% border: 2px solid $shadow_clr +img.icon + width: 1.2rem + height: auto + opacity: .4 + + ul.button-container display: flex flex-direction: row @@ -174,7 +184,7 @@ ul.button-container font-size: 2.2rem input - border-radius: 2rem + border-radius: $border_radius background: $bg_alt_clr border: 3px solid $shadow_clr color: $fg_alt_clr @@ -189,6 +199,7 @@ ul.button-container input[type=submit]:hover opacity: .8 color: $special_clr + cursor: pointer input:not(:last-child) margin-bottom: 1rem diff --git a/src/views/user/settings.slim b/src/views/user/settings.slim new file mode 100644 index 0000000..d21fb7c --- /dev/null +++ b/src/views/user/settings.slim @@ -0,0 +1 @@ +h1 Settings