Code Monkey home page Code Monkey logo

duoshuo-disqus-theme's Introduction

Disque作为国外很出名一款第三方评论系统,之前一直想使用,因为体验和主题我都很喜欢。但是前一段时间disqus完全被墙了,没办法使用,于是继续使用多说下去。于是写了一个disqus评论框的样式,并把多说的所有css本地化。

开源项目地址: ihewro/Duoshuo-Disqus-theme

使用说明

评论加载的图片地址: loading

建议存到你的空间上面去。在css里面搜索替换一下就好了!

修改comments.php

var duoshuoQuery 的选项里面增加一个theme:"none"的选项来禁止加载多说系统自带的css。

代码示例:

var duoshuoQuery = {short_name:"hewro",theme:"none"};

修改 duoshuo-disqus.csscss文件

.ds-header.ds-gradient-bg:after 里面的width 根据你的“热门评论”自定义文字的长度来设置。

修改embed.js

  • 搜索 <form method="post"> 改成 <form id="commenthw" method="post">(加上id,我们才能对其进行加上css)

  • 搜索

	this.el.find(".ds-comments-tab-" + a).html(this.el.hasClass("ds-narrow") ? '<span class="ds-service-icon ds-' + a + '"></span>' + i: (i ? '<span class="ds-highlight">' + i + "</span>": "0") + s[a][1])

改成

this.el.find(".ds-comments-tab-" + a).html(this.el.hasClass("ds-narrow") ? '<span class="ds-highlight">' + i + '</span>' + s[a][1]: (i ? '<span class="ds-highlight">' + i + "</span>": "0") + s[a][1])

(这个改动是让手机端显示X条评论的地方不是只显示评论数而是和电脑端一样的显示x条评论)

截图

2016-10-22_112331.jpg

duoshuo-disqus-theme's People

Contributors

ihewro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

duoshuo-disqus-theme's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.