Skip to content

Commit 5cb1d17

Browse files
🎨 small tweaks to documentation (#3857)
1 parent f465b6f commit 5cb1d17

6 files changed

Lines changed: 35 additions & 14 deletions

File tree

studio/schemas/editors/blockContentType.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ export const BlockTypography = {
186186
h2_xl: 'text-5xl tracking-display font-normal m-0',
187187
},
188188
normal: {
189-
h2: 'text-2xl pb-8 m-0',
190-
h3: 'text-xl m-0',
191-
h4: 'text-lg font-md m-0',
189+
h2: 'text-xl leading-lofty mb-8',
190+
h3: 'text-lg leading-lofty mt-10 mb-4',
191+
h4: 'text-md mt-4 mb-2',
192192
sm: 'text-sm',
193193
},
194194
}

studio/styles/fonts.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
--spacing-2: 0.5rem;
3333
--spacing-4: 0.5rem;
3434
--spacing-8: 2rem;
35+
--spacing-10: 2.5rem;
3536

3637
--leading-md: 1.4; /*68.3071px h1 larger screen */
3738
--leading-lg: 1.5;
@@ -142,3 +143,20 @@
142143
.pt-editable .font-semibold *:where([data-slate-leaf='true']) {
143144
font-weight: var(--font-weight-semibold);
144145
}
146+
/* margin doesnt seem to work, so using padding */
147+
.pt-editable .mb-8 {
148+
padding-bottom: var(--spacing-8);
149+
}
150+
.pt-editable .mt-10 {
151+
padding-top: var(--spacing-10);
152+
}
153+
.pt-editable .mb-4 {
154+
padding-bottom: var(--spacing-4);
155+
}
156+
157+
.pt-editable .mt-4 {
158+
padding-top: var(--spacing-4);
159+
}
160+
.pt-editable .mb-2 {
161+
padding-bottom: var(--spacing-2);
162+
}

web/app/[locale]/(pages)/[...slug]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { magazineSlug, newsSlug } from '@energyvision/shared/satelliteConfig'
22
import { stegaClean } from '@sanity/client/stega'
33
import type { Metadata } from 'next'
44
import dynamic from 'next/dynamic'
5-
import { cookies, draftMode } from 'next/headers'
5+
import { draftMode } from 'next/headers'
66
import { notFound } from 'next/navigation'
77
import { setRequestLocale } from 'next-intl/server'
88
import { getValidLanguagesLocales } from '@/languageConfig'

web/core/Typography/variants.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ const variants = {
2222
unstyled: '',
2323
h1: 'text-3xl leading-earthy lg:leading-misty pt-4 mb-6 lg:mb-12 text-balance',
2424
h2: `text-xl leading-earthy lg:leading-misty mb-4 lg:mb-8 text-balance`,
25-
h3: `text-lg leading-lofty mt-4 mb-8 text-balance`,
26-
h4: 'text-md mt-2 mb-4 text-balance',
25+
h3: `text-lg leading-lofty mt-10 mb-4 text-balance`,
26+
h4: 'text-md mt-4 mb-2 text-balance',
2727
h5: 'text-md text-balance',
2828
h6: 'text-base text-balance',
2929
h7: 'text-xs leading-earthy text-balance',
@@ -59,7 +59,7 @@ const variants = {
5959
overline: 'text-md mb-2 text-pretty',
6060
ingress: 'text-md mt-5 mb-5 first:mt-0 last:mb-6 text-pretty', //last:mb-10
6161
eyebrow: 'text-xs font-medium uppercase text-pretty',
62-
body: 'my-5 first:mt-0 last:mb-0 [:where(h2+*,h3+*)]:mt-0 text-base text-pretty',
62+
body: 'my-6 first:mt-0 last:mb-0 [:where(h2+*,h3+*)]:mt-0 text-base text-pretty',
6363
small:
6464
'text-sm my-5 first:mt-0 last:mb-0 [:where(h2+*,h3+*)]:mt-0 text-pretty',
6565
simple: 'text-base text-pretty',
@@ -83,7 +83,7 @@ const variants = {
8383
lg:ms-layout-lg`,
8484
body: `
8585
text-pretty
86-
my-5
86+
my-6
8787
:not-only-child:first:mt-0
8888
:not-only-child:last:mb-0
8989
me-layout-sm

web/sanity/lib/client.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
/*import { ClientConfig, createClient } from '@sanity/client'*/
21
import { type ClientConfig, createClient } from 'next-sanity'
32
import { apiVersion, dataset, projectId, studioUrl } from '../lib/api'
43

5-
//import { token } from './token'
6-
7-
//useCdn: true, // Set to false if statically generating pages, using ISR or tag-based revalidation
8-
94
const sanityConfig: ClientConfig = {
105
projectId,
116
dataset,
127
apiVersion,
13-
//handled by definelive?
148
//perspective: dataset === 'global-development' ? 'drafts' : 'published',
159
useCdn: true,
1610
ignoreBrowserTokenWarning: dataset === 'global-development',

web/templates/shared/SharedPageContent.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,15 @@ const applyPaddingTopIfApplicable = (
232232
if (currentComponent?.type === 'anchorLink') {
233233
return ''
234234
}
235+
236+
//If no hero and the first section after is textblock add pt-20
237+
if (
238+
index === 0 &&
239+
heroProps?.heroType === 'noHero' &&
240+
currentComponent?.type === 'textBlock'
241+
) {
242+
return 'pt-20'
243+
}
235244
//the first section after hero does not need pt-20, as heroBlock types adds this
236245
//unless its background image hero
237246
if (index === 0 && heroProps?.heroType !== 'backgroundImage') {

0 commit comments

Comments
 (0)