Skip to content

Instantly share code, notes, and snippets.

@taotiwordpress
Created August 26, 2020 19:12
Show Gist options
  • Save taotiwordpress/af83db2c7669e59140621a15ee85d5ea to your computer and use it in GitHub Desktop.
Save taotiwordpress/af83db2c7669e59140621a15ee85d5ea to your computer and use it in GitHub Desktop.
[share functionality] simple share functionality snippet #html #php
<a href="https://www.facebook.com/sharer.php?u=<?php the_permalink();?>">
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="15" viewBox="0 0 8 15">
<path id="Color_Overlay" data-name="Color Overlay"
d="M2.357,15V8.166H0V5.493H2.363V3.525A3.255,3.255,0,0,1,5.885,0,19.38,19.38,0,0,1,8,.107V2.493H6.557c-1.141,0-1.361.525-1.361,1.3v1.7H7.92L7.566,8.166H5.2V15Z"
fill="#4a3b03" />
</svg>
</a>
<a href="https://twitter.com/share?url=<?php the_permalink();?>&text=<?php the_title();?>">
<svg xmlns="http://www.w3.org/2000/svg" width="17" height="15" viewBox="0 0 17 15">
<path id="Color_Overlay" data-name="Color Overlay"
d="M0,13.3a6.494,6.494,0,0,0,.829.056,6.642,6.642,0,0,0,4.333-1.622A3.534,3.534,0,0,1,1.908,9.108a2.994,2.994,0,0,0,.657.069,3.352,3.352,0,0,0,.919-.132A3.722,3.722,0,0,1,.689,5.33V5.282a3.241,3.241,0,0,0,1.576.47A3.87,3.87,0,0,1,.714,2.6,4.042,4.042,0,0,1,1.186.693,9.649,9.649,0,0,0,8.371,4.65a4.279,4.279,0,0,1-.089-.866A3.644,3.644,0,0,1,11.767,0a3.376,3.376,0,0,1,2.547,1.2A6.663,6.663,0,0,0,16.527.277,3.777,3.777,0,0,1,15,2.371a6.6,6.6,0,0,0,2-.6,7.5,7.5,0,0,1-1.742,1.962c.012.167.012.326.012.493,0,5-3.5,10.771-9.916,10.771A9.347,9.347,0,0,1,0,13.3Z"
fill="#4a3b03" />
</svg>
</a>
<a href="https://www.linkedin.com/shareArticle?url=<?php the_permalink();?>&title=<?php the_title();?>">
<svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 17 17">
<g id="linkedin_icon" data-name="linkedin icon" transform="translate(0.328)">
<path id="Color_Overlay" data-name="Color Overlay"
d="M6.018,17V5.587H9.393V7.148h.046a3.69,3.69,0,0,1,3.33-1.842c3.564,0,4.222,2.361,4.222,5.429v6.256H13.48V11.45c0-1.325-.022-3.023-1.833-3.023-1.83,0-2.112,1.438-2.112,2.931V17Zm10.974-.009H17ZM.28,16.922V5.518H3.807v11.4ZM0,2.055A2.044,2.044,0,1,1,2.044,4.11,2.051,2.051,0,0,1,0,2.055Z"
transform="translate(-0.328 0)" fill="#4a3b03" />
</g>
</svg>
</a>
<a href="mailto:?subject=I wanted you to see this site&amp;body=Check out this site <?php the_permalink();?>.">
<svg xmlns="http://www.w3.org/2000/svg" width="17.99" height="13.492" viewBox="0 0 17.99 13.492">
<g id="envelope_1_" data-name="envelope (1)" transform="translate(0 -64)">
<g id="Group_7" data-name="Group 7" transform="translate(0 64)">
<g id="Group_6" data-name="Group 6" transform="translate(0 0)">
<path id="Path_26" data-name="Path 26"
d="M7.046,65.095c2.469,2.091,6.8,5.77,8.075,6.917a.752.752,0,0,0,1.088,0c1.274-1.148,5.607-4.827,8.076-6.918a.375.375,0,0,0,.053-.517A1.488,1.488,0,0,0,23.161,64H8.17a1.488,1.488,0,0,0-1.176.578A.374.374,0,0,0,7.046,65.095Z"
transform="translate(-6.671 -64)" fill="#4a3b03" />
<path id="Path_27" data-name="Path 27"
d="M17.772,126.446a.373.373,0,0,0-.4.054c-2.738,2.321-6.233,5.3-7.332,6.287a1.518,1.518,0,0,1-2.092,0c-1.172-1.056-5.1-4.392-7.331-6.286a.375.375,0,0,0-.617.286v9.425a1.5,1.5,0,0,0,1.5,1.5H16.49a1.5,1.5,0,0,0,1.5-1.5v-9.425A.375.375,0,0,0,17.772,126.446Z"
transform="translate(0 -124.219)" fill="#4a3b03" />
</g>
</g>
</g>
</svg>
</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment