mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-11 01:53:51 +00:00
Added brand color and input styles to dark theme
This commit is contained in:
committed by
Alejandro Celaya
parent
53f16ac8b5
commit
f313a39b81
14
src/App.scss
14
src/App.scss
@@ -24,17 +24,3 @@
|
|||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not([data-theme='dark']) {
|
|
||||||
--primary-color: #{$lightPrimaryColor};
|
|
||||||
--primary-color-alfa: #{$lightPrimaryColorAlfa};
|
|
||||||
--secondary-color: #{$lightSecondaryColor};
|
|
||||||
--text-color: #{$lightTextColor};
|
|
||||||
}
|
|
||||||
|
|
||||||
html[data-theme='dark'] {
|
|
||||||
--primary-color: #{$darkPrimaryColor};
|
|
||||||
--primary-color-alfa: #{$darkPrimaryColorAlfa};
|
|
||||||
--secondary-color: #{$darkSecondaryColor};
|
|
||||||
--text-color: #{$darkTextColor};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -52,14 +52,10 @@
|
|||||||
background-color: var(--secondary-color);
|
background-color: var(--secondary-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.aside-menu__item--selected {
|
.aside-menu__item--selected,
|
||||||
color: #ffffff;
|
|
||||||
background-color: $mainColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aside-menu__item--selected:hover {
|
.aside-menu__item--selected:hover {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
background-color: $mainColor;
|
background-color: var(--brand-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.aside-menu__item--divider {
|
.aside-menu__item--divider {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
@import '../utils/base';
|
@import '../utils/base';
|
||||||
|
|
||||||
.main-header.main-header {
|
.main-header.main-header {
|
||||||
background-color: $mainColor !important;
|
|
||||||
color: white;
|
color: white;
|
||||||
|
background-color: var(--brand-color) !important;
|
||||||
|
|
||||||
.navbar-brand {
|
.navbar-brand {
|
||||||
color: inherit !important;
|
color: inherit !important;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.react-tagsinput {
|
.react-tagsinput {
|
||||||
background-color: #ffffff;
|
background-color: var(--input-color);
|
||||||
border: 1px solid #cccccc;
|
border: 1px solid var(--input-border-color);
|
||||||
border-radius: .25rem;
|
border-radius: .25rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
min-height: 2.6rem;
|
min-height: 2.6rem;
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
.react-tagsinput--focused {
|
.react-tagsinput--focused {
|
||||||
border-color: #80bdff;
|
border-color: #80bdff;
|
||||||
box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .25);
|
box-shadow: 0 0 0 .2rem rgb(70 150 229 / 25%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.react-tagsinput-tag {
|
.react-tagsinput-tag {
|
||||||
@@ -46,3 +46,7 @@
|
|||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
color: #495057;
|
color: #495057;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.react-autosuggest__suggestion--highlighted {
|
||||||
|
background-color: var(--active-color);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
@import './utils/base';
|
@import './utils/base';
|
||||||
@import 'node_modules/bootstrap/scss/bootstrap.scss';
|
@import 'node_modules/bootstrap/scss/bootstrap.scss';
|
||||||
@import './common/react-tagsinput.scss';
|
@import './common/react-tagsinput.scss';
|
||||||
|
@import './theme/theme';
|
||||||
|
|
||||||
* {
|
* {
|
||||||
outline: none !important;
|
outline: none !important;
|
||||||
@@ -14,24 +15,69 @@ body,
|
|||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (min-width: $smMin) {
|
||||||
|
#root {
|
||||||
|
transition: filter 300ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-open #root {
|
||||||
|
filter: blur(1.5px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.bg-main {
|
.bg-main {
|
||||||
background-color: $mainColor !important;
|
background-color: $mainColor !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card-body,
|
||||||
box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
|
|
||||||
}
|
|
||||||
|
|
||||||
.card,
|
|
||||||
.card-header,
|
.card-header,
|
||||||
.card-body {
|
.list-group-item {
|
||||||
background-color: var(--primary-color);
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-footer {
|
.card-footer {
|
||||||
background-color: var(--primary-color-alfa);
|
background-color: var(--primary-color-alfa);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
|
||||||
|
background-color: var(--primary-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-content,
|
||||||
|
.page-link,
|
||||||
|
.page-item.disabled .page-link,
|
||||||
|
.dropdown-menu {
|
||||||
|
background-color: var(--primary-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-header,
|
||||||
|
.modal-footer,
|
||||||
|
.card-header,
|
||||||
|
.card-footer,
|
||||||
|
.table thead th,
|
||||||
|
.table th,
|
||||||
|
.table td,
|
||||||
|
.page-link,
|
||||||
|
.page-link:hover,
|
||||||
|
.page-item.disabled .page-link,
|
||||||
|
.dropdown-divider {
|
||||||
|
border-color: var(--border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-link:hover {
|
||||||
|
background-color: var(--secondary-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-item.active .page-link {
|
||||||
|
background-color: var(--brand-color);
|
||||||
|
border-color: var(--brand-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination .page-link {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.container-xl {
|
.container-xl {
|
||||||
@media (min-width: $xlgMin) {
|
@media (min-width: $xlgMin) {
|
||||||
max-width: 1320px;
|
max-width: 1320px;
|
||||||
@@ -43,22 +89,29 @@ body,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dropdown-item {
|
||||||
|
color: var(--text-color);
|
||||||
|
}
|
||||||
|
|
||||||
.dropdown-item:not(:disabled) {
|
.dropdown-item:not(:disabled) {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dropdown-item:focus:not(:disabled),
|
||||||
|
.dropdown-item:hover:not(:disabled),
|
||||||
.dropdown-item.active:not(:disabled),
|
.dropdown-item.active:not(:disabled),
|
||||||
.dropdown-item:active:not(:disabled) {
|
.dropdown-item:active:not(:disabled) {
|
||||||
background-color: $lightGrey !important;
|
background-color: var(--active-color) !important;
|
||||||
color: inherit !important;
|
color: var(--text-color) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge-main {
|
.badge-main {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
background-color: $mainColor;
|
background-color: var(--brand-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.table {
|
.table,
|
||||||
|
.table-hover tbody tr:hover {
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,13 +119,10 @@ body,
|
|||||||
background-color: var(--secondary-color);
|
background-color: var(--secondary-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.react-datepicker__input-container,
|
.form-control,
|
||||||
.react-datepicker-wrapper {
|
.form-control:focus {
|
||||||
display: block !important;
|
background-color: var(--input-color);
|
||||||
}
|
border-color: var(--input-border-color);
|
||||||
|
|
||||||
.react-datepicker-popper {
|
|
||||||
z-index: 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-brand {
|
.navbar-brand {
|
||||||
@@ -81,10 +131,6 @@ body,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination .page-link {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.indivisible {
|
.indivisible {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
@@ -99,14 +145,6 @@ body,
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.react-datepicker__day--keyboard-selected {
|
|
||||||
background-color: $mainColor;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: darken($mainColor, 12%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.progress-bar {
|
.progress-bar {
|
||||||
background-color: $mainColor;
|
background-color: $mainColor;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
.overview__card.overview__card {
|
.overview__card.overview__card {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-top: 3px solid $mainColor;
|
border-top: 3px solid var(--brand-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.overview__card-title {
|
.overview__card-title {
|
||||||
|
|||||||
@@ -3,5 +3,5 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
background-color: var(--primary-color-alfa);
|
background-color: var(--primary-color-alfa);
|
||||||
padding: .75rem 0;
|
padding: .75rem 0;
|
||||||
border-top: 1px solid rgba(black, .125);
|
border-top: 1px solid var(--border-color);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@import '../utils/base';
|
||||||
|
|
||||||
.tag-card.tag-card {
|
.tag-card.tag-card {
|
||||||
margin-bottom: .5rem;
|
margin-bottom: .5rem;
|
||||||
}
|
}
|
||||||
@@ -26,11 +28,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tag-card__tag-name {
|
.tag-card__tag-name {
|
||||||
color: #007bff;
|
color: $mainColor;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag-card__tag-name:hover {
|
.tag-card__tag-name:hover {
|
||||||
color: #0056b3;
|
color: darken($mainColor, 15%);
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|||||||
47
src/theme/theme.scss
Normal file
47
src/theme/theme.scss
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
@import '../utils/base';
|
||||||
|
|
||||||
|
// Light theme colors
|
||||||
|
$lightPrimaryColor: #ffffff;
|
||||||
|
$lightPrimaryColorAlfa: rgba($lightPrimaryColor, .5);
|
||||||
|
$lightSecondaryColor: $lightColor;
|
||||||
|
$lightTextColor: #212529;
|
||||||
|
$lightBorderColor: rgba(0, 0, 0, .125);
|
||||||
|
$lightActiveColor: $lightGrey;
|
||||||
|
$lightBrandColor: $mainColor;
|
||||||
|
$lightInputColor: $lightPrimaryColor;
|
||||||
|
$lightBorderInputColor: rgba(0, 0, 0, .19);
|
||||||
|
|
||||||
|
// Dark theme colors
|
||||||
|
$darkPrimaryColor: #161b22;
|
||||||
|
$darkPrimaryColorAlfa: rgba($darkPrimaryColor, .7);
|
||||||
|
$darkSecondaryColor: #0f131a;
|
||||||
|
$darkTextColor: rgb(201, 209, 217);
|
||||||
|
$darkBorderColor: rgba(0, 0, 0, .2);
|
||||||
|
$darkActiveColor: $darkSecondaryColor;
|
||||||
|
$darkBrandColor: #0b2d4e;
|
||||||
|
$darkInputColor: darken($darkPrimaryColor, 2%);
|
||||||
|
$darkBorderInputColor: rgba(0, 0, 0, .3);
|
||||||
|
|
||||||
|
html:not([data-theme='dark']) {
|
||||||
|
--primary-color: #{$lightPrimaryColor};
|
||||||
|
--primary-color-alfa: #{$lightPrimaryColorAlfa};
|
||||||
|
--secondary-color: #{$lightSecondaryColor};
|
||||||
|
--text-color: #{$lightTextColor};
|
||||||
|
--border-color: #{$lightBorderColor};
|
||||||
|
--active-color: #{$lightActiveColor};
|
||||||
|
--brand-color: #{$lightBrandColor};
|
||||||
|
--input-color: #{$lightInputColor};
|
||||||
|
--input-border-color: #{$lightBorderInputColor};
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-theme='dark'] {
|
||||||
|
--primary-color: #{$darkPrimaryColor};
|
||||||
|
--primary-color-alfa: #{$darkPrimaryColorAlfa};
|
||||||
|
--secondary-color: #{$darkSecondaryColor};
|
||||||
|
--text-color: #{$darkTextColor};
|
||||||
|
--border-color: #{$darkBorderColor};
|
||||||
|
--active-color: #{$darkActiveColor};
|
||||||
|
--brand-color: #{$darkBrandColor};
|
||||||
|
--input-color: #{$darkInputColor};
|
||||||
|
--input-border-color: #{$darkBorderInputColor};
|
||||||
|
}
|
||||||
@@ -32,3 +32,20 @@
|
|||||||
background-color: #333333;
|
background-color: #333333;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.react-datepicker__input-container,
|
||||||
|
.react-datepicker-wrapper {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.react-datepicker-popper {
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.react-datepicker__day--keyboard-selected {
|
||||||
|
background-color: $mainColor;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: darken($mainColor, 12%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
.dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled):hover,
|
.dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled):hover,
|
||||||
.show > .dropdown-btn__toggle.dropdown-btn__toggle.dropdown-toggle {
|
.show > .dropdown-btn__toggle.dropdown-btn__toggle.dropdown-toggle {
|
||||||
color: #6c757d;
|
color: #6c757d;
|
||||||
background-color: var(--primary-color);
|
background-color: var(--input-color);
|
||||||
text-align: left;
|
text-align: left;
|
||||||
border-color: rgba(0, 0, 0, .125);
|
border-color: var(--input-border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-btn__toggle.dropdown-btn__toggle:after {
|
.dropdown-btn__toggle.dropdown-btn__toggle:after {
|
||||||
|
|||||||
@@ -12,21 +12,10 @@ $responsiveTableBreakpoint: $mdMax;
|
|||||||
// Colors
|
// Colors
|
||||||
$mainColor: #4696e5;
|
$mainColor: #4696e5;
|
||||||
$lightColor: #f5f6fe;
|
$lightColor: #f5f6fe;
|
||||||
$lightGrey: #dddddd;
|
$lightGrey: #eeeeee;
|
||||||
$dangerColor: #dc3545;
|
$dangerColor: #dc3545;
|
||||||
$mediumGrey: #dee2e6;
|
$mediumGrey: #dee2e6;
|
||||||
|
|
||||||
// Themes
|
|
||||||
$lightPrimaryColor: #ffffff;
|
|
||||||
$lightPrimaryColorAlfa: rgba($lightPrimaryColor, .5);
|
|
||||||
$lightSecondaryColor: $lightColor;
|
|
||||||
$lightTextColor: #212529;
|
|
||||||
|
|
||||||
$darkPrimaryColor: #161b22;
|
|
||||||
$darkPrimaryColorAlfa: rgba(#161b22, .5);
|
|
||||||
$darkSecondaryColor: #0d1117;
|
|
||||||
$darkTextColor: #ffffff;
|
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
$headerHeight: 57px;
|
$headerHeight: 57px;
|
||||||
$asideMenuWidth: 260px;
|
$asideMenuWidth: 260px;
|
||||||
|
|||||||
@@ -25,6 +25,6 @@
|
|||||||
|
|
||||||
.visits-stats__nav-link.active {
|
.visits-stats__nav-link.active {
|
||||||
border-color: $mainColor;
|
border-color: $mainColor;
|
||||||
background-color: white !important;
|
background-color: var(--primary-color) !important;
|
||||||
color: $mainColor !important;
|
color: $mainColor !important;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user