Skip to content

Commit 3bc1347

Browse files
Remove Static Views (#669)
* Add course data for Core Fundamentals and Command Line Interface; update BlogCard component to remove views display * Remove instructor and course data for Core Fundamentals and Command Line Interface * Remove views display from BlogArea components across multiple layouts * Remove 'views' field from blog data retrieval across multiple components
1 parent 1bcbc5f commit 3bc1347

File tree

31 files changed

+39
-123
lines changed

31 files changed

+39
-123
lines changed

src/components/blog-card/blog-01.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import clsx from "clsx";
33
import Anchor from "@ui/anchor";
44
import { IBlog } from "@utils/types";
55

6-
type TProps = Pick<IBlog, "title" | "path" | "category" | "postedAt" | "image" | "views"> & {
6+
type TProps = Pick<IBlog, "title" | "path" | "category" | "postedAt" | "image"> & {
77
className?: string;
88
};
99

1010
const BlogCard = forwardRef<HTMLDivElement, TProps>(
11-
({ title, path, category, postedAt, image, views, className }, ref) => (
11+
({ title, path, category, postedAt, image, className }, ref) => (
1212
<div
1313
className={clsx(
1414
"blog-card tw-relative tw-overflow-hidden tw-transition-all tw-rounded tw-bg-white tw-shadow-xl tw-shadow-black/5 tw-group",
@@ -42,15 +42,11 @@ const BlogCard = forwardRef<HTMLDivElement, TProps>(
4242
<h3 className="tw-text-xl tw-mb-0 tw-leading-normal">
4343
<Anchor path={path}>{title}</Anchor>
4444
</h3>
45-
<ul className="tw-flex tw-gap-7">
45+
<ul>
4646
<li className="tw-text-md tw-mt-3.8">
4747
<i className="far fa-calendar tw-mr-2.5" />
4848
{postedAt}
4949
</li>
50-
<li className="tw-text-md tw-mt-3.8">
51-
<i className="far fa-eye tw-mr-2.5" />
52-
{views} views
53-
</li>
5450
</ul>
5551
</div>
5652
</div>

src/components/blog-card/blog-02.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import clsx from "clsx";
33
import Anchor from "@ui/anchor";
44
import { IBlog } from "@utils/types";
55

6-
type TProps = Pick<IBlog, "title" | "path" | "category" | "postedAt" | "image" | "views"> & {
6+
type TProps = Pick<IBlog, "title" | "path" | "category" | "postedAt" | "image"> & {
77
className?: string;
88
};
99

1010
const BlogCard = forwardRef<HTMLDivElement, TProps>(
11-
({ title, path, category, postedAt, image, views, className }, ref) => (
11+
({ title, path, category, postedAt, image, className }, ref) => (
1212
<div
1313
className={clsx(
1414
"blog-card tw-grid tw-relative tw-overflow-hidden tw-transition-all tw-rounded tw-bg-white tw-shadow-xl tw-shadow-black/5 tw-group",
@@ -46,15 +46,11 @@ const BlogCard = forwardRef<HTMLDivElement, TProps>(
4646
{title}
4747
</Anchor>
4848
</h3>
49-
<ul className="tw-flex tw-gap-7">
49+
<ul>
5050
<li className="tw-text-md tw-mt-3.8 tw-text-white tw-mb-0">
5151
<i className="far fa-calendar tw-mr-2.5" />
5252
{postedAt}
5353
</li>
54-
<li className="tw-text-md tw-mt-3.8 tw-text-white">
55-
<i className="far fa-eye tw-mr-2.5" />
56-
{views} views
57-
</li>
5854
</ul>
5955
</div>
6056
</div>

src/components/blog-card/blog-03.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import clsx from "clsx";
33
import Anchor from "@ui/anchor";
44
import { IBlog } from "@utils/types";
55

6-
type TProps = Pick<IBlog, "image" | "path" | "title" | "category" | "postedAt" | "views"> & {
6+
type TProps = Pick<IBlog, "image" | "path" | "title" | "category" | "postedAt"> & {
77
className?: string;
88
};
99

1010
const BlogCard = forwardRef<HTMLDivElement, TProps>(
11-
({ className, image, path, title, category, postedAt, views }, ref) => {
11+
({ className, image, path, title, category, postedAt }, ref) => {
1212
return (
1313
<div className={clsx("blog-card tw-group", className)} ref={ref}>
1414
<div className="tw-relative tw-overflow-hidden tw-rounded tw-h-[250px]">
@@ -40,15 +40,11 @@ const BlogCard = forwardRef<HTMLDivElement, TProps>(
4040
<Anchor path={path}>{title}</Anchor>
4141
</h3>
4242

43-
<ul className="tw-flex tw-gap-7 tw-text-gray-300 tw-text-md">
43+
<ul className="tw-text-gray-300 tw-text-md">
4444
<li className="tw-mt-3.8 tw-mb-0">
4545
<i className="far fa-calendar tw-mr-2.5" />
4646
{postedAt}
4747
</li>
48-
<li className="tw-mt-3.8">
49-
<i className="far fa-eye tw-mr-2.5" />
50-
{views} views
51-
</li>
5248
</ul>
5349
</div>
5450
</div>

src/components/blog-card/blog-04.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import clsx from "clsx";
33
import Anchor from "@ui/anchor";
44
import { BlogMetaType, IBlog } from "@utils/types";
55

6-
type TProps = Pick<IBlog, "image" | "path" | "title" | "postedAt" | "views"> & {
6+
type TProps = Pick<IBlog, "image" | "path" | "title" | "postedAt"> & {
77
className?: string;
88
category?: BlogMetaType;
99
};
1010

1111
const BlogCard = forwardRef<HTMLDivElement, TProps>(
12-
({ className, image, path, title, postedAt, views, category }, ref) => {
12+
({ className, image, path, title, postedAt, category }, ref) => {
1313
return (
1414
<div
1515
className={clsx(
@@ -49,15 +49,11 @@ const BlogCard = forwardRef<HTMLDivElement, TProps>(
4949
<Anchor path={path}>{title}</Anchor>
5050
</h3>
5151

52-
<ul className="tw-flex tw-gap-7 tw-text-gray-300 tw-text-md">
52+
<ul className="tw-flex tw-text-gray-300 tw-text-md">
5353
<li className="tw-mt-3.8 tw-mb-0">
5454
<i className="far fa-calendar tw-mr-2.5" />
5555
{postedAt}
5656
</li>
57-
<li className="tw-mt-3.8">
58-
<i className="far fa-eye tw-mr-2.5" />
59-
{views} views
60-
</li>
6157
</ul>
6258
</div>
6359
</div>

src/components/blog-card/blog-05.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import SocialShare from "@components/social-share/layout-03";
99

1010
type TProps = Pick<
1111
IBlog,
12-
"image" | "path" | "title" | "postedAt" | "views" | "category" | "author" | "excerpt"
12+
"image" | "path" | "title" | "postedAt" | "category" | "author" | "excerpt"
1313
> & {
1414
className?: string;
1515
};
1616

1717
const BlogCard = forwardRef<HTMLDivElement, TProps>(
18-
({ className, image, path, title, postedAt, views, category, author, excerpt }, ref) => {
18+
({ className, image, path, title, postedAt, category, author, excerpt }, ref) => {
1919
return (
2020
<div
2121
className={clsx(
@@ -60,11 +60,6 @@ const BlogCard = forwardRef<HTMLDivElement, TProps>(
6060
text={postedAt}
6161
icon="far fa-calendar"
6262
/>
63-
<BlogMetaItem
64-
className="tw-pr-5 md:tw-pr-8"
65-
text={`${views} views`}
66-
icon="far fa-eye"
67-
/>
6863
</div>
6964
<p className="tw-mt-4" dangerouslySetInnerHTML={{ __html: excerpt }} />
7065
<div className="tw-flex tw-items-center tw-justify-between tw-mt-7.5">

src/components/blog-card/blog-06.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,12 @@ import { IBlog } from "@utils/types";
77
import Button from "@components/ui/button";
88
import SocialShare from "@components/social-share/layout-03";
99

10-
type TProps = Pick<
11-
IBlog,
12-
"image" | "path" | "title" | "postedAt" | "views" | "author" | "excerpt"
13-
> & {
10+
type TProps = Pick<IBlog, "image" | "path" | "title" | "postedAt" | "author" | "excerpt"> & {
1411
className?: string;
1512
};
1613

1714
const BlogCard = forwardRef<HTMLDivElement, TProps>(
18-
({ className, image, path, title, postedAt, views, author, excerpt }, ref) => {
15+
({ className, image, path, title, postedAt, author, excerpt }, ref) => {
1916
return (
2017
<div
2118
className={clsx(
@@ -54,11 +51,6 @@ const BlogCard = forwardRef<HTMLDivElement, TProps>(
5451
text={postedAt}
5552
icon="far fa-calendar"
5653
/>
57-
<BlogMetaItem
58-
className="tw-pr-5 md:tw-pr-8"
59-
text={`${views} views`}
60-
icon="far fa-eye"
61-
/>
6254
</div>
6355
<p className="tw-mt-4" dangerouslySetInnerHTML={{ __html: excerpt }} />
6456
<div className="tw-flex tw-items-center tw-justify-between tw-mt-7.5 md:tw-mt-9">

src/containers/blog-full/layout-01/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const BlogArea = ({ data: { blogs, pagiData } }: TProps) => {
3232
path={blog.path}
3333
category={blog.category}
3434
postedAt={blog.postedAt}
35-
views={blog.views}
3635
initial="offscreen"
3736
whileInView="onscreen"
3837
viewport={{ once: true, amount: 0.2 }}

src/containers/blog-full/layout-02/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const BlogArea = ({ data: { blogs, recentPosts, tags, pagiData } }: TProps) => {
3636
path={blog.path}
3737
image={blog.image}
3838
postedAt={blog.postedAt}
39-
views={blog.views}
4039
initial="offscreen"
4140
whileInView="onscreen"
4241
viewport={{ once: true, amount: 0.2 }}

src/containers/blog-full/layout-03/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ const BlogArea = ({ data: { blogs, recentPosts, tags, pagiData } }: TProps) => {
3535
path={blog.path}
3636
image={blog.image}
3737
postedAt={blog.postedAt}
38-
views={blog.views}
3938
category={blog.category}
4039
author={blog.author}
4140
excerpt={blog.excerpt}

src/containers/blog-full/layout-04/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ const BlogArea = ({ data: { blogs, pagiData } }: TProps) => {
3131
path={blog.path}
3232
image={blog.image}
3333
postedAt={blog.postedAt}
34-
views={blog.views}
3534
author={blog.author}
3635
excerpt={blog.excerpt}
3736
initial="offscreen"

0 commit comments

Comments
 (0)