Skip to content

Commit

Permalink
layouts and main menu
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesthebrooks committed Oct 24, 2024
1 parent 8f1286c commit 9718674
Show file tree
Hide file tree
Showing 16 changed files with 427 additions and 196 deletions.
2 changes: 1 addition & 1 deletion _data/assetPaths.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"admin.js": "/assets/js/admin-OYJBR6FH.js",
"admin.map": "/assets/js/admin-OYJBR6FH.js.map",
"anchor.mi.js": "/assets/js/anchor.min.js",
"anchor.min.js": "/assets/js/anchor.min.js",
"app.js": "/assets/js/app-ZQYILJ3O.js",
"app.map": "/assets/js/app-ZQYILJ3O.js.map",
"uswds.js": "/assets/js/uswds-init.js",
Expand Down
35 changes: 20 additions & 15 deletions _includes/collection-item.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
<li class="usa-collection__item">
<div class="usa-prose padding-right-4">
{% if post.data.image %}
{% assign imagepath="./_img/" | append: post.data.image %}
{% image_with_class imagepath "usa-collection__img" post.data.image_alt_text %}
{% endif %}
<div class="usa-collection__body">
<h3 class="usa-collection__heading">
<a
class="usa-link"
href="{{ post.url | url }}"
>{{ post.data.title }}</a
>
<div class="padding-bottom-5 margin-top-4 usa-prose border-bottom-05 border-base-lightest usa-content">
<h3 class="title">
<a class="usa-link text-no-underline" href="{{ post.url | url }}"
>{{ post.data.title }}</a>
</h3>
<div class="margin-bottom-2">
<div class="margin-top-neg-105 font-family-ui">
<time datetime="{{ post.date | date: '%Y-%m-%dT12:00:00+01:00' }}">
{{ post.date | readableDate }}
</time>
</div>
</div>

<p class="usa-collection__description">
{{ post.templateContent | truncatewords: 10 }}
{%- if post.data.excerpt -%}
{{ post.data.excerpt | truncatewords: 50 }}
{%- else -%}
{{ post.content | striptags | truncatewords: 50 }}
{%- endif -%}
</p>
<ul class="usa-collection__meta" aria-label="More information">
<li class="usa-collection__meta-item">
{{ post.data.author }}
</li>
<li class="usa-collection__meta-item">
<time datetime="{{ post.date | date: '%Y-%m-%dT12:00:00+01:00' }}">
{{ post.date | date: '%B %d, %Y' }}
</time>
</li>
</ul>

</div>
</li>
</div>
31 changes: 31 additions & 0 deletions _includes/doc-registry.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{%- assign documentation_navigation=site.documentation_navigation -%}
{%- for nav_item in documentation_navigation -%}
<h2> {%- if nav_item.icon -%}
<i class='fa fa-fw {{ nav_item.icon }}'></i>
{%- endif -%}
{{ nav_item.name | escape }}
</h2>
<ul>
{%- for docpage in site.docs -%}
{%- if nav_item.identifier == docpage.parent -%}
<li>
<a href="{{ docpage.url }}">{{ docpage.title }}</a>
</li>
{%- endif -%}
{%- endfor -%}
</ul>
{%- if nav_item.children -%}
{%- for sub_child in nav_item.children -%}
<h3>{{ sub_child.name }}</h3>
<ul>
{%- for docpage in site.docs -%}
{%- if sub_child.identifier == docpage.parent -%}
<li>
<a href="{{ docpage.url }}">{{ docpage.title }}</a>
</li>
{%- endif -%}
{%- endfor -%}
</ul>
{%- endfor -%}
{%- endif -%}
{%- endfor -%}
223 changes: 163 additions & 60 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,66 +1,169 @@
<footer class="usa-footer site-footer" role="contentinfo">
<div class="usa-identifier site-identifier">
<section class="usa-identifier__section usa-identifier__section--masthead" aria-label="Agency identifier">
<div class="usa-identifier__container">
<div class="usa-identifier__logos">
<a href="https://www.gsa.gov">
{% image_with_class "_img/gsa-logo.svg" "usa-identifier__logo" "GSA logo identifier" %}
</a>
<div class="footer-section-bottom usa-footer__primary-section bg-accent-warm-light border-top border-accent-warm-dark">
<div class="grid-container padding-bottom-4">
<div class="grid-row grid-gap-4">
<div class="mobile-lg:grid-col-6 desktop:grid-col-3">
<section class="usa-footer__primary-content usa-footer__primary-content--collapsible">
<h4 class="usa-footer__primary-link">Get in touch</h4>
<ul class="usa-list usa-list--unstyled">
<li class="usa-footer__secondary-link"><a href="/contact">Customer support</a></li>
<li class="usa-footer__secondary-link"><a href="mailto:[email protected]">Business
inquiries</a></li>
<li class="usa-footer__secondary-link"><a href="https://join.tts.gsa.gov/">Join our team</a>
</li>
</ul>
</section>
</div>
<div class="mobile-lg:grid-col-6 desktop:grid-col-3">
<section class="usa-footer__primary-content usa-footer__primary-content--collapsible">
<h4 class="usa-footer__primary-link">For developers</h4>
<ul class="usa-list usa-list--unstyled">
<li class="usa-footer__secondary-link"><a
href="/docs/ops/repos/#repositories">Repositories</a></li>
<li class="usa-footer__secondary-link"><a href="/docs/pricing/free-limited-sandbox/">Free
developer sandbox</a></li>
<li class="usa-footer__secondary-link"><a href="https://cloudgov.statuspage.io/">cloud.gov
status</a></li>
</ul>
</section>
</div>
<div class="mobile-lg:grid-col-6 desktop:grid-col-3">
<section class="usa-footer__primary-content usa-footer__primary-content--collapsible">
<h4 class="usa-footer__primary-link">Policies</h4>
<ul class="usa-list usa-list--unstyled">
<li class="usa-footer__secondary-link"><a
href="https://www.gsa.gov/vulnerability-disclosure-policy">Vulnerability disclosure
policy</a></li>
<li class="usa-footer__secondary-link"><a href="https://18f.gsa.gov/open-source-policy/">Open
source policy</a></li>
</ul>
</section>
</div>
</div>
<div class="usa-identifier__identity" aria-label="Agency description">
<p class="usa-identifier__identity-domain">cloud.gov</p>
<p class="usa-identifier__identity-disclaimer">
An official website of the <a class="external_link" href="https://gsa.gov">General Services Administration</a>
</p>
</div>
</div>

