Skip to content

Commit

Permalink
Doc uploader use an accordion versus reveal
Browse files Browse the repository at this point in the history
This also overrides the honeycrisp version of the accordion
so that we can pass it an html item versus just text.
  • Loading branch information
bseeger committed Jan 31, 2024
1 parent 2920e67 commit 390e89f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
15 changes: 15 additions & 0 deletions src/main/resources/templates/fragments/accordion.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<th:block
th:fragment="accordion"
th:with="controlId=${controlId == null ? 'a1' : controlId}"
th:assert="
${!#strings.isEmpty(buttonLabel)},
${!#strings.isEmpty(content)}">
<div class="accordion">
<button class="accordion__button" aria-expanded="true" aria-controls="controlId">
<th:block th:replace="${buttonLabel}"/>
</button>
<div class="accordion__content" id="controlId">
<th:block th:replace="${content}"/>
</div>
</div>
</th:block>
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<th:block th:fragment="docUploadSeeWhatToAddReveal">
<th:block th:replace="~{'fragments/honeycrisp/reveal' :: reveal(
controlId='r1',
linkLabel=~{::revealLabel1},
content=~{::revealContent1})}">
<th:block th:ref="revealLabel1">
<th:block th:replace="~{fragments/accordion :: accordion(
buttonLabel=~{::contentLabel},
content=~{::contentContent})}">
<th:block th:ref="contentLabel">
<span class="clipboard-icon">
<i class="icon-">&#xE862;</i>
</span>
Expand Down

0 comments on commit 390e89f

Please sign in to comment.