|
|
@ -2,6 +2,7 @@ import React from "react"; |
|
|
|
import { connect } from "react-redux"; |
|
|
|
import { connect } from "react-redux"; |
|
|
|
import { Link } from "react-router-dom"; |
|
|
|
import { Link } from "react-router-dom"; |
|
|
|
import Avatar from "../../../components/Avatar"; |
|
|
|
import Avatar from "../../../components/Avatar"; |
|
|
|
|
|
|
|
import moment from "jalali-moment"; |
|
|
|
|
|
|
|
|
|
|
|
export const Single = ({ blog, isMobile }) => { |
|
|
|
export const Single = ({ blog, isMobile }) => { |
|
|
|
return ( |
|
|
|
return ( |
|
|
@ -50,11 +51,11 @@ export const Single = ({ blog, isMobile }) => { |
|
|
|
<h1 className="lg:text-5xl font-bold leading-6 dark:text-gray-200"> |
|
|
|
<h1 className="lg:text-5xl font-bold leading-6 dark:text-gray-200"> |
|
|
|
{blog?.title} |
|
|
|
{blog?.title} |
|
|
|
</h1> |
|
|
|
</h1> |
|
|
|
<p className="text-tiny leading-6 lg:text-tiny text-gray70 dark:text-gray-200 lg:w-4/5 mt-4 lg:mt-6 lg:leading-7"> |
|
|
|
|
|
|
|
{window.t( |
|
|
|
<div |
|
|
|
"پیش از بلعیدن طعمه اش، با آن بازی می کند. با این همه، ما تا آنجا که ممکن است، با علاقه فراوان" |
|
|
|
className="text-tiny leading-6 lg:text-tiny text-gray70 dark:text-gray-200 lg:w-4/5 mt-4 lg:mt-6 lg:leading-7" |
|
|
|
)} |
|
|
|
dangerouslySetInnerHTML={{ __html: blog?.text }} |
|
|
|
</p> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{!isMobile && ( |
|
|
|
{!isMobile && ( |
|
|
|
<div className="w-full flex justify-between"> |
|
|
|
<div className="w-full flex justify-between"> |
|
|
@ -63,7 +64,8 @@ export const Single = ({ blog, isMobile }) => { |
|
|
|
{blog?.author.picFileId && ( |
|
|
|
{blog?.author.picFileId && ( |
|
|
|
<img |
|
|
|
<img |
|
|
|
src={`https://dnvn.ir/api/v1/file/${blog?.author.picFileId}`} |
|
|
|
src={`https://dnvn.ir/api/v1/file/${blog?.author.picFileId}`} |
|
|
|
alt="" |
|
|
|
alt="author" |
|
|
|
|
|
|
|
className="w-20 rounded" |
|
|
|
/> |
|
|
|
/> |
|
|
|
)} |
|
|
|
)} |
|
|
|
<div className="flex flex-col py-2 mr-2 justify-center"> |
|
|
|
<div className="flex flex-col py-2 mr-2 justify-center"> |
|
|
@ -78,10 +80,14 @@ export const Single = ({ blog, isMobile }) => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="flex flex-col i justify-center items-end"> |
|
|
|
<div className="flex flex-col i justify-center items-end"> |
|
|
|
<span className="lg:text-tiny text-gray1 lg:font-black"> |
|
|
|
<span className="lg:text-tiny text-gray1 lg:font-black"> |
|
|
|
{window.t("زمان مطالعه" + " " + "۳۰ دقیقه")} |
|
|
|
{window.t("زمان مطالعه:") + |
|
|
|
|
|
|
|
" " + |
|
|
|
|
|
|
|
`${blog?.duration}` + |
|
|
|
|
|
|
|
" " + |
|
|
|
|
|
|
|
window.t("دقیقه")} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<span className="mt-3 lg:text-tiny text-gray1 lg:font-black"> |
|
|
|
<span className="mt-3 lg:text-tiny text-gray1 lg:font-black"> |
|
|
|
{window.t("1400/11/24")} |
|
|
|
{moment(blog?.updatedAt).locale("fa").format("YYYY/MM/DD")} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|