<div class="usa-footer__secondary-section bg-accent-warm">
<div class="grid-container">
<div class="usa-footer__logo grid-row grid-gap-2">
<div class="grid-col-auto">
{% image_with_class "./_img/cloud-gov-logo.svg" "width-card-lg height-auto" site.title %}
</div>
<div class="grid-col-auto desktop:margin-left-auto">
<p class="">
<a href="mailto:{{site.email}}">{{site.email}}</a>
</p>
</div>
</div>
</div>
</section>
<nav class="usa-identifier__section usa-identifier__section--required-links" aria-label="Important links">
<div class="usa-identifier__container">
<ul class="usa-identifier__required-links-list">
<li class="usa-identifier__required-links-item">
<a href="https://www.gsa.gov/about-us" class="usa-identifier__required-link usa-link">
About GSA
</a>
</li>
<li class="usa-identifier__required-links-item">
<a href="https://www.gsa.gov/website-information/accessibility-aids" class="usa-identifier__required-link usa-link">
Accessibility support
</a>
</li>
<li class="usa-identifier__required-links-item">
<a href="https://www.gsa.gov/reference/freedom-of-information-act-foia" class="usa-identifier__required-link usa-link">
FOIA requests
</a>
</li>
<li class="usa-identifier__required-links-item">
<a href="https://www.gsa.gov/reference/civil-rights-programs/notification-and-federal-employee-antidiscrimination-and-retaliation-act-of-2002" class="usa-identifier__required-link usa-link">
No FEAR Act data
</a>
</li>
<li class="usa-identifier__required-links-item">
<a href="https://www.gsaig.gov/" class="usa-identifier__required-link usa-link">
Office of the Inspector General
</a>
</li>
<li class="usa-identifier__required-links-item">
<a href="https://www.gsa.gov/reference/reports/budget-performance" class="usa-identifier__required-link usa-link">
Performance reports
</div>

<div class="usa-identifier">
<section
class="usa-identifier__section usa-identifier__section--masthead"
aria-label="Agency identifier,"
>
<div class="usa-identifier__container">
<div class="usa-identifier__logos">
<a href="" class="usa-identifier__logo">
{% image_with_class "./_img/logos/GSA-logo.svg" "usa-identifier__logo-img" "GSA Logo" %}
</a>
</li>
<li class="usa-identifier__required-links-item">
<a href="https://www.gsa.gov/website-information/website-policies" class="usa-identifier__required-link usa-link">
Privacy policy
</a>
</li>
</ul>
</div>
</nav>
<section class="usa-identifier__section usa-identifier__section--usagov" aria-label="Government information and services">
<div class="usa-identifier__container">
<div class="usa-identifier__usagov-description">Looking for U.S. government information and services?</div>
<a href="https://www.usa.gov/" class="external_link">Visit USA.gov</a>
</div>
</section>
</div>
</div>
<section
class="usa-identifier__identity"
aria-label="Agency description"
>
<p class="usa-identifier__identity-domain">cloud.gov</p>
<p class="usa-identifier__identity-disclaimer">
An official website of the
<a href="https://www.gsa.gov">U.S. General Services Administration</a>
</p>
</section>
</div>
</section>
<nav
class="usa-identifier__section usa-identifier__section--required-links"
aria-label="Important links,"
>
<div class="usa-identifier__container">
<ul class="usa-identifier__required-links-list">
<li class="usa-identifier__required-links-item">
<a
href="https://www.gsa.gov/about-us"
class="usa-identifier__required-link usa-link"
>
About GSA
</a>
</li>

