Skip to content

Commit

Permalink
refactored static-asset to optionally display as a button link
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-mon1 committed Nov 23, 2022
1 parent 164daf7 commit b4b313f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 0 additions & 2 deletions config.yml
Expand Up @@ -58,8 +58,6 @@ markup:
ordered: false
startLevel: 1

enableInlineShortcodes: true

params:
description: "Guidance on building better digital services in government"
agency_refer: "U.S. General Services Administration"
Expand Down
2 changes: 1 addition & 1 deletion content/guides/rpa/rpa-playbook-internal-controls.md
Expand Up @@ -16,5 +16,5 @@ The addendum addresses topics such as:
- Audit Readiness
- Controls Objectives and Suggested Artifacts

{{< asset-static file="rpa-playbook-ic-addendum-v1.0.pdf" label="IC Addendum" >}}
{{< asset-static file="rpa-playbook-ic-addendum-v1.0.pdf" label="IC Addendum" button="true" >}}

2 changes: 1 addition & 1 deletion content/guides/rpa/rpa-playbook.md
Expand Up @@ -9,7 +9,7 @@ guide: rpa

Written by the RPA CoP, the RPA playbook provides detailed, accessible guidance for federal agencies starting a new RPA program or evolving an existing program.

* {{< asset-static file="rpa-playbook.pdf" label="Download the RPA Playbook (v1.1)" >}}
{{< asset-static file="rpa-playbook.pdf" label="Download the RPA Playbook (v1.1)" button="true" >}}



Expand Down
5 changes: 4 additions & 1 deletion themes/digital.gov/layouts/shortcodes/asset-static.html
Expand Up @@ -2,6 +2,9 @@
{{/*
Example:
{{< asset-static file="2021-ux-summit-designing-with-people-of-all-abilities.pptx" label="View the slides (PowerPoint, 5.7 MB, 26 pages)" >}}

If link is a button link, use button="true":
{{< asset-static button="true" file="2021-ux-summit-designing-with-people-of-all-abilities.pptx" label="View the slides (PowerPoint, 5.7 MB, 26 pages)" >}}
*/}}


Expand All @@ -13,5 +16,5 @@

{{- $fileBaseCDN := printf "%s/static/%s" $cdnurl $file -}}

<a href="{{ $fileBaseCDN }}">{{ $label }}</a>
<a href="{{ $fileBaseCDN }}" {{- if .Get "button" -}}class="usa-button usa-button--outline"{{- end -}}>{{ $label }}</a>
{{ end }}

0 comments on commit b4b313f

Please sign in to comment.