Merge pull request #5400 from Faldrian/5003-fix-more-button-mobile
Fix for "more" link on mobile view
This commit is contained in:
commit
137e60ca51
8 changed files with 30 additions and 18 deletions
|
|
@ -93,6 +93,7 @@ This is disabled by default since it requires the installation of additional pac
|
||||||
* Drop unneeded and too open crossdomain.xml
|
* Drop unneeded and too open crossdomain.xml
|
||||||
* Fix hidden aspect dropdown on getting started page [#5407](https://github.com/diaspora/diaspora/pulls/5407)
|
* Fix hidden aspect dropdown on getting started page [#5407](https://github.com/diaspora/diaspora/pulls/5407)
|
||||||
* Fix a few issues on Bootstrap pages [#5401](https://github.com/diaspora/diaspora/pull/5401)
|
* Fix a few issues on Bootstrap pages [#5401](https://github.com/diaspora/diaspora/pull/5401)
|
||||||
|
* Improve handling of the `more` link on mobile stream pages [#5400](https://github.com/diaspora/diaspora/pull/5400)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
* Don't pull jQuery from a CDN by default [#5105](https://github.com/diaspora/diaspora/pull/5105)
|
* Don't pull jQuery from a CDN by default [#5105](https://github.com/diaspora/diaspora/pull/5105)
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@ h3 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.more-link {
|
.more-link, .no-more-posts {
|
||||||
-webkit-box-shadow: inset 0 1px 5px #777, 0 1px 1px rgba(0,0,0,0.4);
|
-webkit-box-shadow: inset 0 1px 5px #777, 0 1px 1px rgba(0,0,0,0.4);
|
||||||
display: block;
|
display: block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
@ -204,10 +204,12 @@ h3 {
|
||||||
color: rgba(220,220,220,0.8);
|
color: rgba(220,220,220,0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1, h2 {
|
||||||
color: $text-grey;
|
color: $text-grey;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
text-shadow: 0 2px 0 #fff; } }
|
text-shadow: 0 2px 0 #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,7 @@
|
||||||
- else
|
- else
|
||||||
#main_stream.stream
|
#main_stream.stream
|
||||||
= render 'shared/stream', :posts => @stream.stream_posts
|
= render 'shared/stream', :posts => @stream.stream_posts
|
||||||
#pagination
|
= render 'shared/stream_more_button'
|
||||||
%a.more-link.paginate{:href => next_page_path}
|
|
||||||
%h1
|
|
||||||
= t("more")
|
|
||||||
- else
|
- else
|
||||||
#main_stream
|
#main_stream
|
||||||
.dull
|
.dull
|
||||||
|
|
@ -33,4 +30,3 @@
|
||||||
= t('.ignoring', :name => @person.first_name)
|
= t('.ignoring', :name => @person.first_name)
|
||||||
- elsif user_signed_in? && (current_user.person != @person)
|
- elsif user_signed_in? && (current_user.person != @person)
|
||||||
= t('.has_not_shared_with_you_yet', :name => @person.first_name)
|
= t('.has_not_shared_with_you_yet', :name => @person.first_name)
|
||||||
|
|
||||||
|
|
|
||||||
15
app/views/shared/_stream_more_button.mobile.haml
Normal file
15
app/views/shared/_stream_more_button.mobile.haml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
-if @stream.stream_posts.length == 15
|
||||||
|
#pagination
|
||||||
|
%a.more-link.paginate{:href => next_page_path}
|
||||||
|
%h1
|
||||||
|
= t("more")
|
||||||
|
-elsif params[:max_time].present?
|
||||||
|
#pagination
|
||||||
|
%div.no-more-posts
|
||||||
|
%h2
|
||||||
|
= t("stream_helper.no_more_posts")
|
||||||
|
-else
|
||||||
|
#pagination
|
||||||
|
%div.no-more-posts
|
||||||
|
%h2
|
||||||
|
= t("stream_helper.no_posts_yet")
|
||||||
|
|
@ -10,8 +10,4 @@
|
||||||
|
|
||||||
#main_stream.stream
|
#main_stream.stream
|
||||||
= render 'shared/stream', :posts => @stream.stream_posts
|
= render 'shared/stream', :posts => @stream.stream_posts
|
||||||
-if @stream.stream_posts.length > 0
|
= render 'shared/stream_more_button'
|
||||||
#pagination
|
|
||||||
%a.more-link.paginate{:href => next_page_path}
|
|
||||||
%h1
|
|
||||||
= t("more")
|
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,5 @@
|
||||||
|
|
||||||
#main_stream.stream
|
#main_stream.stream
|
||||||
= render 'shared/stream', :posts => @stream.stream_posts
|
= render 'shared/stream', :posts => @stream.stream_posts
|
||||||
-if @stream.stream_posts.length > 0
|
= render 'shared/stream_more_button'
|
||||||
#pagination
|
|
||||||
%a.more-link.paginate{:href => next_page_path}
|
|
||||||
%h1
|
|
||||||
= t("more")
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1188,6 +1188,8 @@ en:
|
||||||
one: "Show one more comment"
|
one: "Show one more comment"
|
||||||
other: "Show %{count} more comments"
|
other: "Show %{count} more comments"
|
||||||
hide_comments: "Hide all comments"
|
hide_comments: "Hide all comments"
|
||||||
|
no_more_posts: "You have reached the end of the stream."
|
||||||
|
no_posts_yet: "There are no posts yet."
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
show:
|
show:
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,10 @@ require 'rubygems'
|
||||||
|
|
||||||
prefork = proc do
|
prefork = proc do
|
||||||
ENV["RAILS_ENV"] ||= "test"
|
ENV["RAILS_ENV"] ||= "test"
|
||||||
|
|
||||||
|
# Have all rests run with english browser locale
|
||||||
|
ENV['LANG'] = 'C'
|
||||||
|
|
||||||
require 'cucumber/rails'
|
require 'cucumber/rails'
|
||||||
|
|
||||||
require 'capybara/rails'
|
require 'capybara/rails'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue