Skip to content

Commit

Permalink
Added Layout Pyramid snippet (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
Laskewitz authored Oct 11, 2024
2 parents 56c5d2b + ab6b82b commit 757a37e
Show file tree
Hide file tree
Showing 9 changed files with 154 additions and 6 deletions.
3 changes: 0 additions & 3 deletions power-apps/layout-funnel/assets/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions power-apps/layout-funnel/source/README.md

This file was deleted.

26 changes: 26 additions & 0 deletions power-apps/layout-pyramid/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Layout Pyramid

This is a simple snippet that can help you get started with creating a screen in canvas app. It is a set of containers with various number of columns. The first container has 1 column, the second container has 2 columns, the third container has 3 columns, and the fourth container has 4 columns.

## Authors

Snippet|Author(s)
--------|---------
Daniel Laskewitz | [GitHub](https://github.com/laskewitz) ([@Laskewitz](https://www.twitter.com/laskewitz) )

## Minimal path to awesome

1. Open your canvas app in **Power Apps**
1. Copy the contents of the **[YAML-file](./source/pyramid.pa.yaml)**
1. Right click on the screen where you want to add the snippet and select "Paste YAML"
![View of the paste code button](./assets/pastecode.png)

This will add the containers to your screen and you can delete the containers you don't want to use.

![View of the pasted containers](./assets/pyramid.png)

## Disclaimer

**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**

<img src="https://m365-visitor-stats.azurewebsites.net/powerplatform-snippets/power-apps/layout-pyramid" aria-hidden="true" />
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added power-apps/layout-pyramid/assets/pastecode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added power-apps/layout-pyramid/assets/pyramid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions power-apps/layout-pyramid/assets/sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/pnp/samples/v1.0/metadata-schema.json",
"name": "pnp-powerplatform-snippets-layout-pyramid",
"version": "1.0.0.0",
"source": "pnp",
"creationDateTime": "2024-10-11T00:00:00.000Z",
"updateDateTime": "2024-10-11T00:00:00.000Z",
"title": "Layout Pyramid",
"shortDescription": "This is a simple snippet that can help you get started with creating a screen in canvas app. It is a set of containers with various number of columns.",
"longDescription": [
"This is a simple snippet that can help you get started with creating a screen in canvas app. It is a set of containers with various number of columns. The first container has 4 columns, the second container has 3 columns, the third container has 2 columns, and the fourth container has 1 column."
],
"url": "https://github.com/pnp/powerplatform-snippets/tree/main/power-apps/layout-pyramid/",
"products": [
"Power Platform",
"Power Apps",
"powerplatform-snippets",
"power-apps-snippets"
],
"tags": [],
"categories": [],
"metadata": [
{
"key": "Product",
"value": "Power Apps"
},
{
"key": "Type",
"value": "Snippet"
}
],
"thumbnails": [
{
"type": "image",
"order": 100,
"url": "https://raw.githubusercontent.com/pnp/powerplatform-snippets/main/power-apps/layout-pyramid/assets/pyramid.png",
"alt": "Preview PNG"
}
],
"authors": [
{
"gitHubAccount": "laskewitz",
"name": "Daniel Laskewitz",
"pictureUrl": "https://github.com/laskewitz.png"
}
]
}
]
79 changes: 79 additions & 0 deletions power-apps/layout-pyramid/source/pyramid.pa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
- MainContainerPyramidScreen:
Control: GroupContainer
Variant: verticalAutoLayoutContainer
Properties:
Height: =Parent.Height
LayoutAlignItems: =LayoutAlignItems.Stretch
LayoutDirection: =LayoutDirection.Vertical
LayoutJustifyContent: =LayoutJustifyContent.Center
LayoutMode: =LayoutMode.Auto
Width: =Parent.Width
Children:
- Container1PyramidScreen:
Control: GroupContainer
Variant: horizontalAutoLayoutContainer
Properties:
LayoutMode: =LayoutMode.Auto
- Container2PyramidScreen:
Control: GroupContainer
Variant: horizontalAutoLayoutContainer
Properties:
LayoutMode: =LayoutMode.Auto
Children:
- Container21PyramidScreen:
Control: GroupContainer
Variant: horizontalAutoLayoutContainer
Properties:
LayoutMode: =LayoutMode.Auto
- Container22PyramidScreen:
Control: GroupContainer
Variant: horizontalAutoLayoutContainer
Properties:
LayoutMode: =LayoutMode.Auto
- Container3PyramidScreen:
Control: GroupContainer
Variant: horizontalAutoLayoutContainer
Properties:
LayoutMode: =LayoutMode.Auto
Children:
- Container31PyramidScreen:
Control: GroupContainer
Variant: horizontalAutoLayoutContainer
Properties:
LayoutMode: =LayoutMode.Auto
- Container32PyramidScreen:
Control: GroupContainer
Variant: horizontalAutoLayoutContainer
Properties:
LayoutMode: =LayoutMode.Auto
- Container33PyramidScreen:
Control: GroupContainer
Variant: horizontalAutoLayoutContainer
Properties:
LayoutMode: =LayoutMode.Auto
- Container4PyramidScreen:
Control: GroupContainer
Variant: horizontalAutoLayoutContainer
Properties:
LayoutMode: =LayoutMode.Auto
Children:
- Container41PyramidScreen:
Control: GroupContainer
Variant: horizontalAutoLayoutContainer
Properties:
LayoutMode: =LayoutMode.Auto
- Container42PyramidScreen:
Control: GroupContainer
Variant: horizontalAutoLayoutContainer
Properties:
LayoutMode: =LayoutMode.Auto
- Container43PyramidScreen:
Control: GroupContainer
Variant: horizontalAutoLayoutContainer
Properties:
LayoutMode: =LayoutMode.Auto
- Container44PyramidScreen:
Control: GroupContainer
Variant: horizontalAutoLayoutContainer
Properties:
LayoutMode: =LayoutMode.Auto

0 comments on commit 757a37e

Please sign in to comment.