Skip to content

Commit f94d846

Browse files
committed
add link to project in toolbar
1 parent ad3c45c commit f94d846

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/css/toolbar.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,23 @@
5353
background-image: url(../img/octicons-24.svg#view-home-fill);
5454
}
5555

56+
.project-link {
57+
display: block;
58+
filter: var(--toolbar-primary-icon-filter);
59+
margin-right: 1ch;
60+
}
61+
62+
.project-link .icon {
63+
display: inherit;
64+
height: 1rem;
65+
width: 1rem;
66+
}
67+
68+
.project-link .icon img {
69+
height: inherit;
70+
width: inherit;
71+
}
72+
5673
.edit-this-page {
5774
display: none;
5875
padding-right: 0.5rem;

src/partials/edit-this-page.hbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
{{#if page.attributes.project-url}}
2+
<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>
3+
{{/if}}
14
{{#if (and page.fileUri (not env.CI))}}
25
<div class="edit-this-page"><a href="{{page.fileUri}}">Edit this Page</a></div>
36
{{else if (and page.editUrl (or env.FORCE_SHOW_EDIT_PAGE_LINK (not page.origin.private)))}}

0 commit comments

Comments
 (0)