-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathreference.html
255 lines (239 loc) · 9.36 KB
/
reference.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<!doctype html>
<!--suppress ALL -->
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes" name="viewport"/>
<title>Fore Element Reference</title>
<!-- <script src="../node_modules/webcomponentsjs/webcomponents-loader.js"></script>-->
<link href="../resources/fore.css" rel="stylesheet">
<link href="../resources/vars.css" rel="stylesheet">
<link href="../resources/demo.css" rel="stylesheet">
<style>
body{
margin:0;
padding:0;
border:0;
font-family: sans-serif;
}
details{
height: auto;
}
details[open] summary ~ .details {
animation: sweep 0.5s ease-in-out forwards;
}
@keyframes sweep {
0% {opacity: 0; margin-top: -10px}
100% {opacity: 1; margin-top: 0px}
}
details[open]{
width: 100%;
/*transition: height 2s;*/
/*
position:fixed;
top:-0.3rem;
left:-0.3rem;
z-index: 5;
overflow: auto;
*/
}
details fx-output{
background: white;
padding: 1rem;
border-radius: 0.3rem;
}
details, summary{
padding: 0.3rem;
font-size: 1.2rem;
}
summary{
background: ghostwhite;
padding: 1rem;
}
summary::after{
padding: 0.2rem 0.4rem;
border-radius: 0.3rem;
margin-left: 1rem;
color: black;
font-size: 0.8rem;
opacity: 0.8;
float: right;
}
.model::after{
background: var(--paper-teal-500);
content:'model';
}
.action::after{
background: var(--paper-amber-500);
content:'action';
}
.common::after{
background: var(--paper-grey-500);
content:'common';
}
.ui::after{
background: var(--paper-light-blue-500);
content:'ui';
}
button{
color: var(--paper-grey-900);
padding: 0.5rem;
border-radius: 0.3rem;
}
button.all{
margin-right: 1rem;
}
.actionbtn{
background: var(--paper-amber-500);
}
.modelbtn{
background: var(--paper-teal-500);
}
.commonbtn{
background: var(--paper-grey-500);
}
fx-output{
display: block;
}
fx-repeatitem{
/*display: inline-block;*/
display: block;
/*min-width: 49%;*/
width: available;
height: fit-content;
}
.uibtn{
background: var(--paper-light-blue-500);
}
.attrName{
font-family: monospace;
}
table, tbody{
width: 100%;
}
table tbody th{
text-align: left !important;
}
.wrapper{
margin-top:1rem;
}
</style>
<script type="text/javascript" src="../src/drawdown.js"></script>
</head>
<body>
<div class="wrapper">
<h1>Fore Element Reference</h1>
<div class="note">This is just a demo - for the real and latest documentation use the menu link.</div>
<fx-fore>
<fx-model>
<fx-instance>
<data>
<element tags="all action" name="fx-action"></element>
<element tags="all common" name="fx-alert"></element>
<element tags="all action" name="fx-append"></element>
<element tags="all model" name="fx-bind"></element>
<element tags="all ui" name="fx-case"></element>
<element tags="all action" name="fx-confirm"></element>
<element tags="all ui" name="fx-control"></element>
<element tags="all ui" name="fx-dialog"></element>
<element tags="all action" name="fx-delete"></element>
<element tags="all action" name="fx-dispatch"></element>
<element tags="all common" name="fx-fore"></element>
<element tags="all model" name="fx-function"></element>
<element tags="all ui" name="fx-group"></element>
<element tags="all model" name="fx-header"></element>
<element tags="all action" name="fx-hide"></element>
<element tags="all ui" name="fx-hint"></element>
<element tags="all action" name="fx-insert"></element>
<element tags="all common" name="fx-inspector"></element>
<element tags="all model" name="fx-instance"></element>
<element tags="all ui" name="fx-items"></element>
<element tags="all action" name="fx-message"></element>
<element tags="all model" name="fx-model"></element>
<element tags="all ui" name="fx-output"></element>
<element tags="all action" name="fx-property"></element>
<element tags="all ui" name="fx-repeat"></element>
<element tags="all action" name="fx-refresh"></element>
<element tags="all action" name="fx-replace"></element>
<element tags="all action" name="fx-send"></element>
<element tags="all action" name="fx-setvalue"></element>
<element tags="all action" name="fx-show"></element>
<element tags="all model" name="fx-submission"></element>
<element tags="all ui" name="fx-switch"></element>
<element tags="all action" name="fx-toggle"></element>
<element tags="all ui" name="fx-trigger"></element>
<element tags="all action" name="fx-update"></element>
<element tags="all common" name="fx-var"></element>
<tag></tag>
<current></current>
</data>
</fx-instance>
<fx-instance id="markdown" type="text" src="elements/fx-action.md"></fx-instance>
<fx-submission id="loadMd"
method="get"
url="elements/{instance('default')/current}.md"
replace="instance"
into="instance()/element[contains(@tags , instance()/tag)][index('elements')]">
<fx-message event="submit-error" value="instance('default')/current || '.md cannot be loaded'"></fx-message>
</fx-submission>
<fx-function signature="markdown($input as xs:string?) as xs:string"
type="text/javascript">
const source = $input;
const converted = markdown(source);
return converted;
</fx-function>
</fx-model>
<fx-trigger>
<button class="all">ALL</button>
<fx-setvalue ref="tag">all</fx-setvalue>
<fx-refresh></fx-refresh>
<fx-action src="closeDetails.js"></fx-action>
</fx-trigger>
<fx-trigger>
<button class="commonbtn">Common</button>
<fx-setvalue ref="tag">common</fx-setvalue>
<fx-refresh></fx-refresh>
<fx-action src="closeDetails.js"></fx-action>
</fx-trigger>
<fx-trigger>
<button class="modelbtn">Model</button>
<fx-setvalue ref="tag">model</fx-setvalue>
<fx-refresh></fx-refresh>
<fx-action src="closeDetails.js"></fx-action>
</fx-trigger>
<fx-trigger>
<button class="uibtn">UI</button>
<fx-setvalue ref="tag">ui</fx-setvalue>
<fx-refresh></fx-refresh>
<fx-action src="closeDetails.js"></fx-action>
</fx-trigger>
<fx-trigger>
<button class="actionbtn">Actions</button>
<fx-setvalue ref="tag">action</fx-setvalue>
<fx-refresh></fx-refresh>
<fx-action src="closeDetails.js"></fx-action>
</fx-trigger>
<fx-repeat id="elements" ref="element[contains(@tags , ../tag)]">
<template>
<details>
<summary class="{@tags}">
{@name}
<fx-action event="click" if="string-length(.)=0">
<fx-message>clicked {.}</fx-message>
<fx-setvalue ref="instance('default')/current" value="instance()/element[contains(@tags , ../tag)][index('elements')]/@name"></fx-setvalue>
<fx-send submission="loadMd"></fx-send>
</fx-action>
</summary>
<div class="details">
<!-- <fx-output id="source" ref="." mediatype="markdown"></fx-output>-->
<fx-output id="source" value="markdown(./text())"></fx-output>
</div>
</details>
</template>
</fx-repeat>
<!-- <fx-inspector open></fx-inspector>-->
</fx-fore>
</div>
<script type="module" src="../index.js"></script>
</body>
</html>