Skip to content

Commit 5fb210c

Browse files
author
Ajit Kumar
committed
feat(announcements): add announcements section with project card component
1 parent d7ce004 commit 5fb210c

File tree

2 files changed

+161
-0
lines changed

2 files changed

+161
-0
lines changed

client/pages/home/index.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,20 @@ export default async function home() {
9898
</div>
9999
<ul className='featured-plugins__list'>{plugins}</ul>
100100
</div>
101+
102+
<div className='from-the-creator'>
103+
<div className='section-header'>
104+
<h2>Announcements</h2>
105+
</div>
106+
<ProjectCard
107+
logo='https://academy.acode.app/icon.png'
108+
alt='Acode Academy'
109+
title='Acode Academy'
110+
subtitle='Learn to build Acode plugins and master the editor — interactive courses by the creator'
111+
url='https://acode.app/plugin/io.foxbiz.acode_academy'
112+
cta='Explore Courses'
113+
/>
114+
</div>
101115
</section>
102116
);
103117
}
@@ -123,6 +137,19 @@ async function GhButton({ url, title, count, icon = 'github' }) {
123137
);
124138
}
125139

140+
function ProjectCard({ logo, alt, title, subtitle, url, cta }) {
141+
return (
142+
<a href={url} target='_blank' rel='noopener noreferrer' className='project-card'>
143+
<img src={logo} alt={alt} className='project-card__logo' />
144+
<div className='project-card__body'>
145+
<h3 className='project-card__title'>{title}</h3>
146+
<p className='project-card__subtitle'>{subtitle}</p>
147+
</div>
148+
<span className='project-card__cta'>{cta}</span>
149+
</a>
150+
);
151+
}
152+
126153
function Plugin({ data }) {
127154
const { name, icon, downloads, id } = data;
128155

client/pages/home/style.scss

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,140 @@
472472
}
473473
}
474474

475+
.from-the-creator {
476+
margin-top: 60px;
477+
margin-bottom: 20px;
478+
width: 100%;
479+
max-width: 1000px;
480+
padding: 0 10px;
481+
482+
.section-header {
483+
display: flex;
484+
align-items: flex-end;
485+
margin-bottom: 24px;
486+
padding: 0 10px;
487+
488+
h2 {
489+
font-family: 'Lexend', sans-serif;
490+
font-size: 1.8rem;
491+
font-weight: 700;
492+
color: #ffffff;
493+
}
494+
}
495+
496+
.project-card {
497+
display: flex;
498+
align-items: center;
499+
gap: 24px;
500+
padding: 28px 32px;
501+
background: linear-gradient(135deg,
502+
rgba(107, 70, 193, 0.15) 0%,
503+
rgba(139, 92, 246, 0.08) 50%,
504+
rgba(107, 70, 193, 0.15) 100%);
505+
border: 1px solid rgba(139, 92, 246, 0.25);
506+
border-radius: 20px;
507+
text-decoration: none;
508+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
509+
position: relative;
510+
overflow: hidden;
511+
512+
&::before {
513+
content: '';
514+
position: absolute;
515+
inset: 0;
516+
background: radial-gradient(circle at top left,
517+
rgba(139, 92, 246, 0.12),
518+
transparent 60%);
519+
opacity: 0;
520+
transition: opacity 0.3s ease;
521+
}
522+
523+
&:hover {
524+
border-color: rgba(139, 92, 246, 0.5);
525+
background: linear-gradient(135deg,
526+
rgba(107, 70, 193, 0.22) 0%,
527+
rgba(139, 92, 246, 0.14) 50%,
528+
rgba(107, 70, 193, 0.22) 100%);
529+
transform: translateY(-4px);
530+
box-shadow: 0 16px 40px rgba(107, 70, 193, 0.25);
531+
532+
&::before {
533+
opacity: 1;
534+
}
535+
536+
.project-card__logo {
537+
transform: scale(1.08);
538+
filter: drop-shadow(0 8px 20px rgba(139, 92, 246, 0.4));
539+
}
540+
541+
.project-card__cta {
542+
background: rgba(139, 92, 246, 0.9);
543+
transform: translateX(4px);
544+
}
545+
}
546+
547+
&__logo {
548+
width: 72px;
549+
height: 72px;
550+
border-radius: 16px;
551+
object-fit: contain;
552+
flex-shrink: 0;
553+
transition: all 0.3s ease;
554+
filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
555+
}
556+
557+
&__body {
558+
flex: 1;
559+
text-align: left;
560+
}
561+
562+
&__title {
563+
font-family: 'Lexend', sans-serif;
564+
font-size: 1.25rem;
565+
font-weight: 700;
566+
color: #fff;
567+
margin-bottom: 6px;
568+
}
569+
570+
&__subtitle {
571+
font-size: 0.9rem;
572+
color: rgba(255, 255, 255, 0.6);
573+
line-height: 1.5;
574+
max-width: 500px;
575+
}
576+
577+
&__cta {
578+
flex-shrink: 0;
579+
display: inline-flex;
580+
align-items: center;
581+
gap: 6px;
582+
padding: 10px 20px;
583+
background: rgba(139, 92, 246, 0.7);
584+
border-radius: 10px;
585+
color: #fff;
586+
font-size: 0.9rem;
587+
font-weight: 600;
588+
transition: all 0.2s ease;
589+
white-space: nowrap;
590+
}
591+
592+
@media screen and (max-width: 600px) {
593+
flex-direction: column;
594+
text-align: center;
595+
padding: 24px 20px;
596+
gap: 16px;
597+
598+
&__body {
599+
text-align: center;
600+
}
601+
602+
&__subtitle {
603+
max-width: none;
604+
}
605+
}
606+
}
607+
}
608+
475609
.article {
476610
font-size: 1.5rem;
477611
text-align: left;

0 commit comments

Comments
 (0)