Skip to content

Commit

Permalink
changes from feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsnes committed Oct 7, 2024
1 parent 34b2429 commit c4aba02
Show file tree
Hide file tree
Showing 9 changed files with 157 additions and 43 deletions.
3 changes: 3 additions & 0 deletions apps/_components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ export { Container } from './Container/Container';
export { ClipboardButton } from './ClipboardButton/ClipboardButton';
export { ColorModal } from './ColorModal/ColorModal';
export { Header } from './Header/Header';
export { Figma } from './logos/Figma';
export { Github } from './logos/Github';
export { Slack } from './logos/Slack';
30 changes: 30 additions & 0 deletions apps/_components/src/logos/Figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
type FigmaProps = React.HTMLAttributes<SVGElement>;

export function Figma(rest: FigmaProps) {
return (
<svg
width='24'
height='24'
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
{...rest}
>
<g clipPath='url(#clip0_38_168)'>
<path
d='M15.3321 8.66788C16.1984 8.64188 17.0204 8.27949 17.624 7.65755C18.2275 7.03561 18.5651 6.20304 18.5651 5.33638C18.5651 4.46973 18.2275 3.63715 17.624 3.01521C17.0204 2.39327 16.1984 2.03088 15.3321 2.00488H8.66809C7.80183 2.03088 6.97976 2.39327 6.3762 3.01521C5.77265 3.63715 5.43508 4.46973 5.43508 5.33638C5.43508 6.20304 5.77265 7.03561 6.3762 7.65755C6.97976 8.27949 7.80183 8.64188 8.66809 8.66788C7.79426 8.68302 6.96133 9.04078 6.34871 9.6641C5.7361 10.2874 5.39282 11.1264 5.39282 12.0004C5.39282 12.8744 5.7361 13.7134 6.34871 14.3367C6.96133 14.96 7.79426 15.3177 8.66809 15.3329C7.79852 15.3542 6.97174 15.7146 6.36426 16.3371C5.75677 16.9597 5.41673 17.7951 5.41673 18.6649C5.41673 19.5347 5.75677 20.3701 6.36426 20.9926C6.97174 21.6152 7.79852 21.9756 8.66809 21.9969C9.5518 21.9964 10.3992 21.645 11.0239 21.02C11.6487 20.3951 11.9998 19.5476 12.0001 18.6639V8.66788H15.3321Z'
fill='#202C3D'
/>
<path
d='M15.332 15.3322C17.1722 15.3322 18.664 13.8404 18.664 12.0002C18.664 10.16 17.1722 8.66821 15.332 8.66821C13.4918 8.66821 12 10.16 12 12.0002C12 13.8404 13.4918 15.3322 15.332 15.3322Z'
fill='#202C3D'
/>
</g>
<defs>
<clipPath id='clip0_38_168'>
<rect width='24' height='24' fill='white' />
</clipPath>
</defs>
</svg>
);
}
33 changes: 33 additions & 0 deletions apps/_components/src/logos/Github.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
type GithubProps = React.HTMLAttributes<SVGElement>;

export function Github(rest: GithubProps) {
return (
<svg
width='24'
height='24'
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
{...rest}
>
<g clip-path='url(#clip0_38_169)'>
<path
fillRule='evenodd'
clipRule='evenodd'
d='M12 2C6.475 2 2 6.475 2 12C2 16.425 4.8625 20.1625 8.8375 21.4875C9.3375 21.575 9.525 21.275 9.525 21.0125C9.525 20.775 9.5125 19.9875 9.5125 19.15C7 19.6125 6.35 18.5375 6.15 17.975C6.0375 17.6875 5.55 16.8 5.125 16.5625C4.775 16.375 4.275 15.9125 5.1125 15.9C5.9 15.8875 6.4625 16.625 6.65 16.925C7.55 18.4375 8.9875 18.0125 9.5625 17.75C9.65 17.1 9.9125 16.6625 10.2 16.4125C7.975 16.1625 5.65 15.3 5.65 11.475C5.65 10.3875 6.0375 9.4875 6.675 8.7875C6.575 8.5375 6.225 7.5125 6.775 6.1375C6.775 6.1375 7.6125 5.875 9.525 7.1625C10.325 6.9375 11.175 6.825 12.025 6.825C12.875 6.825 13.725 6.9375 14.525 7.1625C16.4375 5.8625 17.275 6.1375 17.275 6.1375C17.825 7.5125 17.475 8.5375 17.375 8.7875C18.0125 9.4875 18.4 10.375 18.4 11.475C18.4 15.3125 16.0625 16.1625 13.8375 16.4125C14.2 16.725 14.5125 17.325 14.5125 18.2625C14.5125 19.6 14.5 20.675 14.5 21.0125C14.5 21.275 14.6875 21.5875 15.1875 21.4875C19.1375 20.1625 22 16.4125 22 12C22 6.475 17.525 2 12 2Z'
fill='#202C3D'
/>
</g>
<defs>
<clipPath id='clip0_38_169'>
<rect
width='20'
height='20'
fill='white'
transform='translate(2 2)'
/>
</clipPath>
</defs>
</svg>
);
}
47 changes: 47 additions & 0 deletions apps/_components/src/logos/Slack.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
type SlackProps = React.HTMLAttributes<SVGElement>;

