Skip to content

Commit bd5c7c5

Browse files
🎨 add tabs to magazine (#3472)
1 parent 27d13b6 commit bd5c7c5

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

sanityv3/schemas/documents/magazine.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1+
import { bookmarks } from '@equinor/eds-icons'
12
import type { Rule, SanityDocument } from 'sanity'
23
import slugify from 'slugify'
34
import { magazineSlug } from '../../../satellitesConfig'
45
import blocksToText from '../../helpers/blocksToText'
5-
import { defaultBackgroundColors } from '../defaultColors'
6+
import { EdsIcon } from '../../icons'
67
import { defaultLanguage } from '../../languages'
78
import { Flags } from '../../src/lib/datasetHelpers'
89
import SlugInput from '../components/SlugInput'
10+
import { defaultBackgroundColors } from '../defaultColors'
911
import { configureBlockContent } from '../editors/blockContentType'
1012
import { validateCharCounterEditor } from '../validations/validateCharCounterEditor'
1113
import { withSlugValidation } from '../validations/validateSlug'
1214
import sharedHeaderFields from './header/sharedHeaderFields'
13-
import { EdsIcon } from '../../icons'
14-
import { bookmarks } from '@equinor/eds-icons'
1515
import { lang } from './langField'
1616

1717
const ingressBlockContentType = configureBlockContent({
@@ -154,14 +154,18 @@ export default {
154154
{ type: 'fullWidthVideo' },
155155
{ type: 'figure' },
156156
{ type: 'textWithIconArray' },
157-
{ type: 'pullQuote', initialValue: { background: defaultBackgroundColors[0] } },
157+
{
158+
type: 'pullQuote',
159+
initialValue: { background: defaultBackgroundColors[0] },
160+
},
158161
{ type: 'accordion' },
159162
{ type: 'promoTileArray' },
160163
{ type: 'promotion' },
161164
{ type: 'iframe' },
162165
{ type: 'imageCarousel' },
163166
{ type: 'iframeCarousel' },
164167
{ type: 'videoPlayer' },
168+
{ type: 'tabs' },
165169
],
166170
},
167171
{

web/templates/magazine/MagazinePage.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
import MagazineTagBar from '@sections/MagazineTags/MagazineTagBar'
12
import { useRouter } from 'next/router'
3+
import useSharedTitleStyles from '../../lib/hooks/useSharedTitleStyles'
4+
import { SharedBanner } from '../../pageComponents/pageTemplates/shared/SharedBanner'
25
import { PageContent } from '../../pageComponents/pageTemplates/shared/SharedPageContent'
36
import SharedTitle from '../../pageComponents/pageTemplates/shared/SharedTitle'
4-
import { HeroTypes, MagazinePageSchema } from '../../types/index'
5-
import { SharedBanner } from '../../pageComponents/pageTemplates/shared/SharedBanner'
6-
import Teaser from '../../sections/teasers/Teaser/Teaser'
77
import Seo from '../../pageComponents/shared/Seo'
8-
import useSharedTitleStyles from '../../lib/hooks/useSharedTitleStyles'
9-
import MagazineTagBar from '@sections/MagazineTags/MagazineTagBar'
8+
import Teaser from '../../sections/teasers/Teaser/Teaser'
9+
import { HeroTypes, type MagazinePageSchema } from '../../types/index'
1010
import MagazineDate from './MagazineDate'
1111

1212
type MagazinePageProps = {
@@ -66,14 +66,14 @@ const MagazinePage = ({ data }: MagazinePageProps) => {
6666
</>
6767
)}
6868
{data.hero.type !== HeroTypes.DEFAULT && (
69-
<div className="max-w-viewport px-layout-lg mx-auto pb-6">
69+
<div className="mx-auto max-w-viewport px-layout-lg pb-6">
7070
{tags && tags?.length > 0 && (
7171
<ul className="flex flex-wrap gap-y-4 divide-x-2 divide-energy-red-100">
7272
{tags.map((tag: string) => {
7373
return (
7474
<li
7575
key={`magazine_tag_key_${tag}`}
76-
className="inline-block text-sm font-medium pl-3 pr-3 first:pl-0 lg:text-xs whitespace-nowrap"
76+
className="inline-block whitespace-nowrap pr-3 pl-3 font-medium text-sm first:pl-0 lg:text-xs"
7777
>
7878
{tag}
7979
</li>

0 commit comments

Comments
 (0)