diff --git a/app/assets/stylesheets/base/layout.scss b/app/assets/stylesheets/base/layout.scss
index ec5ee96fc..a6267ad7e 100644
--- a/app/assets/stylesheets/base/layout.scss
+++ b/app/assets/stylesheets/base/layout.scss
@@ -82,6 +82,18 @@
width: 100%;
}
}
+
+ &--inverted {
+ .crayons-layout__sidebar-right {
+ order: -1;
+ }
+ @media (min-width: $breakpoint-m) {
+ --layout: var(--layout-content-width) var(--layout-sidebar-left-width);
+ .crayons-layout__sidebar-right {
+ order: 1;
+ }
+ }
+ }
}
.crayons-layout--3-cols {
diff --git a/app/assets/stylesheets/listings.scss b/app/assets/stylesheets/listings.scss
index 11e9c4671..21a6316ca 100644
--- a/app/assets/stylesheets/listings.scss
+++ b/app/assets/stylesheets/listings.scss
@@ -1,230 +1,6 @@
@import 'variables';
@import 'mixins';
-.listings-container {
- &.listings-form-container {
- form {
- margin: 60px auto 0px;
- width: 100%;
- max-width: 580px;
- background: var(--card-bg);
- box-sizing: border-box;
- border: 1px solid var(--card-color-tertiary);
- @media screen and (min-width: 580px) {
- border-radius: 8px;
- margin: 20px auto 20px;
- }
- * {
- box-sizing: border-box;
- }
- header {
- padding: 25px 22px;
- border-top-left-radius: 8px;
- border-top-right-radius: 8px;
- }
- .listing-form-inner,
- .listings-form-inner {
- padding: 0px 15px 40px;
- @media screen and (min-width: 580px) {
- padding: 0px 15px 18px;
- }
- }
- .listing-back-button {
- font-size: 0.8em;
- margin: 2px 0px 8px;
- display: block;
- }
- h2 {
- font-size: 1.45em;
- color: var(--accent-brand);
- margin: 0px;
- }
- .listing-errors {
- background: $red;
- color: $black;
- padding: 20px;
- border-radius: 3px;
- h2 {
- color: $black;
- }
- }
- label {
- display: inline-block;
- font-size: 0.7em;
- margin: 12px 0px 3px;
- border-radius: 3px;
- padding: 6px 0px;
- font-weight: bold;
- }
- input {
- width: 100%;
- font-size: 18px;
- padding: 10px 7px;
- border-radius: 3px;
- border: 1px solid var(--form-border);
- background: var(--form-bg);
- color: var(--body-color);
- &[type='checkbox'] {
- width: 100px;
- }
- }
- textarea {
- width: 100%;
- height: 300px;
- padding: 5px;
- font-size: 17px;
- border-radius: 3px;
- background: var(--form-bg);
- color: var(--body-color);
- border: 1px solid var(--form-border);
- }
- select {
- width: 100%;
- font-size: 20px;
- }
- details {
- cursor: pointer;
- font-size: 0.8em;
- padding: 8px 0px;
- color: var(--card-color-tertiary);
- }
- .cta-main-listing-form {
- border: 0px;
- padding: 12px 0px;
- border-radius: 3px;
- background-color: $dark-purple;
- background-image: linear-gradient(
- 141deg,
- $dark-purple 0%,
- #1f89db 51%,
- #2981e5 75%
- );
- border-radius: 100px;
- font-size: 1.4em;
- color: white;
- margin-top: 20px;
- width: 380px;
- max-width: 90%;
- margin: 35px auto;
- display: block;
- text-align: center;
- @include themeable(
- box-shadow,
- theme-container-box-shadow,
- 2px 2px 8px darken($light-medium-gray, 5%)
- );
- &.cta-draft {
- color: $black;
- background: $yellow;
- }
- }
- .listings-current-credits {
- position: fixed;
- bottom: 0px;
- left: 0px;
- right: 0px;
- padding: 18px 0px;
- background-color: #aecfef;
- background-image: linear-gradient(
- 141deg,
- #aecfef 0%,
- #ddeeff 51%,
- #c8ebf1 75%
- );
- color: #32325d;
- text-align: center;
- z-index: 20;
- font-size: 0.85em;
- .listings-current-credits-inner {
- display: inline-block;
- margin: 20px;
- select {
- width: initial;
- }
- }
- a {
- text-decoration: underline;
- display: inline-block;
- color: var(--link-brand-color);
- }
- @media screen and (min-width: 580px) {
- font-size: 1.1em;
- }
- }
- .listings-unpublish {
- background: $red;
- }
- p {
- font-size: 0.8em;
- color: var(--card-color-tertiary);
- }
- }
- }
-}
-
-.listingform__bodymarkdown {
- width: 100%;
- height: 300px;
- padding: 5px;
- font-size: 17px;
- border-radius: 3px;
- background: var(--card-bg);
- margin-top: 10px;
- color: var(--body-color);
- border: 1px solid $light-medium-gray;
-}
-
-.listingform__tagsoptions {
- border: 1px solid var(--card-color-tertiary);
- border-bottom-left-radius: 3px;
- border-bottom-right-radius: 3px;
-}
-
-.listingform__tagoptionrow {
- padding: 10px;
- cursor: pointer;
- position: relative;
- &:hover {
- background: lighten($green, 27%);
- color: $black;
- }
-}
-
-.listingform__tagsoptionsbottomrow,
-.listingform__tagsoptionrulesbutton,
-.listingform__tagrules--inactive {
- display: none; //not yet fully functional or relevant
-}
-
-.listingform__tagoptionrow--active {
- background: $green;
- color: $black;
- &:hover {
- background: darken($green, 10%);
- }
-}
-
-.listingform__label {
- width: 100%;
- display: inline-block;
- font-size: 0.7em;
- margin: 8px 0px 3px 0px;
- border-radius: 3px;
- padding: 6px 0px;
- font-weight: bold;
-}
-
-.listings-modal-background {
- z-index: 15;
- position: fixed;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.8);
- user-select: none;
-}
-
.dashboard-listings-container {
width: 800px;
max-width: 96%;
diff --git a/app/assets/stylesheets/views/article-form.scss b/app/assets/stylesheets/views/article-form.scss
index f9d9f9fde..04d236b04 100644
--- a/app/assets/stylesheets/views/article-form.scss
+++ b/app/assets/stylesheets/views/article-form.scss
@@ -261,10 +261,8 @@
}
&__tagname {
- font-family: var(--ff-monospace);
color: var(--base-90);
- letter-spacing: -0.05em;
- font-weight: bold;
+ font-weight: var(--fw-medium);
}
&__tagoptionrow {
diff --git a/app/assets/stylesheets/views/listings.scss b/app/assets/stylesheets/views/listings.scss
index 17e550b94..aca9603a0 100644
--- a/app/assets/stylesheets/views/listings.scss
+++ b/app/assets/stylesheets/views/listings.scss
@@ -35,3 +35,59 @@
color: var(--card-color-tertiary);
}
}
+
+// New/Edit Listing form
+// Tags dropdown
+// TODO: componetize styling..
+
+.listingform {
+ &__tagsoptions {
+ @include generate-box(
+ $level: 2,
+ $bg: var(--card-bg),
+ $border: var(--card-color),
+ $color: var(--card-color)
+ );
+
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: calc(100%);
+ z-index: 100;
+ padding: var(--su-1);
+ left: calc(var(--su-1) * -1);
+ right: calc(var(--su-1) * -1);
+ }
+
+ &__tagname {
+ color: var(--base-90);
+ font-weight: var(--fw-medium);
+ }
+
+ &__tagoptionrow {
+ cursor: pointer;
+ color: var(--link-color);
+ padding: var(--su-3);
+
+ &:hover {
+ background: var(--link-bg-hover);
+ .crayons-tag {
+ color: var(--link-color-hover);
+ }
+ }
+
+ &--active {
+ background: var(--link-bg-hover);
+ .crayons-article-form__tagname {
+ color: var(--link-color-hover);
+ }
+ }
+ }
+
+ &__tagrules,
+ &__tagsoptionrulesbutton,
+ &__tagsoptionsbottomrow,
+ &__tagrules--inactive {
+ display: none;
+ }
+}
diff --git a/app/javascript/listings/__tests__/BodyMarkdown.test.jsx b/app/javascript/listings/__tests__/BodyMarkdown.test.jsx
index 399e1b8db..36b6aa1fa 100644
--- a/app/javascript/listings/__tests__/BodyMarkdown.test.jsx
+++ b/app/javascript/listings/__tests__/BodyMarkdown.test.jsx
@@ -29,7 +29,7 @@ describe('