@@ -22,16 +22,18 @@ component NavigationDoc{
2222 Example{
2323 render: Example.RenderType.CSRSSR
2424 element: CardDisplay{
25- TopNav{ position: 'static'
26- NavContent{
27- NavBrand{ A{ href: `#` T`Brand` } }
28- NavToggleButton{}
29- }
30- NavContentToggle{
31- Ul{
32- Li{ A{ href: `#` T`Home` } }
33- Li{ A{ href: `#` T`Install` } }
34- Li{ A{ href: `#` T`Documentation` } }
25+ TopNav{
26+ NavSections{
27+ NavContent{
28+ NavBrand{ A{ href: `#` T`Brand` } }
29+ NavToggleButton{}
30+ }
31+ NavContentToggle{
32+ Ul{
33+ Li{ A{ href: `#` T`Home` } }
34+ Li{ A{ href: `#` T`Install` } }
35+ Li{ A{ href: `#` T`Documentation` } }
36+ }
3537 }
3638 }
3739 }
@@ -45,16 +47,80 @@ component NavigationDoc{
4547 static any[] use = [TopNav]
4648 ```
4749 ContentSource```
48- TopNav{ position: 'static'
49- NavContent{
50- NavBrand{ A{ href: \`#\` T\`Brand\` } }
51- NavToggleButton{}
50+ TopNav{
51+ NavSections{
52+ NavContent{
53+ NavBrand{ A{ href: \`#\` T\`Brand\` } }
54+ NavToggleButton{}
55+ }
56+ NavContentToggle{
57+ Ul{
58+ Li{ A{ href: \`#\` T\`Home\` } }
59+ Li{ A{ href: \`#\` T\`Install\` } }
60+ Li{ A{ href: \`#\` T\`Documentation\` } }
61+ }
62+ }
5263 }
53- NavContentToggle{
54- Ul{
55- Li{ A{ href: \`#\` T\`Home\` } }
56- Li{ A{ href: \`#\` T\`Install\` } }
57- Li{ A{ href: \`#\` T\`Documentation\` } }
64+ }
65+ ```
66+ }
67+
68+
69+ Content{
70+ H2S`Center Column`
71+ P{
72+ T`Navigation menu with 3 sections.`
73+ }
74+ }
75+
76+ Example{
77+ render: Example.RenderType.CSRSSR
78+ element: CardDisplay{
79+ TopNav{
80+ NavSections{
81+ NavContent{
82+ NavBrand{ A{ href: `#` T`Brand` } }
83+ NavToggleButton{}
84+ }
85+ NavContentToggle{
86+ Ul{
87+ Li{ A{ href: '#' T`Home` }}
88+ Li{ A{ href: '#' T`Documentation` }}
89+ }
90+ }
91+ NavContentToggle{
92+ Ul{
93+ Li{ A{ href: `#` T`Source` } }
94+ }
95+ }
96+ }
97+ }
98+ }
99+
100+ ImportsSource```
101+ import live-web.dom
102+ import live-web-view.navigation
103+ ```
104+ UseSource```
105+ static any[] use = [TopNav]
106+ ```
107+ ContentSource```
108+ TopNav{
109+ NavSections{
110+ NavContent{
111+ NavBrand{ A{ href: \`#\` T\`Brand\` } }
112+ NavToggleButton{}
113+ }
114+ NavContentWide{
115+ Ul{
116+ Li{ A{ href: \'#\' T\`Wide Link\` }}
117+ }
118+ }
119+ NavContentToggle{
120+ Ul{
121+ Li{ A{ href: \`#\` T\`Home\` } }
122+ Li{ A{ href: \`#\` T\`Documentation\` } }
123+ }
58124 }
59125 }
60126 }
@@ -71,23 +137,92 @@ component NavigationDoc{
71137 Example{
72138 render: Example.RenderType.CSRSSR
73139 element: CardDisplay{
74- TopNav{ position: 'static'
75- NavContent{
76- NavBrand{ A{ href: `#` T`Brand` } }
77- NavToggleButton{}
78- }
79- NavContentWide{
80- Ul{
81- Li{ A{ href: '#' T`Wide Screen Link` }}
140+ TopNav{
141+ NavSections{
142+ NavContent{
143+ NavBrand{ A{ href: `#` T`Brand` } }
144+ NavToggleButton{}
145+ }
146+ NavContentWide{
147+ Ul{
148+ Li{ A{ href: '#' T`Wide` }}
149+ }
150+ }
151+ NavContentToggle{
152+ Ul{
153+ Li{ A{ href: `#` T`Home` } }
154+ Li{ A{ href: `#` T`Documentation` } }
155+ }
82156 }
83157 }
84- NavContentToggle{
85- Ul{
86- Li{ A{ href: `#` T`Home` } }
87- Li{ A{ href: `#` T`Documentation` } }
158+ }
159+ }
160+
161+ ImportsSource```
162+ import live-web.dom
163+ import live-web-view.navigation
164+ ```
165+ UseSource```
166+ static any[] use = [TopNav]
167+ ```
168+ ContentSource```
169+ TopNav{
170+ NavSections{
171+ NavContent{
172+ NavBrand{ A{ href: \`#\` T\`Brand\` } }
173+ NavToggleButton{}
174+ }
175+ NavContentWide{
176+ Ul{
177+ Li{ A{ href: \'#\' T\`Wide Link\` }}
178+ }
179+ }
180+ NavContentToggle{
181+ Ul{
182+ Li{ A{ href: \`#\` T\`Home\` } }
183+ Li{ A{ href: \`#\` T\`Documentation\` } }
184+ }
88185 }
89186 }
90187 }
188+ ```
189+ }
190+
191+ Content{
192+ H2S`Navigation from data`
193+ P{
194+ Code`TopNav`T` can be created from data received on the server side.`
195+ }
196+ }
197+
198+ Example{
199+ render: Example.RenderType.CSRSSR
200+ element: CardDisplay{
201+ TopNav{
202+ NavSections{
203+ data: [
204+ {
205+ links: [
206+ { type: 'brand', href: '#', label: 'Brand' },
207+ { type: 'toggle' }
208+ ]
209+ },
210+ {
211+ toggle: true,
212+ links: [
213+ { href: '#', label: 'Home' },
214+ { href: '#', label: 'About' }
215+ ]
216+ },
217+ {
218+ toggle: true,
219+ links: [
220+ { href: '#', label: 'Source' }
221+ ]
222+ }
223+ ]
224+ }
225+ }
91226 }
92227
93228 ImportsSource```
@@ -98,20 +233,102 @@ component NavigationDoc{
98233 static any[] use = [TopNav]
99234 ```
100235 ContentSource```
101- TopNav{ position: 'static'
102- NavContent{
103- NavBrand{ A{ href: \`#\` T\`Brand\` } }
104- NavToggleButton{}
236+ TopNav{
237+ NavSections{
238+ data: [
239+ {
240+ links: [
241+ { type: 'brand', href: '#', label: 'Brand' },
242+ { type: 'toggle' }
243+ ]
244+ },
245+ {
246+ toggle: true,
247+ links: [
248+ { href: '#', label: 'Home' },
249+ { href: '#', label: 'About' }
250+ ]
251+ },
252+ {
253+ toggle: true,
254+ links: [
255+ { href: '#', label: 'Source' }
256+ ]
257+ }
258+ ]
105259 }
106- NavContentWide{
107- Ul{
108- Li{ A{ href: \'#\' T\`Wide Screen Link\` }}
260+ }
261+ ```
262+ }
263+
264+ Content{
265+ H2S`Navigation Fixed`
266+ P{
267+ T`You can create a navigation fixed on top of the screen using the `Code`NavFixed`T` component:`
268+ }
269+ }
270+
271+ Example{
272+ ContentSource```
273+ TopNav{
274+ NavFixed{
275+ NavSections{
276+ // ...
277+ }
278+ }
279+ }
280+ ```
281+ }
282+
283+
284+ Content{
285+ H2S`Navigation With Secondary Menu`
286+ }
287+
288+ Example{
289+ render: Example.RenderType.CSRSSR
290+ element: CardDisplay{
291+ TopNav{
292+ NavSections{
293+ NavContent{
294+ NavBrand{ A{ href: `#` T`Brand` } }
295+ NavToggleButton{}
296+ }
297+ NavContentToggle{
298+ Ul{
299+ Li{ A{ href: `#` T`Home` } }
300+ Li{ A{ classes: ['dropdown'] href: '#' T`Install` }
301+ Ul{ classes: ['secondary', 'right']
302+ Li{ A{ href: '#' T`Link #1` }}
303+ Li{ A{ href: '#' T`Link #2` }}
304+ }
305+ }
306+ }
109307 }
110308 }
111- NavContentToggle{
112- Ul{
113- Li{ A{ href: \`#\` T\`Home\` } }
114- Li{ A{ href: \`#\` T\`Documentation\` } }
309+ }
310+ }
311+
312+ ImportsSource```
313+ import live-web.dom
314+ import live-web-view.navigation
315+ ```
316+ UseSource```
317+ static any[] use = [TopNav]
318+ ```
319+ ContentSource```
320+ TopNav{
321+ NavSections{
322+ NavContent{
323+ NavBrand{ A{ href: \`#\` T\`Brand\` } }
324+ NavToggleButton{}
325+ }
326+ NavContentToggle{
327+ Ul{
328+ Li{ A{ href: \`#\` T\`Home\` } }
329+ Li{ A{ href: \`#\` T\`Install\` } }
330+ Li{ A{ href: \`#\` T\`Documentation\` } }
331+ }
115332 }
116333 }
117334 }
0 commit comments