Skip to content

Instantly share code, notes, and snippets.

@LuigiClaudio
Created June 18, 2020 21:14
Show Gist options
  • Save LuigiClaudio/81f7177dc189854774dd5074c401a694 to your computer and use it in GitHub Desktop.
Save LuigiClaudio/81f7177dc189854774dd5074c401a694 to your computer and use it in GitHub Desktop.
import {
buttonSkinData,
buttonSizeData,
buttonBtnTypeData,
buttonTypeData,
buttonTargetData,
} from '@luigiclaudio/ga-baseline-ui/button';
import { iconSetData } from '@luigiclaudio/ga-baseline-ui/icon';
export default function (config = {}, collections = []) {
return {
backend: {
name: 'git-gateway',
branch: 'master',
},
load_config_file: false,
media_folder: 'static/media',
public_folder: '/media',
collections: [
{
label: 'Site Details',
name: 'siteDetails',
editor: {
preview: false,
},
files: [
{
label: 'Details',
name: 'details',
file: 'siteLaunch/index.md',
fields: [
{
label: 'Site name',
name: 'siteName',
widget: 'string',
},
{
label: 'Site description',
name: 'siteDescription',
widget: 'text',
},
{
label: 'Site icon',
name: 'siteIcon',
widget: 'image',
},
{
label: 'Site URL',
name: 'siteUrl',
widget: 'string',
required: false,
},
{
label: 'Site mission title',
name: 'siteMissionTitle',
widget: 'string',
required: false,
},
{
label: 'Site mission',
name: 'siteMission',
widget: 'text',
required: false,
},
{
label: 'Twitter handle',
name: 'twitterHandle',
widget: 'string',
required: false,
},
{
label: 'Mailing list form URL',
name: 'mailingListFormUrl',
widget: 'string',
required: false,
},
],
},
],
},
{
label: 'Site Launch',
name: 'siteLauch',
editor: {
preview: false,
},
files: [
{
label: 'Launch',
name: 'launch',
file: 'siteLaunch/index.md',
fields: [
{
label: 'Logo Light',
name: 'logoLight',
widget: 'image',
required: false,
},
{
label: 'Logo Dark',
name: 'logoDark',
widget: 'image',
required: false,
},
{ label: 'Title', name: 'title', widget: 'string' },
{
label: 'Subtitle',
name: 'subtitle',
widget: 'string',
required: false,
},
{
label: 'Call to action',
name: 'cta',
widget: 'list',
allow_add: true,
collapsed: false,
fields: [
{
label: 'Label',
name: 'ctaLabel',
widget: 'string',
},
{
label: 'URL',
name: 'ctaUrl',
widget: 'string',
},
{
label: 'Type',
name: 'ctaType',
widget: 'select',
options: buttonTypeData,
default: ['link'],
},
{
label: 'Button type',
name: 'btnType',
widget: 'select',
options: buttonBtnTypeData,
default: ['outlined'],
},
{
label: 'Button size',
name: 'size',
widget: 'select',
options: buttonSizeData,
default: ['lg'],
},
{
label: 'Button skin',
name: 'skin',
widget: 'select',
options: buttonSkinData,
default: ['primary'],
},
{
label: 'Button icon',
name: 'icon',
widget: 'select',
options: iconSetData,
required: false,
default: '',
},
{
label: 'Button target (only for type: anchor)',
name: 'target',
widget: 'select',
options: buttonTargetData,
required: false,
default: ['_blank'],
},
],
},
{
label: 'Background',
name: 'background',
widget: 'list',
allow_add: true,
collapsed: false,
fields: [
{
label: 'Background Image',
name: 'backgroundImage',
widget: 'image',
required: false,
},
{
label: 'Background Color',
name: 'backgroundColor',
widget: 'string',
required: false,
},
{
label: 'Background Position',
name: 'backgroundPosition',
widget: 'string',
required: false,
},
],
},
],
},
],
},
{
label: 'Site Highlights',
name: 'siteHighlights',
editor: {
preview: false,
},
files: [
{
label: 'Highlights',
name: 'highlights',
file: 'siteLaunch/index.md',
fields: [
{
label: 'Highlight',
name: 'highlight',
widget: 'list',
allow_add: true,
collapsed: false,
fields: [
{
label: 'Title',
name: 'title',
widget: 'string',
required: false,
},
{
label: 'Body',
name: 'body',
widget: 'markdown',
required: false,
},
],
},
],
},
],
},
{
label: 'Site Policy',
name: 'sitePolicy',
editor: {
preview: false,
},
files: [
{
label: 'Site Policy',
name: 'sitePolicy',
file: 'siteLaunch/index.md',
fields: [
{
label: 'Policy Items',
name: 'policyItems',
widget: 'list',
required: false,
allow_add: true,
collapsed: false,
fields: [
{
label: 'Policy Title',
name: 'policyTitle',
widget: 'string',
},
{
label: 'Policy',
name: 'policy',
widget: 'list',
allow_add: true,
collapsed: false,
fields: [
{
label: 'Title',
name: 'policyItemTitle',
widget: 'string',
required: false,
},
{
label: 'Body',
name: 'policyItemBody',
widget: 'markdown',
required: false,
},
],
},
],
},
],
},
],
},
...collections,
],
...config,
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment