Skip to content

Commit

Permalink
removes fa icons
Browse files Browse the repository at this point in the history
  • Loading branch information
richmahn committed Nov 29, 2023
1 parent ce49077 commit 98d3e1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion templates/repo/header.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
{{if .LatestProdDM}}
<div class="ui labeled button" tabindex="0">
<a type="submit" class="ui compact basic button" href="{{.Link}}/releases/tag/{{.LatestProdDM.Ref | PathEscapeSegments}}">
<i class="icon fa-file-text"></i>{{ctx.Locale.Tr "repo.metadata.catalog"}}
{{svg "octicon-tag"}} {{ctx.Locale.Tr "repo.metadata.catalog"}}
</a>
<a class="ui basic label" href="{{.Link}}/releases/tag/{{.LatestProdDM.Ref | PathEscapeSegments}}">
{{.LatestProdDM.Ref}}
Expand Down
18 changes: 7 additions & 11 deletions templates/repo/view_file.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<button class="ui mini basic button escape-button gt-mr-2">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
{{end}}
<!-- DCS Customizations -->
<i id="expand-view-button" class="fa fa-expand btn-octicon poping up" data-content="{{ctx.Locale.Tr "repo.expand_view"}}" data-tr-expand="{{ctx.Locale.Tr "repo.expand_view"}}" data-tr-compact="{{ctx.Locale.Tr "repo.compact_view"}}" data-position="bottom center" data-variation="tiny inverted" style="cursor:pointer"></i>
<span id="expand-view-button" class="btn-octicon" data-tooltip-content="{{ctx.Locale.Tr "repo.expand_view"}}">{{svg "octicon-move-to-start"}}{{svg "octicon-move-to-end"}}</span>
<!-- END DCS Customizations -->
</div>
</h4>
Expand Down Expand Up @@ -134,23 +134,19 @@
<script>
const expandViewButton = document.querySelector('#expand-view-button');
let isExpandedView = false;
const expandTooltip = "{{ctx.Locale.Tr "repo.expand_view"}}";
const compactTooltip = "{{ctx.Locale.Tr "repo.compact_view"}}";
expandViewButton.addEventListener('click', () => {
const container = expandViewButton.closest('.container');
const trExpand = expandViewButton.getAttribute('data-tr-expand');
const trCompact = expandViewButton.getAttribute('data-tr-compact');
if (isExpandedView) {
container.classList.remove('fluid', 'padded');
expandViewButton.classList.add('fa-expand');
expandViewButton.classList.remove('fa-compress');
expandViewButton.setAttribute('data-content', trExpand);
isExpandedView = false;
expandViewButton.setAttribute('data-tooltip-content', expandTooltip);
} else {
container.classList.add('fluid', 'padded');
expandViewButton.classList.remove('fa-expand');
expandViewButton.classList.add('fa-compress');
expandViewButton.setAttribute('data-content', trCompact);
isExpandedView = true;
expandViewButton.setAttribute('data-tooltip-content', compactTooltip);
}
isExpandedView = !isExpandedView;
expandViewButton.children[0].before(expandViewButton.children[1]);
}, false);
</script>
<!-- END DCS Customizations -->

0 comments on commit 98d3e1d

Please sign in to comment.