Includables#

App comes with a few templates that are used across the app – they are included into other templates. These templates render common stuff that’s used a lot so they serve the DRY principle.

All such templates start with _. Most live under core/templates/; the asset-include partials live under core/templates/core/ (the Django app-namespaced sub-directory).

  • _delete_item_modal.pug – renders item delete confirmation dialog

  • _dashboard_card.pug – renders a dashboard card for a user item (symbol, last price + last-day % change with arrow, optional performance-chart image, tag chips). Takes user_item, type, chart, precision.

  • _fm.pug – renders flash messages of all types

  • _bc.pug – renders breadcrumb navigation to the current page

  • _field_help.pug – renders help text for a form field

  • _form_field.pug – renders all kinds of form fields incl. its error messages

  • _menu.pug – renders menu in the app layout

    • takes title param (optional): rewrites default page title

  • _menu_search.pug – renders search form used in top bar (desktop) and sidebar (mobile)

  • _paging.pug – renders paging

  • _submenu_dynamic.pug – renders submenu under main menu from the given items

    • takes items param: list of submenu items to be rendered

  • _submenu_sitetree.pug – renders submenu based on sitetree items

  • _title_bc.pug – renders page title into H1 and subtitle into H2

    • takes title param: main title of the page

    • takes subtitle param: page subtitle written under the main title

    • takes small_subtitle param: page smaller version of subtitle ^

    • takes chip param: chip with text next to the headline

  • _detail_price.pug – renders the item’s current price as an <h2> on the item detail page; uses the <item-price> Vue component for shares / coins / ETFs, a plain <span> for indexes.

Asset bootstrap partials (in core/templates/core/) are described in Blocks:

  • core/_js_css.pug – CSS asset includes (UIkit + Bootstrap Icons + app_build.css).

  • core/_post_js.pug – JS asset includes (UIkit JS + app_build.js).