-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
演示页面 #4
Comments
文章评论演示与正文一样,也支持Markdown语法,正文能实现的功能,评论都能实现,同样也支持单条评论点赞(见右上角) |
评论编写支持预览,且比GitHub的预览功能更强大,支持公式的预览 比如$$a^2 + b^2 = c^2$$ |
支持行内公式$E = mc^2$ |
一页最多显示10条评论。在文章浏览页面,一页最多显示10篇文章 |
感觉很好,以及搭起来来了 |
123123123 |
@RealKiro 换成渲染过后的内容感觉不太美观,你可以修改 Issue.prototype = {
// ...
show: function(request_url) {
var issue = this;
$.ajax({
type: 'get',
// 新增请求header,可以直接从github上直接获得渲染过后的html格式信息
headers: {
Accept: 'application/vnd.github.squirrel-girl-preview, application/vnd.github.html+json, application/x-www-form-urlencoded',
},
url: request_url + 'page=' + self.options.page + '&per_page=10',
success: function(data) {
if (self.options.q == undefined || self.options.q == null) {
if (data.length == 0) {
document.getElementById('issue-list').innerHTML = '这个人很勤快但这里什么都还没写~';
$('.footer').css('position', 'absolute');
} else {
issue.addItem(data);
}
} else {
if (data.items.length == 0) {
window.location.href = '404.html';
} else {
issue.addItem(data.items);
}
var html = document.getElementById('issue-list').innerHTML;
var newHtml;
if(self.options.q != '')
newHtml = html.replaceAll(self.options.q, '<font style="background-color:yellow;">' + self.options.q + '</font>');
else
newHtml = html;
document.getElementById('issue-list').innerHTML = newHtml;
}
}
});
} |
ps:不太美观可能是字体太大盖过了标题?有没有可能缩放显示(毕竟只是预览)?(大雾 |
@RealKiro 🉑 我抽空试试看,最近在忙毕业设计 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gitblog
一个简单的页面功能展示。
文章发表支持Markdown语法:
一级标题
二级标题
三级标题
四级标题
五级标题
六级标题
表格绘制
图片插入
引用
代码块
字体样式
加粗
斜体
斜体加粗
划去分割线
超链接
百度一下,你就知道
列表
MathJax公式显示
其他
The text was updated successfully, but these errors were encountered: