Refactor question styles
- Created styles in component/question - Removed old styles from scss/panel - Moved question partial to question controller resource, as it is only used there, not shared
This commit is contained in:
parent
e8bbf2c2f1
commit
d61fa91f0d
|
@ -100,7 +100,8 @@ $navbar-inverse-toggle-border-color: #512da8;
|
|||
@import
|
||||
"components/avatars",
|
||||
"components/buttons",
|
||||
"components/jumbotron";
|
||||
"components/jumbotron",
|
||||
"components/question";
|
||||
|
||||
body { padding-top: 50px; }
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
.question {
|
||||
&--fixed {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
&--hidden {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
box-shadow: none;
|
||||
z-index: -1;
|
||||
}
|
||||
}
|
|
@ -12,28 +12,3 @@
|
|||
.panel-primary .answerbox--question-text {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#questions .panel-body .media {
|
||||
&, .media-body {
|
||||
overflow: visible;
|
||||
}
|
||||
}
|
||||
|
||||
.panel-question {
|
||||
position: fixed;
|
||||
border-top: 1px solid #fff;
|
||||
width: 100%;
|
||||
z-index: 999;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.panel-question.question-hidden {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
box-shadow: none;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.answerbox--question-media, .question-media, .question-body {
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.card.card-question{class: if hidden then 'question-hidden' end, tabindex: if hidden then '-1' end, aria: { hidden: if hidden then :true end }}
|
||||
.card.question--fixed{class: if hidden then 'question--hidden' end, tabindex: if hidden then '-1' end, aria: { hidden: if hidden then :true end }}
|
||||
.container
|
||||
.card-body
|
||||
.media.question-media
|
|
@ -1,9 +1,7 @@
|
|||
- provide(:title, question_title(@question))
|
||||
= render 'shared/question_header', question: @question, hidden: false
|
||||
= render 'shared/question_header', question: @question, hidden: true
|
||||
= render 'question', question: @question, hidden: false
|
||||
= render 'question', question: @question, hidden: true
|
||||
.container.question-page
|
||||
/ TODO: make this pretty (it's currently C-c'd straight from shared/_answerbox)
|
||||
|
||||
#answers
|
||||
- @answers.each do |a|
|
||||
= render 'answerbox', a: a, show_question: false
|
Loading…
Reference in New Issue