-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP of integrating amd restoring social share * update version and add stencil/core dep * remove stencil dep * got something work for local development * manual copy of web-social-share dist files * add support for dynamic import vars * point back to patched original version of web-social-share * style and customize web-social-share * update rollup plugin * basic styles for event details
- Loading branch information
1 parent
33ee8fc
commit 99ef6ed
Showing
9 changed files
with
125 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@import '../../theme.css'; | ||
|
||
button { | ||
background-color: var(--color-tertiary); | ||
border: 2px solid var(--black)!important; | ||
} | ||
|
||
svg { | ||
height: 20px; | ||
} | ||
|
||
i.fa { | ||
color: #00aced; | ||
width: 1.4rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { css, html, LitElement, unsafeCSS, TemplateResult } from 'lit'; | ||
import { customElement, property } from 'lit/decorators.js'; | ||
import socialShareCss from './social-share.css?type=css'; | ||
import 'web-social-share'; | ||
|
||
@customElement('app-social-share') | ||
export class NavigationComponent extends LitElement { | ||
static styles = css`${unsafeCSS(socialShareCss)}`; | ||
|
||
@property() show = false; | ||
shareConfig = {}; | ||
|
||
constructor() { | ||
super(); | ||
|
||
const socialShareUrl = window.location.href; | ||
|
||
this.shareConfig = { | ||
displayNames: true, | ||
config: [{ | ||
facebook: { | ||
socialShareUrl | ||
} | ||
}, { | ||
twitter: { | ||
socialShareUrl | ||
} | ||
}, { | ||
pinterest: { | ||
socialShareUrl | ||
} | ||
}] | ||
}; | ||
} | ||
|
||
connectedCallback() { | ||
super.connectedCallback(); | ||
|
||
this.shadowRoot.addEventListener('closed', () => { | ||
this.toggleShowSocialShare(); | ||
}); | ||
} | ||
|
||
toggleShowSocialShare() { | ||
this.show = !this.show; | ||
} | ||
|
||
protected render(): TemplateResult { | ||
return html` | ||
<div class="container"> | ||
<div class="row"> | ||
<h2 class="header">Interact + Share</h2> | ||
<button type="button" class="btn" @click=${this.toggleShowSocialShare}> | ||
<svg class="svg-inline--fa fa-share-alt fa-w-14" aria-hidden="true" data-prefix="fas" data-icon="share-alt" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" data-fa-i2svg=""><path fill="currentColor" d="M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"></path></svg> | ||
SHARE THIS PAGE | ||
</button> | ||
<web-social-share class="wss" .show=${this.show} .share=${this.shareConfig}> | ||
<i class="fa fa-facebook" slot="facebook"></i> | ||
<i class="fa fa-twitter" slot="twitter"></i> | ||
<i class="fa fa-pinterest" slot="pinterest"></i> | ||
</web-social-share> | ||
</div> | ||
</div> | ||
`; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters