diff options
Diffstat (limited to 'src/assets')
-rw-r--r-- | src/assets/app.scss | 650 | ||||
-rw-r--r-- | src/assets/localization.scss | 9 | ||||
-rw-r--r-- | src/assets/multiselect.scss | 82 | ||||
-rw-r--r-- | src/assets/vars.scss | 23 | ||||
-rw-r--r-- | src/assets/vue-datepicker.scss | 39 |
5 files changed, 803 insertions, 0 deletions
diff --git a/src/assets/app.scss b/src/assets/app.scss new file mode 100644 index 0000000..28eeca8 --- /dev/null +++ b/src/assets/app.scss @@ -0,0 +1,650 @@ +@import "vars.scss"; +@import "multiselect.scss"; +@import "node_modules/bootstrap/scss/bootstrap"; + +#app { + font-family: BlinkMacSystemFont, segoe ui, Roboto, helvetica neue, Arial, noto sans, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol, noto color emoji; +} + +h1 { + font-size: 32px; +} + +h2 { + font-size: 26px; +} + +textarea.form-control { + border-radius: 19px; +} + +::-webkit-scrollbar { + width: 10px; +} + +.bg-maintenance { + color: white !important; + background-color: $maintenance !important; +} + +.bg-dark { + color: white; +} + +.text-maintenance { + color: $maintenance !important; +} + +.incident a, +.bg-maintenance a { + color: inherit; +} + +.list-group { + border-radius: 0.75rem; + + .dark & { + .list-group-item { + background-color: $dark-bg; + color: $dark-font-color; + border-color: $dark-border-color; + } + } +} + + +// optgroup +optgroup { + color: #b1b1b1; + option { + color: #212529; + } +} + +.dark { + optgroup { + color: #535864; + option { + color: $dark-font-color; + } + } +} + +// Scrollbar +::-webkit-scrollbar-thumb { + background: #ccc; + border-radius: 20px; +} + +.modal { + backdrop-filter: blur(3px); +} + +.modal-content { + border-radius: 1rem; + box-shadow: 0 15px 70px rgba(0, 0, 0, 0.1); + + .dark & { + box-shadow: 0 15px 70px rgb(0 0 0); + background-color: $dark-bg; + } +} + +.VuePagination__count { + font-size: 13px; + text-align: center; +} + +.shadow-box { + //overflow: hidden; // Forget why add this, but multiple select hide by this + box-shadow: 0 15px 70px rgba(0, 0, 0, 0.1); + padding: 10px; + border-radius: 10px; + + &.big-padding { + padding: 20px; + } +} + +.btn { + padding-left: 20px; + padding-right: 20px; +} + +.btn-sm { + border-radius: 25px; +} + +.btn-primary { + color: white; + + &:hover, &:active, &:focus, &.active { + color: white; + background-color: $highlight; + border-color: $highlight; + } + + .dark & { + color: $dark-font-color2; + } +} + +.btn-normal { + $bg-color: #F5F5F5; + + background-color: $bg-color; + border-color: $bg-color; + + &:hover { + $hover-color: darken($bg-color, 3%); + background-color: $hover-color; + border-color: $hover-color; + } +} + +.btn-warning { + color: white; + + &:hover, &:active, &:focus, &.active { + color: white; + } +} + +.btn-info { + color: white; + + &:hover, &:active, &:focus, &.active { + color: white; + } +} + +.btn-dark { + background-color: #161B22; +} + +.btn-outline-normal { + padding: 4px 10px; + border: 1px solid #ced4da; + border-radius: 25px; + background-color: transparent; + + .dark & { + color: $dark-font-color; + border: 1px solid $dark-font-color2; + } + + &.active { + background-color: $highlight-white; + + .dark & { + background-color: $dark-font-color2; + } + } +} + +@media (max-width: 550px) { + .table-shadow-box { + padding: 10px !important; + + thead { + display: none; + } + + tbody { + .shadow-box { + background-color: white; + } + } + + tr { + margin-top: 0 !important; + padding: 4px 10px !important; + display: block; + margin-bottom: 6px; + + td:first-child { + font-weight: bold; + } + + td:nth-child(-n+3) { + text-align: center; + } + + td:last-child { + text-align: left; + } + + td { + border-bottom: 1px solid $dark-font-color; + display: block; + padding: 4px; + + .badge { + margin: auto; + display: block; + width: 30%; + } + } + } + } +} + +// Dark Theme override here +.dark { + background-color: #090c10; + color: $dark-font-color; + + mark, .mark { + background-color: #b6ad86; + } + + &::-webkit-scrollbar-thumb, ::-webkit-scrollbar-thumb { + background: $dark-border-color; + } + + .shadow-box { + &:not(.alert) { + background-color: $dark-bg; + } + } + + .form-check-input { + background-color: $dark-bg2; + border-color: $dark-border-color; + } + + .input-group-text { + background-color: #282f39; + border-color: $dark-border-color; + color: $dark-font-color; + } + + .form-check-input:checked { + border-color: $primary; // Re-apply bootstrap border + } + + .form-switch .form-check-input { + background-color: #232f3b; + } + + a:not(.btn), + .table, + .nav-link { + color: $dark-font-color; + + &.btn-info { + color: white; + } + } + + .incident a, + .bg-maintenance a { + color: inherit; + } + + .form-control, + .form-control:focus, + .form-select, + .form-select:focus { + color: $dark-font-color; + background-color: $dark-bg2; + } + + .form-select:disabled { + color: rgba($dark-font-color, 0.7); + background-color: $dark-bg; + } + + .form-control, .form-select { + border-color: $dark-border-color; + } + + .form-control:disabled, .form-control[readonly] { + background-color: #232f3b; + opacity: 1; + } + + .table-hover > tbody > tr:hover > * { + --bs-table-accent-bg: #070a10; + color: $dark-font-color; + } + + .nav-pills .nav-link.active, .nav-pills .show > .nav-link { + color: $dark-font-color2; + } + + .bg-primary { + color: $dark-font-color2; + } + + .btn-secondary { + color: white; + } + + .btn-normal { + $bg-color: $dark-header-bg; + + color: $dark-font-color; + background-color: $bg-color; + border-color: $bg-color; + + &:hover { + $hover-color: darken($bg-color, 3%); + background-color: $hover-color; + border-color: $hover-color; + } + } + + .btn-warning { + color: $dark-font-color2; + + &:hover, &:active, &:focus, &.active { + color: $dark-font-color2; + } + } + + .btn-close { + box-shadow: none; + filter: invert(1); + + &:hover { + opacity: 0.6; + } + } + + .modal-header { + border-color: $dark-bg; + } + + .modal-footer { + border-color: $dark-bg; + } + + // Pagination + .page-item.disabled .page-link { + background-color: $dark-bg; + border-color: $dark-border-color; + } + + .page-link { + background-color: $dark-bg; + border-color: $dark-border-color; + color: $dark-font-color; + } + + .monitor-list { + .item { + &:hover { + background-color: $dark-bg2; + } + + &.active { + background-color: $dark-bg2; + } + } + } + + @media (max-width: 550px) { + .table-shadow-box { + tbody { + .shadow-box { + background-color: $dark-bg2; + + td { + border-bottom: 1px solid $dark-border-color; + } + } + } + } + } + + .alert { + &.bg-info, + &.bg-warning, + &.bg-danger, + &.bg-maintenance, + &.bg-light { + color: $dark-font-color2; + } + } + +} + +/* + * Transitions + */ + +// page-change +.slide-fade-enter-active { + transition: all 0.2s $easing-in; +} + +.slide-fade-leave-active { + transition: all 0.2s $easing-in; +} + +.slide-fade-enter-from, +.slide-fade-leave-to { + transform: translateY(50px); + opacity: 0; +} + +.slide-fade-right-enter-active { + transition: all 0.2s $easing-in; +} + +.slide-fade-right-leave-active { + transition: all 0.2s $easing-in; +} + +.slide-fade-right-enter-from, +.slide-fade-right-leave-to { + transform: translateX(50px); + opacity: 0; +} + +.slide-fade-up-enter-active { + transition: all 0.2s $easing-in; +} + +.slide-fade-up-leave-active { + transition: all 0.2s $easing-in; +} + +.slide-fade-up-enter-from, +.slide-fade-up-leave-to { + transform: translateY(-50px); + opacity: 0; +} + +.monitor-list { + &.scrollbar { + overflow-y: auto; + } + + @media (max-width: 770px) { + &.scrollbar { + height: calc(100% - 97px); + } + } + + .item { + display: block; + text-decoration: none; + padding: 13px 15px 10px 15px; + border-radius: 10px; + transition: all ease-in-out 0.15s; + + &.disabled { + opacity: 0.3; + } + + .info { + white-space: nowrap; + overflow: hidden; + } + + &:hover { + background-color: $highlight-white; + } + + &.active { + background-color: #cdf8f4; + } + .tags { + // Removes margin to line up tags list with uptime percentage + margin-left: -0.25rem; + } + } +} + +.alert-success { + color: #122f21; + background-color: $primary; + border-color: $primary; +} + +.alert-info { + color: #055160; + background-color: #cff4fc; + border-color: #cff4fc; +} + +.alert-danger { + color: #842029; + background-color: #f8d7da; + border-color: #f8d7da; +} + +.btn-success { + color: #fff; + background-color: #4caf50; + border-color: #4caf50; +} + +[contenteditable=true] { + transition: all $easing-in 0.2s; + background-color: rgba(239, 239, 239, 0.7); + border-radius: 8px; + + &.no-bg { + background-color: transparent !important; + } + + &:focus { + outline: 0 solid #eee; + background-color: rgba(245, 245, 245, 0.9); + } + + &:hover { + background-color: rgba(239, 239, 239, 0.8); + } + + .dark & { + background-color: rgba(239, 239, 239, 0.2); + } + + /* + &::after { + margin-left: 5px; + content: "🖊️"; + font-size: 13px; + color: #eee; + } + */ + +} + +.action { + transition: all $easing-in 0.2s; + + &:hover { + cursor: pointer; + transform: scale(1.2); + } +} + +.vue-image-crop-upload .vicp-wrap { + border-radius: 10px !important; +} + +.spinner { + color: $primary; +} + +.prism-editor__textarea { + outline: none !important; +} + +.prism-editor__container { + .important { + font-weight: var(--bs-body-font-weight) !important; + } +} + +h5.settings-subheading::after { + content: ""; + display: block; + width: 50%; + padding-top: 8px; + border-bottom: 1px solid $dark-border-color; +} + +/* required class */ +.code-editor, .css-editor { + /* we dont use `language-` classes anymore so thats why we need to add background and text color manually */ + + border-radius: 1rem; + padding: 10px 5px; + border: 1px solid #ced4da; + + .dark & { + background: $dark-bg2; + border: 1px solid $dark-border-color; + } +} + + +$shadow-box-padding: 20px; + +.shadow-box-with-fixed-bottom-bar { + padding-top: $shadow-box-padding; + padding-bottom: 0; + padding-right: $shadow-box-padding; + padding-left: $shadow-box-padding; +} + +.fixed-bottom-bar { + position: sticky; + bottom: 0; + margin-left: -$shadow-box-padding; + margin-right: -$shadow-box-padding; + z-index: 100; + background-color: rgba(white, 0.2); + backdrop-filter: blur(2px); + border-radius: 0 0 10px 10px; + + .dark & { + background-color: rgba($dark-header-bg, 0.9); + } +} + +@media (max-width: 770px) { + .toast-container { + margin-bottom: 100px !important; + } +} + +@media (max-width: 550px) { + .toast-container { + margin-bottom: 126px !important; + } +} + +.zoom-cursor { + cursor: zoom-in; +} + +// Localization + +@import "localization.scss"; diff --git a/src/assets/localization.scss b/src/assets/localization.scss new file mode 100644 index 0000000..97be377 --- /dev/null +++ b/src/assets/localization.scss @@ -0,0 +1,9 @@ +html[lang='fa'] { + #app { + font-family: 'IRANSans', 'Iranian Sans','B Nazanin', 'Tahoma', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, segoe ui, Roboto, helvetica neue, Arial, noto sans, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol, noto color emoji; + } +} + +ul.multiselect__content { + padding-left: 0 !important; +} diff --git a/src/assets/multiselect.scss b/src/assets/multiselect.scss new file mode 100644 index 0000000..bb24db7 --- /dev/null +++ b/src/assets/multiselect.scss @@ -0,0 +1,82 @@ +@import "vars.scss"; +@import "node_modules/vue-multiselect/dist/vue-multiselect"; + +.multiselect { + .dark & { + color: $dark-font-color; + } +} + +.multiselect__tags { + border-radius: 1.5rem; + border: 1px solid #ced4da; + min-height: 38px; + padding: 6px 40px 0 8px; +} + +.multiselect--active .multiselect__tags { + border-radius: 1rem; +} + +.multiselect__option--highlight { + background: $primary !important; + color: $dark-font-color2 !important; +} + +.multiselect__option--highlight::after { + background: $primary !important; + color: $dark-font-color2 !important; +} + +.multiselect__tag { + border-radius: $border-radius; + margin-bottom: 0; + padding: 6px 26px 6px 10px; + background: $primary !important; +} + +.multiselect__placeholder { + font-size: 1rem; + padding-left: 6px; + padding-top: 0; + padding-bottom: 0; + margin-bottom: 0; + opacity: 0.67; +} + +.multiselect__input, +.multiselect__single { + line-height: 14px; + margin-bottom: 0; +} + +.dark { + .multiselect__tag { + color: $dark-font-color2; + } + + .multiselect__tags { + background-color: $dark-bg2; + border-color: $dark-border-color; + } + + .multiselect__input, + .multiselect__single { + background-color: $dark-bg2; + color: $dark-font-color; + } + + .multiselect__content-wrapper { + background-color: $dark-bg2; + border-color: $dark-border-color; + z-index: 150; + } + + .multiselect--above .multiselect__content-wrapper { + border-color: $dark-border-color; + } + + .multiselect__option--selected { + background-color: $dark-bg; + } +} diff --git a/src/assets/vars.scss b/src/assets/vars.scss new file mode 100644 index 0000000..7250de1 --- /dev/null +++ b/src/assets/vars.scss @@ -0,0 +1,23 @@ +$primary: #5cdd8b; +$danger: #dc3545; +$warning: #f8a306; +$maintenance: #1747f5; +$link-color: #111; +$border-radius: 50rem; +$secondary-text: #aaa; + +$highlight: #7ce8a4; +$highlight-white: #e7faec; + +$dark-font-color: #b1b8c0; +$dark-font-color2: #020b05; +$dark-bg: #0d1117; +$dark-bg2: #070a10; +$dark-border-color: #1d2634; +$dark-header-bg: #161b22; + +$easing-in: cubic-bezier(0.54, 0.78, 0.55, 0.97); +$easing-out: cubic-bezier(0.25, 0.46, 0.45, 0.94); +$easing-in-out: cubic-bezier(0.79, 0.14, 0.15, 0.86); + +$dropdown-border-radius: 0.5rem; diff --git a/src/assets/vue-datepicker.scss b/src/assets/vue-datepicker.scss new file mode 100644 index 0000000..dedbc08 --- /dev/null +++ b/src/assets/vue-datepicker.scss @@ -0,0 +1,39 @@ +@import "@vuepic/vue-datepicker/dist/main.css"; +@import "vars.scss"; + +// Must use #{ } +// Remark: https://stackoverflow.com/questions/50202991/unable-to-set-scss-variable-to-css-variable +.dp__theme_dark { + --dp-background-color: #{$dark-bg2}; + --dp-text-color: #{$dark-font-color}; + --dp-hover-color: #484848; + --dp-hover-text-color: #ffffff; + --dp-hover-icon-color: #959595; + --dp-primary-color: #{#5cdd8b}; + --dp-primary-text-color: #ffffff; + --dp-secondary-color: #494949; + --dp-border-color: #{$dark-border-color}; + --dp-menu-border-color: #2d2d2d; + --dp-border-color-hover: #{$dark-border-color}; + --dp-disabled-color: #212121; + --dp-scroll-bar-background: #212121; + --dp-scroll-bar-color: #484848; + --dp-success-color: #{$primary}; + --dp-success-color-disabled: #428f59; + --dp-icon-color: #959595; + --dp-danger-color: #e53935; + --dp-highlight-color: rgba(0, 92, 178, 0.2); +} + +.dp__input { + border-radius: $border-radius; +} + +// Fix: Full width of text input when using "inline textInput inlineWithInput" mode +.dp__main > div[aria-label="Datepicker input"] { + width: 100%; +} + +.dp__main > div[aria-label="Datepicker menu"]:nth-child(2) { + margin-top: 20px; +} |