Skip to content

Commit 4596e34

Browse files
authored
Merge pull request #113 from w3bdesign/development
Responsive prosjekter
2 parents 074e725 + 362fef2 commit 4596e34

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

src/components/Layout/Header.component.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
import React from "react";
44
import Link from "next/link";
5-
import { usePathname } from "next/navigation";
65
import clsx from "clsx";
6+
import { usePathname } from "next/navigation";
7+
78
import { MotionDiv, MotionLi } from "@/lib/framer/client";
89

910
import MobileMenu from "./MobileMenu.component";

src/components/Layout/MobileMenu.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const MobileMenu = ({ links }: IMobileMenuProps) => {
112112
{name}
113113
</a>
114114
) : (
115-
<Link href={href} data-testid={`mobil-${name}`}>
115+
<Link href={href} data-testid={`mobil-${name}`} prefetch={true}>
116116
{name}
117117
</Link>
118118
)}

src/components/Prosjekter/ProsjektCard.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,24 @@ const ProsjektCard: React.FC<ProjectProps> = ({
2323
urlgithub,
2424
}) => {
2525
return (
26-
<div className="bg-slate-700 shadow-md rounded-lg overflow-hidden">
26+
<div className="bg-slate-700 shadow-md rounded-lg overflow-hidden mx-4 md:m-0">
2727
<div className="relative w-full h-48 md:h-60">
28-
<div className="w-full h-full p-5 pb-[50px] relative overflow-hidden flex justify-center md:w-[750px] md:h-[350px]">
29-
<Image
30-
className="flex justify-center text-center"
31-
width="600"
32-
height="300"
33-
quality={100}
34-
src={urlFor(projectimage).url() as string}
35-
alt={name}
36-
priority
37-
unoptimized
38-
/>
28+
<div className="w-full h-full p-5 md:pb-[50px] relative overflow-hidden flex justify-center md:w-[750px] md:h-[350px]">
29+
{projectimage && (
30+
<Image
31+
className="flex justify-center text-center"
32+
width="600"
33+
height="350"
34+
quality={100}
35+
src={urlFor(projectimage).url() as string}
36+
alt={name}
37+
priority
38+
unoptimized
39+
/>
40+
)}
3941
</div>
4042
</div>
41-
<div className="mt-12 p-2 flex flex-col justify-between min-h-[250px] xl:min-h-[275px]">
43+
<div className="md:mt-12 p-2 flex flex-col justify-between min-h-[250px] xl:min-h-[275px]">
4244
<div>
4345
<h1 className="xl:mt-4 text-xl text-center font-bold py-2 text-slate-200">
4446
{name}

0 commit comments

Comments
 (0)