mobile cleanup plus some font fixes

This commit is contained in:
Sean Yesmunt 2020-01-08 14:20:30 -05:00
parent b44182e751
commit 0fe07b05c0
8 changed files with 35 additions and 16 deletions

View file

@ -3,6 +3,7 @@ import React from 'react';
import { withRouter } from 'react-router';
import { Form, FormField } from 'component/common/form';
import ReactPaginate from 'react-paginate';
import useIsMobile from 'effects/use-is-mobile';
const PAGINATE_PARAM = 'page';
@ -20,6 +21,7 @@ function Paginate(props: Props) {
const [textValue, setTextValue] = React.useState('');
const urlParams = new URLSearchParams(search);
const currentPage = Number(urlParams.get(PAGINATE_PARAM)) || 1;
const isMobile = useIsMobile();
function handleChangePage(newPageNumber: number) {
if (onPageChange) {
@ -63,14 +65,16 @@ function Paginate(props: Props) {
containerClassName="pagination"
/>
</fieldset-section>
<FormField
value={textValue}
onChange={e => setTextValue(e.target.value)}
className="paginate-channel"
label={__('Go to page:')}
type="text"
name="paginate-file"
/>
{!isMobile && (
<FormField
value={textValue}
onChange={e => setTextValue(e.target.value)}
className="paginate-channel"
label={__('Go to page:')}
type="text"
name="paginate-file"
/>
)}
</fieldset-group>
</Form>
);

View file

@ -81,13 +81,13 @@
font-size: 14px;
.media__thumb {
width: 4rem;
height: 2.25rem;
width: 5rem;
height: 3rem;
}
.channel-thumbnail {
width: 4rem;
height: 4rem;
width: 5rem;
height: 5rem;
}
}
}

View file

@ -3,11 +3,10 @@
}
.comment {
font-size: var(--font-multiplier-small);
padding: var(--spacing-small) 0;
display: flex;
flex-direction: row;
font-size: var(--font-small);
font-size: var(--font-body);
padding: var(--spacing-medium) 0;
margin: 0;

View file

@ -66,6 +66,7 @@
.media__subtitle {
align-self: flex-start;
color: var(--color-text-subtitle);
font-size: var(--font-small);
svg {
stroke: var(--color-text-subtitle);

View file

@ -5,6 +5,7 @@
@media (max-width: $breakpoint-small) {
display: none;
margin-left: 0;
}
}

View file

@ -6,6 +6,10 @@
+ .form-field {
margin-left: var(--spacing-medium);
}
@media (max-width: $breakpoint-small) {
font-size: var(--font-small);
}
}
.pagination__item {
@ -41,6 +45,16 @@
display: block;
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 {

View file

@ -46,7 +46,7 @@
.section__title--small {
@extend .section__title;
font-size: var(--font-body);
margin-top: var(--spacing-small);
margin-top: var(--spacing-medium);
}
.section__title--large {

View file

@ -18,7 +18,7 @@ html {
color: var(--color-text);
background-color: var(--color-background);
font-size: 14px;
font-size: 16px;
}
body {