Skip to content

Commit

Permalink
add link to project in toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Aug 11, 2024
1 parent ad3c45c commit f94d846
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/css/toolbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,23 @@
background-image: url(../img/octicons-24.svg#view-home-fill);
}

.project-link {
display: block;
filter: var(--toolbar-primary-icon-filter);
margin-right: 1ch;
}

.project-link .icon {
display: inherit;
height: 1rem;
width: 1rem;
}

.project-link .icon img {
height: inherit;
width: inherit;
}

.edit-this-page {
display: none;
padding-right: 0.5rem;
Expand Down
3 changes: 3 additions & 0 deletions src/partials/edit-this-page.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{{#if page.attributes.project-url}}
<a class="project-link" href="{{{page.attributes.project-url}}}" title="Project home"><span class="icon"><img src="{{{uiRootPath}}}/img/octicons-16.svg#view-mark-{{{or page.attributes.project-host 'github'}}}"></span></a>
{{/if}}
{{#if (and page.fileUri (not env.CI))}}
<div class="edit-this-page"><a href="{{page.fileUri}}">Edit this Page</a></div>
{{else if (and page.editUrl (or env.FORCE_SHOW_EDIT_PAGE_LINK (not page.origin.private)))}}
Expand Down

0 comments on commit f94d846

Please sign in to comment.