Adds styles for user's activity page

This commit is contained in:
Alberto Garcia Cabeza
2015-11-06 12:28:04 +01:00
parent b1ea8f7938
commit ca8f410319
10 changed files with 73 additions and 14 deletions

View File

@@ -20,6 +20,7 @@
// 18. Comments // 18. Comments
// 19. Flags // 19. Flags
// 20. Accesibility // 20. Accesibility
// 21. Activity
// //
// 01. Variables // 01. Variables
@@ -2015,3 +2016,58 @@ table {
clip: rect(0, 0, 0, 0); clip: rect(0, 0, 0, 0);
border: 0; border: 0;
} }
// 21. Activity
// - - - - - - - - - - - - - - - - - - - - - - - - -
.activity {
margin-bottom: rem-calc(48);
margin-top: rem-calc(24);
.sub-nav {
background: none;
border-bottom: 1px solid $border;
border-radius: 0;
padding-bottom: 0;
dd.active {
background: none;
border-bottom: 2px solid $brand;
border-radius: 0;
color: $brand;
}
}
table {
border: 0;
td {
padding-left: rem-calc(36);
position: relative;
&:before {
color: $brand;
font-family: "icons" !important;
font-size: rem-calc(24);
left: 4px;
position: absolute;
}
}
&.activity-comments td:before {
content: "e";
top: 18px;
}
&.activity-debates td:before {
content: "i";
top: 14px;
}
&.activity-proposals td:before {
content: "h";
top: 18px;
}
}
}

View File

@@ -416,8 +416,15 @@
} }
.author { .author {
color: $text;
font-weight: bold; font-weight: bold;
a {
color: $link !important;
&:hover {
color: $link-hover !important;
}
}
} }
aside { aside {

View File

@@ -1,4 +1,3 @@
<%= render "proposals" if @proposals.present? %> <%= render "proposals" if @proposals.present? %>
<%= render "debates" if @debates.present? %> <%= render "debates" if @debates.present? %>
<%= render "comments" if @comments.present? %> <%= render "comments" if @comments.present? %>

View File

@@ -1,11 +1,8 @@
<table class="clear"> <table class="clear activity-comments">
<% @comments.each do |comment| %> <% @comments.each do |comment| %>
<tr id="debate_<%= comment.id %>"> <tr id="debate_<%= comment.id %>">
<td> <td>
<i> <%= comment.commentable.hidden? ? comment.commentable.title : link_to(comment.commentable.title, comment.commentable) %>
<%= t("users.show.comment_to") %>
<%= comment.commentable.hidden? ? comment.commentable.title : link_to(comment.commentable.title, comment.commentable) %>
</i>
<br> <br>
<%= comment.body %> <%= comment.body %>
</td> </td>

View File

@@ -1,4 +1,4 @@
<table class="clear"> <table class="clear activity-debates">
<% @debates.each do |debate| %> <% @debates.each do |debate| %>
<tr id="debate_<%= debate.id %>"> <tr id="debate_<%= debate.id %>">
<td> <td>

View File

@@ -1,4 +1,4 @@
<table class="clear"> <table class="clear activity-proposals">
<% @proposals.each do |proposal| %> <% @proposals.each do |proposal| %>
<tr id="proposal_<%= proposal.id %>"> <tr id="proposal_<%= proposal.id %>">
<td> <td>

View File

@@ -1,6 +1,6 @@
<section role="main"> <section role="main">
<div class="wrap row"> <div class="activity row">
<div class="small-12 medium-9 column"> <div class="small-12 column">
<h2><%= avatar_image(@user, seed: @user.id, size: 60) %> <%= @user.name %></h2> <h2><%= avatar_image(@user, seed: @user.id, size: 60) %> <%= @user.name %></h2>

View File

@@ -340,7 +340,6 @@ en:
other: "%{count} Comments" other: "%{count} Comments"
no_activity: "User has no public activity" no_activity: "User has no public activity"
private_activity: "This user decided to keep the activity list private" private_activity: "This user decided to keep the activity list private"
comment_to: "Comment in: "
unauthorized: unauthorized:
default: "You do not have permission to access this page." default: "You do not have permission to access this page."
manage: manage:

View File

@@ -340,7 +340,6 @@ es:
other: "%{count} Comentarios" other: "%{count} Comentarios"
no_activity: "Usuario sin actividad pública" no_activity: "Usuario sin actividad pública"
private_activity: "Este usuario ha decidido mantener en privado su lista de actividades" private_activity: "Este usuario ha decidido mantener en privado su lista de actividades"
comment_to: "Comentario en: "
unauthorized: unauthorized:
default: "No tienes permiso para acceder a esta página." default: "No tienes permiso para acceder a esta página."
manage: manage:

View File

@@ -95,10 +95,10 @@ ActiveRecord::Schema.define(version: 20151103194329) do
t.string "visit_id" t.string "visit_id"
t.datetime "hidden_at" t.datetime "hidden_at"
t.integer "flags_count", default: 0 t.integer "flags_count", default: 0
t.datetime "ignored_flag_at"
t.integer "cached_votes_total", default: 0 t.integer "cached_votes_total", default: 0
t.integer "cached_votes_up", default: 0 t.integer "cached_votes_up", default: 0
t.integer "cached_votes_down", default: 0 t.integer "cached_votes_down", default: 0
t.datetime "ignored_flag_at"
t.integer "comments_count", default: 0 t.integer "comments_count", default: 0
t.datetime "confirmed_hide_at" t.datetime "confirmed_hide_at"
t.integer "cached_anonymous_votes_total", default: 0 t.integer "cached_anonymous_votes_total", default: 0
@@ -114,6 +114,7 @@ ActiveRecord::Schema.define(version: 20151103194329) do
add_index "debates", ["cached_votes_total"], name: "index_debates_on_cached_votes_total", using: :btree add_index "debates", ["cached_votes_total"], name: "index_debates_on_cached_votes_total", using: :btree
add_index "debates", ["cached_votes_up"], name: "index_debates_on_cached_votes_up", using: :btree add_index "debates", ["cached_votes_up"], name: "index_debates_on_cached_votes_up", using: :btree
add_index "debates", ["confidence_score"], name: "index_debates_on_confidence_score", using: :btree add_index "debates", ["confidence_score"], name: "index_debates_on_confidence_score", using: :btree
add_index "debates", ["description"], name: "index_debates_on_description", using: :btree
add_index "debates", ["hidden_at"], name: "index_debates_on_hidden_at", using: :btree add_index "debates", ["hidden_at"], name: "index_debates_on_hidden_at", using: :btree
add_index "debates", ["hot_score"], name: "index_debates_on_hot_score", using: :btree add_index "debates", ["hot_score"], name: "index_debates_on_hot_score", using: :btree
add_index "debates", ["title"], name: "index_debates_on_title", using: :btree add_index "debates", ["title"], name: "index_debates_on_title", using: :btree
@@ -220,6 +221,7 @@ ActiveRecord::Schema.define(version: 20151103194329) do
add_index "proposals", ["author_id"], name: "index_proposals_on_author_id", using: :btree add_index "proposals", ["author_id"], name: "index_proposals_on_author_id", using: :btree
add_index "proposals", ["cached_votes_up"], name: "index_proposals_on_cached_votes_up", using: :btree add_index "proposals", ["cached_votes_up"], name: "index_proposals_on_cached_votes_up", using: :btree
add_index "proposals", ["confidence_score"], name: "index_proposals_on_confidence_score", using: :btree add_index "proposals", ["confidence_score"], name: "index_proposals_on_confidence_score", using: :btree
add_index "proposals", ["description"], name: "index_proposals_on_description", using: :btree
add_index "proposals", ["hidden_at"], name: "index_proposals_on_hidden_at", using: :btree add_index "proposals", ["hidden_at"], name: "index_proposals_on_hidden_at", using: :btree
add_index "proposals", ["hot_score"], name: "index_proposals_on_hot_score", using: :btree add_index "proposals", ["hot_score"], name: "index_proposals_on_hot_score", using: :btree
add_index "proposals", ["question"], name: "index_proposals_on_question", using: :btree add_index "proposals", ["question"], name: "index_proposals_on_question", using: :btree