Skip to content

Latest commit

 

History

History
125 lines (87 loc) · 2.78 KB

customization.md

File metadata and controls

125 lines (87 loc) · 2.78 KB

Customization

lona-picocss comes with a visual theme configurator built-in. Make sure you installed lona-picocss with debug set to True, and go to /_picocss/settings. The configurator applies all changes live. After you are done, copy all settings from Compiled Settings into your script, to make your changes permanent.

Navigation

The default template of lona-picocss has support for a menu at the top. To configure its contents set settings.PICOCSS_NAVIGATION, like in the examples. When app.settings.PICOCSS_NAVIGATION is or returns an empty list, the menu does not get rendered.

Static Navigation

app.settings.PICOCSS_NAVIGATION = [
    NavItem(
        title='Simple Link',
        url='/home',
    ),

    NavItem(
        title='Dropdown'
        nav_items=[
            NavItem(
                title='Dropdown Link 1'
                url='/dropdown/link-1/',
            ),
            NavItem(
                title='Dropdown Link 2'
                url='/dropdown/link-2/',
            ),
        ]
    ),
]

Dynamic Navigation

from lona_picocss import NavItem

def get_navigation(server, reqest):
    return [
        NavItem(
            title='Settings',
            url=server.reverse('picocss__settings'),
            icon='settings',
        ),
    ]

app.settings.PICOCSS_NAVIGATION = get_navigation

Themes

lona-picocss has support for light and dark themes

Light

Dark

Color Schemes

lona-picocss has support for a list of different color schemes. All of them can be used with light- and dark theme.

Amber

Blue

Blue Grey

Cyan

Deep Orange

Deep Purple

Green

Gray

Indigo

Light Blue

Light Green

Lime

Orange

Pink

Purple

Red

Teal

Yellow