diff --git a/app/assets/images/copy.svg b/app/assets/images/copy.svg new file mode 100644 index 000000000..9ed6bfef1 --- /dev/null +++ b/app/assets/images/copy.svg @@ -0,0 +1 @@ + diff --git a/app/assets/stylesheets/base/layout.scss b/app/assets/stylesheets/base/layout.scss new file mode 100644 index 000000000..2c0b2c612 --- /dev/null +++ b/app/assets/stylesheets/base/layout.scss @@ -0,0 +1,33 @@ +@import '../config/import'; + +:root { + --layout-sidebar-width: 200px; + --layout-gap: #{$su-6}; + --layout-padding: #{$su-6}; +} + +.crayons-layout { + font-size: $fs-base; // todo: drop it when ready + width: 100%; + max-width: $site-width; + margin: 0 auto; + + &__sidebar { + } + + &__content { + } + + &--max-l { + max-width: $breakpoint-l; + } +} + +.crayons-layout--default { + @media (min-width: $breakpoint-s) { + display: grid; + grid-gap: var(--layout-gap); + grid-template-columns: var(--layout-sidebar-width) 1fr; + padding: var(--layout-padding); + } +} diff --git a/app/assets/stylesheets/components/banners.scss b/app/assets/stylesheets/components/banners.scss new file mode 100644 index 000000000..2e1d10edb --- /dev/null +++ b/app/assets/stylesheets/components/banners.scss @@ -0,0 +1,32 @@ +@import '../config/import'; +@import '../base/boxes'; + +.crayons-banner { + padding: $su-4; + border-bottom: 1px solid; + text-align: center; + font-size: $fs-base; + background: var(--base-90); + color: var(--base-0); + + &--brand { + background: var(--accent-brand); + border-bottom-color: var(--accent-brand-darker); + } + + &--success { + background: var(--accent-success); + border-bottom-color: var(--accent-success-darker); + } + + &--warning { + background: var(--accent-warning); + border-bottom-color: var(--accent-warning-darker); + } + + &--error { + background: var(--accent-danger); + border-bottom-color: var(--accent-danger-darker); + color: var(--body-color-inverted); + } +} diff --git a/app/assets/stylesheets/components/forms.scss b/app/assets/stylesheets/components/forms.scss index c0c587826..0c13180b3 100644 --- a/app/assets/stylesheets/components/forms.scss +++ b/app/assets/stylesheets/components/forms.scss @@ -1,8 +1,9 @@ @import '../config/import'; %form-styling { + --border-width: 1px; background-color: var(--form-bg); - border: 1px solid var(--form-border); + border: var(--border-width) solid var(--form-border); color: var(--body-color); appearance: none; -webkit-appearance: none; @@ -29,7 +30,7 @@ // Text inputs and textareas. .crayons-textfield { line-height: $lh-base; - padding: 0.5em; + padding: calc(0.5em - var(--border-width)) 0.5em; font-family: inherit; font-size: $fs-base; width: 100%; @@ -181,3 +182,20 @@ } } } + + +.crayons-color-selector { + @extend %form-styling; + padding: calc(0.5em - var(--border-width)) 0.5em; + height: 40px; + + &::-webkit-color-swatch-wrapper { + padding: 0; + height: $su-6; + width: $su-6; + } + + &::-webkit-color-swatch { + border: 0; + } +} diff --git a/app/assets/stylesheets/components/rich-selectors.scss b/app/assets/stylesheets/components/rich-selectors.scss new file mode 100644 index 000000000..e69de29bb diff --git a/app/assets/stylesheets/config/_generator.scss b/app/assets/stylesheets/config/_generator.scss index 4d36ea925..6a1737d23 100644 --- a/app/assets/stylesheets/config/_generator.scss +++ b/app/assets/stylesheets/config/_generator.scss @@ -205,7 +205,7 @@ ), ( 'grid-rows', - 'grid-template-columns', + 'grid-template-rows', ( 'none': none, '1': repeat(1, minmax(0, 1fr)), @@ -228,6 +228,13 @@ (), true ), + ( + 'grid-items', + 'justify-items', + ('start': start, 'end': end, 'center': center, 'stretch': stretch), + (), + true + ), ( 'float', 'float', @@ -413,7 +420,15 @@ ( 'w', 'width', - ('0': 0, '25': 25%, '50': 50%, '100': 100%, 'auto': auto, 'full': 100vw, 'max': max-content), + ( + '0': 0, + '25': 25%, + '50': 50%, + '100': 100%, + 'auto': auto, + 'full': 100vw, + 'max': max-content + ), (), true ), @@ -427,6 +442,13 @@ ), ('min-h', 'min-height', ('0': 0, '100': 100%, 'full': 100vh), (), true), ('max-h', 'max-height', ('0': 0, '100': 100%, 'full': 100vh), (), true), + ( + 'max-w', + 'max-width', + ('0': 0, '25': 25%, '50': 50%, '75': 75%, '100': 100%), + (), + true + ), ('m', 'margin', ('auto': auto, 'unset': unset, '0': 0), $spacing-units, true), ('-m', 'margin', $negative-spacing-units, (), true), ( @@ -627,5 +649,6 @@ (), true, null - ) + ), + (null, 'all', ('reset': unset), (), false, null) ); diff --git a/app/assets/stylesheets/config/_import.scss b/app/assets/stylesheets/config/_import.scss index 689b3900e..6af2ca56d 100644 --- a/app/assets/stylesheets/config/_import.scss +++ b/app/assets/stylesheets/config/_import.scss @@ -30,9 +30,9 @@ $colors: ( 'accent-success': var(--accent-success), 'accent-success-darker': var(--accent-success-darker), 'accent-success-lighter': var(--accent-success-lighter), - 'accent-warninig': var(--accent-warning), - 'accent-warninig-darker': var(--accent-warning-darker), - 'accent-warninig-lighter': var(--accent-warning-lighter), + 'accent-warning': var(--accent-warning), + 'accent-warning-darker': var(--accent-warning-darker), + 'accent-warning-lighter': var(--accent-warning-lighter), 'accent-danger': var(--accent-danger), 'accent-danger-darker': var(--accent-danger-darker), 'accent-danger-lighter': var(--accent-danger-lighter), diff --git a/app/assets/stylesheets/crayons.scss b/app/assets/stylesheets/crayons.scss index ae124f04e..e6d7be58d 100644 --- a/app/assets/stylesheets/crayons.scss +++ b/app/assets/stylesheets/crayons.scss @@ -4,8 +4,10 @@ @import 'base/reset'; @import 'base/boxes'; @import 'base/icons'; +@import 'base/layout'; @import 'components/avatars'; +@import 'components/banners'; @import 'components/buttons'; @import 'components/cards'; @import 'components/dropdowns'; diff --git a/app/assets/stylesheets/settings.scss b/app/assets/stylesheets/settings.scss index 6b5a89525..a06e46c19 100755 --- a/app/assets/stylesheets/settings.scss +++ b/app/assets/stylesheets/settings.scss @@ -3,530 +3,6 @@ @import 'functions'; $input-width: 650px; -#page-content.users-edit, -#page-content.chat_channel_memberships-edit, -#page-content.chat_channel_memberships-index, -#page-content.users-update, -#page-content.users-confirm_destroy, -#page-content.organizations-create, -#page-content.organizations-update { - font-family: $helvetica; - #notice { - background: $green; - color: black; - padding: 40px 15px 40px; - text-align: center; - position: relative; - top: 0; - left: 0; - right: 0; - font-weight: 700; - font-size: 1.05em; - &.error-notice { - background: rgba(255, 80, 80, 0.7); - color: white; - } - } - .user-settings-page { - h1, - h3, - p { - margin: 10px 0 !important; - } - width: 900px; - max-width: 94%; - margin: 0 auto; - font-size: 15px; - .finish-notice { - background: rgb(102, 93, 162); - max-width: 95%; - padding: 25px 0px; - text-align: center; - margin: 0px 0px 25px; - color: white; - font-weight: bold; - border-radius: 2px; - .small { - font-size: 13px; - font-weight: 300; - padding: 15px 5px 5px; - line-height: 19px; - } - } - .field-notice { - background: white; - max-width: 95%; - padding: 25px 0px; - text-align: center; - margin: 0px 0px 25px; - color: $black; - font-weight: bold; - border-radius: 2px; - border: 1px solid $light-medium-gray; - box-shadow: $shadow; - .small { - font-size: 13px; - font-weight: 300; - padding: 15px 5px 5px; - line-height: 19px; - } - } - .settings-hub { - border-radius: 3px; - list-style: none; - font-size: 20px; - font-family: $helvetica-condensed; - font-stretch: condensed; - margin: 0px 0px; - line-height: 33px; - padding-left: 4px; - width: 97%; - margin-bottom: 15px; - @media screen and (min-width: 514px) { - width: 90%; - margin: 0px auto; - } - @media screen and (min-width: 835px) { - float: left; - width: 250px; - } - .single-settings-tab { - padding-left: 5px; - width: 100%; - display: inline-block; - color: var(--body-color); - &.selected { - @include themeable( - background, - theme-container-accent-background, - $purple - ); - } - @media screen and (min-width: 514px) { - width: 210px; - } - } - } - .settings-form { - margin: 0px auto 50px; - width: 94%; - max-width: 700px; - float: left; - h2 { - font-size: 2.5em; - } - @media screen and (min-width: 835px) { - width: 66%; - } - } - #error_explanation { - max-width: calc(95% - 18px); - margin-bottom: 25px; - } - .big-button { - display: inline-block; - width: 561px; - max-width: calc(100% - 18px); - padding: 10px 0px; - padding-left: 10px; - border-radius: 3px; - font-size: 1.2em; - img { - vertical-align: -3px; - height: 1.2em; - width: 1.2em; - } - } - label { - display: inline-block; - vertical-align: top; - padding: 14px 0px 8px; - } - .field { - input[type='checkbox'] { - margin-top: 15px; - display: inline; - width: 100px; - } - select { - margin-top: 15px; - } - &.checkbox-label-first { - label { - width: auto; - } - } - .field-notice { - text-align: right; - .field-notice-inner { - width: 550px; - max-width: calc(100% - 2vw); - background: $red; - color: white; - padding: 1vw; - border-radius: 5px; - display: inline-block; - text-align: center; - margin-right: 10px; - line-height: 1.5em; - margin-top: 10px; - a { - color: white; - text-decoration: underline; - } - } - } - } - .theme-selector-field { - margin-bottom: 20px; - } - .settings-color-select-container { - display: flex; - align-items: center; - width: 100%; - .color-select-fields { - width: 50%; - .select-field-wrapper { - display: flex; - width: 100%; - .color-select-textbox { - flex: 1; - min-width: 70px; - border-radius: 0px; - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; - } - input[type='color'] { - box-sizing: border-box; - border-radius: 0px; - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; - padding: 3px; - width: 50px; - height: 48px; - margin-left: -1px; - border: 1px solid rgb(222, 230, 233); - cursor: pointer; - } - } - } - .color-select-preview { - flex: 1; - text-align: center; - #color-select-preview-logo { - padding: 25px 20px; - border-radius: 7px; - margin-top: 20px; - display: none; /* Changes to inline-block when javascript loads preview */ - } - } - } - .checkbox-field { - display: flex; - flex-direction: column; - padding: 10px 0px 20px; - max-width: 750px; - font-size: 17px; - .sub-field { - display: inline-block; - } - label { - width: auto; - display: inline; - padding: 0px; - } - input { - display: inline; - width: 30px; - } - .field-explainer { - opacity: 0.7; - margin: 8px auto; - width: 87%; - font-size: 0.9em; - } - } - .field_with_errors { - display: inline-block; - vertical-align: top; - max-width: 100%; - input { - border: 2px solid rgb(237, 65, 65); - background: rgb(252, 241, 243); - } - } - form { - input { - width: $input-width; - max-width: calc(100% - 30px); - padding: 12px; - font-size: 19px; - border: 1px solid rgb(222, 230, 233); - border-radius: 3px; - &[type='file'] { - border: 0px; - } - &[type='submit'] { - width: 255px; - max-width: 100%; - padding: 14px 0px; - margin-top: 20px; - font-size: 1.5em; - cursor: pointer; - &.danger-button { - background: $red; - } - &:hover { - opacity: 0.88; - } - } - } - select { - display: block; - font-size: 19px; - width: $input-width; - max-width: calc(100% - 4px); - padding: 12px; - border: 1px solid rgb(222, 230, 233); - border-radius: 3px; - background-color: white; - } - button.big-action { - width: 130px; - padding: 3px 0px; - font-size: 1.2em; - font-weight: bold; - border-radius: 3px; - border: 0; - &:hover { - opacity: 0.88; - } - cursor: pointer; - &.danger-button { - background-color: #b30000; - color: $white; - } - &:disabled { - background-color: $light-medium-gray; - &:hover { - opacity: 1; - cursor: not-allowed; - } - } - img { - vertical-align: -3px; - height: 1.2em; - width: 1.2em; - } - } - .image-present { - @media screen and (max-width: 700px) { - display: block; - } - img { - height: 48px; - width: 48px; - border-radius: 70px; - &.nav-image-version { - height: auto; - border-radius: 0px; - } - } - input { - width: 497px; - max-width: calc(100% - 84px); - vertical-align: top; - } - } - textarea { - border: 1px solid rgb(222, 230, 233); - width: $input-width; - max-width: calc(100% - 30px); - padding: 12px; - border-radius: 3px; - height: 120px; - font-size: 16px; - resize: none; - } - } - %inline-button-form { - display: inline-block; - input[type='submit'] { - display: inline-block; - font-size: 17px; - border: 0px; - border-radius: 100px; - padding: 2px 10px; - width: auto; - margin: 0px; - margin-left: 5px; - color: white; - background: $black; - } - } - .inline-button-form { - @extend %inline-button-form; - } - .inline-button-form-hidden { - display: none; - } - h2 { - font-size: calc(40px + 1vw); - font-family: $helvetica-condensed; - font-stretch: condensed; - a { - color: $black; - background: $yellow; - } - .organization-dropdown { - position: relative; - display: inline-block; - color: $black; - background: $yellow; - } - select { - color: inherit; - background: inherit; - vertical-align: baseline; - font-size: inherit; - font-family: inherit; - font-stretch: inherit; - border: 0; - margin: 0; - padding-right: 1.25em; - text-indent: 0.01px; - -moz-appearance: none; - -webkit-appearance: none; - text-overflow: ''; - } - .organization-dropdown::before, - .organization-dropdown::after { - content: ''; - position: absolute; - pointer-events: none; - } - .organization-dropdown::after { - /* Custom dropdown arrow */ - content: '\25BC'; - height: 1em; - font-size: 0.625em; - line-height: 1; - right: 0.25em; - top: 50%; - margin-top: -0.5em; - } - .organization-dropdown::before { - /* Custom dropdown arrow cover */ - width: 1em; - right: 0; - top: 0; - bottom: 0; - } - } - .secret-field { - margin: 30px 0px; - } - hr { - opacity: 0.3; - margin-top: 20px; - width: 70%; - } - .single-app-integration { - background: var(--card-bg); - border: 1px solid var(--card-color-tertiary); - border-radius: 8px; - padding: 10px; - h2 { - margin: 0; - padding: 0; - font-size: 1.5em; - } - sup { - color: var(--card-color-tertiary); - } - img { - height: 1em; - margin-left: 5px; - } - } - } - .default-billing-message { - margin: 10px 0px; - } - .stripe-button-wrapper { - height: 40px; - } - .credit-card-button { - background: lighten($blue, 3%); - color: white; - padding: 12px 25px; - border: 1px solid darken($blue, 8%); - border-radius: 3px; - cursor: pointer; - font-size: 1.3em; - box-shadow: inset 0 -5px 5px darken($blue, 2%); - &:hover { - opacity: 0.95; - } - .remove-card { - background: lighten($red, 3%); - } - } - .billing-history-header { - margin-top: 35px; - font-size: 2em; - border-bottom: 5px solid $black; - padding: 5px; - width: 270px; - } - .billing-item { - padding: 10px 5px; - border-bottom: 1px solid $light-medium-gray; - margin-top: 5px; - font-size: 1.3em; - &:hover { - background: $light-gray; - } - .billing-item-detail { - display: inline-block; - color: $medium-gray; - font-size: 0.8em; - margin-top: 6px; - margin-right: 6px; - background: $light-gray; - padding: 3px 8px; - border-radius: 8px; - border: 1px solid $light-medium-gray; - &.billing-item-green { - color: $green; - } - &.billing-item-blue { - color: $blue; - } - &.billing-item-red { - color: $red; - } - } - form { - display: inline-block; - button { - cursor: pointer; - &:hover { - color: $blue; - border: 1px solid $blue; - } - } - } - } -} - -.settings-hr { - opacity: 0.3; - width: 570px; - max-width: 98%; - margin: 0; -} - .github-repos { max-height: 400px; overflow-y: auto; @@ -607,130 +83,6 @@ $input-width: 650px; } } -.settings-org-members { - margin-bottom: 50px; - width: 550px; - max-width: 92%; - h3 { - margin-bottom: 18px; - } - .settings-org-member-row { - padding: 10px; - font-size: 20px; - position: relative; - width: 100%; - background: $light-gray; - margin: 3px 0px; - border-left: 5px solid darken($light-gray, 5%); - &.settings-org-admin-row { - border-left: 5px solid $green; - background: $light-green; - } - .settings-org-member-actions { - margin-top: 5px; - } - form { - display: inline-block; - } - .settings-org-member { - background: $green; - color: white; - padding: 3px 8px; - border-radius: 3px; - font-size: 0.7em; - border: 0px; - cursor: pointer; - &.settings-org-member-admin-self { - cursor: default; - background: $medium-gray; - } - &.settings-org-member-admin-other { - background: $green; - cursor: default; - } - &.settings-org-member-make-admin { - color: $green; - background: $light-green; - border: 1px solid $green; - } - &.settings-org-member-remove { - color: $red; - background: lighten($red, 36%); - border: 1px solid $red; - } - } - } - h5 { - color: $medium-gray; - font-size: 0.9em; - margin-top: -18px; - margin-bottom: 10px; - } - .settings-org-secret { - overflow-x: scroll; - padding: 7px; - border: 1px dashed $medium-gray; - width: 100%; - border-radius: 3px; - font-size: 1.1em; - cursor: pointer; - } - .settings-generate-new-secret { - margin-top: 10px; - background: $black; - color: white; - border: 0px; - padding: 4px 14px; - border-radius: 3px; - font-size: 15px; - cursor: pointer; - &:hover { - background: lighten($black, 14%); - } - } - clipboard-copy { - cursor: pointer; - display: flex; - img { - max-width: 26px; - margin-left: 8px; - } - } - .copy-text-announcer { - display: block; - text-align: center; - padding-top: 10px; - &[hidden] { - display: none; - } - } -} - -.settings-form-userlist { - .settings-form-userlistrow { - font-size: 18px; - padding: 6px 0px; - min-height: 33px; - display: block; - @include themeable(color, theme-color, $black); - a { - @include themeable(color, theme-color, $black); - } - img { - height: 1.5em; - width: 1.5em; - border-radius: 100px; - vertical-align: -0.25em; - margin-right: 0.25em; - } - &:hover { - .inline-button-form-hidden { - @extend %inline-button-form; - } - } - } -} - .signout_confirm-wrapper { padding: calc(15% + 50px) 2% 30%; text-align: center; @@ -743,60 +95,6 @@ $input-width: 650px; } } -.org-widget-preview .primary-sticky-nav { - margin-top: 10px; - position: initial; - font-size: 1.2em; -} - -ul.delete__account { - li { - padding-bottom: 5px; - } -} - -.api__secret { - &__container { - background-color: $white; - display: flex; - height: auto; - margin: 0.5rem 0; - padding: 0.5rem; - border-radius: 3px; - border: 1px solid $light-medium-gray; - } - - &__desc { - .title { - color: $dark-gray; - font-weight: bold; - margin: 0; - padding-bottom: 0.25rem; - } - .content { - margin: 0; - color: $medium-gray; - font-weight: bold; - font-family: $monospace; - padding: 5px 8px; - border: 1px dashed $black; - overflow: hidden; - margin: 3px 0px; - } - .subtitle { - margin: 0; - color: $dark-medium-gray; - } - } - - &__revoke { - text-align: left; - margin: 1rem auto 0; - display: block; - width: 100%; - } -} - .membership-status { display: flex; align-items: center; @@ -833,14 +131,3 @@ ul.delete__account { .membership-purchase-link { font-size: 2rem; } - -#page-content.chat_channel_memberships-edit, -#page-content.chat_channel_memberships-index { - #page-content-inner { - margin-top: 40px; - } - .notice { - margin-top: -40px; - margin-bottom: 20px; - } -} diff --git a/app/assets/stylesheets/theme-selector.scss b/app/assets/stylesheets/theme-selector.scss index 677aadea4..afbf6a5c1 100644 --- a/app/assets/stylesheets/theme-selector.scss +++ b/app/assets/stylesheets/theme-selector.scss @@ -1,249 +1,151 @@ -@import 'variables'; +@import 'config/import'; @import 'fonts'; .rich-selector { - display: inline-block; - position: relative; - cursor: pointer; - border: var(--theme-container-border); - box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); - transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); - margin-top: 5px; - margin-bottom: 10px; - margin-right: 16px; - width: 220px; - height: 124px; - border-radius: 10px; - padding: 0 !important; -} - -.rich-selector:hover, -.rich-selector:focus { - box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); -} - -.rich-selector * { - pointer-events: none; -} - -.rich-selector__radio:focus ~ .rich-selector__outline { - position: absolute; - top: 1px; - right: 7px; - bottom: 1px; - left: 7px; - border: 4px solid $green; - transform: scale(1.1); - border-radius: 10px; -} - -.rich-selector__radio, -.rich-selector__indicator { - position: absolute; - opacity: 0; -} - -.rich-selector__indicator { - height: 20px; - width: 20px; - top: 6px; - right: 6px; - border-radius: 30px; - background: $green; - border: 2px solid darken($green, 10%); -} - -.rich-selector__radio:checked + .rich-selector__indicator { - opacity: 1 !important; -} - -// Theme selector - -.theme-selector__nav { - display: flex; - justify-content: space-around; - align-items: center; - height: 23px; - width: 220px; - background: var(--header-bg); - border-bottom: var(--theme-container-border); - border-radius: 10px 10px 0 0; -} - -.theme-selector__search { - width: 32%; - height: 12px; - background: var(--form-bg); - border-radius: 2px; -} - -.theme-selector__body { - display: flex; - justify-content: center; - align-items: center; - height: 100px; - width: 220px; - background: var(--body-bg); - border-radius: 0 0 10px 10px; -} - -.theme-selector__col, -.theme-selector__col--center { - width: 20%; - height: 85%; - background: var(--card-bg); - border-radius: 2px; - border: var(--theme-container-border); -} - -.theme-selector__col--center { - text-align: center; - color: var(--body-color); - width: 35%; - background: var(--body-bg); - border: none; - margin: 0 10px; -} - -.theme-selector__posts { - height: calc(100% - 18px); - background: var(--card-bg); - border: var(--theme-container-border); - border-radius: 2px; -} - -// Individual theme styles - -.theme-selector--default { - --body-bg: #f9f9fa; - --body-color: #0a0a0a; - --header-bg: #fdf9f3; - --form-bg: #e8e7e7; - --card-bg: #fff; - --theme-container-border: 1px solid #d6d6d6; -} - -.theme-selector--night-theme { - --body-bg: #0d1219; - --body-color: #fff; - --header-bg: #1c2938; - --form-bg: #424a54; - --card-bg: #202c3d; - --theme-container-border: 1px solid #141d26; -} - -.theme-selector--pink-theme { - --body-bg: #fff7f9; - --body-color: #0a0a0a; - --header-bg: #ff4983; - --form-bg: #fff7f9; - --card-bg: #fff; - --theme-container-border: 1px solid #ff4983; -} - -.theme-selector--minimal-light-theme { - --body-bg: #fcfcfc; - --body-color: #0a0a0a; - --header-bg: #ffffff; - --form-bg: #f4f5f7; - --card-bg: #fff; - --theme-container-border: 1px solid #d6d6d6; -} - -.theme-selector--ten-x-hacker-theme { - --body-bg: #0a0a0a; - --body-color: #42ff87; - --header-bg: #1c1c1c; - --form-bg: #0a0a0a; - --card-bg: #0a0a0a; - --theme-container-border: 1px solid #42ff87; -} - -// Font selector - -.font-selector { - height: 1.3em; - padding: 15px !important; - font-size: 1.6em; - line-height: 1.3em; - width: 190px; + background: var(--card-secondary-bg); + border-radius: $br-default; + border: 1px solid var(--base-10); // todo replace with functional variable + padding: $su-4; } +// Font styles .font-selector--default { font-family: Palatino, 'Palatino Linotype', 'Palatino LT STD', 'Book Antiqua', Georgia, serif; } .font-selector--sans-serif { - font-family: $helvetica; + font-family: $ff-default; } .font-selector--monospace { - font-family: $monospace; + font-family: $ff-accent; } .font-selector--comic-sans { font-family: 'Comic Sans MS', cursive, sans-serif; - font-size: 1.44em; } .font-selector--open-dyslexic { font-family: OpenDyslexic, sans-serif; font-display: swap; - font-size: 1.33em; } -// Navbar selector - -.navbar-selector { - height: 1.2em; - padding: 10px 15px !important; - font-size: 1.1em; - line-height: 1.1em; - width: 190px; -} - -// Experience selector - -.exp-selector { - width: 55px; - height: 55px; - border-radius: 100px; - text-align: center; - font-weight: bold; - font-size: 1.6em; - margin: calc(3px + 0.3vw); - line-height: 55px !important; -} - -.exp-selector__indicator { - top: -4px; - right: 0px; - left: -4px; - right: 0px; - height: 100%; +// Theme styles +// Theme selector +.theme-preview { width: 100%; - border-radius: 100px; - background: transparent; - border: 4px solid $green !important; + border-radius: $br-default; + background: var(--preview-body-bg); + color: var(--preview-body-color); + overflow: hidden; + font-size: $fs-s; + line-height: 1; + box-shadow: 0 0 0 1px var(--header-shadow); + + &, + & *, + & * * { + box-sizing: border-box; + } + + &__nav { + display: flex; + justify-content: space-around; + align-items: center; + height: $su-4; + background: var(--preview-header); + box-shadow: 0 1px 1px var(--preview-border); + } + + &__search { + width: 33%; + height: $su-2; + background: var(--preview-form); + border-radius: 1px; + } + + &__main { + display: grid; + grid-gap: $su-1; + grid-template-columns: 20% 1fr 20%; + height: $su-9; + padding: $su-1; + text-align: center; + } + + &__middle { + display: flex; + flex-direction: column; + } + + &__card { + background: var(--preview-card); + border-radius: 1px; + display: flex; + flex: 1 auto; + box-shadow: 0 0 0 1px var(--preview-border); + } } -.rich-selector__radio:focus ~ .exp-selector__outline { - border-radius: 100px; - top: 0px; - right: 0px; - left: 0px; - right: 0px; - border: 1px solid lighten($green, 15%) !important; - z-index: -1; +.theme-selector--default { + --preview-body-bg: #f9f9fa; + --preview-body-color: #0a0a0a; + --preview-header: #fdf9f3; + --preview-form: #e8e7e7; + --preview-card: #fff; + --preview-border: rgba(0, 0, 0, 0.1); } -// Editor selector - -.editor-selector { - height: 1.2em; - padding: 10px 15px !important; - font-size: 1.1em; - line-height: 1.1em; - width: 190px; +.theme-selector--night-theme { + --preview-body-bg: #0d1219; + --preview-body-color: #fff; + --preview-header: #1c2938; + --preview-form: #424a54; + --preview-card: #202c3d; + --preview-border: rgba(0, 0, 0, 0.1); +} + +.theme-selector--pink-theme { + --preview-body-bg: #fff7f9; + --preview-body-color: #0a0a0a; + --preview-header: #fb4881; + --preview-form: #fff7f9; + --preview-card: #fff; + --preview-border: #fb4881; +} + +.theme-selector--minimal-light-theme { + --preview-body-bg: #fcfcfc; + --preview-body-color: #0a0a0a; + --preview-header: #ffffff; + --preview-form: #f4f5f7; + --preview-card: #fff; + --preview-border: rgba(0, 0, 0, 0.1); +} + +.theme-selector--ten-x-hacker-theme { + --preview-body-bg: #0a0a0a; + --preview-body-color: #42ff87; + --preview-header: #1c1c1c; + --preview-form: #0a0a0a; + --preview-card: #0a0a0a; + --preview-border: #42ff87; +} + +// Experience +.rich-selector--experience { + cursor: pointer; + position: relative; +} + +.rich-selector-radio { + overflow: hidden; + position: absolute; + opacity: 0; + left: -9999em; + &:checked + .rich-selector--experience { + border-color: var(--accent-brand); + box-shadow: 0 0 0 1px var(--accent-brand); + } } diff --git a/app/assets/stylesheets/themes/pink.scss b/app/assets/stylesheets/themes/pink.scss index abff78a18..13aa0b9a6 100644 --- a/app/assets/stylesheets/themes/pink.scss +++ b/app/assets/stylesheets/themes/pink.scss @@ -58,7 +58,7 @@ --header-bg: var(--base-40); --header-bg-hover: var(--base-50); --header-bg-current: var(--base-50); - --header-shadow: transparent; + --header-shadow: rgba(0,0,0,0.1); --header-icons-color: var(--base-10); --header-icons-color-hover: var(--base-0); diff --git a/app/views/chat_channel_memberships/edit.html.erb b/app/views/chat_channel_memberships/edit.html.erb index 85a13b7f0..16114276f 100644 --- a/app/views/chat_channel_memberships/edit.html.erb +++ b/app/views/chat_channel_memberships/edit.html.erb @@ -1,99 +1,108 @@ <% if flash[:settings_notice].present? %> -
- <%= @channel.description %> -
-<%= @channel.description %>
+ <% if @membership.role == "mod" %> +You are a channel mod
+ <% end %> +Invite new members by inviting them to this organization.
<% else %> - <%= form_for ChatChannelMembership.new do |f| %> -Questions about Connect Channel moderation? Contact <%= SiteConfig.default_site_email %>
<% else %>You have no pending invitations
<% end %> -Used for backgrounds, borders etc.
+Used for texts (usually put on Brand color 1).
+