How to add buttons will be shared in VK and OK?

How to add buttons to share in social networks VK and OK?

1 Like

You can also try

<script type="text/discourse-plugin" version="0.4">

 api.decorateWidget('topic-map:before', dec => {
 const link = window.location.href;
 const urlfb = "" + encodeURIComponent(link);
 const urlok = "" + encodeURIComponent(link);
 const urlvk = "" + encodeURIComponent(link);
 return dec.rawHtml(`
 <div class="test"><a class="fb" href="${urlfb}" target="_blank"><i class="fa fa-facebook fa-lg" aria-hidden="true"></i></a>
 <a class="ok" href="${urlok}" target="_blank"><i class="fa fa-odnoklassniki fa-lg" aria-hidden="true"></i></a>
  <a class="vk" href="${urlvk}" target="_blank"><i class="fa fa-vk fa-lg" aria-hidden="true"></i></a>


.test {
    display: inline-block;
    margin-top: -50px;
    position: absolute;
.test a.ok{
    margin-left: 15px;
    margin-right: 15px;
.test a{color: #999;}
.test a:hover{color: #666;}

I tried it, do not know right or wrong. Div are, you can change the design as you wish…

1 Like

The theme component to add an extra social button is now ready


This topic was automatically closed after 5 hours. New replies are no longer allowed.