mirror of
https://github.com/dpnmw/community-landing.git
synced 2026-03-18 09:27:16 +00:00
299 lines
9.7 KiB
CSS
299 lines
9.7 KiB
CSS
/* ═══════════════════════════════════════════════════════════════════
|
|
Community Landing — Admin Settings Panel Styles
|
|
Tab navigation + fallback separators + bg-pair layout
|
|
═══════════════════════════════════════════════════════════════════ */
|
|
|
|
/* ── Tab-hidden class (used instead of inline display:none) ── */
|
|
|
|
.cl-tab-hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
/* ── Injected tabs inside native Discourse nav bar ──
|
|
Native structure: <ul class="nav-pills d-nav-submenu__tabs">
|
|
<li class="admin-plugin-config-page__top-nav-item"><a>Settings</a></li>
|
|
<li class="admin-plugin-config-page__top-nav-item cl-admin-tab"><a>Hero</a></li>
|
|
</ul> */
|
|
|
|
.d-nav-submenu__tabs li.cl-admin-tab {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.d-nav-submenu__tabs li.cl-admin-tab a {
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Dimmed state when Discourse filter/search is active */
|
|
.d-nav-submenu__tabs.cl-filter-active > li {
|
|
opacity: 0.4;
|
|
}
|
|
|
|
.d-nav-submenu__tabs.cl-filter-active > li.active {
|
|
opacity: 1;
|
|
border-bottom-color: transparent;
|
|
}
|
|
|
|
/* ── Standalone tab bar (fallback for older Discourse without native nav) ── */
|
|
|
|
.cl-admin-tabs {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0;
|
|
margin: 0 0 20px 0;
|
|
padding: 0;
|
|
border-bottom: 1px solid var(--primary-low, rgba(0, 0, 0, 0.1));
|
|
}
|
|
|
|
.cl-admin-tabs .cl-admin-tab {
|
|
padding: 10px 14px;
|
|
border: none;
|
|
background: none;
|
|
color: var(--primary-medium, #888);
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
border-bottom: 2px solid transparent;
|
|
margin-bottom: -1px;
|
|
transition: color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
|
|
}
|
|
|
|
.cl-admin-tabs .cl-admin-tab:hover {
|
|
color: var(--primary, #333);
|
|
}
|
|
|
|
.cl-admin-tabs .cl-admin-tab.active {
|
|
color: var(--tertiary, #0088cc);
|
|
border-bottom-color: var(--tertiary, #0088cc);
|
|
}
|
|
|
|
.cl-admin-tabs.filter-active .cl-admin-tab {
|
|
opacity: 0.4;
|
|
}
|
|
|
|
.cl-admin-tabs.filter-active .cl-admin-tab.active {
|
|
border-bottom-color: transparent;
|
|
}
|
|
|
|
html.dark-scheme .cl-admin-tabs {
|
|
border-bottom-color: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
html.dark-scheme .cl-admin-tabs .cl-admin-tab:hover {
|
|
color: var(--primary, #ddd);
|
|
}
|
|
|
|
/* ── When tabs are active, remove separator borders ── */
|
|
|
|
.cl-tabs-active .row.setting[data-setting] {
|
|
border-top: none !important;
|
|
margin-top: 0 !important;
|
|
padding-top: 0 !important;
|
|
}
|
|
|
|
|
|
/* ── Fallback: Separator borders when tabs are NOT active ──
|
|
(e.g. if JS fails to load or on older Discourse) */
|
|
|
|
/* All plugin settings spacing */
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="community_landing_enabled"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="logo_"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="accent_"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="dark_bg_color"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="light_bg_color"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="scroll_"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="navbar_"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="hero_"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="stats_"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="stat_"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="about_"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="topics_"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="contributors_"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="groups_"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="show_app_ctas"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="ios_"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="android_"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="app_"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting^="footer_"] {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
/* Section separator borders (fallback only) */
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="logo_dark_url"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="accent_color"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="scroll_animation"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="navbar_signin_label"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="hero_title"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="stats_enabled"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="about_enabled"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="topics_enabled"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="groups_enabled"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="show_app_ctas"],
|
|
.admin-detail:not(.cl-tabs-active) .row.setting[data-setting="footer_description"] {
|
|
border-top: 2px solid rgba(0, 0, 0, 0.12);
|
|
margin-top: 28px;
|
|
padding-top: 24px;
|
|
}
|
|
|
|
/* Dark mode separators (fallback only) */
|
|
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="logo_dark_url"],
|
|
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="accent_color"],
|
|
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="scroll_animation"],
|
|
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="navbar_signin_label"],
|
|
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="hero_title"],
|
|
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="stats_enabled"],
|
|
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="about_enabled"],
|
|
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="topics_enabled"],
|
|
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="groups_enabled"],
|
|
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="show_app_ctas"],
|
|
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="footer_description"],
|
|
html.dark-scheme .admin-detail:not(.cl-tabs-active) .row.setting[data-setting="custom_css"] {
|
|
border-top-color: rgba(255, 255, 255, 0.12);
|
|
}
|
|
|
|
/* ── Settings row distribution (match Discourse native layout) ── */
|
|
|
|
.cl-tabs-active .row.setting {
|
|
padding-bottom: 20px;
|
|
}
|
|
|
|
/* Clearfix without overflow:hidden (avoids clipping dropdowns/color pickers) */
|
|
.cl-tabs-active .row.setting::after {
|
|
content: "";
|
|
display: table;
|
|
clear: both;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-label {
|
|
float: left;
|
|
width: 17.6576%;
|
|
margin-right: 12px;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-label h3 {
|
|
font-size: var(--font-0);
|
|
font-weight: normal;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-label .history-icon {
|
|
opacity: 0;
|
|
transition: opacity 0.3s;
|
|
color: var(--primary-medium);
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-label:hover .history-icon {
|
|
opacity: 1;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-value {
|
|
float: left;
|
|
width: 53%;
|
|
padding-right: 20px;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-value input[type="checkbox"],
|
|
.cl-tabs-active .row.setting .setting-value input[type="radio"] {
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-value .select-kit {
|
|
width: 100% !important;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-value .category-selector {
|
|
width: 95%;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-value .input-setting-string,
|
|
.cl-tabs-active .row.setting .setting-value .input-setting-integer,
|
|
.cl-tabs-active .row.setting .setting-value .input-setting-textarea {
|
|
width: 100%;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-value .input-setting-textarea {
|
|
height: 150px;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-value .input-setting-list {
|
|
padding: 1px;
|
|
background-color: var(--secondary);
|
|
border: 1px solid var(--input-border-color);
|
|
border-radius: 3px;
|
|
transition: border linear 0.2s, box-shadow linear 0.2s;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-controls {
|
|
float: left;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .desc,
|
|
.cl-tabs-active .row.setting .validation-error {
|
|
padding-top: 3px;
|
|
font-size: var(--font-down-1);
|
|
line-height: var(--line-height-large);
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .desc {
|
|
color: var(--primary-medium);
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .validation-error {
|
|
color: var(--danger);
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-theme-warning {
|
|
font-size: var(--font-down-1);
|
|
color: var(--primary-medium);
|
|
}
|
|
|
|
/* Overridden settings indicator (yellow dot) */
|
|
.cl-tabs-active .row.setting.overridden .values input {
|
|
background-color: var(--highlight-bg);
|
|
}
|
|
|
|
.cl-tabs-active .row.setting.overridden h3 {
|
|
position: relative;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting.overridden h3::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0.5rem;
|
|
left: -1rem;
|
|
width: 0.5rem;
|
|
height: 0.5rem;
|
|
border-radius: 100%;
|
|
background-color: var(--highlight-high);
|
|
}
|
|
|
|
.cl-tabs-active .row.setting.overridden.string input[type="text"],
|
|
.cl-tabs-active .row.setting.overridden.string input[type="password"],
|
|
.cl-tabs-active .row.setting.overridden.string textarea {
|
|
background-color: var(--highlight-bg);
|
|
}
|
|
|
|
@media (max-width: 767px) {
|
|
.cl-tabs-active .row.setting .setting-label {
|
|
float: none;
|
|
width: 100%;
|
|
margin-right: 0;
|
|
margin-left: 0;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-label h3 {
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-value {
|
|
width: 100%;
|
|
padding-right: 0;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-value .input-setting-list {
|
|
width: 100%;
|
|
}
|
|
|
|
.cl-tabs-active .row.setting .setting-value .select-kit {
|
|
width: 100% !important;
|
|
}
|
|
}
|