Add Telegram
parent
2aa431ff95
commit
7d07c4fe67
|
@ -13,6 +13,7 @@ interface PublishPreset {
|
|||
type UrlBuilder = (data: PublishPreset) => string;
|
||||
|
||||
const NETWORKS: { [name: string]: UrlBuilder } = {
|
||||
telegram: (d) => `https://telegram.me/share/url?url=${encodeURIComponent(d.url)}${(d.extra && d.extra.text) ? `&text=${encodeURIComponent(d.extra.text)}` : ''}`,
|
||||
};
|
||||
|
||||
function initShareonChild(child: HTMLElement, preset: PublishPreset) {
|
||||
|
|
|
@ -65,5 +65,14 @@ $width: $button-size - 2*$padding-hor;
|
|||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
|
||||
&.telegram {
|
||||
background-color: #27A7E5;
|
||||
|
||||
&::before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg viewBox='4.4 5 14 14' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M4.987 11.948c3.69-1.487 6.151-2.468 7.382-2.941 3.515-1.352 4.245-1.587 4.721-1.595.105-.002.339.022.491.136a.482.482 0 01.18.317c.017.091.038.299.021.461-.19 1.851-1.015 6.343-1.434 8.417-.177.877-.529 1.065-.867 1.094-.736.062-1.291-.343-2.003-.775-1.114-.675-1.788-.987-2.869-1.646-1.25-.762-.15-1.118.562-1.802.186-.179 3.371-3.042 3.357-3.128-.005-.032-.099-.34-.173-.401s-.184-.04-.262-.024c-.112.024-1.892 1.112-5.339 3.264-.506.321-.963.477-1.373.469-.452-.009-1.321-.236-1.968-.43-.792-.239-1.085-.351-1.03-.756.028-.211.23-.431.604-.66z'/%3E%3C/svg%3E");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue