Skip to content

Commit

Permalink
feat: Visual indicator for External link in the sidebar
Browse files Browse the repository at this point in the history
Resolves #240
  • Loading branch information
philwebb authored May 16, 2024
1 parent 3301549 commit de1a789
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 18 deletions.
1 change: 1 addition & 0 deletions gulp.d/tasks/generate-octicons.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const icons = [
'info',
'law',
'light-bulb',
'link-external',
'moon',
'question',
'rocket',
Expand Down
4 changes: 4 additions & 0 deletions preview-src/ui-model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ shared:
url: '/samples/edge-cases/index.html'
- content: 404
url: '/404.html'
- content: External Link
url: 'https://spring.io'
roles: 'link-external'
target: '_blank'
baz:
1.0.0:
home: true
Expand Down
10 changes: 10 additions & 0 deletions src/css/nav.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ html.is-clipped--nav {
margin: 0 0 0 0.75rem;
}

.nav-list a.link-external::after {
content: url(../img/octicons-16.svg#view-link-external);
width: 16px;
height: 16px;
display: inline-block;
vertical-align: middle;
margin: 0 0 2px 5px;
filter: opacity(0.5);
}

.nav-menu > .nav-list + .nav-list {
margin-top: 0.5rem;
}
Expand Down
42 changes: 24 additions & 18 deletions src/img/octicons-16.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit de1a789

Please sign in to comment.