From b208807c33084880d9fdf7c4286bf76e63f4db7e Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Fri, 26 Sep 2014 16:51:37 +0200 Subject: [PATCH] restyle userInfo to be inline --- .../javascripts/app/views/widget/user.jst.eco | 42 ++++++++++--------- app/assets/stylesheets/zzz.css.erb | 39 ++++++++--------- 2 files changed, 41 insertions(+), 40 deletions(-) diff --git a/app/assets/javascripts/app/views/widget/user.jst.eco b/app/assets/javascripts/app/views/widget/user.jst.eco index 2345a8d37..ed33fdf98 100644 --- a/app/assets/javascripts/app/views/widget/user.jst.eco +++ b/app/assets/javascripts/app/views/widget/user.jst.eco @@ -1,40 +1,43 @@ - - +
+
+ + <% for row in @userData: %> <% if @user[row.name] || row.name is 'note': %> - +
<% if row.tag isnt 'textarea': %> -
+ <% end %> <% end %> <% if !_.isEmpty(@user['accounts']): %> - - + + <% end %> <% if !_.isEmpty(@user['links']): %> <% for link in @user['links']: %> - - + <% end %> <% end %> -
<%- @user.avatar(true) %> - +
<%= @user.displayName() %>
-
<%- @Ti( row.display ) %> - <%- @L( @P( @user[row.name] ) ) %> +
<%- @Ti( row.display ) %>
+
<%- @L( @P( @user[row.name] ) ) %>
<% else: %> -
<%- @Ti( row.display ) %> - +
<%- @Ti( row.display ) %>
+
+
<% end %> -
<%- @T( 'Linked Accounts' ) %> - +
+
<%- @T( 'Linked Accounts' ) %>
+
<% for account of @user['accounts']: %> <%= account %> <% end %> -
<%- @T( link['title'] ) %> - +
+
<%- @T( link['title'] ) %>
+
<% for item in link['items']: %> <% if item['url']: %> target="_blank"<% end %>> @@ -47,8 +50,9 @@ <% else: %> <% end %> +
<% end %> -
+ diff --git a/app/assets/stylesheets/zzz.css.erb b/app/assets/stylesheets/zzz.css.erb index 80c6c5e36..3dcdb7cbf 100644 --- a/app/assets/stylesheets/zzz.css.erb +++ b/app/assets/stylesheets/zzz.css.erb @@ -3365,42 +3365,39 @@ footer { } .userInfo { - width: 100%; - border-collapse: collapse; - table-layout: auto; } .userInfo .avatar { float: right; + position: relative; +} +.userInfo .avatar:after { + content: ""; + background: url(<%= asset_path "sprite.svg" %>); + background-position: -226px 0; + right: 0; + top: 0; + width: 97px; + height: 96px; + position: absolute; } .userInfo-name { color: rgba(0,8,14,.73); font-size: 16px; - position: relative; } - .userInfo-name div { - position: absolute; - width: 100%; - top: 50%; - margin-top: -10px; - line-height: 20px; - } - -.userInfo td { - padding: 5px 0; -} - -.userInfo td:first-child { - padding-right: 10px; - vertical-align: top; +.userInfo-entry { + margin: 20px 0; } .userInfo-label { - color: #bbb; + text-transform: uppercase; + color: #999; + font-size: 12px; font-weight: normal; - text-align: right; + letter-spacing: 0.1em; + margin-bottom: 6px; } .userInfo-value {