mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-02-23 14:39:32 +08:00
109 lines
3.9 KiB
YAML
109 lines
3.9 KiB
YAML
# Copyright 2020-2021 Lowdefy, Inc
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
_ref:
|
|
path: templates/general.yaml.njk
|
|
vars:
|
|
pageId: tutorial-add-blocks-config
|
|
pageTitle: Making a booking form config
|
|
section: Tutorial
|
|
# prefetchPages:
|
|
# - tutorial-editing-page
|
|
content:
|
|
- id: md1
|
|
type: MarkdownWithCode
|
|
properties:
|
|
content: |
|
|
##### `lowdefy.yaml`
|
|
```yaml
|
|
name: lowdefy-project-template
|
|
lowdefy: CURRENT_LOWDEFY_VERSION # e.g. 3.4.0
|
|
|
|
menus:
|
|
- id: default
|
|
links:
|
|
- id: welcome
|
|
type: MenuLink
|
|
properties:
|
|
icon: HomeOutlined
|
|
title: Home
|
|
pageId: welcome
|
|
- id: new-ticket
|
|
type: MenuLink
|
|
properties:
|
|
icon: AlertOutlined
|
|
title: New ticket
|
|
pageId: new-ticket
|
|
|
|
pages:
|
|
- _ref: pages/welcome.yaml
|
|
- _ref: pages/new-ticket.yaml
|
|
```
|
|
|
|
##### `pages/new-ticket.yaml`
|
|
```yaml
|
|
id: new-ticket
|
|
type: PageHeaderMenu
|
|
properties:
|
|
title: Log a ticket # The title in the browser tab.
|
|
layout:
|
|
contentJustify: center # Center the contents of the page
|
|
blocks:
|
|
- id: content_card
|
|
type: Card
|
|
layout:
|
|
size: 800 # Set the size of the card so it does not fill the full screen
|
|
contentGutter: 16 # Make a 16px gap between all blocks in this card
|
|
blocks:
|
|
- id: page_heading
|
|
type: Title
|
|
properties:
|
|
content: Log a ticket # Change the title on the page.
|
|
level: 3 # Make the title a little smaller (an html `<h3>`).
|
|
- id: ticket_title
|
|
type: TextInput
|
|
properties:
|
|
title: Title
|
|
- id: ticket_type
|
|
type: ButtonSelector
|
|
properties:
|
|
title: Ticket type
|
|
options: # Set the allowed options
|
|
- Feature request
|
|
- Bug report
|
|
- Question
|
|
- id: ticket_description
|
|
type: TextArea
|
|
properties:
|
|
title: Description
|
|
- id: reset_button
|
|
type: Button
|
|
layout:
|
|
span: 12 # Set the size of the button (span 12 of 24 columns)
|
|
properties:
|
|
title: Reset
|
|
block: true # Make the button fill all the space available to it
|
|
type: default # Make the button a plain button
|
|
icon: ClearOutlined
|
|
- id: submit_button
|
|
type: Button
|
|
layout:
|
|
span: 12
|
|
properties:
|
|
title: Submit
|
|
block: true
|
|
type: primary # Make the button a primary button with color
|
|
icon: SaveOutlined
|
|
```
|