-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into fix/register-new-mach…
…ine-small-fixes
- Loading branch information
Showing
140 changed files
with
573 additions
and
341 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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
6 changes: 6 additions & 0 deletions
6
...web/components/Organization/Wrapper/Themes/FiskistofaTheme/FiskistofaDefaultHeader.css.ts
This file contains 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,6 @@ | ||
import { style } from '@vanilla-extract/css' | ||
|
||
export const gridContainerWidth = style({ | ||
maxWidth: '1342px', | ||
margin: '0 auto', | ||
}) |
65 changes: 65 additions & 0 deletions
65
apps/web/components/Organization/Wrapper/Themes/FiskistofaTheme/FiskistofaDefaultHeader.tsx
This file contains 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,65 @@ | ||
import React from 'react' | ||
|
||
import { ResponsiveSpace } from '@island.is/island-ui/core' | ||
import { theme } from '@island.is/island-ui/theme' | ||
import { DefaultHeader } from '@island.is/web/components' | ||
import { OrganizationPage } from '@island.is/web/graphql/schema' | ||
import { useLinkResolver } from '@island.is/web/hooks/useLinkResolver' | ||
import { useWindowSize } from '@island.is/web/hooks/useViewport' | ||
|
||
import * as styles from './FiskistofaDefaultHeader.css' | ||
|
||
interface HeaderProps { | ||
organizationPage: OrganizationPage | ||
logoAltText: string | ||
isSubpage: boolean | ||
} | ||
|
||
const FiskistofaDefaultHeader: React.FC< | ||
React.PropsWithChildren<HeaderProps> | ||
> = ({ organizationPage, logoAltText, isSubpage }) => { | ||
const { linkResolver } = useLinkResolver() | ||
|
||
const { width } = useWindowSize() | ||
|
||
const themeProp = organizationPage.themeProperties | ||
|
||
return ( | ||
<div | ||
style={{ | ||
background: | ||
(width > theme.breakpoints.lg && !isSubpage | ||
? themeProp.backgroundColor | ||
: 'no-repeat 52% 30% ,linear-gradient(180deg, #E6F2FB 21.56%, #90D9E3 239.74%)') ?? | ||
'', | ||
}} | ||
className={styles.gridContainerWidth} | ||
> | ||
<DefaultHeader | ||
title={organizationPage.title} | ||
titleColor="dark400" | ||
imagePadding={themeProp.imagePadding ?? '0'} | ||
fullWidth={themeProp.fullWidth ?? false} | ||
imageIsFullHeight={themeProp.imageIsFullHeight ?? false} | ||
imageObjectFit={ | ||
themeProp?.imageObjectFit === 'cover' ? 'cover' : 'contain' | ||
} | ||
logo={organizationPage.organization?.logo?.url} | ||
logoHref={ | ||
linkResolver('organizationpage', [organizationPage.slug]).href | ||
} | ||
logoAltText={logoAltText} | ||
titleSectionPaddingLeft={ | ||
organizationPage.themeProperties | ||
.titleSectionPaddingLeft as ResponsiveSpace | ||
} | ||
isSubpage={isSubpage} | ||
mobileBackground={ | ||
organizationPage.themeProperties.mobileBackgroundColor | ||
} | ||
/> | ||
</div> | ||
) | ||
} | ||
|
||
export default FiskistofaDefaultHeader |
2 changes: 2 additions & 0 deletions
2
apps/web/components/Organization/Wrapper/Themes/FiskistofaTheme/index.ts
This file contains 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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import dynamic from 'next/dynamic' | ||
|
||
import DefaultHeader from './FiskistofaDefaultHeader' | ||
import Header from './FiskistofaHeader' | ||
|
||
export const FiskistofaFooter = dynamic(() => import('./FiskistofaFooter'), { | ||
ssr: false, | ||
}) | ||
|
||
export const FiskistofaHeader = Header | ||
export const FiskistofaDefaultHeader = DefaultHeader |
Oops, something went wrong.