export function Slack(rest: SlackProps) {
return (
<svg
width='24'
height='24'
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
{...rest}
>
<path
d='M6.67289 14.424C6.67257 14.8057 6.55909 15.1787 6.3468 15.4959C6.13451 15.8131 5.83294 16.0603 5.48021 16.2061C5.12749 16.352 4.73944 16.39 4.36513 16.3153C3.99082 16.2406 3.64704 16.0567 3.37726 15.7867C3.10748 15.5166 2.92381 15.1727 2.84947 14.7983C2.77513 14.424 2.81345 14.036 2.95959 13.6834C3.10573 13.3307 3.35312 13.0294 3.67051 12.8174C3.98789 12.6054 4.36101 12.4922 4.7427 12.4922H6.67289V14.424Z'
fill='#202C3D'
/>
<path
d='M7.64575 14.4241C7.64575 13.9122 7.84911 13.4212 8.21109 13.0592C8.57307 12.6973 9.06403 12.4939 9.57595 12.4939C10.0879 12.4939 10.5788 12.6973 10.9408 13.0592C11.3028 13.4212 11.5061 13.9122 11.5061 14.4241V19.2574C11.5061 19.7693 11.3028 20.2602 10.9408 20.6222C10.5788 20.9842 10.0879 21.1876 9.57595 21.1876C9.06403 21.1876 8.57307 20.9842 8.21109 20.6222C7.84911 20.2602 7.64575 19.7693 7.64575 19.2574V14.4241Z'
fill='#202C3D'
/>
<path
d='M9.57602 6.67289C9.19433 6.67257 8.82131 6.55909 8.50411 6.3468C8.1869 6.13451 7.93976 5.83294 7.79392 5.48021C7.64808 5.12749 7.61009 4.73944 7.68475 4.36513C7.75941 3.99082 7.94337 3.64704 8.21338 3.37726C8.48339 3.10748 8.82732 2.92381 9.2017 2.84947C9.57607 2.77513 9.96409 2.81345 10.3167 2.95959C10.6693 3.10573 10.9706 3.35312 11.1827 3.67051C11.3947 3.98789 11.5079 4.36101 11.5079 4.7427V6.67289H9.57602Z'
fill='#202C3D'
/>
<path
d='M9.57598 7.64575C10.0879 7.64575 10.5788 7.84911 10.9408 8.21109C11.3028 8.57307 11.5062 9.06403 11.5062 9.57595C11.5062 10.0879 11.3028 10.5788 10.9408 10.9408C10.5788 11.3028 10.0879 11.5061 9.57598 11.5061H4.7427C4.23078 11.5061 3.73982 11.3028 3.37784 10.9408C3.01586 10.5788 2.8125 10.0879 2.8125 9.57595C2.8125 9.06403 3.01586 8.57307 3.37784 8.21109C3.73982 7.84911 4.23078 7.64575 4.7427 7.64575H9.57598Z'
fill='#202C3D'
/>
<path
d='M17.3271 9.57602C17.3275 9.19433 17.441 8.82131 17.6532 8.50411C17.8655 8.1869 18.1671 7.93976 18.5198 7.79392C18.8726 7.64808 19.2606 7.61009 19.6349 7.68475C20.0092 7.75941 20.353 7.94337 20.6228 8.21338C20.8926 8.48339 21.0762 8.82732 21.1506 9.2017C21.2249 9.57607 21.1866 9.96409 21.0405 10.3167C20.8943 10.6693 20.6469 10.9706 20.3295 11.1827C20.0121 11.3947 19.639 11.5079 19.2573 11.5079H17.3271V9.57602Z'
fill='#202C3D'
/>
<path
d='M16.3543 9.57598C16.3543 10.0879 16.1509 10.5788 15.7889 10.9408C15.427 11.3028 14.936 11.5062 14.4241 11.5062C13.9122 11.5062 13.4212 11.3028 13.0592 10.9408C12.6973 10.5788 12.4939 10.0879 12.4939 9.57598V4.7427C12.4939 4.23078 12.6973 3.73982 13.0592 3.37784C13.4212 3.01586 13.9122 2.8125 14.4241 2.8125C14.936 2.8125 15.427 3.01586 15.7889 3.37784C16.1509 3.73982 16.3543 4.23078 16.3543 4.7427V9.57598Z'
fill='#202C3D'
/>
<path
d='M14.424 17.3271C14.8057 17.3275 15.1787 17.441 15.4959 17.6532C15.8131 17.8655 16.0603 18.1671 16.2061 18.5198C16.352 18.8726 16.39 19.2606 16.3153 19.6349C16.2406 20.0092 16.0567 20.353 15.7867 20.6228C15.5166 20.8926 15.1727 21.0762 14.7983 21.1506C14.424 21.2249 14.036 21.1866 13.6834 21.0405C13.3307 20.8943 13.0294 20.6469 12.8174 20.3295C12.6054 20.0121 12.4922 19.639 12.4922 19.2573V17.3271H14.424Z'
fill='#202C3D'
/>
<path
d='M14.4241 16.3543C13.9122 16.3543 13.4212 16.1509 13.0592 15.7889C12.6973 15.427 12.4939 14.936 12.4939 14.4241C12.4939 13.9122 12.6973 13.4212 13.0592 13.0592C13.4212 12.6973 13.9122 12.4939 14.4241 12.4939H19.2574C19.7693 12.4939 20.2602 12.6973 20.6222 13.0592C20.9842 13.4212 21.1876 13.9122 21.1876 14.4241C21.1876 14.936 20.9842 15.427 20.6222 15.7889C20.2602 16.1509 19.7693 16.3543 19.2574 16.3543H14.4241Z'
fill='#202C3D'
/>
</svg>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
gap: var(--ds-spacing-5);
text-align: center;
margin: 0 auto;
margin-top: var(--ds-spacing-12);
}

.ingress {
Expand Down
46 changes: 36 additions & 10 deletions apps/storefront/components/Footer/Footer.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@
margin-bottom: var(--ds-spacing-4);
}

.footer .logos img {
height: 26px;
width: auto;
margin-right: var(--ds-spacing-2);

&.udir {
height: 32px;
}
}

.logos {
display: flex;
flex-direction: column;
Expand All @@ -46,6 +36,42 @@

.link {
--dsc-link-color--visited: var(--ds-color-neutral-text-default);

& svg {
max-width: 24px;

& * {
fill: var(--dsc-link-color);
}
}

&:focus-visible {
& svg * {
fill: var(--dsc-link-color--focus);
}
}

&:hover {
& svg * {
fill: var(--dsc-link-color--hover);
}
}

&:active {
& svg * {
fill: var(--dsc-link-color--active);
}
}
}

.footer .logos img {
height: 26px;
width: auto;
margin-right: var(--ds-spacing-2);

&.udir {
height: 32px;
}
}

.top {
Expand Down
30 changes: 4 additions & 26 deletions apps/storefront/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Button, Heading, Link, Paragraph } from '@digdir/designsystemet-react';
import { EnvelopeClosedIcon } from '@navikt/aksel-icons';
import { Container } from '@repo/components';
import cl from 'clsx/lite';
import { Container, Figma, Github, Slack } from '@repo/components';
import Image from 'next/image';
import NextLink from 'next/link';
import type { ReactNode } from 'react';
Expand Down Expand Up @@ -32,38 +31,17 @@ const rightLinks = [
{
text: 'Bli invitert til slack',
url: 'https://join.slack.com/t/designsystemet/shared_invite/zt-2438eotl3-a4266Vd2IeqMWO8TBw5PrQ',
prefix: (
<Image
height={16}
width={16}
alt=''
src='/img/logos/slack-negative.png'
/>
),
prefix: <Slack />,
},
{
text: 'Github',
url: 'https://github.com/digdir/designsystemet',
prefix: (
<Image
height={16}
width={16}
alt=''
src='/img/logos/github-negative.png'
/>
),
prefix: <Github />,
},
{
text: 'Figma',
url: 'https://www.figma.com/@designsystemet',
prefix: (
<Image
height={16}
width={16}
alt=''
src='/img/logos/figma-negative.png'
/>
),
prefix: <Figma />,
},
];

Expand Down
9 changes: 2 additions & 7 deletions apps/storefront/components/GithubLink/GithubLink.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';
import { Link } from '@digdir/designsystemet-react';
import Image from 'next/image';
import { Github } from '@repo/components';
import { usePathname } from 'next/navigation';
import type { HTMLAttributes } from 'react';

Expand All @@ -18,12 +18,7 @@ const GithubLink = ({
{...rest}
data-unstyled
>
<Image
height={20}
width={20}
alt='github logo'
src='/img/logos/github-logo.svg'
/>
<Github />
Rediger denne siden på Github (åpnes i ny fane)
</Link>
);
Expand Down
1 change: 1 addition & 0 deletions apps/storefront/layouts/PageLayout/PageLayout.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
text-align: center;
justify-content: center;
margin-bottom: var(--ds-spacing-3);
margin-top: var(--ds-spacing-8);
}

.content {
Expand Down

0 comments on commit c4aba02

Please sign in to comment.