budibase/packages/server/src/constants/layouts.js

154 lines
3.6 KiB
JavaScript
Raw Normal View History

const BASE_LAYOUT_PROP_IDS = {
2020-12-03 18:31:38 +01:00
PRIVATE: "layout_private_master",
PUBLIC: "layout_public_master",
}
const EMPTY_LAYOUT = {
componentLibraries: ["@budibase/standard-components"],
title: "{{ name }}",
favicon: "./_shared/favicon.png",
stylesheets: [],
props: {
_id: "30b8822a-d07b-49f4-9531-551e37c6899b",
2021-06-11 14:47:57 +02:00
_component: "@budibase/standard-components/layout",
_children: [
{
_id: "7fcf11e4-6f5b-4085-8e0d-9f3d44c98967",
_component: "@budibase/standard-components/screenslot",
_instanceName: "Screen slot",
_styles: {
2020-12-23 10:23:03 +01:00
normal: {
flex: "1 1 auto",
display: "flex",
"flex-direction": "column",
"justify-content": "flex-start",
"align-items": "stretch",
},
hover: {},
active: {},
selected: {},
},
_children: [],
},
],
_styles: {
active: {},
hover: {},
2021-06-17 14:17:24 +02:00
normal: {},
selected: {},
},
navigation: "Top",
2021-06-17 14:17:24 +02:00
width: "Large",
links: [
{
text: "Home",
url: "/",
},
],
},
}
const BASE_LAYOUTS = [
{
2020-12-03 18:31:38 +01:00
_id: BASE_LAYOUT_PROP_IDS.PRIVATE,
componentLibraries: ["@budibase/standard-components"],
title: "{{ name }}",
favicon: "./_shared/favicon.png",
stylesheets: [],
name: "Navigation Layout",
props: {
2020-12-07 21:29:41 +01:00
_id: "4f569166-a4f3-47ea-a09e-6d218c75586f",
2021-06-23 13:26:46 +02:00
_instanceName: "Navigation Layout",
_component: "@budibase/standard-components/layout",
_children: [
{
_id: "7fcf11e4-6f5b-4085-8e0d-9f3d44c98967",
_component: "@budibase/standard-components/screenslot",
_instanceName: "Screen slot",
_styles: {
normal: {
flex: "1 1 auto",
display: "flex",
"flex-direction": "column",
"justify-content": "flex-start",
"align-items": "stretch",
},
hover: {},
active: {},
selected: {},
2020-11-03 17:27:28 +01:00
},
_children: [],
2020-11-03 17:27:28 +01:00
},
],
_styles: {
active: {},
hover: {},
2021-06-17 14:17:24 +02:00
normal: {},
selected: {},
2020-11-03 17:27:28 +01:00
},
2021-06-30 20:40:59 +02:00
title: "{{ name }}",
navigation: "Top",
2021-06-17 14:17:24 +02:00
width: "Large",
links: [
{
text: "Home",
url: "/",
},
],
2020-11-03 17:27:28 +01:00
},
},
2020-12-03 18:31:38 +01:00
{
_id: BASE_LAYOUT_PROP_IDS.PUBLIC,
componentLibraries: ["@budibase/standard-components"],
title: "{{ name }}",
favicon: "./_shared/favicon.png",
stylesheets: [],
name: "Empty Layout",
2020-12-03 18:31:38 +01:00
props: {
2020-12-07 21:29:41 +01:00
_id: "3723ffa1-f9e0-4c05-8013-98195c788ed6",
2021-06-23 13:26:46 +02:00
_instanceName: "Empty Layout",
_component: "@budibase/standard-components/layout",
2020-12-03 18:31:38 +01:00
_children: [
{
_id: "7fcf11e4-6f5b-4085-8e0d-9f3d44c98967",
_component: "@budibase/standard-components/screenslot",
_instanceName: "Screen slot",
2020-12-03 18:31:38 +01:00
_styles: {
normal: {
flex: "1 1 auto",
display: "flex",
"flex-direction": "column",
"justify-content": "flex-start",
"align-items": "stretch",
},
hover: {},
active: {},
selected: {},
},
_children: [],
},
],
_styles: {
active: {},
hover: {},
2021-06-17 14:17:24 +02:00
normal: {},
2020-12-03 18:31:38 +01:00
selected: {},
},
navigation: "None",
2021-06-17 14:17:24 +02:00
width: "Large",
links: [
{
text: "Home",
url: "/",
},
],
2020-12-03 18:31:38 +01:00
},
},
]
2020-11-03 17:27:28 +01:00
module.exports = {
BASE_LAYOUTS,
BASE_LAYOUT_PROP_IDS,
2020-12-07 16:49:13 +01:00
EMPTY_LAYOUT,
}