parent
5cfa1c519f
commit
f0e7f8005c
26 changed files with 448 additions and 264 deletions
@ -0,0 +1,8 @@ |
||||
.MuiBreadcrumbs-li{ |
||||
a { |
||||
text-decoration: none; |
||||
font-family: numeralLight; |
||||
color: #6F7074; |
||||
letter-spacing: -1px; |
||||
} |
||||
} |
@ -0,0 +1,14 @@ |
||||
.mybooks { |
||||
width: 100vw; |
||||
max-width: 1250px; |
||||
margin: 0px auto; |
||||
padding: 0px 10px 40px; |
||||
direction: rtl; |
||||
overflow-x: hidden; |
||||
min-height: calc(100vh - 288px); |
||||
padding-top: 70px; |
||||
&__list { |
||||
max-width: 1000px; |
||||
margin: 0px auto; |
||||
} |
||||
} |
@ -1,32 +1,65 @@ |
||||
import React from 'react'; |
||||
|
||||
import './index.scss'; |
||||
import SlideshowRoundedIcon from "@material-ui/icons/SlideshowRounded"; |
||||
import "./index.scss"; |
||||
|
||||
const maxDesktopSize = 1250; |
||||
const maxMobileSize = 550; |
||||
|
||||
const fontSize = { |
||||
desktop: { |
||||
h2: window.innerWidth > maxDesktopSize ? 12 : window.innerWidth / 120, |
||||
h2: window.innerWidth > maxDesktopSize ? 14 : window.innerWidth / 100, |
||||
div: window.innerWidth > maxDesktopSize ? 14 : window.innerWidth / 100, |
||||
h3: window.innerWidth > maxMobileSize ? 16 : window.innerWidth / 80, |
||||
}, |
||||
mobile: { |
||||
h2: window.innerWidth > maxMobileSize ? 13 : window.innerWidth / 30, |
||||
div: window.innerWidth > maxMobileSize ? 13 : window.innerWidth / 30, |
||||
h3: window.innerWidth > maxMobileSize ? 16 : window.innerWidth / 25, |
||||
}, |
||||
}; |
||||
|
||||
export default function PowerPoint(props){ |
||||
return( |
||||
export default function PowerPoint(props) { |
||||
return ( |
||||
<> |
||||
{ |
||||
window.innerWidth > 1000 ?
|
||||
<a href={props.data.file} id="ppt" download className="ppt-box d-flex flex-column">
|
||||
<h2 style={{fontSize: fontSize.desktop.h2 }} className="d-flex align-items-center"><span></span>{props.data.title}</h2> |
||||
<div></div> |
||||
</a> : null |
||||
} |
||||
{ |
||||
window.innerWidth < 1000 ?
|
||||
<a href={props.data.file} id="ppt" download className="mobile-ppt-box d-flex flex-column">
|
||||
<h2 className="d-flex align-items-center"><span></span>{props.data.title}</h2> |
||||
<div></div> |
||||
</a> : null |
||||
}
|
||||
{window.innerWidth > 1000 ? ( |
||||
<div className="d-flex flex-column"> |
||||
<h3 style={{ fontSize: fontSize.desktop.h3 }}> |
||||
<SlideshowRoundedIcon style={{ fontSize: 30 }} /> فایل PDF |
||||
</h3> |
||||
<a |
||||
href={`https://dnvn.ir/api/v1/file/${props.data.fileIds}`} |
||||
id="ppt" |
||||
download |
||||
className="ppt-box d-flex flex-column" |
||||
> |
||||
<h2 |
||||
style={{ fontSize: fontSize.desktop.h2 }} |
||||
className="d-flex align-items-center" |
||||
> |
||||
<span></span> |
||||
{props.data.name} |
||||
</h2> |
||||
<div style={{ fontSize: fontSize.desktop.div }}> |
||||
برای دانلود این فایل روی اینجا کلیک کن |
||||
</div> |
||||
</a> |
||||
</div> |
||||
) : null} |
||||
{window.innerWidth < 1000 ? ( |
||||
<a |
||||
href={`https://dnvn.ir/api/v1/file/${props.data.fileIds}`} |
||||
id="ppt" |
||||
download |
||||
className="mobile-ppt-box d-flex flex-column" |
||||
> |
||||
<h2 className="d-flex align-items-center"> |
||||
<span></span> |
||||
{props.data.name} |
||||
</h2> |
||||
<div style={{ fontSize: fontSize.desktop.div }}> |
||||
برای دانلود این فایل روی اینجا کلیک کن |
||||
</div> |
||||
</a> |
||||
) : null} |
||||
</> |
||||
); |
||||
} |
Loading…
Reference in new issue