wangriyu / social-share

一款分享插件

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

social-share

一款分享插件

字体

来源: icon-fonts http://www.iconfont.cn

在线:

  <link href="//at.alicdn.com/t/font_635087_ef20v4flda62yb9.css" rel="stylesheet">

本地(引入 fonts):

  <link href="src/css/iconfont.css" rel="stylesheet">

效果

Demo

Blog

gif

使用

在 head 引入:

  <!--<link href='//at.alicdn.com/t/font_635087_ef20v4flda62yb9.css' rel='stylesheet'>-->
  <link href='src/css/iconfont.css' rel='stylesheet'>
  <link rel='stylesheet' href='src/css/spongebob.min.css' type='text/css' media='all'/>

在 body 中插入:

<div>
  <div class='social_share'>
    <ul id='social_list' class='social_icon_list'></ul>
  </div>
  <script>
    /*
    * title, url, author, img 必填
    * services 选填,false 关闭相应分享
    */
    var shareConfig = {
      title: 'Wang RiYu\'s Blog',
      url: window.location.href,
      author: '鱼乐',
      img: 'http://blog.wangriyu.wang/img/yule.jpg',
      services: {
        facebook: false,
        wechat: true,
        twitter: true,
        weibo: true,
        qq: true,
        qzone: true,
        douban: true,
        youdao: true,
        google: false,
        linkedin: true,
        copy: true,
        mail: true
      }
    }
    // var shareConfig = {
    //   title: '<%= post.title %>',
    //   url: window.location.href,
    //   author: '<%= config.author %>',
    //   img: 'https:<%=theme.avatar%>'
    // }
  </script>
  <script src='src/js/qrcode.min.js'></script>
  <script src='src/js/spongebob.min.js'></script>
</div>

About

一款分享插件

License:MIT License


Languages

Language:CSS 54.6%Language:JavaScript 39.8%Language:HTML 5.6%