X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fapp%2Fheader%2Fsearch-typeahead.component.scss;h=920aa61ae4b6ca9d3d204f9282508a7d395a1a91;hb=71489890a8ed7151b4ecaeed9439dd1cf12c1192;hp=93f021e332dd09c1184e0c02f2c745d868230d8b;hpb=f409f0c3b91d85c66b4841d72ea65b5fbe1483d8;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/header/search-typeahead.component.scss b/client/src/app/header/search-typeahead.component.scss index 93f021e33..920aa61ae 100644 --- a/client/src/app/header/search-typeahead.component.scss +++ b/client/src/app/header/search-typeahead.component.scss @@ -1,26 +1,63 @@ @import '_mixins'; +@import '_variables'; +@import '_bootstrap-variables'; +@import '~bootstrap/scss/mixins/_breakpoints'; + +#search-video { + @include peertube-input-text($search-input-width); + padding-left: 10px; + padding-right: 40px; // For the search icon + font-size: 14px; + + &::placeholder { + color: pvar(--inputPlaceholderColor); + } +} + +.icon.icon-search { + @include icon(25px); + height: 21px; + + background-color: pvar(--mainForegroundColor); + mask: url('../../assets/images/header/search.svg') no-repeat 50% 50%; + + // yolo + position: absolute; + margin-left: -35px; + margin-top: 5px; +} .jump-to-suggestions { top: 100%; left: 0; - z-index: 35; + z-index: z(typeahead); width: 100%; } +#typeahead-help, #typeahead-instructions, -#jump-to-results { - border: 1px solid var(--mainBackgroundColor); - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; - background: var(--mainBackgroundColor); +li.suggestion { + border: 1px solid pvar(--mainBackgroundColor); + background: pvar(--mainBackgroundColor); transition: .3s ease; transition-property: box-shadow; + cursor: pointer; + + // soft border-radius for the last suggestion and the link inside + &:last-of-type { + &, & ::ng-deep a { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; + } + } } +#typeahead-help, #typeahead-instructions { margin-top: 10px; width: 100%; padding: .5rem 1rem; + white-space: normal; ul { list-style: none; @@ -36,19 +73,31 @@ } #typeahead-container { - ::ng-deep input { - border: 1px solid var(--mainBackgroundColor) !important; + input { + border: 1px solid pvar(--mainBackgroundColor) !important; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 20px 0px; flex-grow: 1; transition: box-shadow .3s ease, width .2s ease; } - ::ng-deep span { + @media screen and (min-width: $mobile-view) { + margin-left: 10px; + } + + @media screen and (max-width: $small-view) { + flex: 1; + + input { + width: unset; + } + } + + span { right: 10px; } & > div:last-child { - // we have to switch the display and not the opacity, + // we have to switch the display and not the opacity, // to avoid clashing with the rest of the interface. display: none; } @@ -56,10 +105,13 @@ &:focus, ::ng-deep &:focus-within { & > div:last-child { - display: initial !important; - + @media screen and (min-width: $mobile-view) { + display: initial !important; + } + + #typeahead-help, #typeahead-instructions, - #jump-to-results { + li.suggestion { box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 20px -5px; } } @@ -69,40 +121,24 @@ border-end-start-radius: 0; border-end-end-radius: 0; - @media screen and (min-width: 900px) { + @include media-breakpoint-up(lg) { width: 500px; } } } } -a.focus-visible { - background-color: var(--mainHoverColor); -} - -a { - @include disable-default-a-behaviour; - width: 100%; - - &, &:hover { - color: var(--mainForegroundColor); - } -} - -.bg-gray { - background-color: var(--mainBackgroundColor); -} - -.text-gray-light { - color: var(--mainForegroundColor); -} - .glyphicon { top: 3px; } .advanced-search-status { - cursor: help; + height: max-content; + cursor: default; + + &.c-help { + cursor: help; + } } .small-title { @@ -111,11 +147,6 @@ a { margin-bottom: .5rem; } -my-global-icon { - width: 17px; - position: relative; - top: -2px; - margin: 5px; - - @include apply-svg-color(var(--mainForegroundColor)) +::ng-deep my-suggestion { + width: 100%; }