Skip to content

Commit

Permalink
some modify
Browse files Browse the repository at this point in the history
  • Loading branch information
xCss committed Oct 18, 2017
1 parent ab05b4e commit 7968705
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 16 deletions.
2 changes: 1 addition & 1 deletion dist/Valine.min.js

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/Valine.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* @Valine
* Author: xCss
* Github: https://github.com/xCss/Valine
* Website: https://valine.js.org
*/
require('./Valine.scss');
const md5 = require('blueimp-md5');
import marked from 'marked';
Expand Down Expand Up @@ -202,7 +208,7 @@ class Valine {
_vcard.setAttribute('class', 'vcard');
_vcard.setAttribute('id', ret.id);
let _img = `${v2cdn}${md5(ret.get('mail'))}?s=40`;
_vcard.innerHTML = `<img class="vimg" src='${_img}'><section><div class="vhead"><a rel="nofollow" href="${getLink({link:ret.get('link') ,mail:ret.get('mail')})}" target="_blank" >${ret.get("nick")}</a><span class="vtime">${timeAgo(ret.get("createdAt"))}</span><span rid='${ret.id}' at='@${ret.get('nick')}' mail='${ret.get('mail')}' class="vat">回复</span></div><div class="vcontent">${ret.get("comment")}</div><div class="vfooter"><div></section>`;
_vcard.innerHTML = `<img class="vimg" src='${_img}'><section><div class="vhead"><a rel="nofollow" href="${getLink({link:ret.get('link') ,mail:ret.get('mail')})}" target="_blank" >${ret.get("nick")}</a></div><div class="vcontent">${ret.get("comment")}</div><div class="vfooter"><span class="vtime">${timeAgo(ret.get("createdAt"))}</span><span rid='${ret.id}' at='@${ret.get('nick')}' mail='${ret.get('mail')}' class="vat">回复</span><div></section>`;
let _vlist = _root.el.querySelector('.vlist');
let _vlis = _vlist.querySelectorAll('li');
let _vat = _vcard.querySelector('.vat');
Expand Down
34 changes: 20 additions & 14 deletions src/Valine.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* @Valine
* Author: xCss
* Github: https://github.com/xCss/Valine
* Website: https://valine.js.org
*/
.valine {
* {
box-sizing: border-box;
Expand Down Expand Up @@ -223,23 +229,22 @@
color: #D7191A;
}
}
.vtime {
color: #b3b3b3;
font-size: .75rem;
margin-right:.875rem;
}
.vat {
font-size: .875rem;
color: #999;
padding: 0 5px;
cursor: pointer;
&:hover {
color: #D7191A;
}
}
}
section {
overflow: hidden;
.vfooter{
position:relative;
.vtime {
color: #b3b3b3;
font-size: .75rem;
margin-right:.875rem;
}
.vat {
font-size: .8125rem;
color: #ef2f11;
cursor: pointer;
}
}
}
.vcontent {
word-wrap: break-word;
Expand All @@ -249,6 +254,7 @@
font-size: .875rem;
line-height: 2;
position: relative;
margin-bottom:.75rem;
a {
font-size: .875rem;
color:#708090;
Expand Down

0 comments on commit 7968705

Please sign in to comment.