mobile cleanup plus some font fixes
This commit is contained in:
parent
b44182e751
commit
0fe07b05c0
8 changed files with 35 additions and 16 deletions
|
@ -3,6 +3,7 @@ import React from 'react';
|
||||||
import { withRouter } from 'react-router';
|
import { withRouter } from 'react-router';
|
||||||
import { Form, FormField } from 'component/common/form';
|
import { Form, FormField } from 'component/common/form';
|
||||||
import ReactPaginate from 'react-paginate';
|
import ReactPaginate from 'react-paginate';
|
||||||
|
import useIsMobile from 'effects/use-is-mobile';
|
||||||
|
|
||||||
const PAGINATE_PARAM = 'page';
|
const PAGINATE_PARAM = 'page';
|
||||||
|
|
||||||
|
@ -20,6 +21,7 @@ function Paginate(props: Props) {
|
||||||
const [textValue, setTextValue] = React.useState('');
|
const [textValue, setTextValue] = React.useState('');
|
||||||
const urlParams = new URLSearchParams(search);
|
const urlParams = new URLSearchParams(search);
|
||||||
const currentPage = Number(urlParams.get(PAGINATE_PARAM)) || 1;
|
const currentPage = Number(urlParams.get(PAGINATE_PARAM)) || 1;
|
||||||
|
const isMobile = useIsMobile();
|
||||||
|
|
||||||
function handleChangePage(newPageNumber: number) {
|
function handleChangePage(newPageNumber: number) {
|
||||||
if (onPageChange) {
|
if (onPageChange) {
|
||||||
|
@ -63,14 +65,16 @@ function Paginate(props: Props) {
|
||||||
containerClassName="pagination"
|
containerClassName="pagination"
|
||||||
/>
|
/>
|
||||||
</fieldset-section>
|
</fieldset-section>
|
||||||
<FormField
|
{!isMobile && (
|
||||||
value={textValue}
|
<FormField
|
||||||
onChange={e => setTextValue(e.target.value)}
|
value={textValue}
|
||||||
className="paginate-channel"
|
onChange={e => setTextValue(e.target.value)}
|
||||||
label={__('Go to page:')}
|
className="paginate-channel"
|
||||||
type="text"
|
label={__('Go to page:')}
|
||||||
name="paginate-file"
|
type="text"
|
||||||
/>
|
name="paginate-file"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</fieldset-group>
|
</fieldset-group>
|
||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
|
|
|
@ -81,13 +81,13 @@
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
||||||
.media__thumb {
|
.media__thumb {
|
||||||
width: 4rem;
|
width: 5rem;
|
||||||
height: 2.25rem;
|
height: 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.channel-thumbnail {
|
.channel-thumbnail {
|
||||||
width: 4rem;
|
width: 5rem;
|
||||||
height: 4rem;
|
height: 5rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,11 +3,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.comment {
|
.comment {
|
||||||
font-size: var(--font-multiplier-small);
|
|
||||||
padding: var(--spacing-small) 0;
|
padding: var(--spacing-small) 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
font-size: var(--font-small);
|
font-size: var(--font-body);
|
||||||
padding: var(--spacing-medium) 0;
|
padding: var(--spacing-medium) 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,7 @@
|
||||||
.media__subtitle {
|
.media__subtitle {
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
color: var(--color-text-subtitle);
|
color: var(--color-text-subtitle);
|
||||||
|
font-size: var(--font-small);
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
stroke: var(--color-text-subtitle);
|
stroke: var(--color-text-subtitle);
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
@media (max-width: $breakpoint-small) {
|
@media (max-width: $breakpoint-small) {
|
||||||
display: none;
|
display: none;
|
||||||
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
+ .form-field {
|
+ .form-field {
|
||||||
margin-left: var(--spacing-medium);
|
margin-left: var(--spacing-medium);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: $breakpoint-small) {
|
||||||
|
font-size: var(--font-small);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination__item {
|
.pagination__item {
|
||||||
|
@ -41,6 +45,16 @@
|
||||||
display: block;
|
display: block;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: $breakpoint-small) {
|
||||||
|
width: 2rem;
|
||||||
|
height: 2rem;
|
||||||
|
|
||||||
|
&:not(.pagination__item--previous):not(.pagination__item--next) {
|
||||||
|
font-weight: var(--font-weight-bold);
|
||||||
|
line-height: 2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination__item--break {
|
.pagination__item--break {
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
.section__title--small {
|
.section__title--small {
|
||||||
@extend .section__title;
|
@extend .section__title;
|
||||||
font-size: var(--font-body);
|
font-size: var(--font-body);
|
||||||
margin-top: var(--spacing-small);
|
margin-top: var(--spacing-medium);
|
||||||
}
|
}
|
||||||
|
|
||||||
.section__title--large {
|
.section__title--large {
|
||||||
|
|
|
@ -18,7 +18,7 @@ html {
|
||||||
|
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
background-color: var(--color-background);
|
background-color: var(--color-background);
|
||||||
font-size: 14px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
|
Loading…
Reference in a new issue