From 0dbdaec12402f789056b5e32addfde811dcb2ba6 Mon Sep 17 00:00:00 2001 From: Brandon Fulljames Date: Mon, 29 Jan 2024 17:39:49 +0900 Subject: [PATCH] Add alignment test --- Makefile | 4 +++ examples/alignment.yaml | 73 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 examples/alignment.yaml diff --git a/Makefile b/Makefile index 8ae91ab..1d3c0c2 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,10 @@ demo-clocks: git-hooks demo-command: git-hooks @go run ./cmd/yakdash/main.go -c examples/command.yaml +.PHONY: demo-alignment +demo-alignment: git-hooks + @go run ./cmd/yakdash/main.go -c examples/alignment.yaml + ################################################################################ # Build bin/yakdash: git-hooks $(GO_FILES) diff --git a/examples/alignment.yaml b/examples/alignment.yaml new file mode 100644 index 0000000..ec297a0 --- /dev/null +++ b/examples/alignment.yaml @@ -0,0 +1,73 @@ +layout: + screens: + - stack: vertical + children: + - stack: horizontal + children: + - name: "TL" + module: text + style: + align-vertical: top + align-horizontal: left + config: + text: "Top left" + - name: "TC" + module: text + config: + text: "Top center" + style: + align-vertical: top + align-horizontal: center + - name: "TR" + module: text + config: + text: "Top right" + style: + align-vertical: top + align-horizontal: right + - stack: horizontal + children: + - name: "CL" + module: text + style: + align-vertical: center + align-horizontal: left + config: + text: "Center left" + - name: "CC" + module: text + config: + text: "Center center" + style: + align-vertical: center + align-horizontal: center + - name: "CR" + module: text + config: + text: "Center right" + style: + align-vertical: center + align-horizontal: right + - stack: horizontal + children: + - name: "BL" + module: text + style: + align-vertical: bottom + align-horizontal: left + config: + text: "Bottom left" + - name: "BC" + module: text + config: + text: "Bottom center" + style: + align-vertical: bottom + align-horizontal: center + - name: "BR" + module: text + config: + text: "Bottom right" + style: + align-vertical: bottom + align-horizontal: right