From bd3564d6f3ef50eeb455e56a6f6892c16009a236 Mon Sep 17 00:00:00 2001 From: pixeldesu Date: Mon, 27 Apr 2015 19:36:02 +0200 Subject: [PATCH] center question on question page --- app/views/question/show.html.haml | 59 ++++++++++++++++--------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/app/views/question/show.html.haml b/app/views/question/show.html.haml index 45b572b0..3f4eb9bb 100644 --- a/app/views/question/show.html.haml +++ b/app/views/question/show.html.haml @@ -1,33 +1,34 @@ .panel.panel-question - .panel-body - .media.question-media - - unless @question.author_is_anonymous - %a.pull-left{href: show_user_profile_path(@question.user.screen_name)} - %img.img-rounded.answerbox--img{src: gravatar_url(@question.user)} - .media-body.question-body - - if user_signed_in? - .pull-right - .btn-group - %button.btn.btn-link.btn-sm.dropdown-toggle{data: { toggle: :dropdown }, aria: { expanded: :false }} - %span.caret - %ul.dropdown-menu.dropdown-menu-right{role: :menu} - - if current_user.mod? or @question.user == current_user - %li.text-danger - %a{href: '#', data: { action: 'ab-question-destroy', q_id: @question.id, redirect: if @question.author_is_anonymous? then "/" else show_user_questions_path(@question.user.screen_name) end }} - %i.fa.fa-trash-o - Delete Question - - unless @question.user == current_user - %li - %a{href: '#', data: { action: 'ab-question-report', q_id: @question.id }} - %i.fa.fa-exclamation-triangle - Report - %h6.text-muted.media-heading.answerbox--question-user - = user_screen_name @question.user, @question.author_is_anonymous - asked - %span{title: @question.created_at, data: { toggle: :tooltip, placement: :bottom }} - = time_ago_in_words(@question.created_at) - ago - %p.answerbox--question-text= @question.content + .container + .panel-body + .media.question-media + - unless @question.author_is_anonymous + %a.pull-left{href: show_user_profile_path(@question.user.screen_name)} + %img.img-rounded.answerbox--img{src: gravatar_url(@question.user)} + .media-body.question-body + - if user_signed_in? + .pull-right + .btn-group + %button.btn.btn-link.btn-sm.dropdown-toggle{data: { toggle: :dropdown }, aria: { expanded: :false }} + %span.caret + %ul.dropdown-menu.dropdown-menu-right{role: :menu} + - if current_user.mod? or @question.user == current_user + %li.text-danger + %a{href: '#', data: { action: 'ab-question-destroy', q_id: @question.id, redirect: if @question.author_is_anonymous? then "/" else show_user_questions_path(@question.user.screen_name) end }} + %i.fa.fa-trash-o + Delete Question + - unless @question.user == current_user + %li + %a{href: '#', data: { action: 'ab-question-report', q_id: @question.id }} + %i.fa.fa-exclamation-triangle + Report + %h6.text-muted.media-heading.answerbox--question-user + = user_screen_name @question.user, @question.author_is_anonymous + asked + %span{title: @question.created_at, data: { toggle: :tooltip, placement: :bottom }} + = time_ago_in_words(@question.created_at) + ago + %p.answerbox--question-text= @question.content .container.question-page / TODO: make this pretty (it's currently C-c'd straight from shared/_answerbox)