Skip to content

Commit

Permalink
Custom svg nav icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Reece Browne committed Jan 9, 2025
1 parent ab7f974 commit a2c50af
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/main/resources/static/images/rename.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/main/resources/templates/fragments/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ <h6 class="menu-title" th:text="#{navbar.sections.advance}"></h6>
th:replace="~{fragments/navbarEntry :: navbarEntry ('pipeline', 'family_history', 'home.pipeline.title', 'home.pipeline.desc', 'pipeline.tags', 'advance')}">
</div>
<div
th:replace="~{fragments/navbarEntry :: navbarEntry ('auto-rename', 'text_fields_alt', 'home.auto-rename.title', 'home.auto-rename.desc', 'auto-rename.tags', 'advance')}">
th:replace="~{fragments/navbarEntryCustom :: navbarEntry ('auto-rename', '/images/rename.svg#icon-rename', 'home.auto-rename.title', 'home.auto-rename.desc', 'auto-rename.tags', 'advance')}">
</div>
<div
th:replace="~{fragments/navbarEntry :: navbarEntry ('repair', 'build', 'home.repair.title', 'home.repair.desc', 'repair.tags', 'advance')}">
Expand Down
13 changes: 13 additions & 0 deletions src/main/resources/templates/fragments/navbarEntryCustom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<th:block th:fragment="navbarEntry(endpoint, toolIcon, titleKey, descKey, tagKey, toolGroup)"
th:if="${@endpointConfiguration.isEndpointEnabled(endpoint)}">
<a class="dropdown-item" href="#" th:href="@{${endpoint}}"
th:classappend="${endpoint.equals(currentPage)} ? ${toolGroup} + ' active' : '' + ${toolGroup}"
th:title="#{${descKey}}" th:data-bs-tags="#{${tagKey}}">
<div class="icon" alt="icon" th:class="@{${toolGroup}}">
<svg class="nav-icon" style="height: 2.5rem; width:2.5rem">
<use th:xlink:href="@{${toolIcon}}"></use>
</svg>
<span class="icon-text" th:text="#{${titleKey}}"></span>
</div>
</a>
</th:block>

0 comments on commit a2c50af

Please sign in to comment.