mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-04 19:38:24 -04:00
relative path update
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{% from "components/banner.html" import banner %}
|
{% from "../components/banner.html" import banner %}
|
||||||
{% from "./components/components/skip-link/macro.njk" import usaSkipLink -%}
|
{% from "../components/components/skip-link/macro.njk" import usaSkipLink -%}
|
||||||
{% from "./components/components/header/macro.njk" import usaHeader -%}
|
{% from "../components/components/header/macro.njk" import usaHeader -%}
|
||||||
{% from "./components/components/footer/macro.njk" import usaFooter -%}
|
{% from "../components/components/footer/macro.njk" import usaFooter -%}
|
||||||
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
@@ -59,16 +59,15 @@
|
|||||||
<!-- End Google Tag Manager (noscript) -->
|
<!-- End Google Tag Manager (noscript) -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<div>block skipLink
|
|
||||||
{% block skipLink %}
|
{% block skipLink %}
|
||||||
{{ usaSkipLink({
|
{{ usaSkipLink({
|
||||||
"href": '#main-content',
|
"href": '#main-content',
|
||||||
"text": 'Skip to main content'
|
"text": 'Skip to main content'
|
||||||
}) }}
|
}) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>block header
|
<!-- \\#region header -->
|
||||||
{% block header %}
|
{% block header %}
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
{% if current_user.platform_admin %}
|
{% if current_user.platform_admin %}
|
||||||
@@ -203,9 +202,9 @@
|
|||||||
"assetsPath": asset_path + "images"
|
"assetsPath": asset_path + "images"
|
||||||
}) }}
|
}) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
<!-- \\#endregion -->
|
||||||
|
|
||||||
<div>block main
|
<!-- \\#region block main -->
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<div class="grid-container">
|
<div class="grid-container">
|
||||||
{% block beforeContent %}
|
{% block beforeContent %}
|
||||||
@@ -240,9 +239,9 @@
|
|||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
<!-- \\#endregion -->
|
||||||
|
|
||||||
<div>block footer
|
<!-- \\#region block footer -->
|
||||||
{% block footer %}
|
{% block footer %}
|
||||||
|
|
||||||
{% if current_service and current_service.research_mode %}
|
{% if current_service and current_service.research_mode %}
|
||||||
@@ -359,7 +358,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
<!-- \\#endregion -->
|
||||||
|
|
||||||
{% block bodyEnd %}
|
{% block bodyEnd %}
|
||||||
{% block extra_javascripts %}
|
{% block extra_javascripts %}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ This document serves as a glossary for the templates directory structure of the
|
|||||||
## Directory Structure
|
## Directory Structure
|
||||||
|
|
||||||
- `/templates`
|
- `/templates`
|
||||||
- `base.html`: The main base template from which all other templates inherit. This template is a combination of the old admin_template and main_template.html
|
- `base.html`: The main base template from which all other templates inherit. This template is a combination of `main_template`, `admin_template`, `settings_template`, and `content_template`.
|
||||||
- **/layouts**: Contains base templates and shared layouts used across the site. Simply put, it defines the overall structure or skeleton of the application (less frequently revised).
|
- **/layouts**: Contains base templates and 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 the base layout that includes a sidebar.
|
- `withnav_template.html`: A variation of the base layout that includes a sidebar.
|
||||||
- `/error`: Templates for handling HTTP errors
|
- `/error`: Templates for handling HTTP errors
|
||||||
@@ -20,8 +20,8 @@ This document serves as a glossary for the templates directory structure of the
|
|||||||
- Use **inheritance** (`{% extends %}`) to build on base layouts.
|
- Use **inheritance** (`{% extends %}`) to build on base layouts.
|
||||||
- Employ **components** (`{% include %}`) for reusable UI elements to keep the code DRY and facilitate easier updates.
|
- Employ **components** (`{% include %}`) for reusable UI elements to keep the code DRY and facilitate easier updates.
|
||||||
|
|
||||||
### Notes
|
### Observation Notes
|
||||||
- Macro json files are just guides on how to structure a dict. It's not actually being used as data being passed to components
|
- The macro-options.json files in the header and footer component act as structural guides. They aren't directly used as data passed to the usaFooter function/macro. Instead, these files outline the expected properties and provide a description of their purpose. The `usaFooter` macro component is currently only invoked in the `admin_template`, which will eventually serve as the `base.html` template. This will simplify the approach when we change the footer macros to componenets by eliminating the need to dynamically pass this data from the base.html template.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user