discourse/app/assets/stylesheets/common/admin/customize.scss

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

1117 lines
19 KiB
SCSS
Raw Normal View History

// Customize area
2018-07-03 11:14:53 +08:00
.email-template {
input {
width: 100%;
}
label {
font-weight: bold;
}
}
.create-theme-modal {
div.input {
margin-bottom: 12px;
.label {
width: 20%;
display: inline-block;
}
}
2018-08-31 03:23:15 +08:00
.error {
color: var(--danger);
2018-08-31 03:23:15 +08:00
}
}
.settings-editor {
.ace-wrapper {
position: relative;
width: 100%;
height: 100%;
min-height: 300px;
.ace_editor {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
}
}
.theme-settings-editor-dialog {
.dialog-footer {
display: none;
}
}
2018-08-31 03:23:15 +08:00
.admin-customize.admin-customize-themes {
.admin-container {
padding: 0;
}
.error-message,
.raw-error {
margin-top: 5px;
margin-bottom: 5px;
}
.error-message {
.fa {
color: var(--danger);
}
}
.raw-error {
background-color: var(--primary-very-low);
padding: 5px;
}
}
.admin-customize {
h1 {
margin-bottom: 10px;
input {
margin-bottom: 0;
font-size: var(--font-down-2);
.ios-device & {
font-size: var(--font-down-2);
}
2017-12-22 06:13:06 +08:00
}
}
.field-error,
.field-warning {
margin-top: 10px;
margin-bottom: 10px;
background-color: var(--danger-low-mid);
padding: 10px;
white-space: pre-wrap;
}
.field-warning {
background-color: var(--highlight-bg);
}
.admin-container {
padding-left: 10px;
padding-right: 10px;
}
.admin-footer {
margin-top: 20px;
}
.color-schemes li {
2019-10-05 01:25:54 +08:00
.d-icon {
margin-right: 0.25em;
color: var(--primary-medium);
}
}
.show-current-style {
2018-09-10 02:48:08 +08:00
display: inline-block;
vertical-align: top;
2018-08-31 03:23:15 +08:00
.title {
font-size: var(--font-up-4);
2018-08-31 03:23:15 +08:00
font-weight: bold;
margin-bottom: 0.25em;
display: flex;
align-items: center;
span {
min-width: 0;
overflow-wrap: anywhere;
}
input {
margin: 0;
}
.btn {
margin-left: 0.5em;
}
a {
font-size: var(--font-down-2);
}
}
.theme-description {
display: block;
margin: 10px 0;
}
.metadata {
.authors,
.version {
display: block;
.heading {
font-weight: bold;
}
}
}
div.remote-url {
font-size: var(--font-down-1);
margin-bottom: 7px;
}
a.remote-url,
a.about-url,
a.license-url {
display: inline-block;
margin-right: 10px;
.d-icon {
margin-left: 5px;
}
2019-01-17 00:09:16 +08:00
}
2018-08-31 03:23:15 +08:00
.mini-title {
font-size: var(--font-up-1);
2018-08-31 03:23:15 +08:00
font-weight: bold;
margin-bottom: 7px;
}
.control-unit {
margin-top: 0.5em;
margin-bottom: 2em;
.translation-selector-container {
display: flex;
justify-content: space-between;
width: 79.7%;
@media screen and (max-width: 700px) {
width: 100%;
}
@media screen and (min-width: 700px) and (max-width: 768px) {
width: 73%;
}
.translation-selector {
width: auto;
margin-left: auto;
}
}
2018-08-31 03:23:15 +08:00
}
.control {
margin-bottom: 10px;
}
.description {
margin-bottom: 12px;
}
.theme-controls {
display: flex;
flex-wrap: wrap;
.btn {
margin: 0 0.5em 0.5em 0;
}
}
&.color-scheme .admin-controls {
display: flex;
padding: 1em;
label {
margin-bottom: 0;
input[type="checkbox"] {
margin-top: 0;
}
}
.pull-left {
width: 70%;
}
.pull-right {
width: 30%;
}
}
}
.add-component-button {
vertical-align: middle;
}
.themes-list {
2018-09-10 02:48:08 +08:00
display: inline-block;
.create-actions {
margin-top: 0.5em;
}
}
.themes-list-header {
2018-08-31 03:23:15 +08:00
width: 100%;
display: flex;
border: 1px solid var(--primary-low);
2018-08-31 03:23:15 +08:00
.tab {
border: none;
padding: 1em;
2018-08-31 03:23:15 +08:00
width: 50%;
box-sizing: border-box;
text-align: center;
background: var(--d-nav-bg-color);
&.themes-tab {
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
&.components-tab {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.discourse-no-touch & {
&:focus,
&:hover {
color: var(--d-nav-color--hover);
background: var(--d-nav-bg-color--hover);
&.active {
color: var(--d-nav-color--active);
background: var(--d-nav-bg-color--active);
}
.d-icon {
color: inherit;
}
}
}
2018-08-31 03:23:15 +08:00
&.active {
position: relative;
@include nav-active();
2018-08-31 03:23:15 +08:00
}
}
.d-button-label {
@include ellipsis;
}
}
.themes-list-search {
display: flex;
align-items: center;
position: sticky;
top: 0;
z-index: z("base");
height: 3em;
background: var(--primary-very-low);
.d-icon {
position: absolute;
padding-left: 0.5em;
}
&__input {
width: 100%;
height: 100%;
margin: 0;
border: 0;
padding-left: 2em;
background-color: var(--primary-very-low);
&:focus {
outline: 0;
~ .d-icon {
color: var(--tertiary-hover);
}
}
}
}
.themes-list-filter {
padding-left: 0.67em;
display: flex;
height: 3em;
align-items: center;
background-color: var(--primary-very-low);
&__label {
white-space: nowrap;
margin-right: 1em;
}
&__input {
margin-right: 0.5em;
summary {
width: auto;
}
}
}
.themes-list-filter,
.themes-list-search {
color: var(--primary);
border-bottom: 1px solid var(--primary-low);
display: flex;
border-right: 1px solid var(--primary-low);
border-bottom: 1px solid var(--primary-low);
border-left: 1px solid var(--primary-low);
}
.themes-list-container {
overflow-y: auto;
box-sizing: border-box;
max-height: 60vh;
border-bottom-right-radius: var(--d-border-radius);
border-bottom-left-radius: var(--d-border-radius);
@media screen and (max-height: 1000px) {
max-height: 50vh;
}
@media screen and (max-height: 800px) {
max-height: 40vh;
}
border-right: 1px solid var(--primary-low);
border-bottom: 1px solid var(--primary-low);
border-left: 1px solid var(--primary-low);
width: 100%;
&__item:last-child {
2018-08-31 03:23:15 +08:00
border-bottom: none;
}
&__item {
color: var(--primary);
border-bottom: 1px solid var(--primary-low);
display: flex;
.select-inactive-mode-label {
color: var(--tertiary);
font-weight: bold;
}
&.inactive-theme {
color: var(--primary-high);
background: var(--primary-very-low);
&:not(.selected):hover {
color: var(--primary);
}
}
&.inactive-indicator {
border-right: 0;
border-left: 0;
margin-top: 1em;
padding-left: 0.33em;
span.empty {
padding-left: 0.33em;
padding-top: 1em;
}
.btn.select-inactive-mode {
padding-left: 0;
padding-top: 0;
padding-bottom: 0;
}
}
&:not(.inactive-indicator):not(.selected):hover {
background-color: var(--primary-very-low);
2018-08-31 03:23:15 +08:00
.component {
border-color: var(--primary-low-mid);
2018-08-31 03:23:15 +08:00
}
}
&.selected {
color: var(--secondary);
background-color: var(--tertiary);
.components-list {
color: var(--secondary);
}
2018-08-31 03:23:15 +08:00
}
&:not(.selected) {
.broken-indicator {
color: var(--danger);
}
.fa {
opacity: 0.7;
}
.default-indicator {
color: var(--success);
}
}
2018-08-31 03:23:15 +08:00
.light-grey-icon {
color: var(--primary-medium);
2018-08-31 03:23:15 +08:00
}
2018-08-31 03:23:15 +08:00
.info {
overflow: hidden;
display: flex;
align-items: center;
@include line-clamp(4);
2018-08-31 03:23:15 +08:00
.icons {
margin-left: auto;
2018-08-31 03:23:15 +08:00
}
.cancel-select-inactive-mode {
margin-left: auto;
}
.btn-delete {
font-size: var(--font-down-1);
margin-left: 0.5em;
svg {
margin-right: 0.5em;
}
}
input {
margin-top: 0;
}
2018-08-31 03:23:15 +08:00
}
.components-list {
margin-top: 5px;
display: inline-block;
font-size: var(--font-down-1);
2018-08-31 03:23:15 +08:00
align-items: baseline;
color: var(--primary-high);
2018-08-31 03:23:15 +08:00
.others-count,
.others-count:hover {
color: inherit;
text-decoration: underline;
}
.d-icon {
color: inherit;
}
2018-08-31 03:23:15 +08:00
}
.components {
overflow-wrap: anywhere;
}
.inner-wrapper {
box-sizing: border-box;
padding: 0.67em;
cursor: pointer;
2018-08-31 03:23:15 +08:00
}
span.empty {
padding: 3px 10px 3px 10px;
}
.inner-wrapper,
span.empty {
color: inherit;
width: 100%;
}
}
}
.theme.settings {
.theme-setting {
min-height: 35px;
}
.theme-translation {
padding-bottom: 0;
2018-08-31 03:23:15 +08:00
margin-top: 18px;
min-height: 35px;
.input-setting-textarea {
height: unset;
}
}
.setting-label {
2021-09-20 21:52:03 +08:00
@include breakpoint(tablet, min-width) {
width: 25%;
}
word-wrap: break-word;
h3 {
margin-top: 0;
margin-bottom: 0.5rem;
}
}
.setting {
padding-bottom: 0;
}
.color-palette-input-group {
display: flex;
gap: 0.5rem;
}
}
.editor-information {
display: flex;
align-items: center;
font-size: var(--font-up-1);
margin-bottom: 0.5em;
.editor-back-button {
margin-right: 0.25em;
}
.editor-theme-name-wrapper {
margin-left: 0.25em;
}
.editor-theme-name {
font-weight: bold;
}
}
.current-style.maximized {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: z("fullscreen");
background: var(--secondary);
width: 100%;
padding: 0;
margin: 0;
.wrapper {
position: absolute;
top: 20px;
bottom: 10px;
left: 20px;
right: 20px;
}
}
.content-list,
.current-style {
float: left;
}
.content-list ul {
margin-bottom: 10px;
}
.current-style {
width: 100%;
.admin-container {
margin: 0;
}
.edit-main-nav ul {
padding-bottom: 0;
}
.nav-pills {
li {
margin-right: 0;
display: flex;
2019-03-07 08:52:34 +08:00
&.spacer {
flex-grow: 1;
}
&:last-of-type > a {
margin-right: 0;
}
a.no-text .d-icon {
margin-right: 0;
}
label {
padding: 6px 12px;
margin-bottom: 0;
}
a.blank:not(.active) {
color: var(--primary-medium);
}
input {
margin-bottom: 0;
margin-left: 6px;
}
button {
margin-right: 0;
}
}
}
.ace-wrapper {
position: relative;
height: calc(100vh - 450px);
min-height: 200px;
width: 100%;
}
&.maximized {
.admin-container {
position: absolute;
bottom: 50px;
top: 80px;
width: 100%;
}
.admin-footer {
margin-top: 10px;
}
.ace-wrapper {
height: calc(100vh - 200px);
}
}
.ace_editor {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.ace_placeholder {
font-family: inherit;
font-size: var(--font-up-1);
color: var(--primary-high);
}
.status-actions {
float: right;
margin-top: 7px;
span {
margin-right: 10px;
}
}
.buttons {
float: left;
width: 200px;
.saving {
padding: 5px 0 0 0;
margin-left: 10px;
width: 80px;
color: var(--primary);
}
}
}
.color-scheme {
.controls {
display: flex;
align-items: center;
margin-bottom: 1em;
button:not(:last-child),
a {
margin-right: 10px;
}
button.btn-danger {
margin-left: auto;
}
}
.admin-controls {
display: block;
}
}
.colors {
thead th {
border: none;
}
td.hex {
width: 160px;
.color-picker {
display: inline-flex;
}
}
td.actions {
width: 200px;
}
.color-picker input {
width: 80px;
margin-bottom: 0;
}
th.overridden {
text-align: right;
}
.color-input {
display: flex;
}
2019-10-05 01:25:54 +08:00
h3 {
margin: 0;
}
.description {
2019-10-05 01:25:54 +08:00
margin: 0.15em 0 0;
color: var(--primary-high);
font-size: var(--font-down-1);
line-height: var(--line-height-medium);
}
.invalid .hex input {
background-color: white;
color: black;
border-color: var(--danger);
}
}
.status-message {
display: block;
font-size: var(--font-down-1);
margin-top: 8px;
}
.removable-list {
list-style: none;
margin-left: 0;
li {
&.disabled-child {
.child-link {
color: var(--primary-medium);
&:hover {
text-decoration: underline;
}
}
}
.btn {
margin-left: 5px;
}
display: table-row;
.col.child-link {
2017-05-11 02:43:05 +08:00
padding-right: 10px;
padding-bottom: 10px;
2017-05-11 02:43:05 +08:00
min-width: 80px;
}
2017-05-11 02:43:05 +08:00
.col {
display: table-cell;
}
}
}
}
2017-05-11 02:43:05 +08:00
.add-upload-modal {
input[type="file"] {
display: block;
margin-bottom: 0.25em;
+ label {
color: var(--primary-medium);
}
}
2017-05-11 02:43:05 +08:00
label {
display: inline-block;
2017-05-11 02:43:05 +08:00
}
}
2018-02-15 01:26:05 +08:00
2018-02-16 04:07:26 +08:00
#custom_emoji {
width: 100%;
2018-02-15 01:26:05 +08:00
}
.public-key {
margin-top: 1em;
textarea {
cursor: auto;
min-height: 220px;
margin-bottom: 0;
}
button {
position: absolute;
top: 0;
right: 0;
}
}
.public-key-text-wrapper {
position: relative;
}
2018-07-03 11:14:53 +08:00
.public-key-note {
margin-top: 1em;
color: var(--primary-medium);
}
2018-07-03 11:14:53 +08:00
// Permalinks
.permalinks {
.url,
.topic,
.category,
.external_url,
.destination,
2018-07-03 11:14:53 +08:00
.post {
@include ellipsis;
max-width: 100px;
@include breakpoint(tablet) {
max-width: 100%;
}
}
&.grid tr.admin-list-item {
grid-template-columns: unset;
}
}
.permalink-form {
padding: 0.5em 1em 0 1em;
margin-top: 1em;
background: var(--primary-very-low);
.select-kit {
max-width: 260px;
}
@include breakpoint(tablet) {
label {
width: 100%;
}
}
2018-07-03 11:14:53 +08:00
}
.permalink-description {
color: var(--primary-medium);
}
.permalink-search {
margin-top: 2em;
input {
min-width: 250px;
margin-bottom: 0;
}
}
table.permalinks {
@include breakpoint(tablet, min-width) {
td.url,
th.url {
width: 33%;
}
th.destination,
td.destination {
width: 60%;
}
}
@include breakpoint(tablet) {
td.url .btn-flat {
display: none;
}
}
}
2018-07-03 11:14:53 +08:00
// embedding
.embeddable-hosts {
margin-bottom: 2em;
table.grid {
margin-bottom: 1em;
.tag-chooser,
.user-chooser {
width: 100%;
}
2018-07-03 11:14:53 +08:00
tr td {
word-wrap: break-word;
max-width: 25vw;
align-self: start;
}
td.controls {
min-width: 6em;
}
.select-kit.combo-box.category-chooser {
width: calc(100% - 10px);
}
}
@media screen and (max-width: 880px) {
table.grid {
thead {
display: none;
}
div.label {
display: block;
font-size: var(--font-down-1);
color: var(--primary-medium);
2018-07-03 11:14:53 +08:00
}
td.controls,
td.editing-controls {
align-self: end;
}
tr {
display: grid;
grid-template-columns: repeat(3, 1fr);
}
}
}
@media screen and (max-width: 580px) {
table.grid {
tr td.editing-input {
grid-column-start: 1;
grid-column-end: 4;
max-width: 100%;
input {
width: calc(100% - 20px);
}
}
td.editing-controls {
margin-top: 1em;
max-width: 100%;
}
}
}
@include breakpoint(mobile-medium) {
2018-07-03 11:14:53 +08:00
table.grid tr {
grid-template-columns: repeat(2, 1fr);
td.controls {
text-align: left;
}
}
}
}
.embedding-secondary {
h3 {
margin: 1em 0;
}
margin-bottom: 2em;
.embed-setting {
input[type="text"] {
width: 50%;
}
margin: 0.75em 0;
}
p.description {
color: var(--primary-medium);
2018-07-03 11:14:53 +08:00
margin-bottom: 1em;
max-width: 700px;
}
}
.embedding td input {
margin-bottom: 0;
}
.user-fields {
h2 {
margin-bottom: 1em;
2018-07-03 11:14:53 +08:00
}
.user-field {
padding-block: 0.5em;
margin-bottom: 1em;
border-bottom: 1px solid var(--primary-low);
2018-07-03 11:14:53 +08:00
.form-display {
width: 25%;
float: left;
}
.clearfix {
clear: both;
}
}
}
.reseed-modal {
.options-group-title {
font-size: var(--font-up-2);
font-weight: bold;
margin: 8px 0;
}
.option {
margin-left: 1em;
}
}
.robots-txt-edit {
div.overridden {
background: var(--highlight-bg);
padding: 7px;
margin-bottom: 7px;
}
.robots-txt-input {
width: 100%;
box-sizing: border-box;
height: 55vh;
}
}
.admin-customize-email-templates {
.email-template,
.controls {
margin-top: 1em;
}
.d-editor {
height: 50vh;
}
}
.admin-customize-email-style {
.ace-wrapper {
position: relative;
width: 100%;
height: calc(100vh - 480px);
min-height: 200px;
.ace_editor {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
}
}
2023-02-09 03:21:39 +08:00
.form-templates {
&__info {
2023-02-09 03:21:39 +08:00
margin-top: 1rem;
}
&__table {
2023-02-09 03:21:39 +08:00
margin-bottom: 1rem;
.admin-list-item .action {
text-align: right;
}
}
&__form {
2023-02-09 03:21:39 +08:00
input {
width: 300px;
}
.ace-wrapper {
position: relative;
height: calc(100vh - 450px);
min-height: 200px;
width: 100%;
box-shadow: var(--shadow-footer-nav);
2023-02-09 03:21:39 +08:00
border-radius: 4px;
}
.ace_editor {
border-radius: 4px;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
.ace_placeholder {
font-family: inherit;
font-size: var(--font-up-1);
color: var(--primary-high);
}
.footer-buttons {
display: flex;
gap: 0.5rem;
.btn-danger {
margin-left: auto;
}
}
}
&__editor {
display: flex;
align-items: center;
flex-wrap: wrap;
}
&__quick-insert-field-buttons {
2023-02-09 03:21:39 +08:00
display: flex;
align-items: center;
flex-wrap: wrap;
margin-left: 1rem;
span {
margin-right: 0.25rem;
}
.btn {
&:not(:last-of-type) {
2023-02-09 03:21:39 +08:00
border-right: 1px solid var(--primary-low);
}
}
}
&__validation-options td {
padding: 0.75rem;
}
&__preview-button {
margin-left: auto;
}
2023-02-09 03:21:39 +08:00
}
.customize-form-template-view-modal {
.d-modal__footer {
2023-02-09 03:21:39 +08:00
.btn:last-child {
margin-left: auto;
}
}
}