|
10 | 10 | div ContainerPanel
|
11 | 11 | div DefaultsTitle
|
12 | 12 | div DefaultsPanel
|
| 13 | + div Row |
| 14 | + div Label |
| 15 | + input GlobalInput |
| 16 | + input ContainerInput |
| 17 | + input DefaultsInput |
| 18 | + variable Globals |
| 19 | + variable Container |
| 20 | + variable Defaults |
| 21 | + variable GlobalItems |
| 22 | + variable ContainerItems |
| 23 | + variable DefaultsItems |
| 24 | + variable Name |
| 25 | + variable Value |
| 26 | + variable N |
| 27 | + |
| 28 | + on message go to Start |
| 29 | + set ready |
| 30 | + stop |
| 31 | + |
| 32 | +Start: |
| 33 | + if the message is `save` |
| 34 | + begin |
| 35 | + stop |
| 36 | + end |
| 37 | + |
| 38 | + clear Panel |
| 39 | + |
| 40 | + set style `display` of Panel to `flex` |
| 41 | + set style `flex-direction` of Panel to `column` |
13 | 42 |
|
14 | 43 | create GlobalTitle in Panel
|
15 |
| - set the style of GlobalTitle to |
16 |
| - `font-weight:bold;font-size:110%;background:lightgray;padding:0.2em;text-align:center` |
| 44 | + set the style of GlobalTitle to `font-weight:bold;font-size:110%;background:lightgray;` |
| 45 | + cat `padding:0.2em;text-align:center;margin-top:1em` |
17 | 46 |
|
18 | 47 | create GlobalPanel in Panel
|
19 |
| - set the style of GlobalPanel to `height:auto;max-height:30%;flex:1;overflow-y:scroll;margin-top:0.5em` |
| 48 | + set the style of GlobalPanel to |
| 49 | + `height:auto;max-height:25%;overflow-y:scroll;margin-top:0.5em` |
20 | 50 |
|
21 | 51 | create ContainerTitle in Panel
|
22 |
| - set the style of ContainerTitle to |
23 |
| - `font-weight:bold;font-size:110%;background:lightgray;padding:0.2em;text-align:center` |
| 52 | + set the style of ContainerTitle to `font-weight:bold;font-size:110%;background:lightgray;` |
| 53 | + cat `padding:0.2em;text-align:center;margin-top:1em` |
24 | 54 |
|
25 | 55 | create ContainerPanel in Panel
|
26 |
| - set the style of ContainerPanel to `height:auto;max-height:30%;flex:1;overflow-y:scroll;margin-top:0.5em` |
| 56 | + set the style of ContainerPanel to |
| 57 | + `height:auto;max-height:20%;overflow-y:scroll;margin-top:0.5em` |
27 | 58 |
|
28 | 59 | create DefaultsTitle in Panel
|
29 |
| - set the style of DefaultsTitle to |
30 |
| - `font-weight:bold;font-size:110%;background:lightgray;padding:0.2em;text-align:center` |
| 60 | + set the style of DefaultsTitle to `font-weight:bold;font-size:110%;background:lightgray;` |
| 61 | + cat `padding:0.2em;text-align:center;margin-top:1em` |
31 | 62 |
|
32 | 63 | create DefaultsPanel in Panel
|
33 |
| - set the style of DefaultsPanel to `flex:1;overflow-y:scroll;margin-top:0.5em` |
| 64 | + set the style of DefaultsPanel to |
| 65 | + `flex:1;max-height:60%;overflow-y:scroll;margin-top:0.5em` |
34 | 66 |
|
35 |
| - on message go to Start |
36 |
| - set ready |
37 |
| - stop |
| 67 | + set GlobalItems to array |
| 68 | + json add `title` to GlobalItems |
| 69 | + json add `description` to GlobalItems |
| 70 | + json add `aspectW` to GlobalItems |
| 71 | + json add `aspectH` to GlobalItems |
38 | 72 |
|
39 |
| -Start: |
40 |
| - set style `display` of Panel to `flex` |
41 |
| - set style `flex-direction` of Panel to `column` |
| 73 | + set ContainerItems to array |
| 74 | + json add `background` to ContainerItems |
| 75 | + json add `border` to ContainerItems |
| 76 | + |
| 77 | + set DefaultsItems to array |
| 78 | + json add `fontFamily` to DefaultsItems |
| 79 | + json add `fontSize` to DefaultsItems |
| 80 | + json add `fontWeight` to DefaultsItems |
| 81 | + json add `fontStyle` to DefaultsItems |
| 82 | + json add `fontColor` to DefaultsItems |
| 83 | + json add `textAlign` to DefaultsItems |
| 84 | + json add `textMarginLeft` to DefaultsItems |
| 85 | + json add `textMarginTop` to DefaultsItems |
| 86 | + json add `blockLeft` to DefaultsItems |
| 87 | + json add `blockTop` to DefaultsItems |
| 88 | + json add `blockWidth` to DefaultsItems |
| 89 | + json add `blockBackground` to DefaultsItems |
| 90 | + json add `blockBorder` to DefaultsItems |
| 91 | + json add `blockBorderRadius` to DefaultsItems |
| 92 | + |
| 93 | + put property `global` of Presentation into Globals |
| 94 | + put property `container` of Presentation into Container |
| 95 | + put property `defaults` of Presentation into Defaults |
42 | 96 |
|
43 | 97 | clear GlobalPanel
|
44 | 98 | clear ContainerPanel
|
45 | 99 | clear DefaultsPanel
|
46 | 100 | set the content of GlobalTitle to `Global defaults`
|
47 | 101 | set the content of ContainerTitle to `Container defaults`
|
48 | 102 | set the content of DefaultsTitle to `Block defaults`
|
| 103 | + |
| 104 | + put the json count of GlobalItems into N |
| 105 | + set the elements of GlobalInput to N |
| 106 | + put 0 into N |
| 107 | + while N is less than the elements of GlobalInput |
| 108 | + begin |
| 109 | + create Row in GlobalPanel |
| 110 | + set the style of Row to `display:flex;margin-top:0.2em` |
| 111 | + create Label in Row |
| 112 | + set the style of Label to `width:10em` |
| 113 | + put element N of GlobalItems into Name |
| 114 | + set the content of Label to Name |
| 115 | + create GlobalInput in Row |
| 116 | + set the style of GlobalInput to `flex:1;margin-right:0.5em` |
| 117 | + put property Name of Globals into Value |
| 118 | + set the text of GlobalInput to Value |
| 119 | + add 1 to N |
| 120 | + end |
| 121 | + |
| 122 | + put the json count of ContainerItems into N |
| 123 | + set the elements of ContainerInput to N |
| 124 | + put 0 into N |
| 125 | + while N is less than the elements of ContainerInput |
| 126 | + begin |
| 127 | + create Row in ContainerPanel |
| 128 | + set the style of Row to `display:flex;margin-top:0.2em` |
| 129 | + create Label in Row |
| 130 | + set the style of Label to `width:10em` |
| 131 | + put element N of ContainerItems into Name |
| 132 | + set the content of Label to Name |
| 133 | + create ContainerInput in Row |
| 134 | + set the style of ContainerInput to `flex:1;margin-right:0.5em` |
| 135 | + put property Name of Container into Value |
| 136 | + set the text of ContainerInput to Value |
| 137 | + add 1 to N |
| 138 | + end |
| 139 | + |
| 140 | + put the json count of DefaultsItems into N |
| 141 | + set the elements of DefaultsInput to N |
| 142 | + put 0 into N |
| 143 | + while N is less than the elements of DefaultsInput |
| 144 | + begin |
| 145 | + create Row in DefaultsPanel |
| 146 | + set the style of Row to `display:flex;margin-top:0.2em` |
| 147 | + create Label in Row |
| 148 | + set the style of Label to `width:10em` |
| 149 | + put element N of DefaultsItems into Name |
| 150 | + set the content of Label to Name |
| 151 | + create DefaultsInput in Row |
| 152 | + set the style of DefaultsInput to `flex:1;margin-right:0.5em` |
| 153 | + put property Name of Defaults into Value |
| 154 | + set the text of DefaultsInput to Value |
| 155 | + add 1 to N |
| 156 | + end |
49 | 157 | stop
|
0 commit comments