Adding public following and followers pages, fix #3
parent
c349200761
commit
71ae4dd3d2
@ -1,3 +1,5 @@ |
|||||||
module AccountsHelper |
module AccountsHelper |
||||||
|
def pagination_options |
||||||
|
{ previous_label: "#{fa_icon('chevron-left')} Prev".html_safe, next_label: "Next #{fa_icon('chevron-right')}".html_safe, inner_window: 2 } |
||||||
|
end |
||||||
end |
end |
||||||
|
@ -0,0 +1,8 @@ |
|||||||
|
.account-grid-card |
||||||
|
.account-grid-card__header |
||||||
|
.avatar= image_tag account.avatar.url(:medium) |
||||||
|
.name |
||||||
|
= link_to url_for_target(account) do |
||||||
|
%span.display_name= display_name(account) |
||||||
|
%span.username= "@#{account.acct}" |
||||||
|
%p.note= account.note |
@ -0,0 +1,20 @@ |
|||||||
|
.card{ style: "background-image: url(#{@account.header.url(:medium)})" } |
||||||
|
.avatar= image_tag @account.avatar.url(:large) |
||||||
|
%h1.name |
||||||
|
= display_name(@account) |
||||||
|
%small= "@#{@account.username}" |
||||||
|
.details |
||||||
|
.counter{ class: active_nav_class(account_url(@account)) } |
||||||
|
= link_to account_url(@account) do |
||||||
|
%span.counter-label Posts |
||||||
|
%span.counter-number= @account.statuses.count |
||||||
|
.counter{ class: active_nav_class(following_account_url(@account)) } |
||||||
|
= link_to following_account_url(@account) do |
||||||
|
%span.counter-label Following |
||||||
|
%span.counter-number= @account.following.count |
||||||
|
.counter{ class: active_nav_class(followers_account_url(@account)) } |
||||||
|
= link_to followers_account_url(@account) do |
||||||
|
%span.counter-label Followers |
||||||
|
%span.counter-number= @account.followers.count |
||||||
|
.bio |
||||||
|
%p= @account.note |
@ -0,0 +1 @@ |
|||||||
|
%p.nothing-here There is nothing here! |
@ -0,0 +1,14 @@ |
|||||||
|
- content_for :page_title do |
||||||
|
People who follow |
||||||
|
= display_name(@account) |
||||||
|
|
||||||
|
= render partial: 'header' |
||||||
|
|
||||||
|
.accounts-grid |
||||||
|
- @followers.each do |f| |
||||||
|
= render partial: 'grid_card', locals: { account: f } |
||||||
|
|
||||||
|
- if @followers.empty? |
||||||
|
= render partial: 'nothing_here' |
||||||
|
|
||||||
|
= will_paginate @followers, pagination_options |
@ -0,0 +1,15 @@ |
|||||||
|
- content_for :page_title do |
||||||
|
People whom |
||||||
|
= display_name(@account) |
||||||
|
follows |
||||||
|
|
||||||
|
= render partial: 'header' |
||||||
|
|
||||||
|
.accounts-grid |
||||||
|
- @following.each do |f| |
||||||
|
= render partial: 'grid_card', locals: { account: f } |
||||||
|
|
||||||
|
- if @following.empty? |
||||||
|
= render partial: 'nothing_here' |
||||||
|
|
||||||
|
= will_paginate @following, pagination_options |
Loading…
Reference in new issue