_SocialShare.tsx
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Struchkov Mark 2024-09-08 14:38:50 +03:00
parent cba2e5a1c6
commit f02f6c01b7
No known key found for this signature in database
GPG Key ID: A3F0AC3F0FA52F3C

View File

@ -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 (
<div className="post-share">
<div className="share-link">
<a className="share-icon share-telegram"
href="javascript:void(0);"
title="Поделиться в Telegram"
data-sharer="telegram"
data-url="{{url absolute=" true"}}"
data-title="{{title}}"
data-caption="{{custom_excerpt}}">
<a
className="share-icon share-telegram"
href="#"
onClick={(e) => e.preventDefault()}
title="Поделиться в Telegram"
data-sharer="telegram"
data-url={`{{url absolute=true}}`}
data-title="{{title}}"
data-caption="{{custom_excerpt}}"
>
<span className="svg-social-icon icon-telegram"></span>
</a>
</div>
<div className="share-link">
<a className="share-icon share-twitter"
href="javascript:void(0);"
title="Поделиться в Twitter"
data-sharer="twitter"
data-url="{{url absolute=" true"}}"
data-title="{{title}}">
<a
className="share-icon share-twitter"
href="#"
onClick={(e) => e.preventDefault()}
title="Поделиться в Twitter"
data-sharer="twitter"
data-url={`{{url absolute=true}}`}
data-title="{{title}}"
>
<span className="svg-social-icon icon-twitter"></span>
</a>
</div>
<!-- <div class="share-link">-->
<!-- <a class="share-icon share-whatsapp"-->
<!-- href="javascript:void(0);"-->
<!-- title="Поделиться в WhatsApp"-->
<!-- data-sharer="whatsapp"-->
<!-- data-url="{{url absolute="true"}}"-->
<!-- data-title="{{title}}"-->
<!-- data-web="">-->
<!-- <span class="svg-social-icon icon-whatsapp"></span>-->
<!-- </a>-->
<!-- </div>-->
<!-- <div class="share-link">-->
<!-- <a class="share-icon share-vk"-->
<!-- href="javascript:void(0);"-->
<!-- title="Поделиться в VK"-->
<!-- data-sharer="vk"-->
<!-- data-url="{{url absolute="true"}}"-->
<!-- data-title="{{title}}"-->
<!-- data-caption="{{custom_excerpt}}">-->
<!-- <span class="svg-social-icon icon-vk"></span>-->
<!-- </a>-->
<!-- </div>-->
{/* Uncomment and fix other sections as needed */}
<div className="share-link">
<a className="share-icon share-pocket"
href="javascript:void(0);"
title="Поделиться в Pocket"
data-title="{{title}}"
data-sharer="pocket"
data-url="{{url absolute=" true"}}">
<a
className="share-icon share-pocket"
href="#"
onClick={(e) => e.preventDefault()}
title="Поделиться в Pocket"
data-title="{{title}}"
data-sharer="pocket"
data-url={`{{url absolute=true}}`}
>
<span className="svg-social-icon icon-pocket"></span>
</a>
</div>
<div className="share-link">
<a className="share-icon share-skype"
href="javascript:void(0);"
title="Поделиться в Skype"
data-sharer="skype"
data-url="{{url absolute=" true"}}"
data-title="{{title}}">
<a
className="share-icon share-skype"
href="#"
onClick={(e) => e.preventDefault()}
title="Поделиться в Skype"
data-sharer="skype"
data-url={`{{url absolute=true}}`}
data-title="{{title}}"
>
<span className="svg-social-icon icon-skype"></span>
</a>
</div>
</div>
)
}
RandomPageButton.css = style
RandomPageButton.afterDOMLoaded = script
export default (() => RandomPageButton) satisfies QuartzComponentConstructor
SocialShare.css = style;
SocialShare.afterDOMLoaded = script;
export default (() => SocialShare) satisfies QuartzComponentConstructor;