Skip to content

Commit

Permalink
add line-clamp on blogCard title
Browse files Browse the repository at this point in the history
  • Loading branch information
Ase020 committed Feb 27, 2024
1 parent ae42ff0 commit edf2acc
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 84 deletions.
154 changes: 75 additions & 79 deletions src/APP/index.js
Original file line number Diff line number Diff line change
@@ -1,79 +1,75 @@
import AboutUs from "./pages/aboutUs/AboutUs";
import AllBlogsPage from "./pages/admin/blogs/AllBlogsPage";
import AddChapterPage from "./pages/admin/chapters/AddChapterPage";
import AllChaptersPage from "./pages/admin/chapters/AllChaptersPage";
import AddEventPage from "./pages/admin/events/AddEventPage";
import AllEventsPage from "./pages/admin/events/AllEventsPage";
import UpdateEventPage from "./pages/admin/events/UpdateEventPage";
import ForgotPassword from "./pages/auth/ForgotPassword";
import LogIn from "./pages/auth/LogIn";
import ResetPassword from "./pages/auth/ResetPassword";
import SignUp from "./pages/auth/SignUp";
import Blog from "./pages/blog/Blog";
import Blogs from "./pages/blogs/Blogs";
import IndividualChapter from "./pages/chapter/pages/IndividualChapter";
import CommunityPage from "./pages/community/CommunityPage";
import SingleEvent from "./pages/community/sections/eventsSection/SingleEvents/SingleEvent";
import EventsPage from "./pages/events/pages/EventsPage";
import EventsSection from "./pages/events/sections/eventsSection/EventsSection";
import Blogs from "./pages/blogs/Blogs";
import Blog from "./pages/blog/Blog";
import Blog2 from "./pages/blog2/Blog2";

import SingleProductDonation from "./pages/donate/pages/SingleProductDonatePage";
import Error400 from "./pages/errorPages/Error400";
import Error403 from "./pages/errorPages/Error403";
import Error404 from "./pages/errorPages/Error404";
import Error500 from "./pages/errorPages/Error500";
import ErrorBoundary from "./pages/errorPages/ErrorBoundary";
import EventsPage from "./pages/events/pages/EventsPage";
import EventsSection from "./pages/events/sections/eventsSection/EventsSection";
import GalleryPage from "./pages/gallery/GalleryPage";
import LandingPage from "./pages/landingPage/LandingPage";
import Layout from "./pages/Layout";
import Products from "./pages/products2/Products";
import Resources from "./pages/resources/Resources";
import Homepage from "./pages/shop/Homepage";
import Checkout from "./pages/shop/OrderSummaryPage";
import ProductDisplay from "./pages/shop/ProductDisplayPage";
import CategoriesProducts from "./pages/shop/sections/CategoriesProducts";
import SingleItemPage from "./pages/shop/SingleItemPage";

