|
|
@ -62,28 +62,74 @@ const Footer = ({ |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// setToggleIcon(false);
|
|
|
|
// setToggleIcon(false);
|
|
|
|
// };
|
|
|
|
// };
|
|
|
|
|
|
|
|
let isMobile = window.innerWidth <= 768 |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<> |
|
|
|
<nav className="nav-footer" |
|
|
|
<Wrapper> |
|
|
|
// style={{display: isMobile?"":"flex" }}
|
|
|
|
<nav |
|
|
|
|
|
|
|
style={{ |
|
|
|
|
|
|
|
display: "flex", |
|
|
|
|
|
|
|
justifyContent: "space-between", |
|
|
|
|
|
|
|
padding: "0rem 2rem", |
|
|
|
|
|
|
|
width: "100%", |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
<nav className="footer-item"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<> |
|
|
|
|
|
|
|
|
|
|
|
<nav className="nav-footer-item" id="toggler"> |
|
|
|
<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> |
|
|
|
<nav style={{ direction: "rtl" }}> |
|
|
|
<nav className="icon" > |
|
|
|
<ProgressBar CountPage={CountPage} /> |
|
|
|
<BookCloseIcon onClick={() => onBookOptionChange({ |
|
|
|
|
|
|
|
...bookOption, |
|
|
|
|
|
|
|
flow: "paginated" |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</nav> |
|
|
|
|
|
|
|
<nav className="icon" > |
|
|
|
|
|
|
|
<ScrollVerticalIcon onClick={() => onBookOptionChange({ |
|
|
|
|
|
|
|
...bookOption, |
|
|
|
|
|
|
|
flow: "paginated" |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/> |
|
|
|
</nav> |
|
|
|
</nav> |
|
|
|
|
|
|
|
|
|
|
|
{/* icons in desktop setting */} |
|
|
|
{/* <nav className="nav-icon"> |
|
|
|
|
|
|
|
|
|
|
|
<nav className="nav-icon"> |
|
|
|
|
|
|
|
{window.innerWidth > 768 ? ( |
|
|
|
|
|
|
|
<div className="display-icon" style={{ cursor: "pointer" }}> |
|
|
|
<div className="display-icon" style={{ cursor: "pointer" }}> |
|
|
|
<nav |
|
|
|
<nav |
|
|
|
style={{ width: "65px", marginLeft: "1rem", display: "flex" }} |
|
|
|
style={{ width: "65px", marginLeft: "1rem", display: "flex" }} |
|
|
@ -94,7 +140,7 @@ const Footer = ({ |
|
|
|
}} |
|
|
|
}} |
|
|
|
className={`${viewType.spread ? "active" : ''}`} |
|
|
|
className={`${viewType.spread ? "active" : ''}`} |
|
|
|
> |
|
|
|
> |
|
|
|
<BookOpenIcon onClick={() => !scrollToggle ? onClickViewType(true) : null } /> |
|
|
|
<BookOpenIcon onClick={() => !scrollToggle ? onClickViewType(true) : null} /> |
|
|
|
</nav> |
|
|
|
</nav> |
|
|
|
<nav |
|
|
|
<nav |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
@ -104,7 +150,7 @@ const Footer = ({ |
|
|
|
> |
|
|
|
> |
|
|
|
<BookCloseIcon onClick={() => onClickViewType(false)} /> |
|
|
|
<BookCloseIcon onClick={() => onClickViewType(false)} /> |
|
|
|
</nav> |
|
|
|
</nav> |
|
|
|
{scrollToggle ? ( |
|
|
|
|
|
|
|
<nav |
|
|
|
<nav |
|
|
|
style={{ width: "65px" }} |
|
|
|
style={{ width: "65px" }} |
|
|
|
onClick={() => setScrollToggle(!scrollToggle)} |
|
|
|
onClick={() => setScrollToggle(!scrollToggle)} |
|
|
@ -118,10 +164,10 @@ const Footer = ({ |
|
|
|
} |
|
|
|
} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</nav> |
|
|
|
</nav> |
|
|
|
) : ( |
|
|
|
|
|
|
|
<nav |
|
|
|
<nav |
|
|
|
style={{ width: "65px" }} |
|
|
|
style={{ width: "65px" }} |
|
|
|
onClick={() => !viewType.spread ? setScrollToggle(!scrollToggle) :setScrollToggle(false) } |
|
|
|
onClick={() => !viewType.spread ? setScrollToggle(!scrollToggle) : setScrollToggle(false)} |
|
|
|
> |
|
|
|
> |
|
|
|
<ScrollHorizontalIcon |
|
|
|
<ScrollHorizontalIcon |
|
|
|
onClick={() => |
|
|
|
onClick={() => |
|
|
@ -132,75 +178,23 @@ const Footer = ({ |
|
|
|
} |
|
|
|
} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</nav> |
|
|
|
</nav> |
|
|
|
)} |
|
|
|
|
|
|
|
</nav> |
|
|
|
</nav> |
|
|
|
</div> |
|
|
|
</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> |
|
|
|
</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` |
|
|
|
const Button = styled.button` |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|