|
|
|
@ -62,28 +62,74 @@ const Footer = ({ |
|
|
|
|
// }
|
|
|
|
|
// setToggleIcon(false);
|
|
|
|
|
// };
|
|
|
|
|
let isMobile = window.innerWidth <= 768 |
|
|
|
|
return ( |
|
|
|
|
<> |
|
|
|
|
<Wrapper> |
|
|
|
|
<nav |
|
|
|
|
style={{ |
|
|
|
|
display: "flex", |
|
|
|
|
justifyContent: "space-between", |
|
|
|
|
padding: "0rem 2rem", |
|
|
|
|
width: "100%", |
|
|
|
|
}} |
|
|
|
|
<nav className="nav-footer" |
|
|
|
|
// style={{display: isMobile?"":"flex" }}
|
|
|
|
|
> |
|
|
|
|
<nav className="footer-item"> |
|
|
|
|
|
|
|
|
|
<> |
|
|
|
|
|
|
|
|
|
<nav className="nav-footer-item" id="toggler"> |
|
|
|
|
<Item text={`${nowPage} / ${totalPage}`} /> |
|
|
|
|
<Item text={`${nowPage} / ${101}`} /> |
|
|
|
|
</nav> |
|
|
|
|
<nav style={{ direction: "rtl", flex: 1 }}> |
|
|
|
|
<ProgressBar value={nowPage} max={100} /> |
|
|
|
|
</nav> |
|
|
|
|
{isMobile ? ( |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<> |
|
|
|
|
<nav className="icon" > |
|
|
|
|
<BookCloseIcon onClick={() => onBookOptionChange({ |
|
|
|
|
...bookOption, |
|
|
|
|
flow: "scrolled-doc", |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
/> |
|
|
|
|
</nav> |
|
|
|
|
<nav className="icon" > |
|
|
|
|
<ScrollVerticalIcon onClick={() => onBookOptionChange({ |
|
|
|
|
...bookOption, |
|
|
|
|
flow: "paginated" |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
/> |
|
|
|
|
</nav> |
|
|
|
|
|
|
|
|
|
</> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
) : ( |
|
|
|
|
<> |
|
|
|
|
<nav className="icon" > |
|
|
|
|
<BookOpenIcon onClick={() => onBookOptionChange({ |
|
|
|
|
...bookOption, |
|
|
|
|
flow: "paginated" |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
/> |
|
|
|
|
</nav> |
|
|
|
|
<nav style={{ direction: "rtl" }}> |
|
|
|
|
<ProgressBar CountPage={CountPage} /> |
|
|
|
|
<nav className="icon" > |
|
|
|
|
<BookCloseIcon onClick={() => onBookOptionChange({ |
|
|
|
|
...bookOption, |
|
|
|
|
flow: "paginated" |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
/> |
|
|
|
|
</nav> |
|
|
|
|
<nav className="icon" > |
|
|
|
|
<ScrollVerticalIcon onClick={() => onBookOptionChange({ |
|
|
|
|
...bookOption, |
|
|
|
|
flow: "paginated" |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
/> |
|
|
|
|
</nav> |
|
|
|
|
|
|
|
|
|
{/* icons in desktop setting */} |
|
|
|
|
{/* <nav className="nav-icon"> |
|
|
|
|
|
|
|
|
|
<nav className="nav-icon"> |
|
|
|
|
{window.innerWidth > 768 ? ( |
|
|
|
|
<div className="display-icon" style={{ cursor: "pointer" }}> |
|
|
|
|
<nav |
|
|
|
|
style={{ width: "65px", marginLeft: "1rem", display: "flex" }} |
|
|
|
@ -104,7 +150,7 @@ const Footer = ({ |
|
|
|
|
> |
|
|
|
|
<BookCloseIcon onClick={() => onClickViewType(false)} /> |
|
|
|
|
</nav> |
|
|
|
|
{scrollToggle ? ( |
|
|
|
|
|
|
|
|
|
<nav |
|
|
|
|
style={{ width: "65px" }} |
|
|
|
|
onClick={() => setScrollToggle(!scrollToggle)} |
|
|
|
@ -118,7 +164,7 @@ const Footer = ({ |
|
|
|
|
} |
|
|
|
|
/> |
|
|
|
|
</nav> |
|
|
|
|
) : ( |
|
|
|
|
|
|
|
|
|
<nav |
|
|
|
|
style={{ width: "65px" }} |
|
|
|
|
onClick={() => !viewType.spread ? setScrollToggle(!scrollToggle) : setScrollToggle(false)} |
|
|
|
@ -132,75 +178,23 @@ const Footer = ({ |
|
|
|
|
} |
|
|
|
|
/> |
|
|
|
|
</nav> |
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
</nav> |
|
|
|
|
</div> |
|
|
|
|
) : ( |
|
|
|
|
"" |
|
|
|
|
)} |
|
|
|
|
</nav> |
|
|
|
|
</nav> |
|
|
|
|
</Wrapper> |
|
|
|
|
|
|
|
|
|
{/* mobile icon footer */} |
|
|
|
|
|
|
|
|
|
{window.innerWidth <= 768 ? ( |
|
|
|
|
<> |
|
|
|
|
<nav className="nav-footer"> |
|
|
|
|
<nav className="footer-item"> |
|
|
|
|
<nav className="nav-footer-item" id="toggler"> |
|
|
|
|
<Item text={`${nowPage} / ${100}`} /> |
|
|
|
|
</nav> |
|
|
|
|
<ProgressBar CountPage={CountPage} /> |
|
|
|
|
|
|
|
|
|
{/* icons in right of pages setting */} |
|
|
|
|
*/} </> |
|
|
|
|
|
|
|
|
|
<nav |
|
|
|
|
style={{ |
|
|
|
|
width: "25px", |
|
|
|
|
marginLeft: "1rem", |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
<ScrollVerticalIcon |
|
|
|
|
onClick={() => |
|
|
|
|
onBookOptionChange({ |
|
|
|
|
...bookOption, |
|
|
|
|
flow: "paginated", |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
/> |
|
|
|
|
</nav> |
|
|
|
|
<nav style={{ width: "25px", marginLeft: "1rem" }}> |
|
|
|
|
<ScrollHorizontalIcon |
|
|
|
|
onClick={() => |
|
|
|
|
onBookOptionChange({ |
|
|
|
|
...bookOption, |
|
|
|
|
flow: "scrolled-doc", |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
/> |
|
|
|
|
</nav> |
|
|
|
|
</nav> |
|
|
|
|
<Button>خرید کتاب</Button> |
|
|
|
|
</nav> |
|
|
|
|
</> |
|
|
|
|
) : ( |
|
|
|
|
"" |
|
|
|
|
)} |
|
|
|
|
</> |
|
|
|
|
</nav> |
|
|
|
|
{isMobile ? <Button>خرید کتاب</Button> : null} |
|
|
|
|
|
|
|
|
|
</nav> |
|
|
|
|
); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const Icon = styled.div` |
|
|
|
|
width: 16px; |
|
|
|
|
height: 16px; |
|
|
|
|
|
|
|
|
|
& > div, |
|
|
|
|
& > svg { |
|
|
|
|
width: 16px; |
|
|
|
|
height: 16px; |
|
|
|
|
} |
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
const Button = styled.button` |
|
|
|
|
width: 100%; |
|
|
|
|