|
|
@ -3,6 +3,7 @@ import { connect } from "react-redux"; |
|
|
|
import { blog } from "../../../redux/actions"; |
|
|
|
import { blog } from "../../../redux/actions"; |
|
|
|
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 New = ({ blog, isMobile, setActive }) => { |
|
|
|
export const New = ({ blog, isMobile, setActive }) => { |
|
|
|
return ( |
|
|
|
return ( |
|
|
@ -26,29 +27,36 @@ export const New = ({ blog, isMobile, setActive }) => { |
|
|
|
<strong className="text-base lg:text-lg lg:my-4 my-2 leading-6 lg:leading-7 dark:text-gray-200"> |
|
|
|
<strong className="text-base lg:text-lg lg:my-4 my-2 leading-6 lg:leading-7 dark:text-gray-200"> |
|
|
|
{blog?.title} |
|
|
|
{blog?.title} |
|
|
|
</strong> |
|
|
|
</strong> |
|
|
|
<p className="text-tiny leading-5 lg:leading-6 mb-3 dark:text-gray-200"> |
|
|
|
|
|
|
|
{window.t( |
|
|
|
<div |
|
|
|
"هر نفسی که فرو می بریم، مرگی را که مدام به ما دست اندازی میکند پس میزند در نهایت این مرگ" |
|
|
|
className="text-tiny leading-5 lg:leading-7 mb-3 dark:text-gray-200 p-2 text-justify" |
|
|
|
)} |
|
|
|
dangerouslySetInnerHTML={{ __html: blog?.text }} |
|
|
|
</p> |
|
|
|
/> |
|
|
|
<div className="w-full hidden lg;flex justify-between"> |
|
|
|
<div className="w-full hidden lg;flex justify-between"> |
|
|
|
<div className="flex"> |
|
|
|
<div className="flex"> |
|
|
|
<Avatar size={60} /> |
|
|
|
{!blog?.author.picFileId && <Avatar size={60} />} |
|
|
|
|
|
|
|
{blog?.author.picFileId && ( |
|
|
|
|
|
|
|
<img |
|
|
|
|
|
|
|
src={`https://dnvn.ir/api/v1/file${blog?.author.picFileId}`} |
|
|
|
|
|
|
|
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"> |
|
|
|
<strong className="lg:text-tiny lg:font-black text-gray1"> |
|
|
|
<strong className="lg:text-tiny lg:font-black text-gray1"> |
|
|
|
{`{window.t("نوشته از:")}` + " " + `{window.t("کامران ایزدی")}`} |
|
|
|
{`{window.t("نوشته از:")}` + " " + `${blog?.author.name}`} |
|
|
|
</strong> |
|
|
|
</strong> |
|
|
|
<p className="lg:text-sm lg:font-semibold text-gray70 mt-2"> |
|
|
|
<p className="lg:text-sm lg:font-semibold text-gray70 mt-2"> |
|
|
|
{window.t("سردبیر بخش وبلاگ دانوین")} |
|
|
|
{blog?.author.role} |
|
|
|
</p> |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</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-sm text-gray1 lg:font-black"> |
|
|
|
<span className="lg:text-sm text-gray1 lg:font-black"> |
|
|
|
{`{window.t("زمان مطالعه")}` + " " + `{window.t("۳۰ دقیقه")}`} |
|
|
|
{`{window.t("زمان مطالعه")}` + " " + `${blog?.duration}`} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<span className="mt-2 lg:text-sm text-gray1 lg:font-black"> |
|
|
|
<span className="mt-2 lg:text-sm 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> |
|
|
|