update 21 files

front
Reza_ashrafi 2 years ago
parent 2253102e3e
commit e9d37eeae1
  1. 25
      public/index.html
  2. 6
      src/views/Callback/index.js
  3. 6
      src/views/Cart/index.js
  4. 18
      src/views/Checkout/index.js
  5. 17
      src/views/Home/Download/index.js
  6. 52
      src/views/Home/Footer/index.js
  7. 4
      src/views/Home/HomeScroll/Product/index.js
  8. 12
      src/views/Home/HomeScroll/index.js
  9. 10
      src/views/Home/HomeSearch/index.js
  10. 40
      src/views/Home/HomeSlider/Blog/index.js
  11. 2
      src/views/Home/HomeSlider/Header/index.js
  12. 25
      src/views/Home/HomeSlider/index.js
  13. 12
      src/views/Home/HomeStatic/index.js
  14. 6
      src/views/Home/Membership/index.js
  15. 28
      src/views/Home/Navbar/Laptop/index.js
  16. 4
      src/views/Home/Navbar/Mobile/index.js
  17. 20
      src/views/Home/SingleBlog/index.js
  18. 6
      src/views/Product/index.js
  19. 6
      src/views/Products/index.js
  20. 6
      src/views/QR/index.js

@ -1,13 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="false" />
<meta
name="viewport"
content="width=device-width, initial-scale=1"
user-scalable="false"
/>
<meta name="theme-color" content="#000000" />
<meta name="description" content="دانوین" />
<link href="https://api.mapbox.com/mapbox-gl-js/v1.10.1/mapbox-gl.css" rel="stylesheet" />
<link
href="https://api.mapbox.com/mapbox-gl-js/v1.10.1/mapbox-gl.css"
rel="stylesheet"
/>
<meta name="mobile-web-app-capable" content="yes" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<meta name="apple-mobile-web-app-capable" content="yes" />
@ -19,7 +25,7 @@
<script src="en.js"></script>
<script>
const lang = localStorage.getItem("language");
window.lang = lang
window.lang = lang;
window.ar = ar;
window.en = en;
function t(val) {
@ -48,8 +54,14 @@
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WVV8H9L" height="0" width="0"
style="display: none; visibility: hidden"></iframe></noscript>
<noscript
><iframe
src="https://www.googletagmanager.com/ns.html?id=GTM-WVV8H9L"
height="0"
width="0"
style="display: none; visibility: hidden"
></iframe
></noscript>
<!-- End Google Tag Manager (noscript) -->
<div id="root"></div>
<script>
@ -71,5 +83,4 @@
}
</script>
</body>
</html>

