Skip to content

Commit

Permalink
Tweak github button
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Feb 29, 2024
1 parent 6e4d1ac commit 8de1a4b
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 7 deletions.
17 changes: 17 additions & 0 deletions docs/discovery/common.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
.discovery-nav > .github::before {
--size: 15px;
content: "";
display: inline-block;
vertical-align: text-top;
height: var(--size);
aspect-ratio: 1/1;
margin-right: 5px;
margin-left: -3px;
background: url("./img/github.svg") no-repeat center;
background-size: calc(var(--size) - 0px);
opacity: .85;
}
.discovery-root-darkmode .discovery-nav > .github::before {
background-image: url("./img/github-white.svg");
}

.view-markdown {
max-width: 850px;
}
Expand Down
9 changes: 9 additions & 0 deletions docs/discovery/common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* global discovery */

Promise.resolve().then(() =>
discovery.nav.primary.append({
className: 'github',
content: 'text:"GitHub"',
data: { href: 'https://github.com/discoveryjs/jora' }
})
);
1 change: 1 addition & 0 deletions docs/discovery/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = {
view: {
noscript: './noscript.js',
assets: [
'./common.js',
'./common.css',
'./pages/default.css',
'./pages/default.js',
Expand Down
1 change: 1 addition & 0 deletions docs/discovery/img/github-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/discovery/img/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 0 additions & 7 deletions docs/discovery/pages/default.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
/* global discovery */

Promise.resolve().then(() =>
discovery.nav.before('inspect', {
name: 'github',
data: '{ text: "GitHub", href: "https://github.com/discoveryjs/jora" }'
})
);

discovery.page.define('default', [
{
view: 'page-header',
Expand Down

0 comments on commit 8de1a4b

Please sign in to comment.