mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-19 10:16:03 +01:00
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
5 changed files with 19 additions and 31 deletions
|
@ -100,7 +100,8 @@ $navbar-inverse-toggle-border-color: #512da8;
|
||||||
@import
|
@import
|
||||||
"components/avatars",
|
"components/avatars",
|
||||||
"components/buttons",
|
"components/buttons",
|
||||||
"components/jumbotron";
|
"components/jumbotron",
|
||||||
|
"components/question";
|
||||||
|
|
||||||
body { padding-top: 50px; }
|
body { padding-top: 50px; }
|
||||||
|
|
||||||
|
|
14
app/assets/stylesheets/components/_question.scss
Normal file
14
app/assets/stylesheets/components/_question.scss
Normal file
|
@ -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 {
|
.panel-primary .answerbox--question-text {
|
||||||
color: #fff;
|
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
|
.container
|
||||||
.card-body
|
.card-body
|
||||||
.media.question-media
|
.media.question-media
|
|
@ -1,9 +1,7 @@
|
||||||
- provide(:title, question_title(@question))
|
- provide(:title, question_title(@question))
|
||||||
= render 'shared/question_header', question: @question, hidden: false
|
= render 'question', question: @question, hidden: false
|
||||||
= render 'shared/question_header', question: @question, hidden: true
|
= render 'question', question: @question, hidden: true
|
||||||
.container.question-page
|
.container.question-page
|
||||||
/ TODO: make this pretty (it's currently C-c'd straight from shared/_answerbox)
|
|
||||||
|
|
||||||
#answers
|
#answers
|
||||||
- @answers.each do |a|
|
- @answers.each do |a|
|
||||||
= render 'answerbox', a: a, show_question: false
|
= render 'answerbox', a: a, show_question: false
|
Loading…
Reference in a new issue