Skip to content

Commit

Permalink
docs: add ico to nav bar
Browse files Browse the repository at this point in the history
  • Loading branch information
krisk committed May 8, 2022
1 parent d8801c6 commit 1b32357
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 32 deletions.
50 changes: 25 additions & 25 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
serviceWorker: true,
themeConfig: {
logo: '/assets/img/logo.png',
repo: 'krisk/fuse',
// repo: 'krisk/fuse',
base: 'docs',
lastUpdated: 'Last Updated',
docsDir: 'docs',
Expand Down Expand Up @@ -98,32 +98,32 @@ function getPlugins() {
getComponent('Donate')
]
}
],
[
('social-share',
{
networks: ['twitter', 'facebook', 'reddit', 'email', 'linkedin'],
extendsNetworks: {
email: {
sharer: 'mailto:?subject=@title&body=@url%0D%0A%0D%0A@description',
type: 'direct',
icon: '/assets/img/email.png'
},
linkedin: {
sharer:
'https://www.linkedin.com/sharing/share-offsite/?mini=true&url=@url&title=@title&summary=@description',
type: 'popup',
color: '#1786b1',
icon: '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="M910.336 0H113.664A114.005333 114.005333 0 0 0 0 113.664v796.672A114.005333 114.005333 0 0 0 113.664 1024h796.672A114.005333 114.005333 0 0 0 1024 910.336V113.664A114.005333 114.005333 0 0 0 910.336 0zM352.256 796.330667H207.189333V375.466667h145.066667z m-72.021333-477.866667a77.824 77.824 0 0 1-81.237334-74.069333A77.824 77.824 0 0 1 280.234667 170.666667a77.824 77.824 0 0 1 81.237333 73.728 77.824 77.824 0 0 1-81.237333 73.386666z m582.314666 477.866667H716.8v-227.669334c0-46.762667-18.432-93.525333-73.045333-93.525333a84.992 84.992 0 0 0-81.237334 94.549333v226.304h-140.629333V375.466667h141.653333v60.757333a155.989333 155.989333 0 0 1 136.533334-71.338667c60.416 0 163.498667 30.378667 163.498666 194.901334z" /></svg>'
}
},
twitterUser: 'kirorisk',
autoQuote: true,
isPlain: false,
noGlobalSocialShare: true
})
]
// [
// ('social-share',
// {
// networks: ['twitter', 'facebook', 'reddit', 'email', 'linkedin'],
// extendsNetworks: {
// email: {
// sharer: 'mailto:?subject=@title&body=@url%0D%0A%0D%0A@description',
// type: 'direct',
// icon: '/assets/img/email.png'
// },
// linkedin: {
// sharer:
// 'https://www.linkedin.com/sharing/share-offsite/?mini=true&url=@url&title=@title&summary=@description',
// type: 'popup',
// color: '#1786b1',
// icon: '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="M910.336 0H113.664A114.005333 114.005333 0 0 0 0 113.664v796.672A114.005333 114.005333 0 0 0 113.664 1024h796.672A114.005333 114.005333 0 0 0 1024 910.336V113.664A114.005333 114.005333 0 0 0 910.336 0zM352.256 796.330667H207.189333V375.466667h145.066667z m-72.021333-477.866667a77.824 77.824 0 0 1-81.237334-74.069333A77.824 77.824 0 0 1 280.234667 170.666667a77.824 77.824 0 0 1 81.237333 73.728 77.824 77.824 0 0 1-81.237333 73.386666z m582.314666 477.866667H716.8v-227.669334c0-46.762667-18.432-93.525333-73.045333-93.525333a84.992 84.992 0 0 0-81.237334 94.549333v226.304h-140.629333V375.466667h141.653333v60.757333a155.989333 155.989333 0 0 1 136.533334-71.338667c60.416 0 163.498667 30.378667 163.498666 194.901334z" /></svg>'
// }
// },
// twitterUser: 'kirorisk',
// autoQuote: true,
// isPlain: false,
// // noGlobalSocialShare: true
// })
// ]
// [
// 'vuepress-plugin-google-adsense',
// {
// ad_client: GOOGLE_AD_CLIENT_ID
Expand Down
18 changes: 13 additions & 5 deletions docs/.vuepress/nav/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@ module.exports = [
// link: '/team/'
// },
{
text: 'Support Fuse.js',
text: 'Sponsor',
link: '/support/'
},
{
text: 'Twitter',
link: 'https://twitter.com/kirorisk'
},
{
text: 'GitHub',
link: 'https://twitter.com/kirorisk'
}
// {
// text: 'Jobs',
// link: '/jobs/'
Expand All @@ -17,8 +25,8 @@ module.exports = [
// text: 'Stories',
// link: '/stories/'
// },
{
text: 'Release Notes',
link: 'https://github.com/krisk/Fuse/releases'
}
// {
// text: 'Release Notes',
// link: 'https://github.com/krisk/Fuse/releases'
// }
]
1 change: 1 addition & 0 deletions docs/.vuepress/public/assets/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.
1 change: 1 addition & 0 deletions docs/.vuepress/public/assets/img/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions docs/.vuepress/styles/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -366,4 +366,16 @@ body {
h2 {
padding-bottom: 1rem;
border-bottom: none;
}

nav.nav-links div:nth-child(3) a {
background-image: url(/assets/img/twitter.svg);
background-repeat: no-repeat;
padding-left: 30px; /* width of the image plus a little extra padding */
}

nav.nav-links div:nth-child(4) a {
background-image: url(/assets/img/github.svg);
background-repeat: no-repeat;
padding-left: 30px; /* width of the image plus a little extra padding */
}
3 changes: 1 addition & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
noGlobalSocialShare: true
shareTitle: Fuse.js - JavaScript fuzzy-search library
---

# What is Fuse.js?

<social-share :networks="['twitter', 'reddit', 'linkedin', 'email']" />
<!-- <social-share :networks="['twitter', 'reddit', 'linkedin', 'email']" /> -->

Fuse.js is a **powerful, lightweight fuzzy-search library, with zero dependencies**.

Expand Down

0 comments on commit 1b32357

Please sign in to comment.