APP TEMPLATE
Overview
App template is the skeleton where the high level/base layout divisions are set/defined. When it comes to layout, it's common to have it dividide into parts like "Navigation Bar", "Top Menu", "Main Section", "Header", "Footer", etc. Those definitions are easily managed by adding on the App Template.
The default App Template includes a single <still-component>
tag, which renders the active component based on routing or first component Loading set in the StillAppSetup. It must appear only once and is required in app-template.js
. To add persistent UI parts, use <st-fixed>
with a component
property—these remain visible across navigations.
Lone component considerations
Because AppTemplate is tied to the Still Application container, it's not available when using Lone component becuase in therms of rendering they are totally depending on the environment in which they being embeded.
Standard AppTemplate (app-template.js
) after initiating a project
Defining Application top Bar with fixed part
As stated above, AppTemplate fixed part stays stick even when there is navigation. Follow the bellow example:
Animated result:
Creating a menu using Fixed parts
A fixed part recives the component just like <st-element>
, such component works the same way a component works in other scenarios inspit being fixed, for this reason we can leverage it for creating more interactive parts like menus.
When using navigation in the fixed part, it does not affect the part itself, but the <still-component/>
part of the AppTemplate
, this makes fixed part the suitable place for transversal menus.
This component is placed inside app/components/person/ folder | |
---|---|
Animated result:
Application Stylization
At the end of the Day the AppTemplate sits on the of the stillUiPlaceholder which is an HTML index.html
placed in the project root folder, for this reason this (index.html
) is the right to use as the source of the App UI styling for the layout by including our .css
files in there.