-
Notifications
You must be signed in to change notification settings - Fork 0
Githan/projects #21
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
Merged
Merged
Githan/projects #21
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6d99b58
add animations and projectcards into main
358a3c6
Ferdigstilt prosjektkort og prosjektsection, fikset on hover effekter
GithMa 5df1e69
Ferdig for nå med prosjektsider
GithMa 50add2b
Fjernet noe jeg hadde gjort med uhell i footer
GithMa 7dc4c37
Lagt til med omfj sine forbedringer, bruke group i tailwind for å vis…
GithMa e40280b
ci: use double quote
omfj 0a79022
fix: lint and types
omfj 75bdaa6
chore: update vscode settings to use biome
omfj 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 |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "recommendations": ["biomejs.biome", "bradlc.vscode-tailwindcss"], | ||
| "unwantedRecommendations": [] | ||
| } |
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,5 @@ | ||
| { | ||
| "cSpell.words": ["projectdetail"], | ||
| "editor.defaultFormatter": "biomejs.biome", | ||
| "editor.formatOnSave": true | ||
| } |
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
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
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,61 @@ | ||
| import { ArrowRight, Eye } from "lucide-react"; | ||
|
|
||
| type ProjectCardProps = { | ||
| imgUrl: string; | ||
| title: string; | ||
| description: string; | ||
| previewUrl: string; | ||
| prosjektSide: string; | ||
| }; | ||
|
|
||
| const ProjectCard = ({ | ||
| imgUrl, | ||
| title, | ||
| description, | ||
| previewUrl, | ||
| prosjektSide, | ||
| }: ProjectCardProps) => { | ||
| return ( | ||
| <div className="rounded-xl overflow-hidden shadow-lg flex flex-col h-full bg-[#010F1B]"> | ||
| <div | ||
| className="h-52 md:h-60 rounded-t-xl relative group py-3" | ||
| style={{ | ||
| background: `url(${imgUrl}) no-repeat center center `, | ||
| backgroundSize: "contain", | ||
| backgroundPosition: "center", | ||
| backgroundOrigin: "content-box", | ||
| }} | ||
| > | ||
| <div className="overlay flex items-center justify-center absolute inset-0 bg-[#011627] opacity-0 group-hover:opacity-80 transition-all duration-250 rounded-t-xl"> | ||
| <a | ||
| href={previewUrl} | ||
| className="h-14 w-14 border-2 relative rounded-full border-[#ADB7BE] hover:border-white flex items-center justify-center" | ||
| > | ||
| <Eye className="h-10 w-10 text-[#ADB7BE] hover:text-white" /> | ||
| </a> | ||
| </div> | ||
| </div> | ||
| <a | ||
| href={prosjektSide} | ||
| className="text-white rounded-b-xl bg-[#011627] py-6 px-4 flex flex-col justify-between flex-grow cursor-pointer group" | ||
| style={{ textDecoration: "none" }} | ||
| > | ||
| <h5 className="font-xl font-semibold mb-2">{title}</h5> | ||
| <p style={{ whiteSpace: "pre-line" }} className="text-[#ADB7BE] mb-4"> | ||
| {description} | ||
| </p> | ||
| <span className="flex items-center gap-2 font-medium tracking-wider transition-colors duration-300 text-white group-hover:text-blue-400"> | ||
| <span className="relative"> | ||
| Les mer her | ||
| <span className="absolute left-0 -bottom-0.5 h-[2px] bg-blue-400 transition-all duration-300 w-+ group-hover:w-full" /> | ||
| </span> | ||
| <span className="inline-flex transition-transform duration-300 translate-none group-hover:translate-x-(6px)"> | ||
| <ArrowRight size={20} className="text-white group-hover:text-blue-400" /> | ||
| </span> | ||
| </span> | ||
| </a> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default ProjectCard; | ||
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 @@ | ||
| import { ArrowRight } from "lucide-react"; | ||
|
|
||
| type ProjectDetailProps = { | ||
| slug: string; | ||
| title: string; | ||
| desc: string; | ||
| small_img: string; | ||
| large_img: string; | ||
| link: string; | ||
| }; | ||
|
|
||
| export default function ProjectDetail({ title, desc, large_img, link }: ProjectDetailProps) { | ||
| return ( | ||
| <div> | ||
| <h1 className="text-4xl font-bold mb-6 text-center">{title}</h1> | ||
|
|
||
| <img | ||
| src={large_img} | ||
| alt={title} | ||
| className="w-full max-w-2xl mx-auto mb-6 rounded shadow-lg" | ||
| /> | ||
|
|
||
| <p className="text-lg leading-relaxed">{desc}</p> | ||
|
|
||
| {link && ( | ||
| <a | ||
| href={link} | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="group flex justify-center items-center gap-2 font-medium tracking-wider mt-5" | ||
| > | ||
| <span className="relative"> | ||
| <span className="transition-colors duration-300 group-hover:text-blue-400"> | ||
| Link til siden | ||
| </span> | ||
| <span className="absolute left-0 -bottom-0.5 h-[2px] bg-blue-400 transition-all duration-300 w-0 group-hover:w-full" /> | ||
| </span> | ||
|
|
||
| <span className="inline-flex transition-transform duration-300 group-hover:translate-x-1"> | ||
| <ArrowRight | ||
| className="transition-colors duration-300 group-hover:text-blue-400" | ||
| size={24} | ||
| /> | ||
| </span> | ||
| </a> | ||
| )} | ||
| </div> | ||
| ); | ||
| } |
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,52 @@ | ||
| import ProjectCard from "./projectCard"; | ||
|
|
||
| // Dette skal hentes fra Sanity etterhvert | ||
| export const projectData = [ | ||
| { | ||
| slug: "lffh", | ||
| title: "LFFH-nettsiden", | ||
| desc: "Funksjonell nettside for Linjeforeningen for Fiskehelse og Havbruk, med mulighet for blant annet innlogging, arrangementopprettelse og påmelding til arrangementer", | ||
| small_img: "/ProjectImages/lffh_logo_small.png", | ||
| large_img: "/ProjectImages/lffh_rectangle.png", | ||
| link: "https://www.lffh.no/", | ||
| }, | ||
| { | ||
| slug: "integrerbar", | ||
| title: "Integrerbar-nettsiden (under utvikling)", | ||
| desc: "En nettside utviklet for Integrerbar, studentbaren tilknyttet Fakultet for naturvitenskap og teknologi ved Universitetet, med base i Realfagbygget.", | ||
| small_img: "/ProjectImages/integrerbar_logo_small.png", | ||
| large_img: "/ProjectImages/integrerbar_rectangle.jpeg", | ||
| link: "https://integrerbar-web.fly.dev", | ||
| }, | ||
| { | ||
| slug: "nti", | ||
| title: "NTidrett-nettsiden (under utvikling)", | ||
| desc: "En nettside utviklet for NT Idrett, idrettsorganisasjonen tilknyttet Fakultet for naturvitenskap og teknologi ved universitetet.", | ||
| small_img: "/ProjectImages/nti_logo_small.png", | ||
| large_img: "/ProjectImages/nti_logo_white.jpeg", | ||
| link: "https://ntidrett.no/", | ||
| }, | ||
| ]; | ||
|
|
||
| export default function ProjectsSection() { | ||
| return ( | ||
| <> | ||
| <h2 className="text-center text-4xl font-bold text-white mt-4 mb-8 md:mb-12">Prosjekter</h2> | ||
|
|
||
| {/* Prosjekter */} | ||
| <div className="flex flex-wrap gap-8 items-stretch justify-center"> | ||
| {projectData.map((project) => ( | ||
| <div key={project.slug} className="w-full sm:w-[48%] lg:w-[31%] flex"> | ||
| <ProjectCard | ||
| imgUrl={project.small_img} | ||
| title={project.title} | ||
| description={project.desc} | ||
| previewUrl={project.link} | ||
| prosjektSide={`prosjekter/${project.slug}`} | ||
| /> | ||
| </div> | ||
| ))} | ||
| </div> | ||
| </> | ||
| ); | ||
| } |
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.
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.