From c7e3f2fc19f46afa8665d060efe40197b9bbe39f Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Mon, 22 Feb 2016 00:08:27 +0100 Subject: [PATCH] Adjust the SPV design --- .../single_post_comment_stream.js | 2 +- .../single_post_content_view.js | 1 + .../single_post_interactions.js | 1 + .../app/views/stream_post_views.js | 2 +- app/assets/stylesheets/base.scss | 1 + app/assets/stylesheets/comments.scss | 3 +- app/assets/stylesheets/single-post-view.scss | 48 +++++-------------- .../templates/comment-stream_tpl.jst.hbs | 2 +- .../single-post-content_tpl.jst.hbs | 8 ++-- .../single-post-interactions_tpl.jst.hbs | 2 +- .../templates/single-post-viewer_tpl.jst.hbs | 2 +- 11 files changed, 27 insertions(+), 45 deletions(-) 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 index ebb0a9dbf..9bf53e3b0 100644 --- 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 @@ -20,7 +20,7 @@ app.views.SinglePostCommentStream = app.views.CommentStream.extend({ postRenderTemplate: function() { app.views.CommentStream.prototype.postRenderTemplate.apply(this); - this.$(".new_comment_form_wrapper").removeClass('hidden'); + this.$(".new-comment-form-wrapper").removeClass("hidden"); _.defer(this.highlightPermalinkComment); }, 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 e2345f985..9d11a3ca9 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 @@ -7,6 +7,7 @@ app.views.SinglePostContent = app.views.Base.extend({ templateName: "single-post-viewer/single-post-content", tooltipSelector: "time, .post_scope", + className: "framed-content", subviews : { "#single-post-actions" : "singlePostActionsView", 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 index b8c4a8661..9549a74a5 100644 --- 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 @@ -3,6 +3,7 @@ app.views.SinglePostInteractions = app.views.Base.extend({ templateName: "single-post-viewer/single-post-interactions", tooltipSelector: ".avatar.micro", + className: "framed-content", subviews: { '#comments': 'commentStreamView' diff --git a/app/assets/javascripts/app/views/stream_post_views.js b/app/assets/javascripts/app/views/stream_post_views.js index 30af6a13a..b298cd0ad 100644 --- a/app/assets/javascripts/app/views/stream_post_views.js +++ b/app/assets/javascripts/app/views/stream_post_views.js @@ -143,7 +143,7 @@ app.views.StreamPost = app.views.Post.extend({ focusCommentTextarea: function(evt){ evt.preventDefault(); - this.$(".new_comment_form_wrapper").removeClass("hidden"); + this.$(".new-comment-form-wrapper").removeClass("hidden"); this.$(".comment_box").focus(); return this; diff --git a/app/assets/stylesheets/base.scss b/app/assets/stylesheets/base.scss index 0993dc8a9..114298043 100644 --- a/app/assets/stylesheets/base.scss +++ b/app/assets/stylesheets/base.scss @@ -18,6 +18,7 @@ body { .page-people.action-show, .page-people.action-contacts, .page-photos, +.page-posts, .page-profiles.action-edit, .page-services.action-index, .page-streams, diff --git a/app/assets/stylesheets/comments.scss b/app/assets/stylesheets/comments.scss index 6f0b9ea5f..0ad5cb838 100644 --- a/app/assets/stylesheets/comments.scss +++ b/app/assets/stylesheets/comments.scss @@ -8,7 +8,8 @@ } .media { margin-top: 10px; } } - .comments > .comment, .comment.new_comment_form_wrapper { + .comments > .comment, + .comment.new-comment-form-wrapper { .avatar { height: 35px; width: 35px; diff --git a/app/assets/stylesheets/single-post-view.scss b/app/assets/stylesheets/single-post-view.scss index 0166d1802..db8272460 100644 --- a/app/assets/stylesheets/single-post-view.scss +++ b/app/assets/stylesheets/single-post-view.scss @@ -3,9 +3,9 @@ } #single-post-content { - border-right: solid 1px #cccccc; - #head { + .head { padding-bottom: 10px; + padding-top: 5px; border-bottom: 1px solid $border-grey; #post-info { .author{ color: $grey; } @@ -26,12 +26,12 @@ .near-from { color: $text-grey; font-size: 12px; - margin: 10px 20px 0px 15px; + margin: 10px 15px 0; } .mapContainer { - margin: 10px 20px 0px 15px; + margin: 10px 15px 0; } - .row.reshare { + .reshare { border-top: 1px solid lighten($border-grey,5%); padding-top: 10px; margin-top: 10px; @@ -99,44 +99,16 @@ } } - #body { - margin-left: 20px; - padding-top: 20px; - width: auto; - - #real-post-content div.reshare { - border-left: 2px solid #DDD; - padding-left: 10px; - } + .body { + padding: 20px 15px; .nsfw-off { display: none; } .nsfw-shield { display: none; } - .oembed { width: 95%; } - .photo_attachments { - img.big_stream_photo { max-width: 90%; } - } } } #single-post-interactions { - border-left: 1px solid #cccccc; - position: relative; - left: -1px; - margin-left: 0; - padding-left: 15px; - - .comment.media .img { - margin-left: 5px; - } - - .no_comments { - padding-top: 10px; - padding-bottom: 10px; - background-color: $background-grey; - text-align: center; - border-radius: 4px; - margin-bottom: 30px; - } + .no-comments { text-align: center; } a { color: $blue; @@ -161,4 +133,8 @@ img{ display: inline; } } + .comments > .comment, + .comment.new-comment-form-wrapper { + padding: 10px; + } } diff --git a/app/assets/templates/comment-stream_tpl.jst.hbs b/app/assets/templates/comment-stream_tpl.jst.hbs index ac8f118e4..1bbf98bba 100644 --- a/app/assets/templates/comment-stream_tpl.jst.hbs +++ b/app/assets/templates/comment-stream_tpl.jst.hbs @@ -11,7 +11,7 @@
{{#if loggedIn}} -