mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-05-16 17:22:38 +00:00
Search uses horizontal/vertical nav bar
This commit is contained in:
parent
8ead652d4e
commit
f9064c06c6
3 changed files with 154 additions and 128 deletions
|
|
@ -25,6 +25,7 @@
|
||||||
.board-content-container {
|
.board-content-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
.board-content {
|
.board-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
const React = require('react');
|
const React = require('react');
|
||||||
const PropTypes = require('prop-types');
|
const PropTypes = require('prop-types');
|
||||||
const Icon = require('stremio-icons/dom');
|
const Icon = require('stremio-icons/dom');
|
||||||
const { MainNavBar, MetaRow } = require('stremio/common');
|
const { HorizontalNavBar, MainVerticalNavBar, MetaRow } = require('stremio/common');
|
||||||
const useSearch = require('./useSearch');
|
const useSearch = require('./useSearch');
|
||||||
const styles = require('./styles');
|
const styles = require('./styles');
|
||||||
|
|
||||||
|
|
@ -9,8 +9,9 @@ const Search = ({ queryParams }) => {
|
||||||
const search = useSearch(queryParams);
|
const search = useSearch(queryParams);
|
||||||
return (
|
return (
|
||||||
<div className={styles['search-container']}>
|
<div className={styles['search-container']}>
|
||||||
<MainNavBar
|
<HorizontalNavBar
|
||||||
className={styles['nav-bar']}
|
className={styles['horizontal-nav-bar']}
|
||||||
|
route={'search'}
|
||||||
query={
|
query={
|
||||||
search.selected !== null ?
|
search.selected !== null ?
|
||||||
search.selected.extra.reduce((query, [name, value]) => {
|
search.selected.extra.reduce((query, [name, value]) => {
|
||||||
|
|
@ -23,8 +24,15 @@ const Search = ({ queryParams }) => {
|
||||||
:
|
:
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
route={'search'}
|
backButton={false}
|
||||||
|
searchBar={true}
|
||||||
|
addonsButton={true}
|
||||||
|
fullscreenButton={true}
|
||||||
|
notificationsMenu={true}
|
||||||
|
navMenu={true}
|
||||||
/>
|
/>
|
||||||
|
<div className={styles['search-content-container']}>
|
||||||
|
<MainVerticalNavBar className={styles['nav-bar']} route={'search'} />
|
||||||
<div className={styles['search-content']}>
|
<div className={styles['search-content']}>
|
||||||
{
|
{
|
||||||
search.selected === null || search.selected.extra.every(([name]) => name !== 'search') ?
|
search.selected === null || search.selected.extra.every(([name]) => name !== 'search') ?
|
||||||
|
|
@ -83,6 +91,7 @@ const Search = ({ queryParams }) => {
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,16 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: var(--color-background);
|
background-color: var(--color-background);
|
||||||
|
|
||||||
.nav-bar {
|
.horizontal-nav-bar {
|
||||||
flex: none;
|
flex: none;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-content-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
.search-content {
|
.search-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
|
|
@ -82,9 +87,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: @large) {
|
@media only screen and (min-width: @large) {
|
||||||
.search-container {
|
.search-container {
|
||||||
|
.search-content-container {
|
||||||
.search-content {
|
.search-content {
|
||||||
.search-row, .search-row-placeholder {
|
.search-row, .search-row-placeholder {
|
||||||
.meta-item, .meta-item-placeholder {
|
.meta-item, .meta-item-placeholder {
|
||||||
|
|
@ -96,9 +103,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: @large) {
|
@media only screen and (max-width: @large) {
|
||||||
.search-container {
|
.search-container {
|
||||||
|
.search-content-container {
|
||||||
.search-content {
|
.search-content {
|
||||||
.search-row, .search-row-placeholder {
|
.search-row, .search-row-placeholder {
|
||||||
.meta-item, .meta-item-placeholder {
|
.meta-item, .meta-item-placeholder {
|
||||||
|
|
@ -110,9 +119,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: @medium) {
|
@media only screen and (max-width: @medium) {
|
||||||
.search-container {
|
.search-container {
|
||||||
|
.search-content-container {
|
||||||
.search-content {
|
.search-content {
|
||||||
.search-row, .search-row-placeholder {
|
.search-row, .search-row-placeholder {
|
||||||
.meta-item, .meta-item-placeholder {
|
.meta-item, .meta-item-placeholder {
|
||||||
|
|
@ -124,9 +135,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: @small) {
|
@media only screen and (max-width: @small) {
|
||||||
.search-container {
|
.search-container {
|
||||||
|
.search-content-container {
|
||||||
.search-content {
|
.search-content {
|
||||||
.search-row, .search-row-placeholder {
|
.search-row, .search-row-placeholder {
|
||||||
.meta-item, .meta-item-placeholder {
|
.meta-item, .meta-item-placeholder {
|
||||||
|
|
@ -138,9 +151,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: @xsmall) {
|
@media only screen and (max-width: @xsmall) {
|
||||||
.search-container {
|
.search-container {
|
||||||
|
.search-content-container {
|
||||||
.search-content {
|
.search-content {
|
||||||
.search-row, .search-row-placeholder {
|
.search-row, .search-row-placeholder {
|
||||||
.meta-item, .meta-item-placeholder {
|
.meta-item, .meta-item-placeholder {
|
||||||
|
|
@ -152,3 +167,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue