diff --git a/assets/css/app.scss b/assets/css/app.scss index 2b7b260f60..9f66a17736 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -2,39 +2,10 @@ @tailwind components; @tailwind utilities; -@layer base { - [type='text'], - [type='email'], - [type='url'], - [type='password'], - [type='number'], - [type='date'], - [type='datetime-local'], - [type='month'], - [type='search'], - [type='tel'], - [type='time'], - [type='week'], - [multiple], - textarea, - select { - @apply rounded border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500; - } - - [type='checkbox'], - [type='radio'] { - @apply border-gray-300 text-blue-600 focus:ring-blue-500; - } -} - -.btn { - @apply font-bold py-2 px-4 rounded; -} .btn-blue { - @apply bg-blue-500 text-white; + @apply bg-primary text-white; } .btn-blue:hover { - @apply bg-blue-700; } @import '~cropper/dist/cropper.css'; @@ -45,36 +16,7 @@ @layer components { .card { - @apply bg-white rounded shadow-lg w-full; - } - - // Buttons. - - .btn { - //@apply inline-block text-black px-4 py-2 text-xs font-medium leading-6 text-center bg-gray-100 uppercase transition rounded shadow hover:shadow-lg focus:outline-none; - //disabled:cursor-not-allowed - //@apply block px-4 py-2 transition duration-100 ease-in-out focus:border-blue-500 focus:ring-2 focus:ring-blue-500 focus:outline-none focus:ring-opacity-50 disabled:opacity-50 ; - @apply font-bold h-10 inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2; - } - - .btn-primary { - @apply text-ch-text-primary bg-ch-primary hover:bg-ch-primary-dark focus:ring-ch-primary-light; - } - - .btn-secondary { - @apply text-ch-text-secondary bg-ch-secondary hover:bg-ch-secondary-dark focus:ring-ch-secondary-light; - } - - .btn-warning { - @apply text-ch-text-warning bg-ch-warning hover:bg-ch-warning-dark focus:ring-ch-warning-light; - } - - .btn-success { - @apply text-ch-text-success bg-ch-success hover:bg-ch-success-dark focus:ring-ch-success-light; - } - - .btn-danger { - @apply text-ch-text-error bg-ch-error hover:bg-ch-error-dark focus:ring-ch-error-light; + @apply rounded shadow-lg w-full; } // Buttons with icons. @@ -89,19 +31,18 @@ // Forms. .help-block { - @apply mt-2 text-xs text-gray-500; + @apply mt-2 text-xs; } .has-error .ch-form-label { - @apply h-8 text-red-500; + @apply h-8; } .has-error .help-block { - @apply text-red-500 italic text-xs; + @apply italic text-xs; } .has-error .ch-form-control { - @apply border-red-500; } legend { @@ -122,15 +63,13 @@ // Tables table { - @apply min-w-full divide-y divide-gray-200; + @apply min-w-full divide-y; } table thead { - @apply bg-gray-50; } table tbody { - @apply bg-white divide-y divide-gray-200; } table thead th, @@ -160,19 +99,15 @@ } .alert-info { - @apply text-ch-text-info bg-ch-info; } .alert-warning { - @apply text-ch-text-warning bg-ch-warning; } .alert-success { - @apply text-ch-text-success bg-ch-success; } .alert-danger { - @apply text-ch-text-error bg-ch-error; } // Tabs @@ -194,11 +129,11 @@ // Page header .page-header { - @apply text-gray-500 text-2xl flex flex-row gap-2; + @apply text-2xl flex flex-row gap-2; } #no-data-view { - @apply flex flex-col items-center justify-center p-4 space-y-4 antialiased text-gray-900; + @apply flex flex-col items-center justify-center p-4 space-y-4 antialiased; } .pull-right { @@ -210,16 +145,12 @@ } .ch-tool-icon { - @apply font-extrabold text-transparent bg-clip-text bg-ch-primary mr-0.5; } .ch-tool-icon-disabled { - @apply font-extrabold text-transparent bg-clip-text bg-gray-400 mr-0.5; } .ch-tool-icon-gradient { - @apply font-extrabold text-transparent bg-clip-text bg-gradient-to-br from-ch-primary to-ch-primary-light; } .ch-tool-icon-button { - @apply font-extrabold bg-clip-text bg-ch-text; } // Forms @@ -234,40 +165,11 @@ // Special - .badge { - @apply rounded-sm p-1 font-medium; - - &--error { - @apply bg-ch-error text-ch-text-error; - } - - &--success { - @apply bg-ch-success text-ch-text-success; - } - - &--warning { - @apply bg-ch-warning text-ch-text-warning; - } - - &--info { - @apply bg-ch-info text-ch-text-info; - } - - &--primary { - @apply bg-ch-primary text-ch-text-primary; - } - - &--secondary { - @apply bg-ch-secondary text-ch-text-secondary; - } - } - // Progress bars .progress { - @apply rounded-sm ring-1 ring-ch-secondary bg-ch-primary text-sm text-center min-h-full ml-12 mr-4; + @apply rounded-sm ring-1 text-sm text-center min-h-full ml-12 mr-4; } .progress .progress-bar { - @apply bg-ch-secondary text-ch-text-secondary; } // Pager @@ -312,44 +214,3 @@ @import "~@fancyapps/fancybox/dist/jquery.fancybox.css"; @import "~timepicker/jquery.timepicker.min.css"; //@import "~jquery-contextmenu/dist/jquery.contextMenu.css"; - -// Base Prime components -.p-checkbox { - width: 16px; - height: 16px; -} -.p-checkbox .p-checkbox-box { - border: 2px solid #d4d4d8; - background: #ffffff; - width: 16px; - height: 16px; - color: #3f3f46; - border-radius: 0.375rem; - transition: none; -} -.p-checkbox .p-checkbox-box .p-checkbox-icon { - transition-duration: 0.2s; - color: #ffffff; - font-size: 10px; -} -.p-checkbox .p-checkbox-box.p-highlight { - border-color: #4F46E5; - background: #4F46E5; -} -.p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box:hover { - border-color: #d4d4d8; -} -.p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box.p-focus { - outline: 0 none; - outline-offset: 0; - box-shadow: 0 0 0 1px #6366F1; - border-color: #4F46E5; -} -.p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box.p-highlight:hover { - border-color: #4F46E5; - background: #4F46E5; - color: #ffffff; -} -.p-checkbox.p-invalid > .p-checkbox-box { - border-color: #f0a9a7; -} diff --git a/assets/css/scorm.scss b/assets/css/scorm.scss index ba33a9c14a..2c76f45ceb 100644 --- a/assets/css/scorm.scss +++ b/assets/css/scorm.scss @@ -243,13 +243,11 @@ body { .scorm_item_section .section { background: url("../../public/img/scorm/folder-item-closed.png") no-repeat 10px center; padding: 10px 20px 10px 35px; - @apply text-ch-ternary; } .scorm_item_section.scorm_completed .section { background: url("../../public/img/scorm/folder-item-open.png") no-repeat 10px center; padding-right: 1.5em; - @apply text-ch-ternary; } .scorm_item_normal a:hover { @@ -273,7 +271,6 @@ body { padding: 0; display: inline-block; width: 100%; - @apply bg-ch-primary; } #scorm-info .description-autor p { @@ -294,12 +291,11 @@ body { } #scorm-info #progress_bar .progress { - @apply rounded-sm ring-1 ring-ch-secondary bg-white text-sm text-center min-h-full ml-12 mr-4; + @apply rounded-sm ring-1 bg-white text-sm text-center min-h-full ml-12 mr-4; } #scorm-info .progress-bar { line-height: 17px; - @apply bg-ch-secondary text-ch-text-secondary; } .scorm-title { @@ -444,27 +440,22 @@ body { text-align: center; border-radius: 100%; font-size: 20px; - @apply bg-ch-ternary text-ch-text-secondary; } .icon-toolbar .fa:hover, .icon-toolbar .mdi:hover { - @apply bg-ch-primary-light; } .expand .fa, .expand .mdi { - @apply bg-ch-ternary; } .expand .fa:hover, .expand .mdi:hover { - @apply bg-ch-primary-light text-ch-text-secondary; } .expand .fa:active, .expand .fa:focus, .expand .mdi:active, .expand .mdi:focus { - @apply bg-ch-primary-light text-ch-text-secondary; } .actions_lp { @@ -501,7 +492,7 @@ body { -webkit-transition: all 0.4s ease-out; -moz-transition: all 0.4s ease-out; transition: all 0.4s ease-out; - @apply border-2 border-ch-ternary-dark bg-ch-text-secondary; + @apply border-2; } .c-menu-right .circle { opacity: 0; @@ -510,7 +501,7 @@ body { padding: 2px; border-radius: 20px; background-color: #ffffff; - @apply border-2 border-ch-ternary-dark bg-ch-text-secondary; + @apply border-2; } .c-menu-left .open.circle { @@ -531,7 +522,6 @@ body { line-height: 35px; text-align: center; border-radius: 100%; - @apply text-ch-text-secondary; } .c-menu-left .circle a:hover { @@ -551,14 +541,12 @@ body { padding: 7px; background: #ffffff; font-size: 16px; - @apply border-2 border-ch-ternary-dark; + @apply border-2; } .menu-button:hover { - @apply bg-ch-ternary-light text-ch-text-secondary; } .menu-button-selected { - @apply bg-ch-ternary text-ch-text-secondary; } /* LP VIEW COLLAPSE */ @@ -671,19 +659,15 @@ body { } #learning_path_toc .child_item.lp_item_type_document.scorm_completed{ background: url(../../public/img/icons/svg/check-completed.svg) right center no-repeat; - @apply bg-ch-ternary; } #learning_path_toc .child_item.lp_item_type_document.scorm_not_attempted{ background: url(../../public/img/icons/svg/check-not-attempted.svg) right center no-repeat; - @apply bg-ch-ternary; } #learning_path_toc .root_item.lp_item_type_document.scorm_completed{ background: url(../../public/img/icons/svg/check-completed.svg) right center no-repeat; - @apply bg-ch-ternary; } #learning_path_toc .root_item.lp_item_type_document.scorm_not_attempted{ background: url(../../public/img/icons/svg/check-not-attempted.svg) right center no-repeat; - @apply bg-ch-ternary; } .status-heading .panel-heading .item-action{ @@ -704,42 +688,31 @@ body { width: 100%; } .scorm_completed .item a{ - @apply text-ch-ternary; } .scorm_completed .item a.scorm_highlighted{ - @apply text-ch-ternary; } .scorm_highlight .item { background: url("../../public/img/scorm/scorm_highlight.png") no-repeat 10px center !important; - @apply bg-ch-secondary text-ch-text-secondary; } .scorm_highlight.scorm_completed .item { background: url("../../public/img/scorm/scorm_current.png") no-repeat 10px center !important; - @apply bg-ch-secondary text-ch-text-secondary; } .scorm_highlight.scorm_failed .item { background: url("../../public/img/scorm/scorm_failed.png") no-repeat 10px center !important; - @apply bg-ch-secondary text-ch-text-secondary; } .scorm_item_normal.scorm_highlight { - @apply bg-ch-secondary text-ch-text-secondary; } .scorm_item_normal.scorm_highlight.scorm_not_attempted { background: url(../../public/img/icons/svg/check-not-attempted.svg) right center no-repeat; - @apply bg-ch-secondary text-ch-text-secondary; } .scorm_item_normal.scorm_highlight.scorm_completed { background: url(../../public/img/icons/svg/check-highlight.svg) right center no-repeat; - @apply bg-ch-secondary text-ch-text-secondary; } .scorm_item_normal.scorm_highlight a { - @apply text-ch-text-secondary; } #learning_path_toc .root_item.lp_item_type_document.scorm_highlight{ - @apply bg-ch-primary; } #learning_path_toc .child_item.lp_item_type_document.scorm_highlight{ - @apply bg-ch-primary; } #learning_path_right_zone .lp-view-tabs .tab-content { bottom: 0; diff --git a/assets/css/scss/_exercise.scss b/assets/css/scss/_exercise.scss index b9d55507a9..3366aceb41 100644 --- a/assets/css/scss/_exercise.scss +++ b/assets/css/scss/_exercise.scss @@ -116,7 +116,7 @@ } .exercise-draggable-answer-option { - @apply border border-gray-400 rounded-sm p-2 cursor-move bg-gray-100; + @apply border border-gray-50 rounded-sm p-2 cursor-move bg-gray-10; } .question-answer { @@ -134,7 +134,7 @@ } .droppable-item { - @apply p-2 bg-indigo-200; + @apply p-2; &.list-inline { @apply text-center align-middle; @@ -148,7 +148,7 @@ @apply p-2; &:empty { - @apply bg-indigo-300 rounded-sm; + @apply rounded-sm; min-height: 4rem; min-width: 6rem; } @@ -185,25 +185,25 @@ @apply mb-4; &-ribbon { - @apply mb-4 flex border bg-gray-100 rounded-md; + @apply mb-4 flex border bg-gray-10 rounded-md; &-title { - @apply font-bold p-3 rounded-l-md; + @apply font-bold p-3 rounded-l-md text-white; &--error { - @apply bg-ch-error text-ch-text-error; + @apply bg-error; } &--warning { - @apply bg-ch-warning text-ch-text-warning; + @apply bg-warning; } &--success { - @apply bg-ch-success text-ch-text-success; + @apply bg-success; } &--info { - @apply bg-ch-info text-ch-text-info; + @apply bg-info; } } diff --git a/assets/css/scss/_forms.scss b/assets/css/scss/_forms.scss deleted file mode 100755 index e69de29bb2..0000000000 diff --git a/assets/css/scss/components/_badges.scss b/assets/css/scss/components/_badges.scss new file mode 100644 index 0000000000..821493e408 --- /dev/null +++ b/assets/css/scss/components/_badges.scss @@ -0,0 +1,31 @@ +.badge { + @apply font-semibold py-1 px-4 rounded-full text-white; + + &--default { + @apply bg-gray-50; + } + + &--error { + @apply bg-error; + } + + &--success { + @apply bg-success; + } + + &--warning { + @apply bg-warning; + } + + &--info { + @apply bg-info; + } + + &--primary { + @apply bg-primary; + } + + &--secondary { + @apply bg-secondary; + } +} \ No newline at end of file diff --git a/assets/css/scss/components/_buttons.scss b/assets/css/scss/components/_buttons.scss new file mode 100644 index 0000000000..4bfa96d746 --- /dev/null +++ b/assets/css/scss/components/_buttons.scss @@ -0,0 +1,70 @@ +.btn { + @apply font-semibold px-6 py-3.5 rounded-md text-center transition; + + &--primary { + @apply bg-primary text-white; + + &:hover, + &:focus { + @apply bg-support-4; + } + + &:disabled { + @apply bg-gray-25 cursor-default select-none text-gray-50; + } + } + + &--primary-outline { + @apply bg-white border border-primary text-primary; + + &:hover, + &:focus { + @apply bg-primary text-white; + } + + &:disabled, + &.disabled{ + @apply bg-gray-10 border-gray-25 text-gray-50; + } + } + + &--secondary { + @apply bg-secondary text-white; + + &:hover, + &:focus { + @apply bg-support-5; + } + + &:disabled { + @apply bg-gray-25 cursor-default select-none text-gray-50; + } + } + + &--secondary-outline { + @apply bg-white border border-secondary text-secondary; + + &:hover, + &:focus { + @apply bg-secondary text-white; + } + + &:disabled, + &.disabled{ + @apply bg-gray-10 border-gray-25 text-gray-50; + } + } + + &--gray { + @apply bg-gray-90 text-white; + + &:hover, + &:focus { + @apply bg-black; + } + + &:disabled { + @apply bg-gray-25 cursor-default select-none text-gray-50; + } + } +} diff --git a/assets/css/scss/components/_forms.scss b/assets/css/scss/components/_forms.scss new file mode 100644 index 0000000000..4b670b0bed --- /dev/null +++ b/assets/css/scss/components/_forms.scss @@ -0,0 +1,61 @@ +form { + .form__field { + @apply w-full; + } + + input { + @apply w-full; + } +} + +// input switch +.p-inputswitch { + @apply align-middle h-4 w-8; + + .p-inputswitch-slider { + @apply bg-gray-50 rounded-full transition-none; + + &:before { + @apply bg-white duration-200 h-3 left-0.5 -mt-1.5 rounded-full w-3; + } + } + + &.p-inputswitch-checked { + .p-inputswitch-slider { + @apply bg-secondary; + + &:before { + @apply translate-x-4; + } + } + } + + &.p-focus { + .p-inputswitch-slider { + @apply outline-none outline-offset-0; + } + } + + ~ label { + @apply ml-4; + } +} + +.p-inputwrapper { + @apply w-full; +} + +// input text +.p-inputtext { + @apply appearance-none rounded-md transition w-full; +} + +.p-input-icon-right { + > .p-inputtext { + @apply pr-10; + } + + > i:last-of-type { + @apply right-3; + } +} \ No newline at end of file diff --git a/assets/css/scss/index.scss b/assets/css/scss/index.scss index dc507aa3f5..47f2222d05 100755 --- a/assets/css/scss/index.scss +++ b/assets/css/scss/index.scss @@ -4,7 +4,9 @@ //// Tools //@import 'inbox'; //@import 'install'; -//@import "forms"; +@import "components/badges"; +@import "components/buttons"; +@import "components/forms"; //@import 'announcement'; @import "layout/topbar"; @@ -13,6 +15,8 @@ @import 'layout/main_container'; @import 'layout/toast'; +@import 'login'; + @import 'forums'; @import 'exercise'; //@import 'jqueryui'; diff --git a/assets/vue/components/Loading.vue b/assets/vue/components/Loading.vue index 51b621f060..749df3a671 100644 --- a/assets/vue/components/Loading.vue +++ b/assets/vue/components/Loading.vue @@ -1,7 +1,7 @@