From abba8d8dfc29206da7744c78a06b6cbc29dbbe06 Mon Sep 17 00:00:00 2001 From: flaburgan Date: Sun, 11 Aug 2013 23:55:40 +0200 Subject: [PATCH 01/39] Add header to the single post view --- Changelog.md | 2 ++ app/assets/stylesheets/header.css.scss | 2 ++ app/assets/templates/post-viewer_tpl.jst.hbs | 18 +++--------------- app/controllers/posts_controller.rb | 2 +- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/Changelog.md b/Changelog.md index d78a0dd8e..f8dc57214 100644 --- a/Changelog.md +++ b/Changelog.md @@ -57,6 +57,8 @@ * Add possibility to ask for Bitcoin donations [#4375](https://github.com/diaspora/diaspora/pull/4375) * Remove posts, comments and private conversations from the mobile site. [#4408](https://github.com/diaspora/diaspora/pull/4408) [#4409](https://github.com/diaspora/diaspora/pull/4409) * Added a link to user photos and thumbnails are shown in the left side bar [#4347](https://github.com/diaspora/diaspora/issues/4347) +======= +* Rework the single post view # 0.1.1.0 diff --git a/app/assets/stylesheets/header.css.scss b/app/assets/stylesheets/header.css.scss index f3eea7d72..494c20190 100644 --- a/app/assets/stylesheets/header.css.scss +++ b/app/assets/stylesheets/header.css.scss @@ -1,3 +1,5 @@ +body > #container { margin-top: 50px; } /* to avoid being hidden under the header in the SPV */ + body > header { @include box-shadow(0,1px,3px,rgba(0,0,0,0.9)); background: url('header-bg.png') rgb(40,35,35); diff --git a/app/assets/templates/post-viewer_tpl.jst.hbs b/app/assets/templates/post-viewer_tpl.jst.hbs index 8301ac213..dada78ec9 100644 --- a/app/assets/templates/post-viewer_tpl.jst.hbs +++ b/app/assets/templates/post-viewer_tpl.jst.hbs @@ -1,16 +1,4 @@
- -
- - - - - {{t "viewer.home"}} - - - -
- -
-
-
+
+
+
diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 10c579337..9911e251c 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -9,7 +9,7 @@ class PostsController < ApplicationController before_filter :set_format_if_malformed_from_status_net, :only => :show before_filter :find_post, :only => [:show, :next, :previous, :interactions] - layout 'application' + layout 'with_header' before_filter -> { @css_framework = :bootstrap } respond_to :html, From d63dc9f0a58d003696fdfa90f46c6dbfa9f1748d Mon Sep 17 00:00:00 2001 From: flaburgan Date: Mon, 12 Aug 2013 23:07:07 +0200 Subject: [PATCH 02/39] Add images, fix layout rendering --- app/assets/stylesheets/application.css.sass | 9 +-------- app/assets/stylesheets/new-templates.css.scss | 1 + app/controllers/posts_controller.rb | 3 +-- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/application.css.sass b/app/assets/stylesheets/application.css.sass index 76e63aae2..b07c39418 100644 --- a/app/assets/stylesheets/application.css.sass +++ b/app/assets/stylesheets/application.css.sass @@ -5,15 +5,8 @@ @import 'new_styles/_spinner' @import 'sidebar.css.scss' @import 'header.css.scss' +@import 'sprites.css.scss' -/* ===== sprites ===== */ - -@import 'icons/*.png' -@import 'branding/*.png' -@import 'social_media_logos/*.png' -@include all-icons-sprites -@include all-branding-sprites -@include all-social_media_logos-sprites /* ====== media ====== */ .media :margin 10px diff --git a/app/assets/stylesheets/new-templates.css.scss b/app/assets/stylesheets/new-templates.css.scss index 43444ad8b..5f5de6250 100644 --- a/app/assets/stylesheets/new-templates.css.scss +++ b/app/assets/stylesheets/new-templates.css.scss @@ -4,6 +4,7 @@ /* core */ @import 'new_styles/flash_messages'; +@import 'sprites.css.scss'; @import 'header.css.scss'; @import 'new_styles/base'; diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 9911e251c..361cf814f 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -9,7 +9,6 @@ class PostsController < ApplicationController before_filter :set_format_if_malformed_from_status_net, :only => :show before_filter :find_post, :only => [:show, :next, :previous, :interactions] - layout 'with_header' before_filter -> { @css_framework = :bootstrap } respond_to :html, @@ -27,7 +26,7 @@ class PostsController < ApplicationController mark_corresponding_notifications_read if user_signed_in? respond_to do |format| - format.html{ gon.post = PostPresenter.new(@post, current_user); render 'posts/show' } + format.html{ gon.post = PostPresenter.new(@post, current_user); render 'posts/show', layout: 'with_header' } format.xml{ render :xml => @post.to_diaspora_xml } format.mobile{render 'posts/show' } format.json{ render :json => PostPresenter.new(@post, current_user) } From 10e52f970c24e7e72941c630d452f1cab5fcc41d Mon Sep 17 00:00:00 2001 From: flaburgan Date: Mon, 12 Aug 2013 23:23:00 +0200 Subject: [PATCH 03/39] improve design --- app/assets/stylesheets/header.css.scss | 1 + app/assets/stylesheets/new_styles/_base.scss | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/header.css.scss b/app/assets/stylesheets/header.css.scss index 494c20190..cf58dc3fc 100644 --- a/app/assets/stylesheets/header.css.scss +++ b/app/assets/stylesheets/header.css.scss @@ -9,6 +9,7 @@ body > header { height: 26px; position: fixed; width: 100%; + min-width: 620px; top: 0; left: 0; border-bottom: 1px solid #000; diff --git a/app/assets/stylesheets/new_styles/_base.scss b/app/assets/stylesheets/new_styles/_base.scss index 42520e3cb..a3559de36 100644 --- a/app/assets/stylesheets/new_styles/_base.scss +++ b/app/assets/stylesheets/new_styles/_base.scss @@ -86,7 +86,7 @@ a { color : $link-blue } display: table; position: absolute; - height: 100%; + height: 93%; width: 100%; img, From 149c812d036123170a4da2ff34b3539675870914 Mon Sep 17 00:00:00 2001 From: flaburgan Date: Mon, 12 Aug 2013 23:23:37 +0200 Subject: [PATCH 04/39] add missing sprite file --- app/assets/stylesheets/sprites.css.scss | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 app/assets/stylesheets/sprites.css.scss diff --git a/app/assets/stylesheets/sprites.css.scss b/app/assets/stylesheets/sprites.css.scss new file mode 100644 index 000000000..686161f75 --- /dev/null +++ b/app/assets/stylesheets/sprites.css.scss @@ -0,0 +1,7 @@ +/* ===== sprites ===== */ +@import 'icons/*.png'; +@import 'branding/*.png'; +@import 'social_media_logos/*.png'; +@include all-icons-sprites; +@include all-branding-sprites; +@include all-social_media_logos-sprites; From 46d2240ed4405aaab8413bc95a3cb948b57d38f8 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Wed, 14 Aug 2013 23:25:58 +0200 Subject: [PATCH 05/39] Add hacky bootstrap header fix for single post view. --- app/assets/stylesheets/bootstrap-headerfix.sass | 15 +++++++++++++++ app/helpers/layout_helper.rb | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 app/assets/stylesheets/bootstrap-headerfix.sass diff --git a/app/assets/stylesheets/bootstrap-headerfix.sass b/app/assets/stylesheets/bootstrap-headerfix.sass new file mode 100644 index 000000000..ba97345f1 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-headerfix.sass @@ -0,0 +1,15 @@ +// A temporary fix for displaying the header in the single post view. +// Should be removed once everything uses Bootstrap. + +header + .container + width: 950px + .header-nav + span + a + font-weight: bold + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif + font-size: 13px + li + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif + font-size: 13px diff --git a/app/helpers/layout_helper.rb b/app/helpers/layout_helper.rb index 3b7c716ac..1053b1ca6 100644 --- a/app/helpers/layout_helper.rb +++ b/app/helpers/layout_helper.rb @@ -56,7 +56,8 @@ module LayoutHelper def include_base_css_framework(use_bootstrap=false) if use_bootstrap || @aspect == :getting_started - stylesheet_link_tag 'bootstrap-complete' + stylesheet_link_tag('bootstrap-complete') + + stylesheet_link_tag('bootstrap-headerfix') else stylesheet_link_tag 'blueprint', :media => 'screen' end From 958793e3382489002b01925d2bd6ff147c07673d Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sat, 17 Aug 2013 14:41:09 +0200 Subject: [PATCH 06/39] Implement new single post view. --- .../app/pages/single-post-viewer.js | 40 +++++++++++++++++++ .../single-post-viewer/single_post_actions.js | 3 ++ .../single_post_comment_stream.js | 15 +++++++ .../single_post_content_view.js | 33 +++++++++++++++ .../single_post_interactions.js | 24 +++++++++++ .../single-post-actions_tpl.jst.hbs | 24 +++++++++++ .../single-post-content_tpl.jst.hbs | 36 +++++++++++++++++ .../single-post-interactions_tpl.jst.hbs | 29 ++++++++++++++ .../templates/single-post-viewer_tpl.jst.hbs | 8 ++++ 9 files changed, 212 insertions(+) create mode 100644 app/assets/javascripts/app/pages/single-post-viewer.js create mode 100644 app/assets/javascripts/app/views/single-post-viewer/single_post_actions.js create mode 100644 app/assets/javascripts/app/views/single-post-viewer/single_post_comment_stream.js create mode 100644 app/assets/javascripts/app/views/single-post-viewer/single_post_content_view.js create mode 100644 app/assets/javascripts/app/views/single-post-viewer/single_post_interactions.js create mode 100644 app/assets/templates/single-post-viewer/single-post-actions_tpl.jst.hbs create mode 100644 app/assets/templates/single-post-viewer/single-post-content_tpl.jst.hbs create mode 100644 app/assets/templates/single-post-viewer/single-post-interactions_tpl.jst.hbs create mode 100644 app/assets/templates/single-post-viewer_tpl.jst.hbs diff --git a/app/assets/javascripts/app/pages/single-post-viewer.js b/app/assets/javascripts/app/pages/single-post-viewer.js new file mode 100644 index 000000000..2c68fb158 --- /dev/null +++ b/app/assets/javascripts/app/pages/single-post-viewer.js @@ -0,0 +1,40 @@ +app.pages.SinglePostViewer = app.views.Base.extend({ + templateName: "single-post-viewer", + + subviews : { + "#single-post-content" : "singlePostContentView", + '#single-post-interactions' : 'singlePostInteractionsView' + }, + + initialize : function(options) { + this.model = new app.models.Post({ id : options.id }); + this.model.preloadOrFetch().done(_.bind(this.initViews, this)); + this.model.interactions.fetch() //async, yo, might want to throttle this later. + this.setupLightbox() + }, + + setupLightbox : function(){ + this.lightbox = Diaspora.BaseWidget.instantiate("Lightbox"); + this.lightbox.set({ + imageParent: '.photo_attachments', + imageSelector: 'img.stream-photo' + }); + this.$el.delegate("a.stream-photo-link", "click", this.lightbox.lightboxImageClicked); + }, + + initViews : function() { + this.singlePostContentView = new app.views.SinglePostContent({model: this.model}); + this.singlePostInteractionsView = new app.views.SinglePostInteractions({model: this.model}); + this.render(); + }, + + postRenderTemplate : function() { + if(this.model.get("title")){ + // formats title to html... + var html_title = app.helpers.textFormatter(this.model.get("title"), this.model); + //... and converts html to plain text + document.title = $('
').html(html_title).text(); + } + }, + +}); diff --git a/app/assets/javascripts/app/views/single-post-viewer/single_post_actions.js b/app/assets/javascripts/app/views/single-post-viewer/single_post_actions.js new file mode 100644 index 000000000..054ddf150 --- /dev/null +++ b/app/assets/javascripts/app/views/single-post-viewer/single_post_actions.js @@ -0,0 +1,3 @@ +app.views.SinglePostActions = app.views.Feedback.extend({ + templateName: "single-post-viewer/single-post-actions", +}); diff --git a/app/assets/javascripts/app/views/single-post-viewer/single_post_comment_stream.js b/app/assets/javascripts/app/views/single-post-viewer/single_post_comment_stream.js new file mode 100644 index 000000000..787f7b004 --- /dev/null +++ b/app/assets/javascripts/app/views/single-post-viewer/single_post_comment_stream.js @@ -0,0 +1,15 @@ +app.views.SinglePostCommentStream = app.views.CommentStream.extend({ + + postRenderTemplate: function() { + app.views.CommentStream.prototype.postRenderTemplate.apply(this) + this.$(".new_comment_form_wrapper").removeClass('hidden') + }, + + presenter: function(){ + return _.extend(this.defaultPresenter(), { + moreCommentsCount : 0, + showExpandCommentsLink : false, + commentsCount : this.model.interactions.commentsCount() + }) + }, +}) diff --git a/app/assets/javascripts/app/views/single-post-viewer/single_post_content_view.js b/app/assets/javascripts/app/views/single-post-viewer/single_post_content_view.js new file mode 100644 index 000000000..c04d63dd7 --- /dev/null +++ b/app/assets/javascripts/app/views/single-post-viewer/single_post_content_view.js @@ -0,0 +1,33 @@ +app.views.SinglePostContent = app.views.Base.extend({ + templateName: 'single-post-viewer/single-post-content', + + subviews : { + "#single-post-actions" : "singlePostActionsView", + '#real-post-content' : 'postContentView', + ".oembed" : "oEmbedView", + ".opengraph" : "openGraphView" + }, + + initialize : function() { + this.singlePostActionsView = new app.views.SinglePostActions({model: this.model}); + this.oEmbedView = new app.views.OEmbed({model : this.model}); + this.openGraphView = new app.views.OpenGraph({model : this.model}); + this.postContentView = new app.views.StatusMessage({model: this.model}); + }, + + presenter : function() { + return _.extend(this.defaultPresenter(), { + authorIsCurrentUser : this.authorIsCurrentUser(), + showPost : this.showPost(), + text : app.helpers.textFormatter(this.model.get("text"), this.model) + }) + }, + + authorIsCurrentUser : function() { + return app.currentUser.authenticated() && this.model.get("author").id == app.user().id + }, + + showPost : function() { + return (app.currentUser.get("showNsfw")) || !this.model.get("nsfw") + } +}); diff --git a/app/assets/javascripts/app/views/single-post-viewer/single_post_interactions.js b/app/assets/javascripts/app/views/single-post-viewer/single_post_interactions.js new file mode 100644 index 000000000..3ca98b952 --- /dev/null +++ b/app/assets/javascripts/app/views/single-post-viewer/single_post_interactions.js @@ -0,0 +1,24 @@ +app.views.SinglePostInteractions = app.views.Base.extend({ + templateName: "single-post-viewer/single-post-interactions", + + subviews: { + '#comments': 'commentStreamView' + }, + + initialize : function() { + this.model.interactions.on('change', this.render, this); + this.commentStreamView = new app.views.SinglePostCommentStream({model: this.model}) + }, + + presenter : function(){ + var interactions = this.model.interactions + return { + likes : interactions.likes.toJSON(), + comments : interactions.comments.toJSON(), + reshares : interactions.reshares.toJSON(), + commentsCount : interactions.commentsCount(), + likesCount : interactions.likesCount(), + resharesCount : interactions.resharesCount(), + } + }, +}); diff --git a/app/assets/templates/single-post-viewer/single-post-actions_tpl.jst.hbs b/app/assets/templates/single-post-viewer/single-post-actions_tpl.jst.hbs new file mode 100644 index 000000000..cd4609447 --- /dev/null +++ b/app/assets/templates/single-post-viewer/single-post-actions_tpl.jst.hbs @@ -0,0 +1,24 @@ + diff --git a/app/assets/templates/single-post-viewer/single-post-content_tpl.jst.hbs b/app/assets/templates/single-post-viewer/single-post-content_tpl.jst.hbs new file mode 100644 index 000000000..abf755b7e --- /dev/null +++ b/app/assets/templates/single-post-viewer/single-post-content_tpl.jst.hbs @@ -0,0 +1,36 @@ + +
+
+
+
diff --git a/app/assets/templates/single-post-viewer/single-post-interactions_tpl.jst.hbs b/app/assets/templates/single-post-viewer/single-post-interactions_tpl.jst.hbs new file mode 100644 index 000000000..e31284151 --- /dev/null +++ b/app/assets/templates/single-post-viewer/single-post-interactions_tpl.jst.hbs @@ -0,0 +1,29 @@ +
+ + + {{resharesCount}} + + {{#each reshares}} + {{{personImage author 'small' "micro"}}} + {{/each}} +
+
+ + {{#each likes}} + {{{personImage author 'small' "micro"}}} + {{/each}} +
+
+ + + {{commentsCount}} + + {{#each comments}} + {{{personImage author 'small' "micro"}}} + {{/each}} +
+
+
diff --git a/app/assets/templates/single-post-viewer_tpl.jst.hbs b/app/assets/templates/single-post-viewer_tpl.jst.hbs new file mode 100644 index 000000000..322d96367 --- /dev/null +++ b/app/assets/templates/single-post-viewer_tpl.jst.hbs @@ -0,0 +1,8 @@ +
+
+
+
+
+
+
+
From 72f8d58c06f67ff6eea8ff7852ebd4b9e3cfcd6d Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sat, 17 Aug 2013 14:41:38 +0200 Subject: [PATCH 07/39] Questionable css for the new single post view. --- app/assets/stylesheets/default.css | 3 ++- app/assets/stylesheets/new_styles/_base.scss | 1 - app/assets/stylesheets/single-post-view.css.sass | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 app/assets/stylesheets/single-post-view.css.sass diff --git a/app/assets/stylesheets/default.css b/app/assets/stylesheets/default.css index 4fd8a7622..d8f1156b9 100644 --- a/app/assets/stylesheets/default.css +++ b/app/assets/stylesheets/default.css @@ -10,4 +10,5 @@ *= require vendor/facebox *= require vendor/fileuploader *= require vendor/autoSuggest -*/ \ No newline at end of file +*= require single-post-view +*/ diff --git a/app/assets/stylesheets/new_styles/_base.scss b/app/assets/stylesheets/new_styles/_base.scss index a3559de36..af0415459 100644 --- a/app/assets/stylesheets/new_styles/_base.scss +++ b/app/assets/stylesheets/new_styles/_base.scss @@ -5,7 +5,6 @@ body { } body { - background-image : image_url("texture/light-bg.png"); padding : none; &.lock { diff --git a/app/assets/stylesheets/single-post-view.css.sass b/app/assets/stylesheets/single-post-view.css.sass new file mode 100644 index 000000000..1559c251c --- /dev/null +++ b/app/assets/stylesheets/single-post-view.css.sass @@ -0,0 +1,16 @@ +#single-post-container + padding-top: 20px +#single-post-content + #author + .bd + padding-left: 10px + border-right: solid 1px #ccc + padding-right: 10px +#single-post-interactions + #likes, #reshares, #comments-meta + padding-bottom: 5px + .comment + border-bottom: solid 1px #ccc + padding-top: 10px + padding-bottom: 10px + From 8c695ecec2a352b80af7abc6c1892da7a7b6243a Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sat, 17 Aug 2013 14:41:55 +0200 Subject: [PATCH 08/39] Switch to new single post view. --- app/assets/javascripts/app/router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/app/router.js b/app/assets/javascripts/app/router.js index 0d29cd9c8..9f54f7d66 100644 --- a/app/assets/javascripts/app/router.js +++ b/app/assets/javascripts/app/router.js @@ -25,7 +25,7 @@ app.Router = Backbone.Router.extend({ }, singlePost : function(id) { - this.renderPage(function(){ return new app.pages.PostViewer({ id: id })}); + this.renderPage(function(){ return new app.pages.SinglePostViewer({ id: id })}); }, siblingPost : function(){ //next or previous From d7aaaea86e21a6250355e6d61edf9db28cb021ec Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sat, 17 Aug 2013 14:42:12 +0200 Subject: [PATCH 09/39] Fix specs for new single post view. --- features/comments.feature | 2 +- features/support/publishing_cuke_helpers.rb | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/features/comments.feature b/features/comments.feature index 93e2d8174..6a25a261a 100644 --- a/features/comments.feature +++ b/features/comments.feature @@ -55,6 +55,6 @@ Feature: commenting When I follow "less than a minute ago" Then I should see "Look at this dog" And I make a show page comment "I think thats a cat" - Then I should see "less than a minute ago" within "#post-comments" + Then I should see "less than a minute ago" within "#comments" When I go to "alice@alice.alice"'s page Then I should see "I think thats a cat" diff --git a/features/support/publishing_cuke_helpers.rb b/features/support/publishing_cuke_helpers.rb index 390be3b93..3e16cd73f 100644 --- a/features/support/publishing_cuke_helpers.rb +++ b/features/support/publishing_cuke_helpers.rb @@ -80,9 +80,8 @@ module PublishingCukeHelpers end def comment_on_show_page(comment_text) - within("#post-interactions") do - focus_comment_box(".label.comment") - make_comment(comment_text, "new-comment-text") + within("#single-post-interactions") do + make_comment(comment_text) end end From b8fb70d44e85c58c245cfe89870455d67732dd6c Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sat, 17 Aug 2013 20:35:15 +0200 Subject: [PATCH 10/39] Visual changes to the spv. --- .../single_post_content_view.js | 7 ++- .../stylesheets/single-post-view.css.sass | 25 ++++++++ .../single-post-actions_tpl.jst.hbs | 8 +-- .../single-post-content_tpl.jst.hbs | 12 ++-- .../single-post-interactions_tpl.jst.hbs | 57 ++++++++++--------- 5 files changed, 71 insertions(+), 38 deletions(-) diff --git a/app/assets/javascripts/app/views/single-post-viewer/single_post_content_view.js b/app/assets/javascripts/app/views/single-post-viewer/single_post_content_view.js index c04d63dd7..913375f0a 100644 --- a/app/assets/javascripts/app/views/single-post-viewer/single_post_content_view.js +++ b/app/assets/javascripts/app/views/single-post-viewer/single_post_content_view.js @@ -5,7 +5,8 @@ app.views.SinglePostContent = app.views.Base.extend({ "#single-post-actions" : "singlePostActionsView", '#real-post-content' : 'postContentView', ".oembed" : "oEmbedView", - ".opengraph" : "openGraphView" + ".opengraph" : "openGraphView", + ".status-message-location" : "postLocationStreamView" }, initialize : function() { @@ -15,6 +16,10 @@ app.views.SinglePostContent = app.views.Base.extend({ this.postContentView = new app.views.StatusMessage({model: this.model}); }, + postLocationStreamView : function(){ + return new app.views.LocationStream({ model : this.model}); + }, + presenter : function() { return _.extend(this.defaultPresenter(), { authorIsCurrentUser : this.authorIsCurrentUser(), diff --git a/app/assets/stylesheets/single-post-view.css.sass b/app/assets/stylesheets/single-post-view.css.sass index 1559c251c..038b0c76f 100644 --- a/app/assets/stylesheets/single-post-view.css.sass +++ b/app/assets/stylesheets/single-post-view.css.sass @@ -1,11 +1,26 @@ #single-post-container padding-top: 20px #single-post-content + #head + color: #aaa + font-size: 12px #author .bd padding-left: 10px border-right: solid 1px #ccc padding-right: 10px + #body + margin-left: 20px + padding-top: 20px + .photo_attachments + padding-bottom: 10px + img + display: block + margin-left: auto + margin-right: auto + padding-bottom: 5px + max-width: 90% + #single-post-interactions #likes, #reshares, #comments-meta padding-bottom: 5px @@ -13,4 +28,14 @@ border-bottom: solid 1px #ccc padding-top: 10px padding-bottom: 10px + p + margin: 0 + textarea + width: 95% + a + color: #3f8fba + .timeago + color: #aaaaaa + text-decoration: none + font-size: smaller diff --git a/app/assets/templates/single-post-viewer/single-post-actions_tpl.jst.hbs b/app/assets/templates/single-post-viewer/single-post-actions_tpl.jst.hbs index cd4609447..6dd66978b 100644 --- a/app/assets/templates/single-post-viewer/single-post-actions_tpl.jst.hbs +++ b/app/assets/templates/single-post-viewer/single-post-actions_tpl.jst.hbs @@ -3,20 +3,20 @@
- {{#if userCanReshare}} - + {{#if userReshare}} {{else}} - + {{/if}} {{/if}} diff --git a/app/assets/templates/single-post-viewer/single-post-content_tpl.jst.hbs b/app/assets/templates/single-post-viewer/single-post-content_tpl.jst.hbs index abf755b7e..7c1d8373e 100644 --- a/app/assets/templates/single-post-viewer/single-post-content_tpl.jst.hbs +++ b/app/assets/templates/single-post-viewer/single-post-content_tpl.jst.hbs @@ -1,9 +1,7 @@