update src/Views/Home/Main/index.js, src/Views/Home/Sidebar/index.js, src/components/Banners/index.js and data.js

master
mahdi andalib 3 years ago
parent 7a2d690144
commit 8b9905ecbd
  1. BIN
      public/images/blog-author.png
  2. BIN
      public/images/blog-featured-image.jpg
  3. 83
      public/images/index.js
  4. 11
      public/images/light-gray-comment-icon.svg
  5. 2
      src/Views/Home/Main/index.js
  6. 2
      src/Views/Home/Sidebar/index.js
  7. 8
      src/components/Blogss/assets/article-featured-image.svg
  8. BIN
      src/components/Blogss/assets/blog-author.png
  9. BIN
      src/components/Blogss/assets/blog-featured-image.jpg
  10. BIN
      src/components/Blogss/assets/blog-featured-image2.jpg
  11. 11
      src/components/Blogss/assets/light-gray-comment-icon copy.svg
  12. 11
      src/components/Blogss/assets/light-gray-comment-icon.svg
  13. 11
      src/components/Blogss/assets/white-comment-icon.svg
  14. 81
      src/components/Blogss/design1/index.js
  15. 7
      src/components/Blogss/design2/BlogDesign2.scss
  16. 112
      src/components/Blogss/design2/index.js
  17. 107
      src/components/Blogss/design3/index.js
  18. 85
      src/components/Blogss/design4/index.js
  19. 86
      src/components/Blogss/design5/index.js
  20. 81
      src/components/Blogss/design6/index.js
  21. 35
      src/components/Blogss/index.js
  22. 11
      src/redux/data.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

