mirror of
https://github.com/GSA/notifications-admin.git
synced 2025-12-10 07:03:12 -05:00
2.4 KiB
2.4 KiB
New Templates Glossary
This document serves as a glossary for the templates directory structure of the project.
Directory Structure
/templatesbase.html: The main base template from which all other templates inherit. This template is a combination ofmain_template,admin_template,withoutnav_template, andcontent_template.- /layouts: Contains shared layouts used across the site. Simply put, it defines the overall structure or skeleton of the application (less frequently revised).
withnav_template.html: A variation of org_template and settings_template that includes a sidebar.
- /components: Houses reusable UI components that can be included in multiple templates and can be tailored with different content or links depending on the context.(more frequently revised or customized)
head.html: Template for the site's <head>, included inbase.html.header.html: Template for the site's header, included inbase.html.footer.html: Template for the site's footer, included inbase.html.settings_navigation.html: The settings navigation used inwithnav_template.htmlthat previously extendedsettings_template.html.org_nav.html: The organization's navigation used solely inorg_template.html.main_nav.html: The main navigation used inwithnav_template.htmlservice_navigation.html: The service navigation used inwithnav_template.html. In withnav_template.html, theserviceNavigationblock will be left empty in any child templates that previously extendedsettings_template.html.
- /views (or /pages): Individual page templates that use the base layouts, components, and partials to present content.
Best Practices
- Use inheritance
{% extends %}to build on base layouts. - Employ components
{% include %}for reusable UI elements.
Old Layout Templates We Don't Need
- withoutnav_template.html Delete, it is now apart of base.html
- main_template.html Delete, it is now apart of base.html
- settings_templates.html
withnav_templatecan be used to replacesettings_template. - settings_nav.html (move to /components/ directory)
- main_nav.html (move to /components/ directory)
- service_navigation.html (move to /components/ directory)
- org_template, Delete, it is now apart of withnav_template.html
- org_nav.html (move to /components/ directory)
- content_template.html Delete, it is now apart of base.html