Pages
Create a src/vision/layouts/pages.json
file (case-sensitive)
The src/vision/layouts/pages.json
file is responsible for:
- Defining what OML Vision can render
- Home Page
- Titles
- Icons
- Sidebar
- Titles
- Icons
- Child Pages
- Titles
- Table, Tree, or Diagram
- Icons
- Home Page
- Defining the path to the content that OML Vision renders
It is formatted as a JSON data structure.
An example of what this looks like is seen below with the source code found here
[
{ "title": "Home", "path": "/", "treeIcon": "home" },
{
"title": "Kepler16b",
"treeIcon": "server",
"iconUrl": "https://nasa-jpl.github.io/stellar/icons/satellite.svg",
"children": [
{
"title": "Objectives",
"treeIcon": "window",
"path": "objectives"
},
{
"title": "Missions",
"treeIcon": "graph-scatter",
"path": "missions",
"isDiagram": true
},
{
"title": "Components",
"treeIcon": "list-tree",
"path": "components",
"isTree": true
},
{
"title": "Connections",
"treeIcon": "window",
"path": "connections"
},
{
"title": "Requirements",
"treeIcon": "list-tree",
"path": "requirements",
"isTree": true
}
]
}
]
Home Page
The home page acts as an entry point for users to navigate through the pages that OML Vision renders.
title
title: string
This string defines the title of the home page. A good name for the home page is "Home" or "Frontpage"
The name of the title
is rendered in the sidebar for the OML Vision extension shown in the red boxes.
path
path: string
This string defines the path of the page.
For the Home Page
the path must be /
The name of the path
is rendered in the sidebar when you hover and hold for 2 seconds over the Home Page
in the OML Vision extension shown in the red boxes.
treeIcon
treeIcon: string
This string defines the icon to be rendered in the sidebar next to the Title
of the page.
A full list of available icons can be seen here. Use the default codicon ID
as the value of the treeIcon
The Home Page
icon of the treeIcon
is rendered in the sidebar for the OML Vision extension shown in the red boxes.
Child Pages
Child pages are pages that are grouped with other similar pages. The paths to these pages are rendered in the sidebar and in the Home Page
shown in the red boxes.
OML Vision supports more than 1 child page.
title
title: string
This string defines the title of the child page.
The name of the title
is rendered in the sidebar and in the Home Page
.
treeIcon
treeIcon: string
This string defines the icon to be rendered in the sidebar next to the Title
of the page.
A full list of available icons can be seen here. Use the default codicon ID
as the value of the treeIcon
The Child Page
icon of the treeIcon
is rendered in the sidebar for the OML Vision extension.
iconUrl
iconUrl: string
This string defines the path of the icon that is rendered in the home page.
Supported image file formats are .svg, .png, or .jpg
The Child Page
icon of the iconUrl
is rendered in the Home Page
in the OML Vision extension shown in the red boxes.
children
children: {
title: string;
path: string;
treeIcon: string;
isTree: boolean;
isDiagram: boolean;
}[];
This children
array of objects defines the title
, path
, and treeIcon
of the Child Page
.
You can more than one Child Page
in the children
array.
By default all child pages are rendered as tables unless specified with the isTree or isDiagram booleans.
The Child Pages
are rendered in the sidebar and in the Home Page
of the OML Vision extension shown in the red boxes.
title
title: string
This string defines the title of the child page.
The name of the title
of the Child Page
is rendered in the sidebar and in the Home Page
of the OML Vision extension.
path
path: string
This string defines the path of the Child Page
.
Remember this string as it will be needed for the layouts of the tables, trees, and diagrams
The name of the path
is rendered in the sidebar when you hover and hold for 2 seconds over the Child Page
in the OML Vision extension.
treeIcon
treeIcon: string
This string defines the icon to be rendered in the sidebar next to the Title
of the page.
A full list of available icons can be seen here. Use the default codicon ID
as the value of the treeIcon
The Child Page
icon of the treeIcon
is rendered in the sidebar for the OML Vision extension.
isTree
isTree: boolean
This bool specifies whether or not the Child Page
will be a tree. Set isTree
to true
to turn the Child Page
into a tree.
isDiagram
isDiagram: boolean
This bool specifies whether or not the Child Page
will be a diagram. Set isDiagram
to true
to turn the Child Page
into a diagram.