@ -0,0 +1,83 @@
import blogImage from "../assets/blog-featured-image.jpg";
import blogAuthorImg from "../assets/blog-author.png";
import commentIcon from "../assets/light-gray-comment-icon.svg";
const BlogDesign1 = ({
blogExcerpt,
blogAuthor,
blogComments,
commentNumBgColor,
commentNumTextColor,
commentNumTopPosition,
commentNumRightPosition,
}) => {
return (
<section className="w-4/12 mx-auto p-4 bg-white rounded-md shadow-md my-8">
<div className="flex items-strech justify-around p-2">
<div className="w-2/5">
<img src={blogImage} alt="" className="w-full h-full" />
</div>
<div className="w-3/5 mr-4 flex flex-col justify-between py-2">
<div>
<h2 className="text-base text-justify text-grayTextColor font-bold leading-6">
آیا مواد غذای پر فیبر و مفید هستند؟
</h2>
{blogExcerpt && (
<p className="text-justify text-sm leading-6 my-1 text-grayTextColor mt-3">
در این قسمت یک توضیح بسیار کوتاه یا عادی در مورد ارور نوشته
خواهد شد. طراح سعی می کند تا این متن را بیشتر از خد انتظار بلند
کند تا دیگران متوجه شوند.
</p>
)}
</div>
<div className="flex item-center justify-between w-full mt-2">
{blogAuthor && (
<div className="flex items-center">
<img src={blogAuthorImg} alt="" className="w-8 h-8" />
<p className="text-sm text-lightGrayTextColor mr-2 font-light">
حامد دژبانی نسب
</p>
</div>
)}
{blogComments && (
<div className="flex items-center">
<p className="text-sm text-lightGrayTextColor ml-2 font-light">
زمان مطالعه 30 دقیقه
</p>
<div className="relative">
<img src={commentIcon} alt="" className="w-7 h-7" />
<span
className={`comment-num absolute ${commentNumBgColor} ${commentNumTextColor} ${commentNumTopPosition} ${commentNumRightPosition}`}
>
26
</span>
</div>
</div>
)}
</div>
</div>
</div>
</section>
);
};
export default BlogDesign1;
// background color i used in commnet number background color
// bg-lightGrayBgColor
// bg-white
// text color i used for comment number text color:
// text-grayTextColor
// text-white
BlogDesign1.defaultProps = {
blogExcerpt: true,
blogAuthor: true,
blogComments: true,
commentNumBgColor: "bg-lightGrayBgColor",
commentNumTextColor: "text-white",
commentNumTopPosition: "-top-2",
commentNumRightPosition: "-right-2",
};

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" width="33.241" height="33.241" viewBox="0 0 33.241 33.241">
<g id="vuesax_linear_message" data-name="vuesax/linear/message" transform="translate(-684 -186)">
<g id="message" transform="translate(684 186)">
<path id="Vector" d="M9,23.546H8.31C2.77,23.546,0,22.16,0,15.235V8.31Q0,0,8.31,0H19.39Q27.7,0,27.7,8.31v6.925q0,8.31-8.31,8.31H18.7a1.4,1.4,0,0,0-1.108.554l-2.078,2.77a1.968,1.968,0,0,1-3.324,0L10.111,24.1A1.565,1.565,0,0,0,9,23.546Z" transform="translate(2.77 2.77)" fill="none" stroke="#818181" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
<path id="Vector-2" data-name="Vector" d="M.495.5H.507" transform="translate(21.661 14.735)" fill="none" stroke="#818181" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-3" data-name="Vector" d="M.495.5H.507" transform="translate(16.12 14.735)" fill="none" stroke="#818181" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-4" data-name="Vector" d="M.495.5H.507" transform="translate(10.578 14.735)" fill="none" stroke="#818181" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-5" data-name="Vector" d="M0,0H33.241V33.241H0Z" fill="none" opacity="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -8,7 +8,7 @@ function Main({ activeComponent }) {
return (
<div className="lg:flex lg:flex-col lg:w-5/6 lg:h-full border-r border-gray-200">
<header className="w-full flex flex-row items-center h-16 px-1 py-4 bg-gray-700"></header>
<section className="w-full lg:overflow-y-scroll py-5 px-10 flex-1 flex-col">
<section className="w-full lg:overflow-y-scroll py-5 px-10 flex-1 flex-col bg-[#f5f5f5]">
<h1 className="font-sansbold text-3xl text-left">
{activeComponent?.content?.name}
</h1>

@ -4,7 +4,7 @@ import { components } from "../../../redux/actions";
function Sidebar({ list, setActive }) {
return (
<div className="lg:flex lg:flex-col lg:w-1/6 lg:h-full ltr">
<div className="lg:flex lg:flex-col lg:w-1/6 lg:h-full ltr bg-[#f5f5f5]">
<header className="w-full h-16 flex flex-row items-center p-4 bg-gray-600">
<img
src={"https://barnamenegar.ir/static/media/white logo 2.7ffbddbc.svg"}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" width="33.241" height="33.241" viewBox="0 0 33.241 33.241">
<g id="vuesax_linear_message" data-name="vuesax/linear/message" transform="translate(-684 -186)">
<g id="message" transform="translate(684 186)">
<path id="Vector" d="M9,23.546H8.31C2.77,23.546,0,22.16,0,15.235V8.31Q0,0,8.31,0H19.39Q27.7,0,27.7,8.31v6.925q0,8.31-8.31,8.31H18.7a1.4,1.4,0,0,0-1.108.554l-2.078,2.77a1.968,1.968,0,0,1-3.324,0L10.111,24.1A1.565,1.565,0,0,0,9,23.546Z" transform="translate(2.77 2.77)" fill="none" stroke="#818181" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
<path id="Vector-2" data-name="Vector" d="M.495.5H.507" transform="translate(21.661 14.735)" fill="none" stroke="#818181" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-3" data-name="Vector" d="M.495.5H.507" transform="translate(16.12 14.735)" fill="none" stroke="#818181" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-4" data-name="Vector" d="M.495.5H.507" transform="translate(10.578 14.735)" fill="none" stroke="#818181" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-5" data-name="Vector" d="M0,0H33.241V33.241H0Z" fill="none" opacity="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" width="33.241" height="33.241" viewBox="0 0 33.241 33.241">
<g id="vuesax_linear_message" data-name="vuesax/linear/message" transform="translate(-684 -186)">
<g id="message" transform="translate(684 186)">
<path id="Vector" d="M9,23.546H8.31C2.77,23.546,0,22.16,0,15.235V8.31Q0,0,8.31,0H19.39Q27.7,0,27.7,8.31v6.925q0,8.31-8.31,8.31H18.7a1.4,1.4,0,0,0-1.108.554l-2.078,2.77a1.968,1.968,0,0,1-3.324,0L10.111,24.1A1.565,1.565,0,0,0,9,23.546Z" transform="translate(2.77 2.77)" fill="none" stroke="#818181" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
<path id="Vector-2" data-name="Vector" d="M.495.5H.507" transform="translate(21.661 14.735)" fill="none" stroke="#818181" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-3" data-name="Vector" d="M.495.5H.507" transform="translate(16.12 14.735)" fill="none" stroke="#818181" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-4" data-name="Vector" d="M.495.5H.507" transform="translate(10.578 14.735)" fill="none" stroke="#818181" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-5" data-name="Vector" d="M0,0H33.241V33.241H0Z" fill="none" opacity="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" width="33.241" height="33.241" viewBox="0 0 33.241 33.241">
<g id="vuesax_linear_message" data-name="vuesax/linear/message" transform="translate(-684 -186)">
<g id="message" transform="translate(684 186)">
<path id="Vector" d="M9,23.546H8.31C2.77,23.546,0,22.16,0,15.235V8.31Q0,0,8.31,0H19.39Q27.7,0,27.7,8.31v6.925q0,8.31-8.31,8.31H18.7a1.4,1.4,0,0,0-1.108.554l-2.078,2.77a1.968,1.968,0,0,1-3.324,0L10.111,24.1A1.565,1.565,0,0,0,9,23.546Z" transform="translate(2.77 2.77)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
<path id="Vector-2" data-name="Vector" d="M.495.5H.507" transform="translate(21.661 14.735)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-3" data-name="Vector" d="M.495.5H.507" transform="translate(16.12 14.735)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-4" data-name="Vector" d="M.495.5H.507" transform="translate(10.578 14.735)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-5" data-name="Vector" d="M0,0H33.241V33.241H0Z" fill="none" opacity="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,81 @@
import blogImage from "../assets/blog-featured-image.jpg";
import blogAuthorImg from "../assets/blog-author.png";
import commentIcon from "../assets/light-gray-comment-icon.svg";
const BlogDesign1 = ({
blogExcerpt,
blogAuthor,
blogComments,
commentNumBgColor,
commentNumTextColor,
commentNumTopPosition,
commentNumRightPosition,
}) => {
return (
<div className="w-fit flex items-strech justify-around p-4 bg-white">
<div className="w-fit">
<img
src="images/blog-featured-image.jpg"
alt="blogImage"
className="shrink"
/>
</div>
<div className="flex-1 flex flex-col justify-between mr-4 py-2">
<div>
<h2 className="text-base text-justify text-[#646464] font-sansbold leading-6">
آیا مواد غذای پر فیبر و مفید هستند؟
</h2>
{blogExcerpt && (
<p className="text-justify text-sm leading-6 my-1 text-[#646464] mt-3">
در این قسمت یک توضیح بسیار کوتاه یا عادی در مورد ارور نوشته خواهد
شد. طراح سعی می کند تا این متن را بیشتر از خد انتظار بلند کند تا
دیگران متوجه شوند.
</p>
)}
</div>
<div className="flex item-center justify-between w-full mt-2">
{blogAuthor && (
<div className="flex items-center">
<img src="images/blog-author.png" alt="" className="w-8 h-8" />
<p className="text-sm text-lightGrayTextColor mr-2 font-light">
حامد دژبانی نسب
</p>
</div>
)}
{blogComments && (
<div className="flex items-center">
<p className="text-sm text-lightGrayTextColor ml-2 font-light">
زمان مطالعه 30 دقیقه
</p>
<div className="relative">
<img
src="images/light-gray-comment-icon.svg"
alt=""
className="w-7 h-7"
/>
<span
className={`comment-num absolute ${commentNumBgColor} ${commentNumTextColor} ${commentNumTopPosition} ${commentNumRightPosition}`}
>
26
</span>
</div>
</div>
)}
</div>
</div>
</div>
);
};
export default BlogDesign1;
BlogDesign1.defaultProps = {
blogExcerpt: true,
blogAuthor: true,
blogComments: true,
commentNumBgColor: "bg-[#818181]",
commentNumTextColor: "text-white",
commentNumTopPosition: "-top-2",
commentNumRightPosition: "-right-2",
};

@ -0,0 +1,7 @@
.child-text {
transition: all 0.4s;
}
.parent:hover .child-text {
transition: all 0.4s;
transform: translateY(-7px) !important;
}

@ -0,0 +1,112 @@
import React from "react";
import "./BlogDesign2.scss";
import blogFeaturedImage2 from "../assets/blog-featured-image2.jpg";
import blogAuthorImg from "../assets/blog-author.png";
import whiteCommentIcon from "../assets/white-comment-icon.svg";
const BlogDesign2 = ({
blogSubTitle,
dateButton,
tagButton,
blogAuthor,
blogComments,
commentNumBgColor,
commentNumTextColor,
commentNumTopPosition,
commentNumRightPosition,
}) => {
return (
<section className="w-4/12 mx-auto p-4 bg-white rounded-md shadow-md my-8">
<div
className="parent relative flex flex-col justify-end p-3 cursor-pointer"
style={{
backgroundImage: `url(${blogFeaturedImage2})`,
backgroundSize: "100% 100%",
backgroundRepeat: "no-repeat",
// minHeight: "300px",
height: "calc(100vh/3)",
maxHeight: "300px",
}}
>
{dateButton && (
<button className="bg-yellow-100 rounded p-1 text-sm absolute left-2 top-4">
1400/09/19
</button>
)}
{tagButton && (
<button className="bg-yellow-100 rounded p-1 text-sm absolute left-2 top-4">
تگ
</button>
)}
<div className="z-10 child-text">
<h2 className="text-white text-base font-bold leading-6">
آیا مواد غذایی پر فیبر مفید هستند؟
</h2>
{blogSubTitle && (
<h2 className="text-white text-base mt-2 font-bold leading-6">
شما چه فکری می کنید
</h2>
)}
</div>
<div className="z-10 flex item-center justify-between w-full mt-4">
{blogAuthor && (
<div className="flex items-center transition duration-200 transform hover:-translate-y-1">
<img src={blogAuthorImg} alt="" className="w-8 h-8" />
<p className="text-sm text-white font-light mr-2">
حامد دژبانی نسب
</p>
</div>
)}
{blogComments && (
<div className="flex items-center">
<p className="text-sm text-white font-light ml-2">
زمان مطالعه 30 دقیقه
</p>
<div className="relative">
<img src={whiteCommentIcon} alt="" className="w-7 h-7" />
<span
className={`comment-num absolute ${commentNumBgColor} ${commentNumTextColor} ${commentNumTopPosition} ${commentNumRightPosition}`}
>
26
</span>
</div>
</div>
)}
</div>
<div
style={{
zIndex: 0,
background:
"linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(2,0,36,0) 100%)",
}}
className="absolute right-0 bottom-0 h-full w-full"
></div>
</div>
</section>
);
};
export default BlogDesign2;
// background color i used in commnet number background color
// bg-lightGrayBgColor
// bg-white
// text color i used for comment number text color:
// text-grayTextColor
// text-white
BlogDesign2.defaultProps = {
blogSubTitle: true,
dateButton: true,
tagButton: false,
blogAuthor: true,
blogComments: true,
commentNumBgColor: "bg-white",
commentNumTextColor: "text-grayTextColor",
commentNumTopPosition: "-top-2",
commentNumRightPosition: "-right-2",
};

@ -0,0 +1,107 @@
import React from "react";
import blogFeaturedImage2 from "../assets/blog-featured-image2.jpg";
import blogAuthorImg from "../assets/blog-author.png";
import commentIcon from "../assets/light-gray-comment-icon.svg";
const BlogDesign3 = ({
blogSubTitle,
blogAuthor,
blogComments,
blogTitleColor,
blogCommentAuthorTextColor,
commentNumBgColor,
commentNumTextColor,
commentNumTopPosition,
commentNumRightPosition,
}) => {
return (
<section className="w-4/12 mx-auto p-4 bg-white rounded-md shadow-md my-8">
<div
className="flex flex-col justify-end relative p-3"
style={{
backgroundImage: `url(${blogFeaturedImage2})`,
backgroundSize: "100% 100%",
backgroundRepeat: "no-repeat",
// minHeight: "300px",
height: "calc(100vh/3)",
maxHeight: "300px",
}}
>
{/* <img src={blogFeaturedImage2} alt="" /> */}
<div className="w-full mx-auto p-4 rounded-lg shadow-md bg-white transform translate-y-20">
<h2
className={`text-base text-justify font-bold leading-6 ${blogTitleColor}`}
>
آیا مواد غذای پر فیبر و مفید هستند؟
</h2>
{blogSubTitle && (
<h2
className={`text-base text-justify mt-2 font-bold leading-6 ${blogTitleColor}`}
>
نظر شما چیه
</h2>
)}
<div className="flex item-center justify-between w-full mt-4">
{blogAuthor && (
<div className=" flex items-center">
<img src={blogAuthorImg} alt="" className="w-8 h-8" />
<p
className={`text-sm font-light mr-2 ${blogCommentAuthorTextColor}`}
>
حامد دژبانی نسب
</p>
</div>
)}
{blogComments && (
<div className=" flex items-center">
<p
className={`text-sm font-light ml-2 ${blogCommentAuthorTextColor}`}
>
زمان مطالعه 30 دقیقه
</p>
<div className="relative">
<img src={commentIcon} alt="" className="w-7 h-7" />
<span
className={`comment-num absolute ${commentNumBgColor} ${commentNumTextColor} ${commentNumTopPosition} ${commentNumRightPosition}`}
>
26
</span>
</div>
</div>
)}
</div>
</div>
</div>
</section>
);
};
export default BlogDesign3;
//different text colors i used:
// text-darkBlueTextColor2
// text-productTitle
// text-lightGrayTextColor
// background color i used in commnet number background color
// bg-lightGrayBgColor
// bg-white
// text color i used for comment number text color:
// text-grayTextColor
// text-white
BlogDesign3.defaultProps = {
blogTitleColor: "text-lightGrayTextColor",
blogCommentAuthorTextColor: "text-lightGrayTextColor",
blogSubTitle: true,
blogAuthor: true,
blogComments: true,
commentNumBgColor: "bg-lightGrayBgColor",
commentNumTextColor: "text-white",
commentNumTopPosition: "-top-2",
commentNumRightPosition: "-right-2",
};

@ -0,0 +1,85 @@
import React from "react";
import blogImage from "../assets/blog-featured-image.jpg";
import blogAuthorImg from "../assets/blog-author.png";
import commentIcon from "../assets/light-gray-comment-icon.svg";
const BlogDesign4 = ({
blogExcerpt,
blogAuthor,
blogComments,
commentNumBgColor,
commentNumTextColor,
commentNumTopPosition,
commentNumRightPosition,
}) => {
return (
<section className="w-4/12 mx-auto p-4 bg-white rounded-md shadow-md my-20 mb-8">
<div className="flex items-strech justify-between relative p-2 rounded-xl border border-gray-300 ">
<div className="w-2/5 transform translate-x-1/3">
<img src={blogImage} alt="" className="w-full h-full " />
</div>
<div className="w-3/5 flex flex-col justify-between py-3 transform translate-x-10">
<div>
<h2 className="text-base text-grayTextColor font-bold leading-6">
آیا مواد غذای پر فیبر و مفید هستند؟
</h2>
{blogExcerpt && (
<p className="text-sm text-justify leading-6 text-grayTextColor mt-3">
در این قسمت یک توضیح بسیار کوتاه یا عادی در مورد ارور نوشته
خواهد شد. طراح سعی می کند تا این متن را بیشتر از خد انتظار بلند
کند تا دیگران متوجه شوند.
</p>
)}
</div>
<div className=" flex item-center justify-between">
{blogAuthor && (
<div className=" flex items-center">
<img src={blogAuthorImg} alt="" className="w-8 h-8" />
<p className="text-sm text-lightGrayTextColor font-light mr-2">
حامد دژبانی نسب
</p>
</div>
)}
{blogComments && (
<div className=" flex items-center">
<p className="text-sm text-lightGrayTextColor font-light ml-2">
زمان مطالعه 30 دقیقه
</p>
<div className="relative">
<img src={commentIcon} alt="" className="w-7 h-7" />
<span
className={`comment-num absolute ${commentNumBgColor} ${commentNumTextColor} ${commentNumTopPosition} ${commentNumRightPosition}`}
>
26
</span>
</div>
</div>
)}
</div>
</div>
</div>
</section>
);
};
export default BlogDesign4;
// background color i used in commnet number background color
// bg-lightGrayBgColor
// bg-white
// text color i used for comment number text color:
// text-grayTextColor
// text-white
BlogDesign4.defaultProps = {
blogExcerpt: true,
blogAuthor: true,
blogComments: true,
commentNumBgColor: "bg-lightGrayBgColor",
commentNumTextColor: "text-white",
commentNumTopPosition: "-top-2",
commentNumRightPosition: "-right-2",
};

@ -0,0 +1,86 @@
import React from "react";
import blogImage from "../assets/blog-featured-image.jpg";
import blogAuthorImg from "../assets/blog-author.png";
import commentIcon from "../assets/light-gray-comment-icon.svg";
const BlogDesign5 = ({
blogExcerpt,
blogAuthor,
blogComments,
commentNumBgColor,
commentNumTextColor,
commentNumTopPosition,
commentNumRightPosition,
}) => {
return (
<section className="w-5/12 mx-auto p-4 bg-gray-200 rounded-md shadow-md my-8">
<div className="flex items-strech justify-around p-4 rounded-md shadow-md bg-white">
<div className="w-2/5">
<img src={blogImage} alt="" className="w-full h-full" />
</div>
<div className="w-3/5 flex flex-col justify-between py-3 mr-4">
<div>
<h2 className="text-base text-justify text-grayTextColor font-bold leading-6">
آیا مواد غذای پر فیبر و مفید هستند؟
</h2>
{blogExcerpt && (
<p className="text-justify text-sm leading-6 text-grayTextColor mt-3 ">
در این قسمت یک توضیح بسیار کوتاه یا عادی در مورد ارور نوشته
خواهد شد. طراح سعی می کند تا این متن را بیشتر از خد انتظار بلند
کند تا دیگران متوجه شوند.
</p>
)}
</div>
<div className="flex item-center justify-between w-full">
{blogAuthor && (
<div className="flex items-center">
<img src={blogAuthorImg} alt="" className="w-8 h-8" />
<p className="text-sm text-lightGrayTextColor font-light mr-2">
حامد دژبانی نسب
</p>
</div>
)}
{blogComments && (
<div className="flex items-center">
<p className="text-sm text-lightGrayTextColor font-light ml-2">
زمان مطالعه 30 دقیقه
</p>
<div className="relative">
<img src={commentIcon} alt="" className="w-7 h-7" />
<span
className={`comment-num absolute ${commentNumBgColor} ${commentNumTextColor} ${commentNumTopPosition} ${commentNumRightPosition}`}
>
26
</span>
</div>
</div>
)}
</div>
</div>
</div>
</section>
);
};
export default BlogDesign5;
// background color i used in commnet number background color
// bg-lightGrayBgColor
// bg-white
// text color i used for comment number text color:
// text-grayTextColor
// text-white
BlogDesign5.defaultProps = {
blogExcerpt: true,
blogAuthor: true,
blogComments: true,
commentNumBgColor: "bg-lightGrayBgColor",
commentNumTextColor: "text-white",
commentNumTopPosition: "-top-2",
commentNumRightPosition: "-right-2",
};

@ -0,0 +1,81 @@
import React from "react";
import blogAuthorImg from "../assets/blog-author.png";
import FeaturedImage from "../assets/article-featured-image.svg";
import commentIcon from "../assets/light-gray-comment-icon.svg";
const BlogDesign6 = ({
blogExcerpt,
blogAuthor,
blogComments,
commentNumBgColor,
commentNumTextColor,
commentNumTopPosition,
commentNumRightPosition,
}) => {
return (
<section className="w-5/12 mx-auto p-4 bg-white rounded-md shadow-md my-8">
<div className="">
<img src={FeaturedImage} alt="" className="w-full" />
<div className="py-2">
<h2 className="text-base text-justify text-grayTextColor mt-2 font-bold leading-6">
آیا مواد غذای پر فیبر و مفید هستند؟
</h2>
{blogExcerpt && (
<p className="text-justify text-sm leading-6 my-3 text-grayTextColor">
در این قسمت یک توضیح بسیار کوتاه یا عادی در مورد ارور نوشته خواهد
شد. طراح سعی می کند تا این متن را بیشتر از خد انتظار بلند کند تا
دیگران متوجه شوند.
</p>
)}
<div className="flex item-center justify-between w-full mt-4">
{blogAuthor && (
<div className=" flex items-center">
<img src={blogAuthorImg} alt="" className="w-8 h-8" />
<p className="text-sm text-lightGrayTextColor mr-2">
حامد دژبانی نسب
</p>
</div>
)}
{blogComments && (
<div className=" flex items-center">
<p className="text-sm text-lightGrayTextColor ml-2">
زمان مطالعه 30 دقیقه
</p>
<div className="relative">
<img src={commentIcon} alt="" className="w-7 h-7" />
<span
className={`comment-num absolute ${commentNumBgColor} ${commentNumTextColor} ${commentNumTopPosition} ${commentNumRightPosition}`}
>
26
</span>
</div>
</div>
)}
</div>
</div>
</div>
</section>
);
};
export default BlogDesign6;
// background color i used in commnet number background color
// bg-lightGrayBgColor
// bg-white
// text color i used for comment number text color:
// text-grayTextColor
// text-white
BlogDesign6.defaultProps = {
blogExcerpt: true,
blogAuthor: true,
blogComments: true,
commentNumBgColor: "bg-lightGrayBgColor",
commentNumTextColor: "text-white",
commentNumTopPosition: "-top-2",
commentNumRightPosition: "-right-2",
};

@ -0,0 +1,35 @@
import React, { useState } from "react";
import Blog1 from "./design1";
import Blog2 from "./design2";
import Blog3 from "./design3";
import Blog4 from "./design4";
import Blog5 from "./design5";
import Blog6 from "./design6";
function Blogs() {
const list = {
1: <Blog1 />,
2: <Blog2 />,
3: <Blog3 />,
4: <Blog4 />,
5: <Blog5 />,
6: <Blog6 />,
};
const [type, setType] = useState(1);
return (
<div className="w-full flex flex-col items-center">
<select
className="b-10 w-20 bg-gray-200"
onChange={(e) => setType(e.target.value)}
>
{Object.keys(list).map((option, index) => (
<option key={index}>{option}</option>
))}
</select>
{list[type]}
</div>
);
}
export default Blogs;

@ -6,6 +6,7 @@ import Advertisements from "../components/Advertisements";
import Alert from "../components/Alert";
import Toast from "../components/Toast";
import Banners from "../components/Banners";
import Blogss from "../components/Blogss";
// import ButtonDesign from "./components/buttonDesign/ButtonDesign";
// import ProductDesign from "./components/productDesign/ProductDesign";
@ -177,6 +178,16 @@ const components = [
code: null,
},
},
{
name: "Blogss",
author: "Andalib",
props: [],
content: {
name: "Blog Designs",
component: <Blogss />,
code: null,
},
},
];
export default components;

Loading…
Cancel
Save