Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Schubert <mail@dennis-schubert.de>2018-03-03 11:49:19 +0300
committerBenjamin Neff <benjamin@coding4coffee.ch>2018-03-07 02:39:26 +0300
commit8e88f4b18370a3877631277569d1d0ef5bbc6612 (patch)
tree56b42c579668feab8268cbfe36e154a4cac767c6
parent4e5ee36675246038009ba231b1a4101dbb36a59e (diff)
Add the back-to-top button to all views
fixes #7727
-rw-r--r--app/assets/javascripts/app/pages/single-post-viewer.js12
-rw-r--r--app/assets/stylesheets/base.scss15
-rw-r--r--app/views/layouts/application.html.haml2
-rw-r--r--app/views/people/contacts.haml2
-rw-r--r--app/views/people/index.html.haml2
-rw-r--r--app/views/people/show.html.haml2
-rw-r--r--app/views/streams/main_stream.html.haml2
-rw-r--r--app/views/tags/show.haml2
8 files changed, 20 insertions, 19 deletions
diff --git a/app/assets/javascripts/app/pages/single-post-viewer.js b/app/assets/javascripts/app/pages/single-post-viewer.js
index f12f45a33..8069bfa90 100644
--- a/app/assets/javascripts/app/pages/single-post-viewer.js
+++ b/app/assets/javascripts/app/pages/single-post-viewer.js
@@ -3,23 +3,23 @@
app.pages.SinglePostViewer = app.views.Base.extend({
templateName: "single-post-viewer",
- subviews : {
- "#single-post-content" : "singlePostContentView",
- '#single-post-interactions' : 'singlePostInteractionsView'
+ subviews: {
+ "#single-post-content": "singlePostContentView",
+ "#single-post-interactions": "singlePostInteractionsView"
},
- initialize : function() {
+ initialize: function() {
this.model = new app.models.Post(gon.post);
this.initViews();
},
- initViews : function() {
+ initViews: function() {
this.singlePostContentView = new app.views.SinglePostContent({model: this.model});
this.singlePostInteractionsView = new app.views.SinglePostInteractions({model: this.model});
this.render();
},
- postRenderTemplate : function() {
+ postRenderTemplate: function() {
if(this.model.get("title")){
// formats title to html...
var html_title = app.helpers.textFormatter(this.model.get("title"), this.model.get("mentioned_people"));
diff --git a/app/assets/stylesheets/base.scss b/app/assets/stylesheets/base.scss
index 4bc53b49a..3de954947 100644
--- a/app/assets/stylesheets/base.scss
+++ b/app/assets/stylesheets/base.scss
@@ -70,20 +70,29 @@ pre { word-wrap: break-word; }
height: 50px;
line-height: 50px;
opacity: 0;
+ pointer-events: none;
position: fixed;
right: 20px;
+ text-decoration: none;
transition: opacity ease 400ms;
width: 50px;
z-index: 49;
&:hover,
- &.visible:hover {
+ &:focus,
+ &:active {
color: $white;
- opacity: .85;
text-decoration: none;
}
- &.visible { opacity: .5; }
+ &.visible {
+ opacity: .5;
+ pointer-events: auto;
+
+ &:hover {
+ opacity: .85;
+ }
+ }
}
.noscript {
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index a0bc26e8b..a55a832e6 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -38,3 +38,5 @@
%ol.indicator
#flash-container= flash_messages
+
+ %a.entypo-chevron-up.back-to-top#back-to-top{title: t("layouts.application.back_to_top"), href: "#"}
diff --git a/app/views/people/contacts.haml b/app/views/people/contacts.haml
index b3af8650d..698f5951b 100644
--- a/app/views/people/contacts.haml
+++ b/app/views/people/contacts.haml
@@ -17,8 +17,6 @@
= render partial: 'people/person', locals: hash
= will_paginate @contacts_of_contact, renderer: WillPaginate::ActionView::BootstrapLinkRenderer
- %a.entypo-chevron-up.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"}
-
-if user_signed_in? && @person
#new_status_message_pane
= render 'shared/modal',
diff --git a/app/views/people/index.html.haml b/app/views/people/index.html.haml
index 912be0d6f..672ee0db0 100644
--- a/app/views/people/index.html.haml
+++ b/app/views/people/index.html.haml
@@ -29,8 +29,6 @@
= will_paginate @people, renderer: WillPaginate::ActionView::BootstrapLinkRenderer
- %a.entypo-chevron-up.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"}
-
.col-md-4
- if AppConfig.settings.invitations.open?
%h4
diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml
index 1d725f382..cab25f855 100644
--- a/app/views/people/show.html.haml
+++ b/app/views/people/show.html.haml
@@ -30,8 +30,6 @@
.loader.hidden
.spinner
- %a.entypo-chevron-up.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"}
-
-if user_signed_in? && @person
#new_status_message_pane
= render 'shared/modal',
diff --git a/app/views/streams/main_stream.html.haml b/app/views/streams/main_stream.html.haml
index 2dc05a9e1..dd297185b 100644
--- a/app/views/streams/main_stream.html.haml
+++ b/app/views/streams/main_stream.html.haml
@@ -178,5 +178,3 @@
.col-md-9
.stream-container#aspect-stream-container
= render "aspects/aspect_stream", stream: @stream
-
- %a.entypo-chevron-up.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"}
diff --git a/app/views/tags/show.haml b/app/views/tags/show.haml
index 8f42ba032..40536be52 100644
--- a/app/views/tags/show.haml
+++ b/app/views/tags/show.haml
@@ -33,5 +33,3 @@
#paginate
.loader.hidden
.spinner
-
- %a.entypo-chevron-up.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"}