mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-01 11:28:15 -05:00
a737090442
- add User.staff scope - inject MessageBus into Ember views (so it can be used by the poll plugin) - REFACTOR: use more accurate is_first_post? method instead of post_number == 1 - FEATURE: add support for JSON-typed custom fields - FEATURE: allow plugins to add validation - FEATURE: add post_custom_fields to PostSerializer - FEATURE: allow plugins to whitelist post_custom_fields - FIX: don't bump when post did not save successfully - FEATURE: polls are supported in any post - FEATURE: allow for multiple polls in the same post - FEATURE: multiple choice polls - FEATURE: rating polls - FEATURE: new dialect allowing users to preview polls in the composer
105 lines
1.9 KiB
SCSS
105 lines
1.9 KiB
SCSS
div.poll {
|
|
|
|
ul, ol {
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
display: inline-block;
|
|
max-width: 90%;
|
|
}
|
|
|
|
li, .option {
|
|
cursor: pointer;
|
|
font-size: 1.125em;
|
|
line-height: 2;
|
|
}
|
|
|
|
li[data-poll-option-id] {
|
|
color: $secondary;
|
|
background: $primary;
|
|
padding: 0 .8em;
|
|
margin-bottom: .7em;
|
|
border-radius: .25rem;
|
|
box-shadow: inset 0 -.2em 0 0 rgba(0,0,0,.2),
|
|
inset 0 0 0 100px rgba(0,0,0,0),
|
|
0 .2em 0 0 rgba(0,0,0,.2);
|
|
|
|
&:hover {
|
|
box-shadow: inset 0 -.2em 0 0 rgba(0,0,0,.25),
|
|
inset 0 0 0 100px rgba(0,0,0,.1),
|
|
0 .2em 0 0 rgba(0,0,0,.2);
|
|
}
|
|
|
|
&:active {
|
|
-webkit-transform: translate(0,2px);
|
|
transform: translate(0,2px);
|
|
box-shadow: inset 0 -.1em 0 0 rgba(0,0,0,.25),
|
|
inset 0 0 0 100px rgba(0,0,0,.1),
|
|
0 .1em 0 0 rgba(0,0,0,.2);
|
|
}
|
|
|
|
&[data-poll-selected="selected"] {
|
|
background: green !important;
|
|
}
|
|
}
|
|
|
|
.button {
|
|
display: inline-block;
|
|
padding: 6px 12px;
|
|
margin-right: 5px;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
color: $primary;
|
|
background: dark-light-diff($primary, $secondary, 90%, -65%);
|
|
|
|
&:hover {
|
|
background: dark-light-diff($primary, $secondary, 65%, -75%);
|
|
color: #fff;
|
|
}
|
|
}
|
|
|
|
.poll-container {
|
|
margin: 0;
|
|
span {
|
|
font-size: 1.125em;
|
|
line-height: 2
|
|
}
|
|
}
|
|
|
|
.results {
|
|
|
|
.option {
|
|
max-width: 90%;
|
|
padding-right: 1.6em;
|
|
}
|
|
|
|
.percentage {
|
|
width: 10%;
|
|
font-size: 1.7em;
|
|
text-align: right;
|
|
vertical-align: middle;
|
|
color: #9E9E9E;
|
|
}
|
|
|
|
.bar-back {
|
|
background: rgb(219,219,219);
|
|
}
|
|
|
|
.bar {
|
|
height: 10px;
|
|
background: $primary;
|
|
transition: all 0.25s;
|
|
}
|
|
|
|
}
|
|
|
|
&[data-poll-type="number"] {
|
|
|
|
li {
|
|
display: inline-block;
|
|
margin-right: .7em;
|
|
}
|
|
|
|
}
|
|
|
|
}
|