Skip to content

Commit

Permalink
move download button to toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
NickCrew committed Jan 17, 2025
1 parent 87f1030 commit 7154bdc
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
5 changes: 5 additions & 0 deletions src/partials/download-this-page.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{#if page.attributes.pdf-filename}}
&nbsp;<i class="fa-solid fa-download"></i>&nbsp;
<a href="{{{page.attributes.pdf-filename}}}" title="Save page as PDF">Download</a>
&nbsp;&nbsp; &nbsp;&nbsp;
{{/if}}
8 changes: 6 additions & 2 deletions src/partials/edit-this-page.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{#if (and page.fileUri (not env.CI))}}
<div class="edit-this-page"><a href="{{page.fileUri}}">Edit this Page</a></div>
<i class="fa-brands fa-github"></i>&nbsp;
<div class="edit-this-page"><a href="{{page.fileUri}}" title="View/edit the source of this page">Edit</a></div>
&nbsp;&nbsp;
{{else if (and page.editUrl (or env.FORCE_SHOW_EDIT_PAGE_LINK (not page.origin.private)))}}
<div class="edit-this-page"><a href="{{page.editUrl}}">Edit this Page</a></div>
<i class="fa-brands fa-github"></i>&nbsp;
<div class="edit-this-page"><a href="{{page.editUrl}}" title="View/edit the source of this page">Edit</a></div>
&nbsp;&nbsp;
{{/if}}
4 changes: 2 additions & 2 deletions src/partials/header-content.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<a class="navbar-item" href="{{{or site.url siteRootPath}}}/txprotect/current/index.html">Protect {{#if page.attributes.txprotect-current-version}}<small>v{{{page.attributes.txprotect-current-version}}}{{/if}}</small></a>
</div>
</div>
{{#if page.attributes.pdf-filename}}
<!--{{#if page.attributes.pdf-filename}}
<div class="navbar-item">
<span class="control">
<a class="button is-primary" title="Export and save the current page in PDF format."
Expand All @@ -34,7 +34,7 @@
</a>
</span>
</div>
{{/if}}
{{/if}}-->
</div>
</div>
</nav>
Expand Down
4 changes: 3 additions & 1 deletion src/partials/page-versions.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{{#with page.versions}}
<div class="page-versions">
<button class="version-menu-toggle" title="Show other versions of page">{{@root.page.componentVersion.displayVersion}}</button>
<button class="version-menu-toggle" title="Show other versions of page">
&nbsp;<i class="fa-solid fa-tag"></i>&nbsp;
{{@root.page.componentVersion.displayVersion}}</button>
<div class="version-menu">
{{#each this}}
<a class="version
Expand Down
7 changes: 3 additions & 4 deletions src/partials/toolbar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
{{/with}}
{{> breadcrumbs}}
{{> page-versions}}
{{#if page.editUrl}}
<i class="fa-brands fa-github"></i>
<div class="edit-this-page"> <a href="{{page.editUrl}}">&nbsp; Edit this page</a></div>
{{/if}}
{{> download-this-page}}
{{> edit-this-page}}

</div>

0 comments on commit 7154bdc

Please sign in to comment.