export {
AddChapterPage,
AddEventPage,
AllBlogsPage,
AllChaptersPage,
AllEventsPage,
UpdateEventPage,
LandingPage,
Homepage,
Checkout,
CategoriesProducts,
SingleItemPage,
Layout,
Products,
Resources,
AboutUs,
CommunityPage,
DonatePage,
SingleEvent,
Blogs,
Blog,
Blog2,
EventsPage,
EventsSection,
SingleProductDonation,
IndividualChapter,
Error400,
Error403,
Error404,
Error500,
ErrorBoundary,
ProductDisplay,
ForgotPassword,
LogIn,
ResetPassword,
SignUp,
GalleryPage,
};
import AboutUs from "./pages/aboutUs/AboutUs";
import AllBlogsPage from "./pages/admin/blogs/AllBlogsPage";
import AddChapterPage from "./pages/admin/chapters/AddChapterPage";
import AllChaptersPage from "./pages/admin/chapters/AllChaptersPage";
import AddEventPage from "./pages/admin/events/AddEventPage";
import AllEventsPage from "./pages/admin/events/AllEventsPage";
import UpdateEventPage from "./pages/admin/events/UpdateEventPage";
import ForgotPassword from "./pages/auth/ForgotPassword";
import LogIn from "./pages/auth/LogIn";
import ResetPassword from "./pages/auth/ResetPassword";
import SignUp from "./pages/auth/SignUp";
import Blog from "./pages/blog/Blog";
import Blog2 from "./pages/blog2/Blog2";
import Blogs from "./pages/blogs/Blogs";
import IndividualChapter from "./pages/chapter/pages/IndividualChapter";
import CommunityPage from "./pages/community/CommunityPage";
import SingleEvent from "./pages/community/sections/eventsSection/SingleEvents/SingleEvent";
import DonatePage from "./pages/donate/DonatePage";
import SingleProductDonation from "./pages/donate/pages/SingleProductDonatePage";
import Error400 from "./pages/errorPages/Error400";
import Error403 from "./pages/errorPages/Error403";
import Error404 from "./pages/errorPages/Error404";
import Error500 from "./pages/errorPages/Error500";
import ErrorBoundary from "./pages/errorPages/ErrorBoundary";
import EventsPage from "./pages/events/pages/EventsPage";
import EventsSection from "./pages/events/sections/eventsSection/EventsSection";
import GalleryPage from "./pages/gallery/GalleryPage";
import LandingPage from "./pages/landingPage/LandingPage";
import Layout from "./pages/Layout";
import Products from "./pages/products2/Products";
import Resources from "./pages/resources/Resources";
import Homepage from "./pages/shop/Homepage";
import Checkout from "./pages/shop/OrderSummaryPage";
import ProductDisplay from "./pages/shop/ProductDisplayPage";
import CategoriesProducts from "./pages/shop/sections/CategoriesProducts";
import SingleItemPage from "./pages/shop/SingleItemPage";

export {
AddChapterPage,
AddEventPage,
AllBlogsPage,
AllChaptersPage,
AllEventsPage,
UpdateEventPage,
LandingPage,
Homepage,
Checkout,
CategoriesProducts,
SingleItemPage,
Layout,
Products,
Resources,
AboutUs,
CommunityPage,
DonatePage,
SingleEvent,
Blogs,
Blog,
Blog2,
EventsPage,
EventsSection,
SingleProductDonation,
IndividualChapter,
Error400,
Error403,
Error404,
Error500,
ErrorBoundary,
ProductDisplay,
ForgotPassword,
LogIn,
ResetPassword,
SignUp,
GalleryPage,
};
8 changes: 5 additions & 3 deletions src/APP/pages/blog2/sections/BlogUMightLike.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* eslint-disable react/prop-types */
import React from "react";
import { formatDistanceToNow } from "date-fns";
import React from "react";
import { Link } from "react-router-dom";

import BlogStats from "../../blogs/sections/BlogStats";
import logo from "../../../../assets/images/sytLogo.png";
import BlogStats from "../../blogs/sections/BlogStats";

function BlogUMightLike({ blog, block }) {
const timeAgo = formatDistanceToNow(new Date(blog.created_at), {
Expand All @@ -25,7 +25,9 @@ function BlogUMightLike({ blog, block }) {

<div className="h-1/2 flex flex-col gap-2 py-2">
<div className="flex items-center justify-between pr-3">
<h3 className="text-xl text-[#323433] font-semibold">{blog.title}</h3>
<h3 className="text-xl text-[#323433] font-semibold line-clamp-1">
{blog.title}
</h3>

<BlogStats likes={blog.likes} blogId={blog.id} />
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/APP/pages/blog2/sections/RelatedBlogCard.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable react/prop-types */
import React from "react";
import { formatDistanceToNow } from "date-fns";
import React from "react";
import { Link } from "react-router-dom";

function RelatedBlogCard({ blog }) {
Expand Down
2 changes: 1 addition & 1 deletion src/router/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
EventsPage,
IndividualChapter,
Homepage,
Resources,
// Resources,
ProductDisplay,
ForgotPassword,
LogIn,
Expand Down

0 comments on commit edf2acc

Please sign in to comment.