diff --git a/quartz/components/_SocialShare.tsx b/quartz/components/_SocialShare.tsx index 51c317bf4..19f826b40 100644 --- a/quartz/components/_SocialShare.tsx +++ b/quartz/components/_SocialShare.tsx @@ -1,4 +1,5 @@ import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" +// If `script` is required but causes type issues, consider fixing the type instead of ignoring. // @ts-ignore import script from "./scripts/_socialshare.inline" import style from "./styles/_socialshare.scss.scss" @@ -7,71 +8,64 @@ const SocialShare: QuartzComponent = ({ displayClass, fileData }: QuartzComponen return (
- + e.preventDefault()} + title="Поделиться в Telegram" + data-sharer="telegram" + data-url={`{{url absolute=true}}`} + data-title="{{title}}" + data-caption="{{custom_excerpt}}" + >
- + e.preventDefault()} + title="Поделиться в Twitter" + data-sharer="twitter" + data-url={`{{url absolute=true}}`} + data-title="{{title}}" + >
- - - - - - - - - - - - - - - - - - - - - - + {/* Uncomment and fix other sections as needed */}
- + e.preventDefault()} + title="Поделиться в Pocket" + data-title="{{title}}" + data-sharer="pocket" + data-url={`{{url absolute=true}}`} + >
- + e.preventDefault()} + title="Поделиться в Skype" + data-sharer="skype" + data-url={`{{url absolute=true}}`} + data-title="{{title}}" + >
) } -RandomPageButton.css = style -RandomPageButton.afterDOMLoaded = script -export default (() => RandomPageButton) satisfies QuartzComponentConstructor + +SocialShare.css = style; +SocialShare.afterDOMLoaded = script; + +export default (() => SocialShare) satisfies QuartzComponentConstructor;