<li class="usa-identifier__required-links-item">
<a
href="https://www.gsa.gov/website-information/accessibility-statement"
class="usa-identifier__required-link usa-link"
>
Accessibility statement
</a>
</li>

<li class="usa-identifier__required-links-item">
<a
href="https://www.gsa.gov/reference/freedom-of-information-act-foia"
class="usa-identifier__required-link usa-link"
>
FOIA requests
</a>
</li>

<li class="usa-identifier__required-links-item">
<a
href="https://www.gsa.gov/reference/civil-rights-programs/the-no-fear-act"
class="usa-identifier__required-link usa-link"
>
No FEAR Act data
</a>
</li>

<li class="usa-identifier__required-links-item">
<a
href="https://www.gsaig.gov/"
class="usa-identifier__required-link usa-link"
>
Office of the Inspector General
</a>
</li>

<li class="usa-identifier__required-links-item">
<a
href="https://www.gsa.gov/reference/reports/budget-performance"
class="usa-identifier__required-link usa-link"
>
Performance reports
</a>
</li>

<li class="usa-identifier__required-links-item">
<a
href="https://www.gsa.gov/website-information/website-policies"
class="usa-identifier__required-link usa-link"
>
Privacy policy
</a>
</li>
</ul>
</div>
</nav>
<section
class="usa-identifier__section usa-identifier__section--usagov"
aria-label="U.S. government information and services,"
>
<div class="usa-identifier__container">
<div class="usa-identifier__usagov-description">
Looking for U.S. government information and services?
</div>
<a href="https://www.usa.gov/" class="usa-link"> Visit USA.gov </a>
</div>
</section>
</div>


</footer>
9 changes: 8 additions & 1 deletion _includes/layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@
<body>
{% include "header.html" %}

{% include "menu.html" primary_navigation: site.primary_navigation secondary_navigation: site.secondary_navigation %}


{% case navigation %}
{% when "pages" %}
{% include "menu.html" primary_navigation: pages.navigation.primary secondary_navigation: pages.navigation.secondary %}
{% else %}
{% include "menu.html" primary_navigation: site.primary_navigation secondary_navigation: site.secondary_navigation %}
{% endcase %}

{{ content }}

Expand Down
2 changes: 1 addition & 1 deletion _includes/layouts/data.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% endcomment %}


<div class="usa-layout-docs usa-section">
<div class="usa-layout-docs usa-section data-layout">
<div class="grid-container">
<div class="grid-row grid-gap">
<div class="usa-layout-docs__main desktop:grid-col-9 usa-prose">
Expand Down
2 changes: 1 addition & 1 deletion _includes/layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
The home page uses wide.html layout, since it extends full width of page
{% endcomment %}

<main id="main-content">
<main id="main-content" class="default-layout">
{{ content }}
</main>
43 changes: 43 additions & 0 deletions _includes/layouts/docs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
layout: layouts/base
---

{% comment %}
This template is for a single page that does not have a date associated with it. For example, an about page.
{% endcomment %}

<div class="usa-layout-docs usa-section bg-accent-warm-light docs-layout">
<div class="grid-container">
<div class="grid-row grid-gap">
{% if sidenav == true %}
{% if navigation == "pages" %}
{% include "pages/sidenav.html" %}
{% else %}
{% include "sidenav.html" %}
{% endif %}
{% endif %}
<main id="main-content"
class="usa-layout-docs__main usa-prose bg-white padding-y-8 padding-x-4 desktop:grid-col-8">
<h1>{{ title }}</h1>

{% assign toc_content = content | toc | strip | strip_newlines %}
{% assign empty_toc_content = '<ol id="toc" class="section-nav"></ol>' %}

{% if showtoc != false and toc_content != '' and toc_content != empty_toc_content %}
<h2>Table of Contents</h2>
<div id="table-of-contents">
{{ toc_content }}
</div>
{% endif %}

{{ content }}

<div class="grid-row">
<div class="grid-col flex-4"></div>
<div class="grid-col flex-1"><p><a href="{{ site.github_url }}/edit/{{ site.github_branch }}/{{ page.relative_path }}">Suggest edits</a></p></div>
</div>

</main>
</div>
</div>
</div>
Loading

0 comments on commit 9718674

Please sign in to comment.