@ -205,7 +205,11 @@ class Callback extends Component {
<Navbar />
{/* <h1 style={{ fontSize: fontSize.mobile.h1 }}>{window.t("سبد خرید")}</h1> */}
<Status status={true} />
<div className="d-flex">
<div
className={`d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<Table
list={list}
handleCounter={this.handleCounter}

@ -272,7 +272,11 @@ class Cart extends Component {
<h1 style={{ fontSize: fontSize.mobile.h1 }}>
{window.t("سبد پیش خرید")}
</h1>
<div className="d-flex">
<div
className={`d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<Table
list={list}
handleCounter={this.handleCounter}

@ -193,7 +193,11 @@ class Cart extends Component {
</header>
<span>{window.t("مشخصات تحویل گیرنده")}</span>
<br />
<div className="d-flex">
<div
className={`d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<div class="checkout__forms--right">
<Input
name="recieverName"
@ -361,7 +365,11 @@ class Cart extends Component {
</div>
) : null}
<h1 style={{ fontSize: 19 }}>{window.t("جزئیات صورتحساب")}</h1>
<div className="d-flex">
<div
className={`d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<Table
list={list}
handleCounter={this.handleCounter}
@ -372,7 +380,11 @@ class Cart extends Component {
</div>
<span>{window.t("مشخصات تحویل گیرنده")}</span>
<br />
<div className="d-flex">
<div
className={`d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<div class="checkout__forms--right2">
<Input
name="recieverName"

@ -7,8 +7,17 @@ const H_DownloadApp = () => {
return (
<>
{window.innerWidth > 1000 ? (
<div className="h-download-app" id="download">
<div className="h-download-app-text">
<div
className={`h-download-app d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
id="download"
>
<div
className={`h-download-app-text ${
window.lang === "en" ? "text-start" : ""
}`}
>
{window.t("لذت یادگیری را با")}
<span>{window.t("دانوین")}</span> {window.t("تجربه کنید")}
</div>
@ -17,7 +26,9 @@ const H_DownloadApp = () => {
<a
download
href="https://danovin.ir/app.apk"
className="h-download-app-content-box2"
className={`h-download-app-content-box2 d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<div className="h-download-app-content-box2-app-img-container">
<img

@ -11,10 +11,26 @@ export default class Footer extends Component {
return (
<>
{window.innerWidth > 1000 ? (
<footer className="footer d-flex flex-column">
<div className="footer-container d-flex">
<div className="footer-container__content d-flex">
<div className="footer-container__content--box first d-flex flex-column">
<footer
className={`footer d-flex flex-column ${
window.lang === "en" ? "align-items-end" : ""
}`}
>
<div
className={`footer-container d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<div
className={`footer-container__content d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<div
className={`footer-container__content--box first d-flex flex-column ${
window.lang === "en" ? "align-items-start" : ""
}`}
>
<h1>{window.t("دانوین کجاست؟")}</h1>
<p className="mt-2">
{window.t(
@ -74,9 +90,19 @@ export default class Footer extends Component {
</div>
</div>
</div>
<div className="footer-container__content--box second d-flex flex-column">
<h1>{window.t("دسترسی سریع")}</h1>
<ul>
<div
className={`footer-container__content--box second d-flex flex-column ${
window.lang === "en" ? "align-items-start" : ""
}`}
>
<h1 className={`${window.lang === "en" ? "text-start" : ""}`}>
{window.t("دسترسی سریع")}
</h1>
<ul
className={`d-flex flex-column ${
window.lang === "en" ? "align-items-start" : ""
}`}
>
{fastAccess.map((item, i) => (
<li key={i}>
<Link to={item.link}>{item.name}</Link>
@ -84,9 +110,17 @@ export default class Footer extends Component {
))}
</ul>
</div>
<div className="footer-container__content--box second d-flex flex-column">
<div
className={`footer-container__content--box second d-flex flex-column ${
window.lang === "en" ? "align-items-start" : ""
}`}
>
<h1>{window.t("لینک های کاربردی")}</h1>
<ul>
<ul
className={`d-flex flex-column ${
window.lang === "en" ? "align-items-start" : ""
}`}
>
{fastAccess.map((item, i) => (
<li key={i}>
<Link to={item.link}>{item.name}</Link>

@ -8,7 +8,9 @@ export default class Product extends Component {
return (
<article
style={{ minWidth: window.innerWidth / number }}
className="scroll-product d-flex flex-column"
className={`scroll-product d-flex flex-column ${
window.lang === "en" ? "" : ""
}`}
>
<Link to={`/books/${data.id}`}>
<img src={data.image} alt={data.title} />

@ -13,8 +13,16 @@ export default class HomeScroll extends Component {
className="mobile-home-scroll d-flex flex-column"
style={{ height: height }}
>
<div className="mobile-home-scroll__header d-flex">
<div className="mobile-home-scroll__header--right d-flex">
<div
className={`mobile-home-scroll__header d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<div
className={`mobile-home-scroll__header--right d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<h1>{title}</h1>
<span></span>
</div>

@ -26,10 +26,16 @@ class HomeSearch extends Component {
render() {
const { levels } = this.props;
return window.innerWidth > 1000 ? (
<div className="home-search d-flex">
<div
className={`home-search d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<input
placeholder={window.t("جستجو در عناوین کتاب ...")}
className="home-search__input d-flex"
className={`home-search__input d-flex ${
window.lang === "en" ? "flex-row-reverse text-start" : ""
}`}
type="text"
name="searchBox"
onChange={(e) =>

@ -30,12 +30,19 @@ export default class Simple extends Component {
<>
{window.innerWidth > 1000 ? (
<article
className="slider-blog d-flex flex-column"
className={`slider-blog d-flex flex-column ${
window.lang === "en" ? "align-items-end" : ""
}`}
style={{
height: height,
}}
>
<Link to={`/blogs/${data.id}`}>
<Link
to={`/blogs/${data.id}`}
className={`d-flex flex-column ${
window.lang === "en" ? "align-items-end" : ""
}`}
>
{data.type === "image" ? (
<img
src={`https://dnvn.ir/api/v1/file/${data.fileIds}`}
@ -49,16 +56,31 @@ export default class Simple extends Component {
<img src={music} alt={data.title} />
) : null}
<h1 style={{ fontSize: fontSize.desktop.h1 }}>{data.title}</h1>
<h2 style={{ fontSize: fontSize.desktop.h2 }}>
<h2
style={{ fontSize: fontSize.desktop.h2 }}
className={`${window.lang === "en" ? "text-start" : ""}`}
>
<div
dangerouslySetInnerHTML={{ __html: data.text }}
style={{ height: 80, overflow: "hidden" }}
></div>
</h2>
<div className="slider-blog__footer d-flex mt-3">
<div className="d-flex">
<div
className={`slider-blog__footer d-flex mt-3 ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<div
className={`d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
{/* <img src={} /> */}
<div className="d-flex flex-column">
<div
className={`d-flex flex-column ${
window.lang === "en" ? "align-items-end" : ""
}`}
>
<span style={{ fontSize: fontSize.desktop.span }}>
{window.t("مطالعه کامل در {data.duration} دقیقه")}{" "}
</span>
@ -120,7 +142,11 @@ export default class Simple extends Component {
></div>
</h2>
<div className="mobile-slider-blog__footer d-flex mt-3">
<div className="d-flex">
<div
className={`d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
{/* <img src={} /> */}
<div
className="d-flex flex-column"

@ -13,7 +13,7 @@ export default class Header extends Component {
minWidth: `${data.width}`,
height: height,
}}
className="slider-header d-flex"
className={`slider-header d-flex ${window.lang === "en" ? "" : ""}`}
>
<div
className="slider-header__right d-flex"

@ -23,7 +23,11 @@ const SimpleHeader = (props) => {
return (
<>
{window.innerWidth > 1000 ? (
<div className="home-scroll__header d-flex">
<div
className={`home-scroll__header d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<div className="home-scroll__header--right d-flex">
<h1 style={{ fontSize: fontSize.desktop.h1 }}>{props.title}</h1>
<span></span>
@ -31,12 +35,21 @@ const SimpleHeader = (props) => {
{props.more ? (
<Link
to={props.link}
className="home-scroll__header--more d-flex align-items-center"
className={`home-scroll__header--more d-flex align-items-center ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<span style={{ fontSize: fontSize.desktop.h1 }}>
{window.t("بیشتر")}
</span>
<img src={dropdown} alt={window.t("فلش")} />
<img
src={dropdown}
style={{
transform: window.lang === "en" ? "rotate(-90deg)" : "",
margin: "0px 5px",
}}
alt={window.t("فلش")}
/>
</Link>
) : null}
</div>
@ -57,7 +70,11 @@ const TabHeader = (props) => {
return (
<>
{window.innerWidth > 1000 ? (
<div className="home-scroll__header d-flex">
<div
className={`home-scroll__header d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<div className="home-scroll__header--right d-flex">
<h1 style={{ fontSize: fontSize.desktop.h1 }}>{props.title}</h1>
<span></span>

@ -75,9 +75,15 @@ const Item = (props) => {
width: `${props.data.width}%`,
height: props.height,
}}
className="home-static__list--item d-flex"
className={`home-static__list--item d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<div
className={`d-flex flex-column ${
window.lang === "en" ? "align-items-end" : ""
}`}
>
<div className="d-flex flex-column">
<h2 style={{ color: "#02733c", fontSize: fontSize.desktop.h2 }}>
{props.data.topText}
</h2>
@ -96,7 +102,7 @@ const Item = (props) => {
width: `${props.data.width}%`,
height: props.height,
}}
className="home-static__list2--item"
className={"home-static__list2--item"}
>
<img
src={`https://dnvn.ir/api/v1/file/${props.data.fileId}`}

@ -15,7 +15,11 @@ class Membership extends Component {
</h1>
<p>{window.t("مشخصات خودت رو وارد کنید و امتیاز هدیه بگیرید")}</p>
</div>
<div className="d-flex">
<div
className={`d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<Input label={window.t("نام و نام خانوادگی")} name={"name"} />
<Input label={window.t("شماره تماس")} name={"mobile"} />
<button className="membership__submit">{window.t("ثبت ")}</button>

@ -44,12 +44,22 @@ class LaptopNavbar extends Component {
if (this.state.navigatePath) return <Navigate path={this.navigatePath} />;
const { links } = this.props;
return (
<nav className="laptop-navbar d-flex">
<div className="d-flex">
<nav
className={`laptop-navbar d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<div
className={`d-flex ${window.lang === "en" ? "flex-row-reverse" : ""}`}
>
<Link to="/" className="laptop-navbar__logo">
<img src={logo} alt={window.t("لوگو")} />
</Link>
<ul className="laptop-navbar__list d-flex">
<ul
className={`laptop-navbar__list d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
{links.map((item, i) => (
<li style={{ fontSize: fontSize.desktop.li }} key={i}>
<Link
@ -78,7 +88,11 @@ class LaptopNavbar extends Component {
</li>
</ul>
</div>
<div className="d-flex align-items-center">
<div
className={`d-flex align-items-center ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
{proxy.status() ? (
<>
{/* <Dropdown>
@ -192,7 +206,11 @@ class LaptopNavbar extends Component {
</div>
</>
) : (
<div className="d-flex">
<div
className={`d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<select
className="language-select"
onChange={(e) => {

@ -87,7 +87,9 @@ export default function MobileNavbar(props) {
if (!status)
return (
<nav className="mobile-navbar d-flex">
<div className="d-flex">
<div
className={`d-flex ${window.lang === "en" ? "flex-row-reverse" : ""}`}
>
<div
className="mobile-navbar__menu"
style={{ marginTop: 10 }}

@ -24,10 +24,24 @@ export default class SingleBlog extends Component {
render() {
const { height, data } = this.props;
return (
<div style={{ height: height }} className="single-blog d-flex">
<div className="single-blog__right d-flex flex-column justify-content-center">
<div
style={{ height: height }}
className={`single-blog d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<div
className={`single-blog__right d-flex flex-column ${
window.lang === "en" ? "align-items-end" : ""
} justify-content-center`}
>
<h1 style={{ fontSize: fontSize.desktop.h1 }}>{data.title}</h1>
<p style={{ fontSize: fontSize.desktop.p }}>{data.text}</p>
<p
style={{ fontSize: fontSize.desktop.p }}
className={`${window.lang === "en" ? "text-start" : ""}`}
>
{data.text}
</p>
<Link
style={{ fontSize: fontSize.desktop.a }}
to={"/blogs/" + data.id}

@ -232,7 +232,11 @@ class Product extends Component {
{window.t("تومان")}
</h3>
<div className="d-flex flex-column mt-3">
<div className="d-flex">
<div
className={`d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<Link
// to={`/products/${
// page === "digital"

@ -98,7 +98,11 @@ class Products extends Component {
<img src={navbarSearch} alt={window.t("جستجو")} />
</div>
<div className="mobile-products__filters d-flex">
<div className="d-flex">
<div
className={`d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<Select name="sort" options={sortFilters} parent={this} />
<Select name="subject" options={subjects} parent={this} />
<Select name="level" options={levels} parent={this} />

@ -128,7 +128,11 @@ class QR extends Component {
<div className="qr d-flex flex-column">
<Navbar />
{qrList ? (
<div className="d-flex">
<div
className={`d-flex ${
window.lang === "en" ? "flex-row-reverse" : ""
}`}
>
<section className="qr__sidebar d-flex flex-column p-2">
<header className="qr__sidebar--header d-flex">
<div className="qr__sidebar--header__right d-flex">

Loading…
Cancel
Save