Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
env:
BASEURL: /ospo-guide
GH_API_TOKEN: ${{ secrets.GH_API_TOKEN }}
ELEVENTY_ENV: production

- name: Save 11ty Cache
uses: actions/cache/save@v4
Expand Down
18 changes: 18 additions & 0 deletions _data/site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ host: https://dsacms.github.io/
# 2. Add a new site.
# 3. Add your site/affiliate name here.

searchgov:

# Only change this if you're using a CNAME. Learn more here: https://search.gov/manual/cname.html
endpoint: https://search.usa.gov

# Replace this with your search.gov account.
affiliate: ospo-guide

# Replace this with your access key.
access_key: empty

# This renders the results within the page instead of sending to user to search.gov.
inline: false

# This allows Search.gov to present relevant type-ahead search suggestions in your website's search box.
# If you do not want to present search suggestions, set this value to false.
suggestions: false

# TODO: Configure touchpoints
# Touchpoints survey form data, if any. See: https://github.com/GSA/touchpoints/wiki/Delivery-Options
# touchpoints:
Expand Down
48 changes: 16 additions & 32 deletions _includes/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,34 @@
{% include "logo.html" %}
<button type="button" class="usa-menu-btn">Menu</button>
</div>
<nav
id="menu-navigation"
aria-label="Menu navigation"
role="navigation"
class="usa-nav"
>
<nav id="menu-navigation" aria-label="Menu navigation" role="navigation" class="usa-nav">
<div class="usa-nav__inner">
<button type="button" class="usa-nav__close">
{% image "./node_modules/@uswds/uswds/dist/img/usa-icons/close.svg" "close" %}
</button>
<ul class="usa-nav__primary usa-accordion">
{% for nav_item in primary_navigation %}
{% unless nav_item.children %}
{% assign basedir = page.url | remove_first: '/' | split: '/' | first | lstrip %}
{% assign linkdir = nav_item.url | replace: "/", "" | lstrip %}
{% unless nav_item.children %}
{% assign basedir = page.url | remove_first: '/' | split: '/' | first | lstrip %}
{% assign linkdir = nav_item.url | replace: "/", "" | lstrip %}
<li class="usa-nav__primary-item">
<a
class="usa-nav__link{% if basedir == linkdir %} usa-current{% endif %}"
href="{{ nav_item.url | url }}"
{% if nav_item.download %}download{% endif %}
><span>{{ nav_item.name | escape }}</span>
<a class="usa-nav__link{% if basedir == linkdir %} usa-current{% endif %}" href="{{ nav_item.url | url }}"
{% if nav_item.download %}download{% endif %}><span>{{ nav_item.name | escape }}</span>
{% if nav_item.download %}
<span class="download-icon">{% uswds_icon "file_download" %}</span>
<span class="download-icon">{% uswds_icon "file_download" %}</span>
{% endif %}
</a>
</li>
{% else %} {% assign nav_id = 'primary-nav-' | append: forloop.index %}
<li class="usa-nav__primary-item">
<button
class="usa-accordion__button usa-nav__link"
aria-expanded="false"
aria-controls="{{ nav_id }}"
type="button"
>
<button class="usa-accordion__button usa-nav__link" aria-expanded="false" aria-controls="{{ nav_id }}"
type="button">
<span>{{ nav_item.name | escape }}</span>
</button>
<ul id="{{ nav_id }}" class="usa-nav__submenu">
{% for subnav_item in nav_item.children %}
<li class="usa-nav__submenu-item">
<a href="{{ subnav_item.url | url }}"
>{{ subnav_item.name | escape }}</a
>
<a href="{{ subnav_item.url | url }}">{{ subnav_item.name | escape }}</a>
</li>
{% endfor %}
</ul>
Expand All @@ -60,25 +46,23 @@
It's there to fix wonky alignment when search is present on the index page
{% endcomment%}
{% comment %}
<!-- TODO: Commenting out search -->
Comment thread
natalialuzuriaga marked this conversation as resolved.
{% endcomment%}
<!-- <div class="usa-nav__secondary {% unless tags %} bottom-2 {% endunless %}">
<div class="usa-nav__secondary {% unless tags %} bottom-2 {% endunless %}">
{% if navigation.secondary_navigation %}
<ul class="usa-nav__secondary-links">
{% for nav_item in navigation.secondary_navigation %}
{% if nav_item.guides == nil or nav_item.guides contains tags[0] %}
{% if nav_item.guides == nil or nav_item.guides contains tags[0] %}
<li class="usa-nav__secondary-item">
<a href="{{ nav_item.url | url }}" class="text-bold">
{{ nav_item.name | escape }}
</a
>
</a>
</li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% include "searchgov/form.html" searchgov: site.searchgov %}
</div> -->
</div>
</div>
</nav>
</header>
</header>
19 changes: 11 additions & 8 deletions _includes/searchgov/form.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
{% comment %}
This will redirect the results to /search template which will handle the js loading
This will redirect the results to /search template which will handle the js loading
{% endcomment %}

{% if searchgov %}
{% if searchgov.inline == true %}
<form id="search_form" class="usa-search usa-search--small" action="{{ '/search/' | url }}" accept-charset="UTF-8" method="get">
{% if searchgov.inline == true %}
<form id="search_form" class="usa-search usa-search--small" action="{{ '/search/' | url }}" accept-charset="UTF-8"
method="get">
{% else %}
<form id="search_form" class="usa-search usa-search--small" action="{{searchgov.endpoint}}/search" accept-charset="UTF-8" method="get">
{% endif %}
<form id="search_form" class="usa-search usa-search--small" action="{{ searchgov.endpoint }}/search"
accept-charset="UTF-8" method="get">
{% endif %}

<input name="utf8" type="hidden" value="&#x2713;" />
<input name="affiliate" type="hidden" value="{{searchgov.affiliate}}" />
<input name="affiliate" type="hidden" value="{{ searchgov.affiliate}}" />

<div role="search">
<label class="usa-sr-only" for="extended-search-field-small">Search small</label>
<input class="usa-input usagov-search-autocomplete" id="extended-search-field-small" type="search" name="query" autocomplete="off">
<input class="usa-input usagov-search-autocomplete" id="extended-search-field-small" type="search" name="query"
autocomplete="off">
<button class="usa-button" type="submit">
{% image_with_class "./node_modules/@uswds/uswds/dist/img/usa-icons-bg/search--white.svg" "usa-search__submit-icon" "Search" %}
</button>
</div>
</form>
{% endif %}
{% endif %}
Loading