-
Notifications
You must be signed in to change notification settings - Fork 1
Add CommunityNews component #78
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
Open
BIA3IA
wants to merge
15
commits into
main
Choose a base branch
from
bianca/communityNews
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f53231e
feat: add CommunityNews component and update page layout
BIA3IA 32fe53b
fix: biome
BIA3IA 1c2ba01
fix: update layout styles for CommunityNews component
BIA3IA e432d53
fix: adjust CommunityNews section to ensure full height display
BIA3IA 4eb7ec3
fix: update padding in CommunityNews section for improved layout
BIA3IA 55cf677
Merge remote-tracking branch 'origin/main' into bianca/communityNews
BIA3IA a0aa35b
feat: update community news component and improve gradient icon handling
BIA3IA 7d44b3c
feat: implement carousel component and mock data
BIA3IA b863417
refactor: simplify section and div elements in carousel component
BIA3IA 623b9bf
feat: enhance keyboard navigation for vertical carousel orientation
BIA3IA 6dee720
Merge remote-tracking branch 'refs/remotes/origin/bianca/communityNew…
BIA3IA d7e9f89
style: refine typography and layout in CommunityNews component
BIA3IA 0cb4b2b
Merge commit '623b9bf29207ad0a843eed33931b43d9c8f76714' into bianca/c…
BIA3IA c3a6137
feat: integrate carousel for community news display and enhance layout
BIA3IA b705fe2
style: adjust width of community news section for better responsiveness
BIA3IA File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,4 +47,7 @@ yarn-error.log* | |
| *.tsbuildinfo | ||
|
|
||
| # idea files | ||
| .idea | ||
| .idea | ||
|
|
||
| # codex | ||
| .codex | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { CommunityNews } from "@/components/projects/community-news" | ||
|
|
||
| export default function Home() { | ||
| return ( | ||
| <main className="w-full"> | ||
| <CommunityNews /> | ||
| </main> | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| "use client" | ||
|
|
||
| import { CardCaption } from "@/components/card-caption" | ||
| import { Carousel, CarouselContent, CarouselDots, CarouselItem } from "@/components/ui/carousel" | ||
|
|
||
| const mockCards = [ | ||
| { | ||
| title: "WeBeepSync", | ||
| caption: | ||
| "WeBeep Sync è una semplice app, user-friendly e senza compromessi che serve per tenere sincronizzati tutti i tuoi file di WeBeep.", | ||
| }, | ||
| { | ||
| title: "PolimiSchedule", | ||
| caption: | ||
| "Genera un file iCalendar (.ics) a partire dal formato testuale dell’Orario delle lezioni. Possibilità di importare su Google Calendar.", | ||
| }, | ||
| { | ||
| title: "WiFiLinux", | ||
| caption: "Scarica ed esegui lo script Python per attivare la connessione permanente al WiFi Polimi.", | ||
| }, | ||
| { | ||
| title: "The TOL Project", | ||
| caption: "Un simulatore gratuito del test di ammissione per le aspiranti matricole di Ingegneria del PoliMi.", | ||
| }, | ||
| ] as const | ||
|
|
||
| // TODO: delete this when merging | ||
| export function CarouselMock() { | ||
| return ( | ||
| <section className="mx-auto flex min-h-screen w-full max-w-4xl flex-col items-center justify-center gap-16 px-7.5"> | ||
| <h1 className="typo-headline-medium sm:typo-display-large bg-linear-to-r from-text-primary via-blue-secondary to-blue-primary bg-clip-text text-transparent"> | ||
| PoliNetwork | ||
| </h1> | ||
|
|
||
| <Carousel className="w-full"> | ||
| <CarouselContent> | ||
| {mockCards.map((card) => ( | ||
| <CarouselItem key={card.title}> | ||
| <div className="flex justify-center"> | ||
| <CardCaption {...card} /> | ||
| </div> | ||
| </CarouselItem> | ||
| ))} | ||
| </CarouselContent> | ||
| <CarouselDots className="mt-8" /> | ||
| </Carousel> | ||
| </section> | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| import { FiCrop } from "react-icons/fi" | ||
| import { CardCaption } from "../card-caption" | ||
| import { Carousel, CarouselContent, CarouselDots, CarouselItem } from "../ui/carousel" | ||
|
|
||
| const communityCards = [ | ||
| { | ||
| title: "Title 1", | ||
| caption: | ||
| "description: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incidunt ut labore et dolore magna aliqua.", | ||
| icon: FiCrop, | ||
| iconPosition: "right", | ||
| }, | ||
| { | ||
| title: "Title 2", | ||
| caption: | ||
| "description: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incidunt ut labore et dolore magna aliqua.", | ||
| icon: FiCrop, | ||
| iconPosition: "right", | ||
| }, | ||
| { | ||
| title: "Title 3", | ||
| caption: | ||
| "description: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incidunt ut labore et dolore magna aliqua.", | ||
| icon: FiCrop, | ||
| iconPosition: "right", | ||
| }, | ||
| { | ||
| title: "Title 4", | ||
| caption: | ||
| "description: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incidunt ut labore et dolore magna aliqua.", | ||
| icon: FiCrop, | ||
| iconPosition: "right", | ||
| }, | ||
| ] as const | ||
|
|
||
| export function CommunityNews() { | ||
| return ( | ||
| <section className="mx-auto flex min-h-screen max-w-400 flex-col items-center justify-center gap-48 px-4 py-49"> | ||
| <div className="flex flex-col items-center gap-6"> | ||
| <h2 className="typo-display-large sm:typo-display-extralarge w-fit bg-linear-to-b from-text-primary to-text-secondary bg-clip-text py-4 text-transparent sm:py-14"> | ||
| Projects | ||
| </h2> | ||
| <p className="typo-title-large sm:typo-headline-small max-w-xl text-center"> | ||
| Esplora e contribuisci ai progetti degli studenti | ||
| </p> | ||
| </div> | ||
|
|
||
| <div className="mx-auto flex w-full flex-col gap-14 sm:w-fit"> | ||
| <div className="flex flex-col items-center gap-2 sm:items-start"> | ||
| <h3 className="typo-headline-medium sm:typo-display-medium text-center sm:text-left"> | ||
| Le novità della community | ||
| </h3> | ||
| <p className="typo-body-large text-center sm:text-left"> | ||
| Rimani aggiornato sulle idee appena condivise dagli studenti del Politecnico | ||
| </p> | ||
| </div> | ||
|
|
||
| {/* Desktop Grid */} | ||
| <div className="hidden grid-cols-2 justify-items-center gap-6 sm:grid xl:grid-cols-4"> | ||
| {communityCards.map((card) => ( | ||
| <CardCaption key={card.title} {...card} /> | ||
| ))} | ||
| </div> | ||
|
|
||
| {/* Mobile Carousel */} | ||
| <div className="sm:hidden"> | ||
| <Carousel className="w-full"> | ||
| <CarouselContent> | ||
| {communityCards.map((card) => ( | ||
| <CarouselItem key={card.title}> | ||
| <div className="flex justify-center"> | ||
| <CardCaption {...card} /> | ||
| </div> | ||
| </CarouselItem> | ||
| ))} | ||
| </CarouselContent> | ||
| <CarouselDots className="mt-8" /> | ||
| </Carousel> | ||
| </div> | ||
| </div> | ||
| </section> | ||
| ) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.