mirror of https://github.com/realaravinth/gitpad
SUMMARY Authenticated and unauthenticated users have different requirements. Links to profile and settings are irrelevant for unauthenticated users. So separate navigation bars. USAGE crate::pages::auth_ctx Authenticated user context should be supplied on every authenticated route template render. Authenticated navigation bar depends on "loggedin_user" to render profile link. AUTH_NAV("auth_nav") Should only be used in authenticated routes. Depends on "loggedin_user" authenticated user context, which can't be supplied in unauthenticated routes. NOTES Currently, there's (template)code duplication, when inheritance for "include" templates are implemented in Tera crate, navigation bars implementations should be refactored to avoid duplication. |
||
---|---|---|
.. | ||
components | ||
pages/auth |