Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Commit

Permalink
添加留言
Browse files Browse the repository at this point in the history
  • Loading branch information
bajins committed Aug 7, 2019
1 parent 221cfa1 commit 67de302
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
- 添加对锚点定位支持,使用方式:在链接后面加上`#标签的id`
> 示例链接:https://file.woytu.com/?dir=DeveloperTool#Xshell
- 化繁为简:去除顶部链接,如果需要顶部链接版本,请看分支[top-links](https://github.com/woytu/DirectoryLister/tree/top-links)
- 添加聊天室
- 添加留言

![新旧式样手机效果对比](/sample-graph.png)

Expand Down
67 changes: 63 additions & 4 deletions resources/themes/bootstrap/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@
<div class="Box-header px-2 clearfix">
<h3 class="Box-title pr-3">
<svg class="octicon octicon-book" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
<path fill-rule="evenodd" d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z">
<path fill-rule="evenodd"
d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z">
</path>
</svg> README
</h3>
Expand All @@ -137,6 +138,19 @@
?>
<!-- READMNE end -->

<!-- 留言 -->
<!-- Valine -->
<div id="vcomments"></div>

<!-- 来必力 -->
<!-- <div id="lv-container" data-id="city" data-uid="MTAyMC80NTE3MC8yMTY4OA=="></div> -->

<!-- Gitalk -->
<!-- <div id="gitalk-container"></div> -->

<!-- Gitment -->
<!-- <div id="gitment-container"></div> -->

</div>

<!-- footer start -->
Expand All @@ -160,7 +174,9 @@
}

function anchorPositioning() {
var url = window.location.href; //获取整个 URL 为字符串。
// 获取整个 URL 为字符串。
var url = window.location.href;
// 判断URL中是否带#号
if (url.indexOf("#") != -1) {
var divId = url.split("#")[1];
// document.getElementById(divId).scrollIntoView(true);
Expand All @@ -183,8 +199,6 @@ function changeDivHeight() {
ClientHeight_top = container_top.clientHeight + 60;
ClientHeight_top1 = ClientHeight_top + 69;
ClientHeight_top2 = ClientHeight_top1 - 60;

//console.log(ScrollHeight_body, InnerHeight_window, container_top.clientHeight, ClientHeight_top, ClientHeight_top1, ClientHeight_top2, InnerHeight_window);
container_top.style.minHeight = '';

if (ScrollHeight_body > ClientHeight_top2) {
Expand Down Expand Up @@ -227,6 +241,51 @@ function changeDivHeight() {
}
</script>

<!-- Valine https://valine.js.org/ -->
<script src='//unpkg.com/valine/dist/Valine.min.js'></script>
<script>
new Valine({
el: '#vcomments',
appId: 'm9S5QXsdju39LvMs8ooRRIiF-MdYXbMMI',
appKey: 'UfBRjySkb4bjPiFuH0Pxe3a9'
})

// 来必力 https://www.livere.com
/*(function (d, s) {
var j, e = d.getElementsByTagName(s)[0];
if (typeof LivereTower === 'function') {
return;
}
j = d.createElement(s);
j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
j.async = true;
e.parentNode.insertBefore(j, e);
})(document, 'script');*/

// Gitalk unpkg.com/docsify/lib/plugins/gitalk.min.js
/*const gitalk = new Gitalk({
clientID: '40cfe11992c4ef076a4b',
clientSecret: 'b43dc6b3740a306bec40c25c2db1ecc6c02e7716',
repo: 'woytu.github.io',
owner: 'woytu',
admin: ['woytu'],
// facebook-like distraction free mode
distractionFreeMode: false
});*/

// Gitment https://imsun.net/posts/gitment-introduction/
/*var gitment = new Gitment({
//id: '页面 ID', // 可选。默认为 location.href
owner: 'woytu',
repo: 'woytu.github.io',
oauth: {
client_id: '40cfe11992c4ef076a4b',
client_secret: 'b43dc6b3740a306bec40c25c2db1ecc6c02e7716',
},
});*/
</script>

<!-- https://gitter.im -->
<script>
((window.gitter = {}).chat = {}).options = {
//room替换成自己的聊天室名称即可,room的名称规则是:username/roomname
Expand Down

0 comments on commit 67de302

Please sign in to comment.