Skip to content

Commit

Permalink
Clean up markdown formats that didn't translate well to pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
rahearn committed Sep 25, 2024
1 parent 0ccb857 commit 76c8599
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 82 deletions.
32 changes: 9 additions & 23 deletions templates/ssp-rendering/lato/templates/approvals.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,35 @@

# Approvals

**System Owner**
## System Owner
<br>
<br>
<br>
<br>
<div style="width:400px"><hr style="border-top:solid 2px #333 !important;color:#333;background-color:#333;" /></div>
{% set owners = ssp.system_characteristics.responsible_parties | parties_for_role("system-owner", ssp) | list %}
{% if owners | count > 0 %}
{{ owners[0].name }}
{% else %}
[Name]
{% endif %}
{% set owner = ssp.system_characteristics.responsible_parties | parties_for_role("system-owner", ssp) | first_or_none %}
{{ owner.name | default('[Name]') }}
<br>
System Owner

**Information System Security Officer**
## Information System Security Officer
<br>
<br>
<br>
<br>
<div style="width:400px"><hr style="border-top:solid 2px #333 !important;color:#333;background-color:#333;" /></div>
{% set isso = ssp.system_characteristics.responsible_parties | parties_for_role("information-system-security-officer", ssp) | list %}
{% if isso | count > 0 %}
{{ isso[0].name }}
{% else %}
[Name]
{% endif %}
{% set isso = ssp.system_characteristics.responsible_parties | parties_for_role("information-system-security-officer", ssp) | first_or_none %}
{{ isso.name | default('[Name]') }}
<br>
Information System Security Officer

**Information System Security Manager**
## Information System Security Manager
<br>
<br>
<br>
<br>
<div style="width:400px"><hr style="border-top:solid 2px #333 !important;color:#333;background-color:#333;" /></div>
{% set issm = ssp.system_characteristics.responsible_parties | parties_for_role("information-system-security-manager", ssp) | list %}
{% if issm | count > 0 %}
{{ issm[0].name }}
{% else %}
[Name]
{% endif %}
{% set issm = ssp.system_characteristics.responsible_parties | parties_for_role("information-system-security-manager", ssp) | first_or_none %}
{{ issm.name | default('[Name]') }}
<br>
Information System Security Manager

<div class="pagebreak"></div>
35 changes: 10 additions & 25 deletions templates/ssp-rendering/lato/templates/frontmatter.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<center>

# U.S. General Services Administration

# {{ ssp.system_characteristics.system_name }} ({{ ssp.system_characteristics.system_name_short }})
Expand All @@ -9,33 +7,22 @@

![GSAIT Logo](./img/gsa_it_logo.png)

</center>

<div class="pagebreak"></div>

Document Prepared By
<table>
<tbody>
## Document Prepared By
{% for party in ssp.metadata.responsible_parties | parties_for_role("prepared-by", ssp) %}
<tr>
<th scope="row">{{ party.type.value.title() }} Name</th><td>{{ party.name }}</td>
</tr>

| | |
| - | - |
| **{{ party.type.value | title }} Name** | {{ party.name }} |
{% set address = party.addresses | first_or_none %}
{% for addr_line in address.addr_lines | as_list %}
<tr>
<th scope="row">Address Line {{ loop.index }}</th><td>{{ addr_line }}</td>
</tr>
| **Address Line {{ loop.index }}** | {{ addr_line }} |
{% endfor %}
<tr>
<th scope="row">City, State Zip</th><td>{{ address.city }}, {{ address.state }} {{ address.postal_code }}</td>
</tr>
{% if address %}
| **City, State Zip** | {{ address.city }}, {{ address.state }} {{ address.postal_code }} |
{% endif %}
{% endfor %}
</tbody>
</table>

<div class="pagebreak"></div>

Document Revision History
## Document Revision History

{% set prepared_by = ssp.metadata.responsible_parties | parties_for_role("prepared-by", ssp) | first_or_none %}
| Date | Comments | Version | Author |
Expand All @@ -44,5 +31,3 @@ Document Revision History
{% set revision_prepared_by = control_interface.get_prop(revision, "prepared-by") | get_party(ssp) | get_default(prepared_by) %}
| {{ revision.last_modified.strftime('%Y-%m-%d') if revision.last_modified else '' }} | {{ revision.title }} | {{ revision.version }} | {{ revision_prepared_by.name }} |
{% endfor %}

<div class="pagebreak"></div>
10 changes: 0 additions & 10 deletions templates/ssp-rendering/lato/templates/gsa_template.md.jinja
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
<style>
@media print {
.pagebreak {
break-after: page
}
}
</style>

{% md_clean_include 'ssp-render/templates/frontmatter.md' heading_level=1 %}

{% md_clean_include 'ssp-render/templates/guidance.md' %}
Expand All @@ -14,8 +6,6 @@

<TableOfContents />

<div class="pagebreak"></div>

{% md_clean_include 'ssp-render/templates/approvals.md' heading_level=1 %}

{% md_clean_include 'ssp-render/templates/section_1.md' heading_level=1 %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
<table>
<tbody>
<tr>
<th scope="row">Name</th><td>{{ party.name }}</td>
</tr>
<tr>
<th scope="row">Title</th><td>{{ control_interface.get_prop(party, 'title') }}</td>
</tr>
<tr>
{% set organization = party.member_of_organizations | first_or_none | get_party(ssp) %}
<th scope="row">Organization</th><td>{{ organization.name }}</td>
</tr>
<tr>
<th scope="row">Address</th><td>
{% set address = organization.addresses | first_or_none %}
| | |
| - | - |
| **Name** | {{ party.name }} |
| **Title** | {{ control_interface.get_prop(party, 'title') }} |
| **Organization** | {{ organization.name }} |
{% if address %}
{{ address.addr_lines | as_list | join(' ') }} {{ address.city }}, {{ address.state }} {{ address.postal_code }}
| **Address** | {{ address.addr_lines | as_list | join(' ') }} {{ address.city }}, {{ address.state }} {{ address.postal_code }} |
{% else %}
| **Address** | |
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Phone Number</th><td>{{ (party.telephone_numbers | first_or_none).number }}</td>
</tr>
<tr>
<th scope="row">Email Address</th><td>{{ (party.email_addresses | first_or_none).__root__ }}</td>
</tr>
</tbody>
</table>
| **Phone Number** | {{ (party.telephone_numbers | first_or_none).number }} |
| **Email Address** | {{ (party.email_addresses | first_or_none).__root__ }} |

0 comments on commit 76c8599

Please sign in to comment.