docbrown/app/assets/stylesheets/moderators.scss
Arit Amana 4f476c1c5a
[deploy] Fix Mod Center v1 bugs post-launch (#8883)
* Fix article heading color on dark themes

* Fix hash shoing when no article tags

* Truncate article titles at 60 characters

* Add tests for bug fixes, make sundry corrections

* Refactor tests

* Truncate title with CSS instead of JS

* Use crayons tag over custom tag

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* Add specific height to fix weird anchor tag issues

* Add explicit pointer when hovering

Co-authored-by: Zhao-Andy <17884966+Zhao-Andy@users.noreply.github.com>
Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
2020-06-26 11:50:55 -04:00

728 lines
15 KiB
SCSS

@import 'variables';
@import 'mixins';
@import 'config/import';
.mod-center-heading {
margin-bottom: var(--su-6);
}
.mod-index-container {
.mod-index-header {
background-color: var(--base-inverted);
border-radius: var(--radius) var(--radius) 0 0;
border-bottom: 1px solid var(--base-10);
padding: var(--su-6) var(--su-4);
.tag-view {
color: var(--base-90);
}
}
.mod-index-list-header {
display: grid;
grid-template-columns: 4fr 2fr 1fr;
background-color: var(--base-0);
border: solid var(--base-10);
border-width: 1px 0;
h2 {
padding: var(--su-2) var(--su-4);
color: var(--base-50);
}
}
.mod-index-list {
margin: 0;
width: 100%;
.moderation-articles-list {
.moderation-single-article {
width: 100%;
background-color: var(--base-inverted);
text-align: left;
padding: var(--su-4);
border: solid var(--base-10);
border-width: 1px 0;
display: grid;
grid-template-columns: 4fr 2fr 1fr;
.article-title {
color: var(--base-90);
min-width: 0;
header > h3 {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
.mod-article-tag {
color: var(--base-80);
padding-right: var(--su-2);
.article-hash-tag {
color: var(--base-40);
}
}
.article-author {
color: var(--base-80);
padding-left: var(--su-4);
}
.article-published-at {
color: var(--base-90);
padding-left: var(--su-6);
}
.article-iframes-container {
border-radius: var(--radius);
margin-top: var(--su-3);
grid-column-start: 1;
grid-column-end: 4;
width: 100%;
display: flex;
&.opened {
border: 1px solid var(--base-20);
}
iframe {
border: none;
}
.article-iframe {
width: 100%;
height: 650px; // height is arbitrary, will be removed for modal-esque view
}
.actions-panel-iframe {
width: 60%;
height: 650px; // height is arbitrary, will be removed for modal-esque view
}
}
}
}
}
}
// these styles are to correct height and margin issues in the iframe
.moderations-actions_panel {
min-height: initial;
height: 100%;
#page-content-inner {
margin-bottom: 0;
height: 100%;
}
}
.mod-container {
display: flex;
flex-direction: column;
background-color: var(--base-0);
border: none;
box-shadow: none;
margin-bottom: 0;
height: 100%;
.circle {
border-radius: 100%;
&.centered-icon {
display: flex;
align-items: center;
justify-content: center;
}
}
header {
&.top-header {
background-color: var(--base-inverted);
padding: var(--su-4) var(--su-4) 0;
display: flex;
flex-direction: column;
}
&.other-things {
padding: var(--su-4);
h1 {
text-transform: uppercase;
font-size: var(--fs-s);
}
}
h1 {
font-size: var(--fs-l);
font-weight: var(--fw-bold);
}
h2 {
font-size: var(--fs-base);
font-weight: var(--fw-normal);
color: var(--base-70);
}
button.close-actions-panel {
position: absolute;
right: var(--su-4);
top: var(--su-4);
}
}
.reactions-container {
padding: var(--su-4);
background-color: var(--base-inverted);
}
.thumb-reactions-container {
display: grid;
grid-gap: var(--su-4);
grid-template-columns: 1fr 1fr;
}
.reaction-button {
position: relative;
background: transparent;
border-color: transparent;
border: 0;
display: flex;
flex-direction: column;
align-items: center;
height: var(--su-10);
padding: var(--su-4) var(--su-6);
border-radius: var(--radius);
&:hover {
background: rgba(59, 73, 223, 0.05);
}
&:hover .reaction-button-circle {
border-color: var(--accent-brand);
}
}
.reaction-button-circle {
position: relative;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto;
width: var(--su-9);
height: var(--su-9);
border: solid 2px var(--base-20);
border-radius: 100%;
background: var(--base-inverted);
img {
width: var(--su-7);
}
.reaction-checkmark {
opacity: 0;
position: absolute;
bottom: 0;
right: 0;
width: var(--su-5);
height: var(--su-5);
display: flex;
align-items: center;
justify-content: center;
background-color: var(--accent-success);
border-radius: 100%;
border: 2px solid var(--base-inverted);
padding: 2px;
color: var(--base-inverted);
}
}
.vote-text {
font-weight: var(--fw-bold);
font-size: var(--fs-base);
line-height: var(--lh-base);
margin-top: var(--su-2);
color: var(--base-90);
white-space: nowrap;
}
.reaction-vomit-button {
display: flex;
align-items: center;
justify-content: center;
border: none;
background: var(--base-inverted);
height: var(--su-7);
padding: var(--su-1) var(--su-2);
margin: var(--su-4) auto;
border-radius: var(--radius);
img {
margin-right: var(--su-2);
width: var(--su-6);
height: var(--su-6);
}
span {
font-weight: var(--fw-medium);
font-size: var(--fs-s);
line-height: var(--lh-tight);
color: var(--base-90);
&:after {
content: 'Flag to Admins';
}
}
.vomit-checkmark {
width: var(--su-5);
height: auto;
font-weight: var(--fw-heavy);
margin-left: var(--su-2);
color: var(--accent-brand);
display: none;
}
&:hover {
background: rgba(59, 73, 223, 0.05);
}
}
.how-this-works-section {
font-weight: var(--fw-medium);
font-size: var(--fs-xs);
line-height: var(--lh-base);
letter-spacing: -0.02em;
color: var(--base-70);
cursor: pointer;
padding: var(--su-4) var(--su-3);
display: flex;
justify-content: center;
align-items: center;
svg {
width: var(--su-4);
height: var(--su-4);
padding: var(--su-1);
path {
fill: var(--base-70);
}
}
}
.reaction-button.reacted {
background: var(--accent-brand);
.reaction-button-circle {
border-color: var(--accent-brand-lighter);
}
.vote-text {
color: var(--base-inverted);
}
.reaction-checkmark {
opacity: 100;
}
}
.reaction-vomit-button.reacted {
background: rgba(59, 73, 223, 0.1);
.vomit-checkmark {
display: inline;
}
span {
color: var(--accent-brand);
&:after {
content: 'Flagged to Admins';
}
}
}
.reaction-button .reacted-emoji,
.reaction-vomit-button .reacted-emoji {
display: none;
}
.reaction-button.reacted .emoji-grey,
.reaction-vomit-button.reacted .emoji-grey {
display: none;
}
.reaction-button.reacted .reacted-emoji,
.reaction-vomit-button.reacted .reacted-emoji {
display: block;
}
.other-things-container {
border-top: 1px solid var(--base-20);
overflow-y: auto;
button.other-things-btn {
background: inherit;
border: none;
padding: var(--su-3) var(--su-4);
width: 100%;
display: flex;
justify-content: space-between;
.label-wrapper {
display: flex;
align-items: center;
.icon {
background-color: var(--base-20);
width: 40px;
height: 40px;
}
header {
text-align: left;
margin-left: var(--su-3);
display: flex;
flex-direction: column;
width: 240px;
h2 {
color: var(--base-100);
font-size: var(--fs-base);
font-weight: var(--fw-medium);
}
h3 {
color: var(--base-70);
font-size: var(--fs-s);
font-weight: var(--fw-normal);
}
}
}
.toggle-chevron-container {
width: 16px;
height: 16px;
display: flex;
align-items: center;
justify-content: center;
align-self: center;
transition-duration: 0.4s;
svg {
fill: var(--base-80);
}
&.rotated {
transform: rotateZ(-180deg);
}
}
&:hover {
background-color: var(--base-inverted);
.label-wrapper > .icon {
background-color: var(--accent-brand);
svg {
fill: var(--base-inverted);
}
}
header h2 {
color: var(--accent-brand);
}
}
&.active {
header h2 {
font-weight: var(--fw-bold);
}
}
&.inactive:not(.active) {
header h2 {
color: var(--base-50);
}
header h3 {
color: var(--base-40);
}
.icon {
background-color: var(--base-20);
svg {
fill: var(--base-50);
}
}
.toggle-chevron-container > svg {
fill: var(--base-60);
}
}
}
.dropdown-options {
display: flex;
flex-direction: column;
padding: 0 var(--su-4);
transition-duration: 1s;
}
.adjust-tags-options {
.add-tag-container {
padding: var(--su-2) var(--su-1);
}
button.adjustable-tag {
background: inherit;
border: none;
padding: var(--su-2) 2px;
font-size: var(--fs-base);
text-align: left;
color: var(--base-80);
font-family: var(--ff-accent);
.num-sign {
color: var(--base-40);
padding-left: 2px;
}
.adjustment-icon {
width: 24px;
height: 24px;
float: right;
margin-right: 2px;
&.subtract {
background: var(--accent-danger);
}
&.plus {
background: var(--accent-success-darker);
}
svg > path {
fill: var(--base-inverted);
}
}
&:hover {
background: rgba(59, 73, 223, 0.05);
}
&.active {
background: rgba(59, 73, 223, 0.05);
}
// &.selected {}
}
.adjustment-reason-container {
display: flex;
flex-direction: column;
padding: var(--su-1);
textarea {
margin-bottom: var(--su-2);
}
}
}
.set-experience-options {
button.level-rating-button {
background: inherit;
border: none;
padding: var(--su-2) 0.125rem;
width: 100%;
display: flex;
justify-content: space-between;
&:hover {
background: rgba(59, 73, 223, 0.05);
}
.level-rating-content {
display: flex;
.level-rating-number {
display: flex;
align-items: center;
justify-content: center;
font-weight: var(--fw-heavy);
font-size: var(--fs-base);
line-height: var(--lh-base);
color: var(--base-100);
width: var(--su-6);
}
.level-rating-text {
font-weight: var(--fw-normal);
font-size: var(--fs-base);
line-height: var(--lh-base);
color: var(--base-90);
}
}
svg {
color: var(--accent-brand);
width: var(--su-5);
height: auto;
margin-right: var(--su-2);
align-self: center;
display: none;
}
}
.level-rating-button.selected {
background: rgba(59, 73, 223, 0.05);
svg {
display: inline;
}
}
}
}
.bottom-actions {
display: flex;
justify-content: center;
padding-bottom: var(--su-4);
margin-top: auto;
button {
display: initial;
font-size: var(--fs-base);
color: var(--accent-brand);
border: none;
background: none;
}
}
h2 {
a {
color: var(--body-color);
}
}
p {
width: 98%;
max-width: 720px;
margin: 1.3em auto;
font-size: 0.9em;
}
hr {
margin: 30px auto;
width: 80%;
max-width: 400px;
opacity: 0.3;
}
#error_explanation {
margin: 10px auto 5px;
box-sizing: border-box;
}
@media screen and (min-width: 880px) {
margin: 90px auto;
border-radius: 12px;
}
.tag-mod-form {
border-top: 1px solid #dddddd;
margin: 42px auto;
.level-rating-button.article-mod-page.selected {
background: #9bebff;
}
}
.tag-mod-form ul {
text-align: left;
font-size: 15px;
}
.tag-mod-form form {
width: 500px;
margin: auto;
max-width: 90%;
}
.tag-mod-form form input {
width: 100%;
padding: 5px;
font-size: 20px;
margin-bottom: 5px;
border-radius: 3px;
box-sizing: border-box;
border: 1px solid var(--card-color-tertiary);
}
.tag-mod-form form input[type='submit'] {
background: $dark-purple;
color: white;
font-weight: bold;
padding: 16px 0px;
margin: auto;
display: block;
border-radius: 3px;
font-size: 1.3em;
font-family: $helvetica-condensed;
}
#undo {
width: 1.5rem;
font-size: 1.1em;
display: inline-block;
color: $red;
background: transparent;
border: 0px;
}
.tag-mod-form form textarea {
box-sizing: border-box;
width: 100%;
padding: 5px;
font-size: 17px;
height: 100px;
box-sizing: boder-box;
border-radius: 3px;
border: 1px solid var(--card-color-tertiary);
}
input.undo {
background: $red;
}
.tag-mod-addition-radio {
padding: 5px 20px;
border-radius: 3px;
border: 1px solid var(--card-color-tertiary);
display: inline-block;
margin: 30px auto 10px;
min-width: 205px;
box-sizing: boder-box;
position: relative;
}
.tag-mod-form input[type='radio'] {
position: absolute;
cursor: pointer;
top: 7px;
}
.tag-mod-form input[type='radio'] + label {
display: inline-block;
cursor: pointer;
font-weight: bold;
padding-left: 25px;
padding-right: 25px;
font-size: 22px;
margin: auto;
margin-left: 4px;
}
.tag-mod-form input[type='radio']:checked + label {
@include themeable(
background,
theme-container-accent-background,
$light-green
);
border-radius: 3px;
}
.tag-mod-form select {
display: block;
font-size: 20px;
padding: 12px;
font-weight: bold;
margin: auto;
border: solid 2px;
margin: 5px auto 15px;
}
.approval-button {
font-size: 20px;
border: 0px;
border-radius: 3px;
padding: 8px 16px;
&.approval-removal {
background: $red;
}
}
}
.mod-link {
display: inline-block;
font-size: 1.3em;
padding: 3px 8px;
border-radius: 3px;
}
.mod-center-section-title {
padding: var(--su-2);
&.resources {
margin-top: var(--su-7);
}
}
.mod-center-inbox {
.inbox-tags {
display: flex;
justify-content: space-between;
padding-left: var(--su-3);
padding-right: var(--su-3);
}
}
#mod-center-other-options svg {
width: var(--su-3);
height: var(--su-3);
&:hover {
cursor: pointer;
}
}
.mod-feedback {
margin-top: var(--su-6);
margin-left: var(--su-3);
}