Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #9 from mustofa-id/new-look
Browse files Browse the repository at this point in the history
i am forgot about share button
  • Loading branch information
sira313 authored Oct 19, 2019
2 parents 1cab32e + a1ddc0b commit 6fd0cf1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
16 changes: 13 additions & 3 deletions src/components/widget/share-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,22 @@ const links = {
export const ShareButtons = ({ url }) => (
<div className='navbar-end'>
<div className='navbar-item has-dropdown is-hoverable'>
<p className='navbar-link'>Share</p>
<p className='navbar-link is-arrowless navbar-hidden'>
<Icon
name='share-2'
size='24'
strokeWidth='1.2px' />
</p>
<div className='navbar-dropdown is-right'>
{Object.keys(links).map((k, i) => (
<a className='navbar-item' key={`${k}--${i}`} href={links[k] + url}>
<a className='navbar-item'
key={`${k}--${i}`}
href={links[k] + url}
target='_blank'
rel='nofollow noopener noreferrer'
aria-label='Share'>
<span className='icon'>
<Icon name={k} size='16' />
<Icon name={k} size='.8rem' />
</span>
<span>{k.replace(/./, x => x.toUpperCase())}</span>
</a>
Expand Down
3 changes: 1 addition & 2 deletions src/templates/gallery-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ const GalleryPost = ({ data, pageContext, location }) => {
<Navbar
backTo={`/${paramType}`}
title={category}
subtitle={${timeToRead} min read`}
burgerIcon='share-2'>
subtitle={${timeToRead} min read`}burgerIcon='share-2'>
{/* Social media share */}
<ShareButtons url={location.href} />
</Navbar>
Expand Down

0 comments on commit 6fd0cf1

Please sign in to comment.