|
14 | 14 | </h4> |
15 | 15 |
|
16 | 16 | <p class="card-text text-muted"> |
17 | | - Dynamic layout configuration with session-based element toggling. |
| 17 | + The Layout Attributes on this page are mapped to this Page's LayoutConfig. |
| 18 | + Try changing the elements below! |
18 | 19 | </p> |
19 | 20 |
|
20 | | - <div class="mt-2"> |
21 | | - <span class="badge example-badge-layout">LayoutConfig</span> |
22 | | - <span class="badge example-badge-layout">Session State</span> |
23 | | - <span class="badge example-badge-layout">AjaxEvent</span> |
24 | | - </div> |
25 | | - |
26 | 21 | </div> |
27 | 22 |
|
28 | 23 | </div> |
|
32 | 27 | <h5 class="mb-0">Default Layout Elements</h5> |
33 | 28 | </div> |
34 | 29 | <div id="layout_config_demo" class="card-body"> |
35 | | - <div class="logo btn" |
| 30 | + <div class="tooltip-left logo btn" |
36 | 31 | title="show_logo: Display application logo (not configurable in this demo)"> |
37 | 32 | Logo |
38 | 33 | </div> |
|
45 | 40 | Mainmenu |
46 | 41 | </a> |
47 | 42 | <a href="#" |
48 | | - tal:attributes="class 'livesearch btn ajax' + (' active' if context.livesearch else '')" |
| 43 | + tal:attributes="class 'tooltip-right livesearch btn ajax' + (' active' if context.livesearch else '')" |
49 | 44 | title="livesearch: Enable live search input (default: True)" |
50 | 45 | ajax:bind="click" |
51 | 46 | ajax:target="${context.ajax_url}?setting=livesearch" |
52 | 47 | ajax:action="toggle_layout_bool:NONE:NONE"> |
53 | 48 | Livesearch |
54 | 49 | </a> |
55 | 50 | <a href="#" |
56 | | - tal:attributes="class 'personaltools btn ajax' + (' active' if context.personaltools else '')" |
| 51 | + tal:attributes="class 'tooltip-right personaltools btn ajax' + (' active' if context.personaltools else '')" |
57 | 52 | title="personaltools: User dropdown menu (default: True)" |
58 | 53 | ajax:bind="click" |
59 | 54 | ajax:target="${context.ajax_url}?setting=personaltools" |
|
69 | 64 | Breadcrumbs |
70 | 65 | </a> |
71 | 66 | <a href="#" |
72 | | - tal:attributes="class 'sidebar_left btn ajax' + (' active' if context.has_navtree else '')" |
| 67 | + tal:attributes="class 'tooltip-left sidebar_left btn ajax' + (' active' if context.has_navtree else '')" |
73 | 68 | title="sidebar_left: List of tile names for left sidebar (e.g. ['navtree'])" |
74 | 69 | ajax:bind="click" |
75 | 70 | ajax:target="${context.ajax_url}?sidebar=left&tile=navtree" |
76 | 71 | ajax:action="toggle_sidebar_tile:NONE:NONE"> |
77 | 72 | sidebar_left |
78 | 73 | </a> |
79 | 74 | <div class="content_area btn" |
80 | | - title="contenttile: Main content tile name (default: 'content')"> |
| 75 | + tal:define="mode 'limited' if context.limit_content_width else 'full'" |
| 76 | + title="contenttile: Main content tile name (default: 'content'). Width mode: limit_content_width"> |
81 | 77 | Content Area |
| 78 | + <small class="d-block text-muted" tal:content="mode"></small> |
82 | 79 | </div> |
83 | 80 | <a href="#" |
84 | | - tal:attributes="class 'sidebar_right btn ajax' + (' active' if context.has_tutorial else '')" |
| 81 | + tal:attributes="class 'tooltip-right sidebar_right btn ajax' + (' active' if context.has_tutorial else '')" |
85 | 82 | title="sidebar_right: List of tile names for right sidebar (e.g. ['tutorial'])" |
86 | 83 | ajax:bind="click" |
87 | 84 | ajax:target="${context.ajax_url}?sidebar=right&tile=tutorial" |
|
150 | 147 | pathbar |
151 | 148 | </a> |
152 | 149 | </div> |
| 150 | + <div class="form-check"> |
| 151 | + <a href="#" |
| 152 | + class="form-check-label ajax" |
| 153 | + ajax:bind="click" |
| 154 | + ajax:target="${context.ajax_url}?setting=limit_content_width" |
| 155 | + ajax:action="toggle_layout_bool:NONE:NONE"> |
| 156 | + <i tal:attributes="class 'bi me-1 ' + ('bi-check-square' if context.limit_content_width else 'bi-square')"></i> |
| 157 | + limit_content_width |
| 158 | + </a> |
| 159 | + </div> |
| 160 | + <div class="form-check"> |
| 161 | + <a href="#" |
| 162 | + class="form-check-label ajax" |
| 163 | + ajax:bind="click" |
| 164 | + ajax:target="${context.ajax_url}?setting=center_content" |
| 165 | + ajax:action="toggle_layout_bool:NONE:NONE"> |
| 166 | + <i tal:attributes="class 'bi me-1 ' + ('bi-check-square' if context.center_content else 'bi-square')"></i> |
| 167 | + center_content |
| 168 | + </a> |
| 169 | + </div> |
153 | 170 | </div> |
154 | 171 | <div class="col-md-6"> |
155 | 172 | <h6>Sidebar Tiles</h6> |
156 | | - <div class="mb-2"> |
| 173 | + <div class="mb-3"> |
157 | 174 | <small class="text-muted">sidebar_left:</small> |
158 | 175 | <div class="form-check"> |
159 | 176 | <a href="#" |
|
165 | 182 | navtree |
166 | 183 | </a> |
167 | 184 | </div> |
| 185 | + <div class="form-check"> |
| 186 | + <a href="#" |
| 187 | + class="form-check-label ajax" |
| 188 | + ajax:bind="click" |
| 189 | + ajax:target="${context.ajax_url}?setting=sidebar_left_static" |
| 190 | + ajax:action="toggle_layout_bool:NONE:NONE"> |
| 191 | + <i tal:attributes="class 'bi me-1 ' + ('bi-check-square' if context.sidebar_left_static else 'bi-square')"></i> |
| 192 | + static (overlay) |
| 193 | + </a> |
| 194 | + </div> |
| 195 | + <div class="d-flex align-items-center mt-1"> |
| 196 | + <small class="text-muted me-2">min_width:</small> |
| 197 | + <div class="btn-group btn-group-sm"> |
| 198 | + <a href="#" |
| 199 | + class="btn btn-outline-secondary ajax" |
| 200 | + ajax:bind="click" |
| 201 | + ajax:target="${context.ajax_url}?setting=sidebar_left_min_width&value=${context.sidebar_left_min_width - 50}" |
| 202 | + ajax:action="set_layout_number:NONE:NONE">-</a> |
| 203 | + <span class="btn btn-outline-secondary disabled" tal:content="context.sidebar_left_min_width">150</span> |
| 204 | + <a href="#" |
| 205 | + class="btn btn-outline-secondary ajax" |
| 206 | + ajax:bind="click" |
| 207 | + ajax:target="${context.ajax_url}?setting=sidebar_left_min_width&value=${context.sidebar_left_min_width + 50}" |
| 208 | + ajax:action="set_layout_number:NONE:NONE">+</a> |
| 209 | + </div> |
| 210 | + </div> |
168 | 211 | </div> |
169 | 212 | <div> |
170 | 213 | <small class="text-muted">sidebar_right:</small> |
|
178 | 221 | tutorial |
179 | 222 | </a> |
180 | 223 | </div> |
| 224 | + <div class="form-check"> |
| 225 | + <a href="#" |
| 226 | + class="form-check-label ajax" |
| 227 | + ajax:bind="click" |
| 228 | + ajax:target="${context.ajax_url}?setting=sidebar_right_static" |
| 229 | + ajax:action="toggle_layout_bool:NONE:NONE"> |
| 230 | + <i tal:attributes="class 'bi me-1 ' + ('bi-check-square' if context.sidebar_right_static else 'bi-square')"></i> |
| 231 | + static (overlay) |
| 232 | + </a> |
| 233 | + </div> |
| 234 | + <div class="d-flex align-items-center mt-1"> |
| 235 | + <small class="text-muted me-2">min_width:</small> |
| 236 | + <div class="btn-group btn-group-sm"> |
| 237 | + <a href="#" |
| 238 | + class="btn btn-outline-secondary ajax" |
| 239 | + ajax:bind="click" |
| 240 | + ajax:target="${context.ajax_url}?setting=sidebar_right_min_width&value=${context.sidebar_right_min_width - 50}" |
| 241 | + ajax:action="set_layout_number:NONE:NONE">-</a> |
| 242 | + <span class="btn btn-outline-secondary disabled" tal:content="context.sidebar_right_min_width">150</span> |
| 243 | + <a href="#" |
| 244 | + class="btn btn-outline-secondary ajax" |
| 245 | + ajax:bind="click" |
| 246 | + ajax:target="${context.ajax_url}?setting=sidebar_right_min_width&value=${context.sidebar_right_min_width + 50}" |
| 247 | + ajax:action="set_layout_number:NONE:NONE">+</a> |
| 248 | + </div> |
| 249 | + </div> |
181 | 250 | </div> |
182 | 251 | </div> |
183 | 252 | </div> |
|
0 commit comments