X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fsass%2Fprimeng-custom.scss;h=06cd3f05728946854ca02cc410a6eb10d6f6d61b;hb=22a59f33deb4b22a03abfbd6610de35b326e4584;hp=6057b1db0573dbe7a49ec2de6ffdc7d26704a990;hpb=3195cd1c118f5e020ab7e635d5a3dcdad2108b1a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/sass/primeng-custom.scss b/client/src/sass/primeng-custom.scss index 6057b1db0..06cd3f057 100644 --- a/client/src/sass/primeng-custom.scss +++ b/client/src/sass/primeng-custom.scss @@ -8,13 +8,20 @@ font-family: 'Glyphicons Halflings'; text-decoration: none !important; color: var(--mainForegroundColor) !important; + font-display: swap; +} + +my-edit-button, +my-delete-button, +my-button { + height: max-content; } // data table customizations p-table { .ui-table-caption { border: none !important; - background-color: #fff !important; + background-color: var(--mainBackgroundColor) !important; .caption { height: 40px; @@ -24,7 +31,7 @@ p-table { } th { - background-color: #fff !important; + background-color: var(--mainBackgroundColor) !important; outline: 0; } @@ -37,7 +44,7 @@ p-table { td { padding-left: 15px !important; - &:not(.action-cell) { + &:not(.action-cell):not(.expand-cell) { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; @@ -62,11 +69,14 @@ p-table { tr { &:hover { background-color: var(--submenuColor) !important; - } - &:not(:hover) { - .action-cell * { - display: none !important; + .action-cell { + .dropdown-root, + my-edit-button, + my-delete-button, + my-button { + display: block !important; + } } } @@ -122,10 +132,14 @@ p-table { &.pi-sort-up { @extend .glyphicon-triangle-top; + + color: var(--mainForegroundColor) !important; } &.pi-sort-down { @extend .glyphicon-triangle-bottom; + + color: var(--mainForegroundColor) !important; } } } @@ -136,6 +150,17 @@ p-table { padding: 0 !important; text-align: center; + .dropdown-root, + my-edit-button, + my-delete-button, + my-button { + display: none !important; + + &.show { + display: block !important; + } + } + my-edit-button + my-delete-button { margin-left: 5px; } @@ -193,7 +218,7 @@ p-table { height: auto !important; a { - color: #000 !important; + color: var(--mainForegroundColor) !important; font-weight: $font-semibold !important; margin: 0 5px !important; outline: 0 !important; @@ -214,6 +239,52 @@ p-table { } } +// multiselect customizations +p-multiselect { + .ui-multiselect-label { + font-size: 15px !important; + padding: 4px 30px 4px 12px !important; + + $width: 338px; + width: $width !important; + + @media screen and (max-width: $width) { + width: 100% !important; + } + } + + .pi.pi-chevron-down{ + margin-left: 0 !important; + + &::after { + @include select-arrow-down; + + right: 0; + margin-top: 6px; + } + } + + .ui-chkbox-icon { + //position: absolute !important; + width: 18px; + height: 18px; + //left: 0; + + //&::after { + // left: -2px !important; + //} + } + + .ui-multiselect-panel .ui-multiselect-items .ui-multiselect-item.ui-state-highlight { + background-color: var(--mainColorLighter); + } + + .ui-inputtext:enabled:focus:not(.ui-state-error) { + border-color: var(--mainColorLighter) !important; + box-shadow: none; + } +} + // PrimeNG calendar tweaks p-calendar .ui-datepicker { a { @@ -230,6 +301,7 @@ p-calendar .ui-datepicker { @extend .glyphicon-chevron-right; @include glyphicon-light; + color: #000 !important; text-align: right; .pi.pi-chevron-right { @@ -241,6 +313,7 @@ p-calendar .ui-datepicker { @extend .glyphicon-chevron-left; @include glyphicon-light; + color: #000 !important; text-align: left; .pi.pi-chevron-left { @@ -254,79 +327,128 @@ p-calendar .ui-datepicker { .pi.pi-chevron-up { @extend .glyphicon-chevron-up; @include glyphicon-light; + + color: #000 !important; } .pi.pi-chevron-down { @extend .glyphicon-chevron-down; @include glyphicon-light; + + color: #000 !important; } } } +p-tablecheckbox:hover div .ui-chkbox-box { + box-shadow: 0 0 0 .1rem rgba(87, 85, 217, .2); +} -.ui-chkbox-box { - &.ui-state-active { - border-color: var(--mainColor) !important; - background-color: var(--mainColor) !important; - } +.ui-chkbox { - .ui-chkbox-icon { - position: relative; - overflow: visible !important; + &, .ui-chkbox-box { + width: 18px !important; + height: 18px !important; + } - &:after { - content: ''; - position: absolute; - top: 1px; - left: 7px; - width: 5px; - height: 13px; - opacity: 0; - transform: rotate(45deg) scale(0); - border-right: 2px solid var(--mainBackgroundColor); - border-bottom: 2px solid var(--mainBackgroundColor); + .ui-chkbox-box { + &.ui-state-active { + border-color: var(--mainColor) !important; + background-color: var(--mainColor) !important; } - &.pi-check:after { - opacity: 1; - transform: rotate(45deg) scale(1); + .ui-chkbox-icon { + position: relative; + overflow: visible !important; + + &:after { + content: ''; + position: absolute; + top: 1px; + left: 6px; + width: 5px; + height: 12px; + opacity: 0; + transform: rotate(45deg) scale(0); + border-right: 2px solid var(--mainBackgroundColor); + border-bottom: 2px solid var(--mainBackgroundColor); + } + + &.pi-check:after { + opacity: 1; + transform: rotate(45deg) scale(1); + } } } } p-inputswitch { + height: 26px; + .ui-inputswitch-checked .ui-inputswitch-slider { background-color: var(--mainColor) !important; } + + &.small { + height: 20px; + + .ui-inputswitch { + width: 2.5em !important; + height: 1.45em !important; + + .ui-inputswitch-slider::before { + height: 1em !important; + width: 1em !important; + } + } + + .ui-inputswitch-checked .ui-inputswitch-slider::before { + transform: translateX(1em) !important; + } + } } p-toast { .ui-toast { - // Modal is 10005 - z-index: 10010 !important; + z-index: z(notification) !important; + + .ui-toast-close-icon { + font-family: "Glyphicons Halflings"; + opacity: 0; + + &:after { + content: "\e014"; + } + } + + &:hover .ui-toast-close-icon { + opacity: .3; + } } .ui-toast-message { font-family: $main-fonts; - - &.ui-toast-message-success { - color: #fff !important; - background-color: #8BC34A !important; + background-color: var(--mainBackgroundColor) !important; + border-radius: 5px; + box-sizing: border-box; + border: 1px solid #EBEEF5 !important; + box-shadow: 0 2px 12px 0 rgba(0, 0 , 0, .1); + overflow: hidden; + + &.ui-toast-message-success .glyphicon { + color: #8BC34A !important; } - &.ui-toast-message-error { - color: #fff !important; - background-color: #F44336 !important; + &.ui-toast-message-error .glyphicon { + color: #F44336 !important; } - &.ui-toast-message-info { - color: #fff !important; - background-color: #03A9F4 !important; + &.ui-toast-message-warn .glyphicon { + color: #F1680D !important; } - &.ui-toast-message-info { - color: #fff !important; - background-color: #03A9F4 !important; + &.ui-toast-message-info .glyphicon { + color: #03A9F4 !important; } .notification-block { @@ -354,3 +476,7 @@ p-toast { } } } + +.ui-widget { + font-family: $main-fonts !important; +}