-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
henter inn mikrotekster fra sanity #136
- Loading branch information
Showing
9 changed files
with
96 additions
and
31 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
38 changes: 38 additions & 0 deletions
38
sanity/schemas/infosider/historikk/historikkHjelpetekster.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,38 @@ | ||
import { FaChurch } from "react-icons/fa"; | ||
|
||
export const HistorikkIkon = FaChurch; | ||
|
||
export default { | ||
type: "document", | ||
name: "historikkHjelpetekster", | ||
title: "Historikk", | ||
__experimental_actions: ["update", "publish"], // Har du laget et nytt datasett må du midlertidig fjerne denne for å kunne lage et nytt oppsett-dokument | ||
icon: HistorikkIkon, | ||
fields: [ | ||
{ | ||
type: 'localeString', | ||
name: 'title', | ||
title: 'Tittel' | ||
}, | ||
{ | ||
type: 'localeText', | ||
name: 'kortInfo' | ||
}, | ||
{ | ||
type: 'localeHistorikkRichText', | ||
name: 'langInfo' | ||
}, | ||
{ | ||
type: 'localeHistorikkRichText', | ||
name: 'deltTekstForklaring' | ||
}, | ||
], | ||
preview: { | ||
prepare(selection) { | ||
return { | ||
title: selection.title, | ||
media: HistorikkIkon, | ||
}; | ||
}, | ||
}, | ||
}; |
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,18 @@ | ||
import { block, decorators, styles } from "../richText/richText"; | ||
import link from "../richText/annotations/link"; | ||
|
||
export default { | ||
title: "HistorikkRichText", | ||
name: "historikkRichText", | ||
type: "array", | ||
of: [ | ||
{ | ||
...block, | ||
styles: [styles.normal, styles.h2, styles.h3], | ||
marks: { | ||
decorators: [decorators.strong, decorators.em, decorators.utkast, decorators.foreslattStykes], | ||
annotations: [link], | ||
}, | ||
}, | ||
], | ||
}; |
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