* Add tag rules to article v2 editor * Add bottom phrase to tag dropdown * Remove console logs * Remove empty space in css * Remove commented code and clean up css * Add type='button' for a11y
748 lines
16 KiB
SCSS
748 lines
16 KiB
SCSS
@import 'variables';
|
|
|
|
.articleformcontainer {
|
|
padding-top: 80px;
|
|
@media screen and (min-width: 500px) {
|
|
padding-top: calc(90px + 0.2vw);
|
|
}
|
|
|
|
padding-bottom: calc(94px + 2vw);
|
|
}
|
|
|
|
.article-form-video-preview {
|
|
text-align: center;
|
|
padding-top: 60px;
|
|
margin: auto;
|
|
max-width: 880px;
|
|
margin-bottom: -50px;
|
|
.article-form-video-image-url {
|
|
padding-top: 15px;
|
|
font-family: $monospace;
|
|
input {
|
|
padding: 3px;
|
|
font-size: 1em;
|
|
border-radius: 3px;
|
|
border: 1px solid darken($light-medium-gray, 5%);
|
|
border: var(--theme-container-border, 1px solid darken($light-medium-gray, 5%));
|
|
width: 340px;
|
|
margin: 10px;
|
|
&[type='submit'] {
|
|
padding: 3px 8px;
|
|
border: 1px solid $green;
|
|
border-radius: 100px;
|
|
width: 200px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.articleform {
|
|
margin: 0 auto;
|
|
width: 97%;
|
|
max-width: 860px;
|
|
padding: 0px 6px;
|
|
background: white;
|
|
background: var(--theme-container-background, white);
|
|
position: relative;
|
|
box-sizing: border-box;
|
|
border: 1px solid darken($light-medium-gray, 5%);
|
|
border: var(--theme-container-border, 1px solid darken($light-medium-gray, 5%));
|
|
box-shadow: $bold-shadow;
|
|
box-shadow: var(--theme-container-box-shadow, $bold-shadow);
|
|
border-radius: 3px;
|
|
|
|
@media screen and (min-width: 500px) {
|
|
padding: 0px 12px;
|
|
border: 1px solid darken($light-medium-gray, 5%);
|
|
border: var(--theme-container-border, 1px solid darken($light-medium-gray, 5%));
|
|
}
|
|
@media screen and (min-width: 600px) {
|
|
width: calc(97% - 30px);
|
|
}
|
|
@media screen and (min-width: 800px) {
|
|
width: calc(95% - 40px);
|
|
padding: 0px 20px;
|
|
}
|
|
.container {
|
|
border: 1px solid $light-medium-gray;
|
|
}
|
|
.help-guide-title {
|
|
padding-top: 20px;
|
|
h1 {
|
|
background: $yellow;
|
|
background: var(--theme-container-accent-background, $yellow);
|
|
}
|
|
}
|
|
}
|
|
|
|
.articleform__form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
margin-top: 1px;
|
|
}
|
|
|
|
.articleform__errors {
|
|
background: $red;
|
|
color: white;
|
|
font-weight: bold;
|
|
margin-top: 12px;
|
|
border-radius: 3px;
|
|
padding: 15px;
|
|
}
|
|
|
|
.articleform__orgsettings {
|
|
padding: 0px;
|
|
padding-left: 0px;
|
|
margin: 20px 2px 0px;
|
|
font-size: 16px;
|
|
select {
|
|
margin-left: 7px;
|
|
vertical-align: middle;
|
|
}
|
|
@media screen and (min-width: 600px) {
|
|
font-size: 18px;
|
|
padding-left: 10px;
|
|
}
|
|
}
|
|
|
|
.articleform__mainimage {
|
|
text-align: center;
|
|
width: 60%;
|
|
border-radius: 8px;
|
|
background: $light-gray;
|
|
background: var(--theme-background, $light-gray);
|
|
border: 1px solid $light-medium-gray;
|
|
border: var(--theme-container-border, 1px solid $light-medium-gray);
|
|
margin-top: 10px;
|
|
cursor: pointer;
|
|
@media screen and (min-width: 550px) {
|
|
width: 40%;
|
|
}
|
|
@media screen and (min-width: 985px) {
|
|
width: 30%;
|
|
}
|
|
img {
|
|
width: 100%;
|
|
height: calc(28vw - 42px);
|
|
background: #fcfcfc;
|
|
border-radius: 8px;
|
|
@media screen and (min-width: 550px) {
|
|
height: calc(16.8vw - 18px);
|
|
}
|
|
@media screen and (min-width: 985px) {
|
|
height: 111px;
|
|
}
|
|
display: block;
|
|
}
|
|
&:hover {
|
|
opacity: 0.8;
|
|
}
|
|
&.articleform__mainimagepreview {
|
|
border-radius: 0px;
|
|
border: 0px;
|
|
margin-top: 0px;
|
|
border-radius: 3px;
|
|
width: 100%;
|
|
cursor: default;
|
|
img {
|
|
width: 100%;
|
|
height: calc(42vw - 44px);
|
|
border-radius: 3px;
|
|
@media screen and (min-width: 985px) {
|
|
height: 355px;
|
|
}
|
|
}
|
|
&:hover {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
.articleform__title {
|
|
height: 26px;
|
|
width: 99%;
|
|
font-size: 17px;
|
|
border: 0;
|
|
padding: 20px 0px 15px;
|
|
font-weight: 600;
|
|
color: $black;
|
|
color: var(--theme-secondary-color, $black);
|
|
background: white;
|
|
background: var(--theme-container-background, white);
|
|
resize: none;
|
|
@media screen and (min-width: 600px) {
|
|
font-size: 29px;
|
|
height: 50px;
|
|
}
|
|
&::placeholder{
|
|
color:#8f949c;
|
|
color: var(--theme-secondary-color, #8f949c);
|
|
}
|
|
&.articleform__titlepreview {
|
|
height: 26px;
|
|
margin-bottom: 0px;
|
|
margin-top: -3px;
|
|
margin-bottom: 1px;
|
|
@media screen and (min-width: 600px) {
|
|
height: 34px;
|
|
margin-top: 0px;
|
|
margin-bottom: 4px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.articleform__titleTooLong {
|
|
position: relative;
|
|
&::before {
|
|
content: "Title Too Long";
|
|
top: 5px;
|
|
left: 5px;
|
|
position: absolute;
|
|
font-size: 0.8em;
|
|
font-weight: bold;
|
|
}
|
|
.articleform__title {
|
|
background: darken($red, 8%);
|
|
border-radius: 3px;
|
|
}
|
|
}
|
|
|
|
.articleform__detailfields {
|
|
display: flex;
|
|
flex-direction: row;
|
|
position: relative;
|
|
}
|
|
.articleform__tagswrapper {
|
|
display: inline-block;
|
|
flex-grow: 1;
|
|
float: left;
|
|
padding-right: 15px;
|
|
@media screen and (min-width: 500px) {
|
|
padding-right: 0px;
|
|
}
|
|
}
|
|
|
|
.articleform__tags {
|
|
height: 40px;
|
|
width: 100%;
|
|
border-radius: 3px;
|
|
padding: 8px 8px 7px;
|
|
@media screen and (min-width: 500px) {
|
|
width: 98%;
|
|
}
|
|
@media screen and (min-width: 600px) {
|
|
height: 19px;
|
|
border-radius: 100px;
|
|
padding-left: 17px;
|
|
}
|
|
margin-left: -4px;
|
|
resize: none;
|
|
border: 0;
|
|
font-size: 16px;
|
|
font-family: $monospace;
|
|
font-weight: bold;
|
|
background: $light-gray;
|
|
background: var(--theme-background, $light-gray);
|
|
color: $black;
|
|
color: var(--theme-secondary-color, $black);
|
|
}
|
|
|
|
.articleform__tagsoptions {
|
|
position: absolute;
|
|
left: -4px;
|
|
right: 3px;
|
|
top: 50px;
|
|
@media screen and (min-width: 600px) {
|
|
top: 30px;
|
|
left: 8px;
|
|
right: 155px;
|
|
}
|
|
background: white;
|
|
background: var(--theme-container-background, white);
|
|
border: 1px solid $medium-gray;
|
|
box-shadow: $bold-shadow;
|
|
box-shadow: var(--theme-container-box-shadow, $bold-shadow);
|
|
font-family: $monospace;
|
|
z-index: 20;
|
|
}
|
|
.articleform__tagoptionrow {
|
|
padding: 10px;
|
|
font-weight: bold;
|
|
cursor: pointer;
|
|
position: relative;
|
|
&:hover {
|
|
background: lighten($green, 27%);
|
|
background: var(--theme-container-background-hover, lighten($green, 27%));
|
|
color: $black;
|
|
color: var(--theme-color, $black);
|
|
|
|
}
|
|
}
|
|
|
|
.articleform__tagsoptionsbottomrow {
|
|
padding: 12px 10px 10px;
|
|
font-weight: bold;
|
|
cursor: pointer;
|
|
position: relative;
|
|
font-size: 0.7em;
|
|
font-style: italic;
|
|
border-top: 1px solid $medium-gray;
|
|
color: var(--theme-secondary-color, $black);
|
|
}
|
|
|
|
.articleform__tagsoptionrulesbutton {
|
|
position: absolute;
|
|
right: 8px;
|
|
top: 9px;
|
|
border: 0;
|
|
border-radius: 3px;
|
|
background: var(--theme-anchor-color, $sky-blue);
|
|
color: var(--theme-container-background, white);
|
|
font-size: 0.8em;
|
|
width: 100px;
|
|
}
|
|
|
|
.articleform__tagrules--inactive {
|
|
display: none
|
|
}
|
|
|
|
.articleform__tagrules--active {
|
|
font-size: 0.76em;
|
|
max-height: 270px;
|
|
overflow: auto;
|
|
border: 1px solid $medium-gray;
|
|
border-radius: 3px;
|
|
margin-top: 8px;
|
|
padding: 0px 8px;
|
|
}
|
|
|
|
.articleform__tagoptionrow--active {
|
|
background: $green;
|
|
background: var(--theme-container-accent-background, $green);
|
|
color: $black;
|
|
color: var(--theme-color, $black);
|
|
}
|
|
|
|
.articleform__tagoptionsummary {
|
|
color: $medium-gray;
|
|
color: var(--theme-secondary-color, $medium-gray);
|
|
font-weight: 400;
|
|
}
|
|
|
|
.articleform__detailsButton {
|
|
color: $black;
|
|
color: var(--theme-color, $black);
|
|
background: lighten($light-medium-gray, 8%);
|
|
background: var(--theme-container-accent-background, lighten($light-medium-gray, 8%));
|
|
border: 0px;
|
|
border-radius: 300px;
|
|
padding: 3px 18px;
|
|
font-family: $helvetica-condensed;
|
|
font-size: 14.4px;
|
|
height: 34px;
|
|
width: 60px;
|
|
display: none;
|
|
@media screen and (min-width: 600px) {
|
|
display: inline-block;
|
|
}
|
|
margin-left: 25px;
|
|
&:hover {
|
|
background: lighten($purple, 5%);
|
|
background: var(--theme-container-background-hover, lighten($purple, 5%));
|
|
}
|
|
img {
|
|
width: 18px;
|
|
height: 18px;
|
|
vertical-align: -4px;
|
|
display: inline-block;
|
|
filter: invert(100);
|
|
filter: var(--theme-social-icon-invert, invert(0));
|
|
margin-right: 0.3rem;
|
|
}
|
|
&.articleform__detailsButton--moreconfig {
|
|
margin-left: 5px;
|
|
&.articleform__detailsButton--bottom {
|
|
margin-left: 5px;
|
|
width: 50px;
|
|
}
|
|
}
|
|
&.articleform__detailsButton--bottom {
|
|
margin-left: 2px;
|
|
margin-top: 10px;
|
|
margin-bottom: 8px;
|
|
display: inline-block;
|
|
padding: 2px 15px;
|
|
border-radius: 3px;
|
|
width: 110px;
|
|
@media screen and (min-width: 600px) {
|
|
margin-left: -5px;
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
.articleform__form--v1 {
|
|
.articleform__detailsButton--bottom {
|
|
@media screen and (min-width: 600px) {
|
|
display: inline-block;
|
|
}
|
|
}
|
|
}
|
|
|
|
.articleform__description {
|
|
height: 30px;
|
|
}
|
|
|
|
.articleform__body {
|
|
min-height: calc(80vh - 370px);
|
|
width: 98%;
|
|
border: 0;
|
|
font-size: 15px;
|
|
resize: none;
|
|
padding: 20px 6px;
|
|
font-family: $monospace;
|
|
// scrollbars not needed because the preact-textarea-autosize package
|
|
// automatically resizes the article form
|
|
overflow: hidden;
|
|
background: white;
|
|
background: var(--theme-container-background, white);
|
|
color: $black;
|
|
color: var(--theme-secondary-color, $black);
|
|
@media screen and (min-width: 600px) {
|
|
font-size: 18px;
|
|
min-height: calc(85vh - 280px);
|
|
}
|
|
&::placeholder{
|
|
color:#8f949c;
|
|
color: var(--theme-secondary-color, #8f949c);
|
|
}
|
|
}
|
|
.articleform__form--v1 {
|
|
.articleform__body {
|
|
min-height: calc(90vh - 370px);
|
|
@media screen and (min-width: 600px) {
|
|
font-size: 18px;
|
|
min-height: calc(95vh - 280px);
|
|
}
|
|
}
|
|
}
|
|
|
|
.articleform__buttons {
|
|
padding-bottom: 5px;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
text-align: center;
|
|
position: fixed;
|
|
flex-wrap: wrap-reverse;
|
|
bottom: 0px;
|
|
left: 0;
|
|
right: 0;
|
|
background: white;
|
|
background: var(--theme-container-background, white);
|
|
z-index: 20;
|
|
border-top: 1px solid $light-medium-gray;
|
|
border-top: var(--theme-container-border, 1px solid $light-medium-gray);
|
|
|
|
* {
|
|
margin: 4px calc(0.7vw);
|
|
}
|
|
|
|
span {
|
|
display: -webkit-inline-flex;
|
|
display: -ms-inline-flexbox;
|
|
display: inline-flex;
|
|
flex-direction: column;
|
|
max-width: 90%;
|
|
width: 290px;
|
|
@media screen and (min-width: 430px) {
|
|
max-width: 90%;
|
|
width: auto;
|
|
}
|
|
p {
|
|
display: inline-block;
|
|
margin-bottom: 2px;
|
|
font-size: 11px;
|
|
color: $medium-gray;
|
|
color: var(--theme-secondary-color, $medium-gray);
|
|
font-style: italic;
|
|
margin-left: -2px;
|
|
}
|
|
button {
|
|
margin-top: 0px;
|
|
margin-left: -1px;
|
|
}
|
|
.hidden {
|
|
visibility: 'hidden';
|
|
}
|
|
.clear-button {
|
|
// in part from https://css-tricks.com/overriding-default-button-styles/
|
|
display: inline-block;
|
|
border: none;
|
|
margin: 0;
|
|
text-decoration: none;
|
|
background: none;
|
|
border: none;
|
|
box-shadow: none;
|
|
color: $medium-gray;
|
|
color: var(--theme-secondary-color, $medium-gray);
|
|
font-family: sans-serif;
|
|
font-size: 1rem;
|
|
cursor: pointer;
|
|
text-align: center;
|
|
transition: background 250ms ease-in-out, transform 150ms ease;
|
|
-webkit-appearance: none;
|
|
-moz-appearance: none;
|
|
text-decoration: underline;
|
|
margin: 0px;
|
|
padding: 0px;
|
|
cursor: pointer;
|
|
font-size: 12.5px;
|
|
font-style: italic;
|
|
display: inline;
|
|
width: fit-content;
|
|
}
|
|
.clear-button:hover {
|
|
background: none;
|
|
color: #666;
|
|
}
|
|
.clear-button:focus {
|
|
outline: 1px solid #fff;
|
|
outline-offset: -4px;
|
|
}
|
|
|
|
.clear-button:active {
|
|
transform: scale(0.99);
|
|
}
|
|
}
|
|
button,
|
|
a {
|
|
margin-top: 5px;
|
|
margin-bottom: 5px;
|
|
cursor: pointer;
|
|
background: $light-gray;
|
|
background: var(--theme-background, $light-gray);
|
|
font-family: $helvetica-condensed;
|
|
font-size: 14.5px;
|
|
border: 0px;
|
|
border-radius: 113px;
|
|
box-shadow: 2px 2px 8px darken($light-medium-gray, 13%);
|
|
box-shadow: var(--theme-container-box-shadow, 2px 2px 8px darken($light-medium-gray, 13%));
|
|
padding: 6px 13px;
|
|
display: inline-block;
|
|
text-align: center;
|
|
color: $medium-gray;
|
|
color: var(--theme-secondary-color, $medium-gray);
|
|
white-space: nowrap;
|
|
@media screen and (min-width: 430px) {
|
|
margin-top: 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
&:hover {
|
|
background: lighten($green, 24%);
|
|
background: var(--theme-container-accent-background, lighten($green, 24%));
|
|
}
|
|
&:focus {
|
|
background: lighten($green, 29%);
|
|
background: var(--theme-container-accent-background, lighten($green, 29%));
|
|
outline: 0;
|
|
box-shadow: 0px 0px 1px lighten($green, 15%);
|
|
}
|
|
&.active {
|
|
background: $green;
|
|
color: $black;
|
|
}
|
|
&.previewbutt {
|
|
min-width: 95px;
|
|
}
|
|
&.articleform__buttons--small {
|
|
width: 45px;
|
|
border: white;
|
|
}
|
|
&.articleform__buttons--publish {
|
|
background: $bold-blue;
|
|
color: white;
|
|
&:hover {
|
|
opacity: 0.9;
|
|
}
|
|
}
|
|
@media screen and (min-width: 630px) {
|
|
font-size: 15px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.articleform__overlay {
|
|
position: absolute;
|
|
top: 0px;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: $dark-gray;
|
|
color: white;
|
|
padding: 4%;
|
|
box-shadow: $bold-shadow;
|
|
box-shadow: var(--theme-container-box-shadow, $bold-shadow);
|
|
text-align: center;
|
|
border-radius: 3px;
|
|
overflow-y: scroll;
|
|
clipboard-copy {
|
|
cursor: pointer;
|
|
img {
|
|
display: inline-block;
|
|
max-width: 24px;
|
|
margin: -10px 5px;
|
|
position: relative;
|
|
}
|
|
input {
|
|
cursor: pointer;
|
|
}
|
|
|
|
#image-markdown-copy-link-input {
|
|
margin-left: 24px;
|
|
}
|
|
#image-markdown-copy-link-announcer {
|
|
display: block;
|
|
padding-top: 10px;
|
|
|
|
&[hidden] {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
h2 {
|
|
color: $green;
|
|
font-size: 1.9em;
|
|
font-family: $helvetica-condensed;
|
|
}
|
|
p {
|
|
font-size: 0.8em;
|
|
padding: 20px 0px;
|
|
code {
|
|
background: $black;
|
|
padding: 1px 4px;
|
|
border-radius: 3px;
|
|
}
|
|
}
|
|
input[type='file'] {
|
|
width: 90%;
|
|
background: $black;
|
|
padding: 20px;
|
|
border-radius: 3px;
|
|
margin: 20px auto;
|
|
display: block;
|
|
cursor: pointer;
|
|
}
|
|
input[type='text'], textarea {
|
|
width: calc(80% - 20px);
|
|
padding: 10px 20px;
|
|
border-radius: 3px;
|
|
margin: 5px auto 0px;
|
|
display: inline-block;
|
|
border: 0px;
|
|
font-size: 1em;
|
|
@media screen and (min-width: 600px) {
|
|
width: calc(100% - 270px);
|
|
border-top-left-radius: 0px;
|
|
border-bottom-left-radius: 0px;
|
|
margin: 20px auto 0px;
|
|
}
|
|
}
|
|
label {
|
|
margin-top: 20px;
|
|
display: inline-block;
|
|
width: 80%;
|
|
font-weight: bold;
|
|
color: white;
|
|
font-size: 1em;
|
|
background: $medium-gray;
|
|
padding: 10px;
|
|
border-radius: 3px;
|
|
@media screen and (min-width: 600px) {
|
|
width: 180px;
|
|
border-top-right-radius: 0px;
|
|
border-bottom-right-radius: 0px;
|
|
}
|
|
}
|
|
small {
|
|
display: block;
|
|
font-size: 0.8em;
|
|
color: $light-medium-gray;
|
|
text-align: left;
|
|
width: 80%;
|
|
margin: 7px auto;
|
|
font-style: oblique;
|
|
@media screen and (min-width: 600px) {
|
|
width: calc(100% - 40px);
|
|
}
|
|
button {
|
|
margin-left: 5px;
|
|
background: $bold-blue;
|
|
}
|
|
}
|
|
.articleform__exitbutton {
|
|
position: absolute;
|
|
color: white;
|
|
font-size: 37px;
|
|
font-weight: bold;
|
|
left: 1%;
|
|
top: 0%;
|
|
background: transparent;
|
|
border: 0px;
|
|
cursor: pointer;
|
|
}
|
|
button {
|
|
background: $red;
|
|
color: white;
|
|
border: 0px;
|
|
padding: 4px 10px;
|
|
font-size: 14px;
|
|
border-radius: 3px;
|
|
font-weight: bold;
|
|
}
|
|
.articleform__donebutton {
|
|
display: block;
|
|
font-size: 22px;
|
|
background: $green;
|
|
color: $black;
|
|
padding: 10px 40px;
|
|
margin: 20px auto;
|
|
}
|
|
img {
|
|
display: block;
|
|
margin: 10px auto;
|
|
width: 200px;
|
|
height: 84px;
|
|
border-radius: 8px;
|
|
}
|
|
}
|
|
|
|
.articleform__notice {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
padding: 25px 0px;
|
|
color: white;
|
|
background: $green;
|
|
text-align: center;
|
|
font-size: 2em;
|
|
font-weight: bold;
|
|
z-index: 50;
|
|
&.articleform__notice--draft {
|
|
background: $yellow;
|
|
color: $black;
|
|
}
|
|
}
|
|
|
|
.articleform_titlepreviewsmall {
|
|
font-size: calc(1.9vw + 22px) !important;
|
|
@media screen and (min-width: 1600px) {
|
|
font-size: 50px !important;
|
|
}
|
|
}
|
|
|
|
.articleform__uploaderror {
|
|
color: darken($red, 8%);
|
|
font-size: 0.8em;
|
|
}
|