From 48c8d730c2e076fa7fe5e769a74d1026c5cfb113 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Sat, 15 Jun 2013 00:42:54 -0400 Subject: removed some tables from the user profile page --- askbot/media/style/style.css | 45 ++++- askbot/media/style/style.less | 45 ++++- askbot/templates/user_profile/macros.html | 9 +- askbot/templates/user_profile/user_info.html | 238 +++++++++++++------------- askbot/templates/user_profile/user_stats.html | 119 +++++-------- 5 files changed, 242 insertions(+), 214 deletions(-) diff --git a/askbot/media/style/style.css b/askbot/media/style/style.css index ae63fa36..b5a76686 100644 --- a/askbot/media/style/style.css +++ b/askbot/media/style/style.css @@ -627,9 +627,6 @@ input[type="submit"].searchBtn { .users-page input[type="submit"].searchBtn { margin-top: 1px; } -table.openid td { - padding: 0 10px 5px 0; -} .ask-page input[type="submit"].searchBtn { display: none; } @@ -3002,6 +2999,22 @@ a:hover.medal { padding: 10px 0px 10px 0px; font-family: 'Open Sans Condensed', Arial, sans-serif; } +.user-profile-page .up-votes, +.user-profile-page .down-votes { + display: inline-block; + font-size: 18px; + font-weight: bold; + height: 30px; + padding-left: 27px; + line-height: 22px; + margin: 0 15px 0 2px; +} +.user-profile-page .up-votes { + background: url(../images/vote-arrow-up-on.png) no-repeat; +} +.user-profile-page .down-votes { + background: url(../images/vote-arrow-down-on.png) no-repeat; +} .user-profile-page .inputs { margin-top: 10px; margin-bottom: 10px; @@ -3422,8 +3435,29 @@ label.retag-error { float: left; } .user-info-table { - margin-bottom: 10px; + margin: 10px 0; border-spacing: 0; + display: table; +} +.user-info-table .col1, +.user-info-table .col2, +.user-info-table .col3 { + display: table-cell; + vertical-align: top; +} +.user-info-table .col1 { + width: 140px; + text-align: center; +} +.user-info-table .col2 { + padding: 0 0 0 10px; + width: 400px; +} +.user-info-table .col3 { + width: 460px; +} +.user-info-table .gravatar { + margin: 0; } /* todo: remove this hack? */ .user-stats-table .narrow { @@ -3799,9 +3833,6 @@ p.signup_p { text-align: right; padding-right: 5px; } -.user-info-table .gravatar { - margin: 0; -} #responses { clear: both; line-height: 18px; diff --git a/askbot/media/style/style.less b/askbot/media/style/style.less index 54753952..7472eb9a 100644 --- a/askbot/media/style/style.less +++ b/askbot/media/style/style.less @@ -3118,6 +3118,23 @@ a:hover.medal { font-family:@main-font; } + .up-votes, + .down-votes { + display: inline-block; + font-size: 18px; + font-weight: bold; + height: 30px; + padding-left: 27px; + line-height: 22px; + margin: 0 15px 0 2px; + } + .up-votes { + background: url(../images/vote-arrow-up-on.png) no-repeat; + } + .down-votes { + background: url(../images/vote-arrow-down-on.png) no-repeat; + } + .inputs { margin-top: 10px; margin-bottom: 10px; @@ -3574,8 +3591,30 @@ label.retag-error { } .user-info-table { - margin-bottom: 10px; + margin: 10px 0; border-spacing: 0; + display: table; + + .col1, + .col2, + .col3 { + display: table-cell; + vertical-align: top; + } + .col1 { + width: 140px; + text-align: center; + } + .col2 { + padding: 0 0 0 10px; + width: 400px; + } + .col3 { + width: 460px; + } + .gravatar { + margin:0; + } } /* todo: remove this hack? */ @@ -4034,10 +4073,6 @@ p.signup_p { } -.user-info-table .gravatar { - margin:0; -} - #responses { clear:both; line-height:18px; diff --git a/askbot/templates/user_profile/macros.html b/askbot/templates/user_profile/macros.html index ac573553..9e334e8b 100644 --- a/askbot/templates/user_profile/macros.html +++ b/askbot/templates/user_profile/macros.html @@ -13,12 +13,7 @@ {% endspaceless %}
- - - - -
- {{ macros.tag_list_widget(tag_names, deletable = False) }} -
+ {{ macros.tag_list_widget(tag_names, deletable = False) }} +
{% endmacro %} diff --git a/askbot/templates/user_profile/user_info.html b/askbot/templates/user_profile/user_info.html index 6c20f1f4..9786d4ec 100644 --- a/askbot/templates/user_profile/user_info.html +++ b/askbot/templates/user_profile/user_info.html @@ -1,130 +1,126 @@ {% import "macros.html" as macros %} - - - -
-
- {{ macros.gravatar(view_user, 128) }} - {% if request.user == view_user %} -

{% trans %}change picture{% endtrans %}

+
- - {% if request.user == view_user %} - - - + + {% endif %} + + + + {% if view_user.real_name %} + + + + + {% endif %} + {% if settings.GROUPS_ENABLED %} + + + + + {% endif %} + + + + + {% if view_user.last_seen %} + + + + + {% endif %} + {% if view_user.website and (not view_user.is_blocked()) %} + + + + + {% endif %} + {% if request.user == view_user and + settings.TWITTER_SECRET and + settings.TWITTER_KEY and + settings.ENABLE_SHARING_TWITTER + %} + {% include "user_profile/twitter_sharing_controls.html" %} + {% endif %} + {% if view_user.location or view_user.country %} + + + + + {% endif %} + {% if view_user.date_of_birth %} + + + + + + {% endif %} + {% if votes_today_left %} + + + + {% endif %} - - - -
-
- {% if view_user.about and (not view_user.is_blocked()) %} - {{view_user.about|linebreaks}} + {% endif %} +
+

{{user_status_for_display}}

+
{% trans %}real name{% endtrans %}{{view_user.real_name}}
{% trans %}groups{% endtrans %} +
+ + {% for group in user_groups %} + + {{ macros.user_group(group, groups_membership_info[group.id]) }} + + {% endfor %} +
+
+ {% trans %}add group{% endtrans %} +
+
{% trans %}member since{% endtrans %}{{ macros.timeago(view_user.date_joined) }}
{% trans %}last seen{% endtrans %}{{ macros.timeago(view_user.last_seen) }}
{% trans %}website{% endtrans %}{{ macros.user_website_link(view_user, max_display_length = 30) }}
{% trans %}location{% endtrans %}{{ macros.user_full_location(view_user) }}
{% trans %}age{% endtrans %}{% trans age=view_user.date_of_birth|get_age%}{{ age }} years old{% endtrans %}
{% trans %}todays unused votes{% endtrans %}{{ votes_today_left }} {% trans %}votes left{% endtrans %}
+
+ +
+ {% if view_user.about and (not view_user.is_blocked()) %} + {{view_user.about|linebreaks}} + {% endif %} +
+ diff --git a/askbot/templates/user_profile/user_stats.html b/askbot/templates/user_profile/user_stats.html index fe446c44..648280c4 100644 --- a/askbot/templates/user_profile/user_stats.html +++ b/askbot/templates/user_profile/user_stats.html @@ -23,54 +23,32 @@

{% trans cnt=total_votes %}{{cnt}} Vote{% pluralize %}{{cnt}} Votes {% endtrans %}

{% endspaceless %}
- - - - - -
- {% trans %}thumb up{% endtrans %} - {{up_votes}} - - {% trans %}thumb down{% endtrans %} - {{down_votes}} - -
+
{{ up_votes }}
+
{{ down_votes }}
{% spaceless %}

{% trans counter=user_tags|length %}{{counter}} Tag{% pluralize %}{{counter}} Tags{% endtrans %}

{% endspaceless %}
- - - - - -
-
    - {% for tag in user_tags %} -
  • - {{ macros.tag_widget( - tag.name, - html_tag = 'div', - search_state = search_state, - truncate_long_tag = True, - extra_content = - '× ' ~ - tag.user_tag_usage_count|intcomma ~ - '' - ) - }} -
  • - {# - {% if loop.index is divisibleby 10 %} -
- {% endif %} - #} - {% endfor %} - -
+ +
{% if interesting_tag_names %} {{ user_profile_macros.tag_selection(interesting_tag_names, 'interesting') }} @@ -87,39 +65,32 @@

{% trans counter=total_badges %}{{counter}} Badge{% pluralize %}{{counter}} Badges{% endtrans %}

{% endspaceless %}
- - - - - -
- {% for badge, badge_user_awards in badges %} + {% for badge, badge_user_awards in badges %} +  {% trans name=badge.get_name() %}{{name}}{% endtrans %} +   + × + {{ badge_user_awards|length|intcomma }} + +
- {% endif %} - {% endfor %} -
+ title="{{ award.content_object.get_snippet()|collapse }}" + href="{{ award.content_object.get_absolute_url() }}" + >{% if award.content_type.post_type == 'answer' %}{% trans %}Answer to:{% endtrans %}{% endif %} {{ award.content_object.thread.title|escape }} + + {% endif %} + {% endfor %} + + {% if loop.index is divisibleby 3 %} +
+ {% endif %} + {% endfor %}
{% endif %} {% endblock %} -- cgit v1.2.3-1-g7c22