Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blog styles #209

Merged
merged 8 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
},
"devDependencies": {
"@playwright/test": "^1.44.1",
"@tailwindcss/typography": "^0.5.13",
"@types/node": "^20.14.1",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
Expand Down
10 changes: 5 additions & 5 deletions src/pages/blog/sections/BlogBody.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ import { glovo } from "../../../assets/images/blogs-page";
import NextRead from "./NextRead";
import RelatedBlogs from "./RelatedBlogs";

import "./blogBody.css";

function BlogBody({ id, categoryId, blogBody }) {
const BodyRef = useRef(null);

useEffect(() => {
if (BodyRef.current) {
BodyRef.current.innerHTML += blogBody ?? "";
BodyRef.current.innerHTML = blogBody ?? "";
}
}, [blogBody]);

return (
<div className="flex flex-col md:flex-row gap-5 w-full pb-8 px-3">
<div className="w-full md:w-[70%] flex flex-col gap-5">
<div className="container text-[13px] md:text-base font-normal text-[#323433]">
<div ref={BodyRef} className="blog-content" />

<div
ref={BodyRef}
className="prose-md text-gray-900 prose prose-a:no-underline prose-li:marker:text-[#333] prose-li:marker:text-sm prose-a:text-[#009975] first-letter:font-bold first-letter:text-5xl first-letter:uppercase"
/>
{/* <Advert /> */}
</div>
{/* read next */}
Expand Down
6 changes: 5 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,9 @@ module.exports = {
},
},
// eslint-disable-next-line global-require, import/no-extraneous-dependencies
plugins: [require("tailwind-scrollbar-hide"), require("tailwindcss-animate")],
plugins: [
require("tailwind-scrollbar-hide"),
require("tailwindcss-animate"),
require("@tailwindcss/typography"),
],
};
Loading