Skip to content

Commit e91d3a6

Browse files
authored
feat: general fixes (#427)
- fix issue #426: zkEVM project page doesn't display all posts (#426) - fix issue #425: make all links elements as tag element across all pages (#425) - fix issue #425: Syntax highlights for code snippets #424 wa (#424)
1 parent dbb29ef commit e91d3a6

File tree

15 files changed

+690
-1018
lines changed

15 files changed

+690
-1018
lines changed

app/[lang]/about/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export default async function AboutPage({ params: { lang } }: any) {
3232
href={siteConfig.links.discord}
3333
target="_blank"
3434
rel="noreferrer"
35+
className="self-start"
3536
passHref
3637
>
3738
<Button>
@@ -82,6 +83,7 @@ export default async function AboutPage({ params: { lang } }: any) {
8283
href={siteConfig.links.discord}
8384
target="_blank"
8485
rel="noreferrer"
86+
className="w-fit mx-auto"
8587
passHref
8688
>
8789
<Button>

app/[lang]/projects/sections/ProjectContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const ProjectContent = ({
8383
<div className="flex flex-col">
8484
<div className="flex flex-col gap-6 text-left">
8585
<Link
86-
className="flex items-center gap-2 text-tuatara-950/80 hover:text-tuatara-950"
86+
className="flex items-center gap-2 text-tuatara-950/80 hover:text-tuatara-950 mr-auto"
8787
href={`/${lang}/projects`}
8888
>
8989
<Icons.arrowLeft />

app/[lang]/resources/page.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const ResourceItem = ({
5050
href={url}
5151
target="_blank"
5252
rel="noreferrer noopener"
53-
className="group pb-3 duration-500 group-hover:transition"
53+
className="group pb-3 duration-500 group-hover:transition self-start"
5454
>
5555
<div className="flex items-center gap-1">
5656
<div className="flex space-x-3">
@@ -228,9 +228,10 @@ export default function ResourcePage({ params: { lang } }: LangProps) {
228228
</h3>
229229
}
230230
>
231+
<div className="pb-6"></div>
231232
<Link
232233
href={siteConfig.links.discord}
233-
className="pb-6"
234+
className="w-fit mx-auto"
234235
target="_blank"
235236
rel="noreferrer"
236237
passHref

articles/the-next-chapter-for-zkevm-community-edition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ tags:
1818
"infrastructure/protocol",
1919
"proof systems",
2020
]
21-
projects: ["zkevm"]
21+
projects: ["zkevm-community"]
2222
---
2323

2424
We are excited to share some updates on our road to building a zkEVM, as we generalize our exploration towards the design and implementation of a general-purpose zkVM.

components/blog/ArticlesList.tsx

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ import { ArticleListCard } from "./article-list-card"
66
import { cn } from "@/lib/utils"
77
import Link from "next/link"
88
import { useTranslation } from "react-i18next"
9+
import { cva } from "class-variance-authority"
10+
11+
const ArticleTitle = cva(
12+
"text-white font-display hover:text-anakiwa-400 transition-colors group-hover:text-anakiwa-400",
13+
{
14+
variants: {
15+
variant: {
16+
compact:
17+
"text-[20px] font-semibold lg:font-bold lg:text-lg line-clamp-2 mt-auto",
18+
default: "text-[20px] font-semibold lg:font-bold line-clamp-3 mt-auto",
19+
xl: "text-[20px] font-bold lg:!text-[40px] lg:!leading-[44px] mt-auto",
20+
},
21+
},
22+
}
23+
)
924

1025
const ArticleInEvidenceCard = ({
1126
article,
@@ -54,7 +69,7 @@ const ArticleInEvidenceCard = ({
5469
{children}
5570
</Link>
5671
) : (
57-
<>{children}</>
72+
<div className="group">{children}</div>
5873
)
5974
}
6075

@@ -90,23 +105,18 @@ const ArticleInEvidenceCard = ({
90105
{formatDate(article.date)}
91106
</span>
92107
)}
93-
<Link
94-
href={`/blog/${article.id}`}
95-
className={cn(
96-
" text-white font-display hover:text-anakiwa-400 transition-colors",
97-
{
98-
"text-[20px] font-semibold lg:font-bold lg:text-lg line-clamp-2 mt-auto":
99-
variant === "compact",
100-
"text-[20px] font-semibold lg:font-bold line-clamp-3 mt-auto":
101-
variant === "default",
102-
"text-[20px] font-bold lg:!text-[40px] lg:!leading-[44px] mt-auto":
103-
variant === "xl",
104-
},
105-
titleClassName
106-
)}
107-
>
108-
{article.title}
109-
</Link>
108+
{asLink === false ? (
109+
<Link
110+
href={`/blog/${article.id}`}
111+
className={cn(ArticleTitle({ variant }), titleClassName)}
112+
>
113+
{article.title}
114+
</Link>
115+
) : (
116+
<span className={cn(ArticleTitle({ variant }), titleClassName)}>
117+
{article.title}
118+
</span>
119+
)}
110120
<span className="text-sm text-white/80 uppercase font-inter">
111121
{article.authors?.join(", ")}
112122
</span>

components/blog/article-in-evidance-card.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ export const ArticleInEvidenceCard = async ({
123123
</span>
124124
)}
125125
{showReadMore && (
126-
<Link href={`/blog/${article.id}`} className="ml-auto">
127-
<Button className="uppercase ml-auto mt-4" variant="secondary">
126+
<Link href={`/blog/${article.id}`} className="ml-auto mt-4">
127+
<Button className="uppercase ml-auto" variant="secondary">
128128
<div className="flex items-center gap-2">
129129
<span className="!text-center">{t("readMore")}</span>
130130
<Icons.arrowRight className="w-4 h-4" />

components/blog/article-list-card.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ export const ArticleListCard = ({
3030

3131
return (
3232
<div className="flex h-full">
33-
<div
33+
<Link
3434
className="full group cursor-pointer hover:scale-105 duration-300"
35-
onClick={() => {
36-
router.push(url)
37-
}}
35+
href={url}
3836
rel="noreferrer"
3937
>
4038
<div className="grid grid-cols-[80px_1fr] lg:grid-cols-[120px_1fr] items-center gap-4 lg:gap-10">
@@ -107,7 +105,7 @@ export const ArticleListCard = ({
107105
</span>
108106
</div>
109107
</div>
110-
</div>
108+
</Link>
111109
</div>
112110
)
113111
}

components/blog/blog-recent-articles.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ const ArticleInEvidenceCard = ({
118118
</span>
119119
)}
120120
{showReadMore && (
121-
<Link href={`/blog/${article.id}`} className="ml-auto">
122-
<Button className="uppercase ml-auto mt-4" variant="secondary">
121+
<Link href={`/blog/${article.id}`} className="ml-auto mt-4">
122+
<Button className="uppercase ml-auto" variant="secondary">
123123
<div className="flex items-center gap-2">
124124
<span className="!text-center">Read More</span>
125125
<Icons.arrowRight className="w-4 h-4" />

components/project/project-card.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { cn } from "@/lib/utils"
1414
import { LocaleTypes } from "@/app/i18n/settings"
1515

1616
import { ProjectLink } from "../mappings/project-link"
17+
import Link from "next/link"
1718

1819
interface ProjectCardProps
1920
extends React.HTMLAttributes<HTMLDivElement>,
@@ -100,14 +101,11 @@ export default function ProjectCard({
100101
)}
101102
<div className="flex flex-col justify-between h-full gap-8 p-4 bg-white rounded-b-lg">
102103
<div className="flex flex-col justify-start gap-2">
103-
<h1
104-
className="text-2xl font-bold leading-7 text-black duration-200 cursor-pointer hover:text-anakiwa-500"
105-
onClick={() => {
106-
router.push(`/projects/${id}`)
107-
}}
108-
>
109-
{name}
110-
</h1>
104+
<Link href={`/projects/${id}`}>
105+
<h1 className="text-2xl font-bold leading-7 text-black duration-200 cursor-pointer hover:text-anakiwa-500">
106+
{name}
107+
</h1>
108+
</Link>
111109
{projectContent?.tldr && (
112110
<div className="flex flex-col h-24 gap-4">
113111
<p className="text-slate-900/80 line-clamp-4">

components/research/research-card.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { cn } from "@/lib/utils"
1414
import { LocaleTypes } from "@/app/i18n/settings"
1515

1616
import { ProjectLink } from "../mappings/project-link"
17+
import Link from "next/link"
1718

1819
interface ProjectCardProps
1920
extends React.HTMLAttributes<HTMLDivElement>,
@@ -77,14 +78,12 @@ export default function ProjectCard({
7778
const { content: projectContent } = getProjectById(id, lang)
7879

7980
return (
80-
<div
81+
<Link
82+
href={`/projects/${id?.toLowerCase()}`}
8183
className={cn(
8284
"group cursor-pointer",
8385
projectCardVariants({ showLinks, border, className })
8486
)}
85-
onClick={() => {
86-
router.push(`/projects/${id?.toLowerCase()}`)
87-
}}
8887
>
8988
{showBanner && (
9089
<div
@@ -178,6 +177,6 @@ export default function ProjectCard({
178177
</div>
179178
</div>
180179
</div>
181-
</div>
180+
</Link>
182181
)
183182
}

0 commit comments

Comments
 (0)