1、修复首页分页BUG

2、优化部分页面效果
pull/219/head
Minho 2018-01-27 10:56:23 +08:00
parent b691a2333f
commit c537ada16e
6 changed files with 30 additions and 32 deletions

View File

@ -35,7 +35,7 @@ func (c *HomeController) Index() {
c.Abort("500")
}
if totalCount > 0 {
pager := pagination.NewPagination(c.Ctx.Request,totalCount,conf.PageSize)
pager := pagination.NewPagination(c.Ctx.Request,totalCount,pageSize)
c.Data["PageHtml"] = pager.HtmlPages()
} else {
c.Data["PageHtml"] = ""

View File

@ -692,7 +692,7 @@
display: block;
margin-top: -1px;
top: 100%;
z-index: 1;
z-index: 1000;
}
.ql-snow .ql-color-picker,
.ql-snow .ql-icon-picker {

View File

@ -22,6 +22,7 @@
{{else}}
<link href="{{cdncss "/static/highlight/styles/zenburn.css"}}" rel="stylesheet">
{{end}}
<link href="{{cdncss "/static/katex/katex.min.css"}}" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
@ -44,7 +45,7 @@
{{if gt .Model.RelationshipId 0}}
{{if eq .Model.RoleId 0 1 2}}
<div class="dropdown pull-right">
<a href="{{urlfor "DocumentController.Edit" ":key" .Model.Identify ":id" ""}}" class="btn btn-default">编辑</a>
<a href="{{urlfor "DocumentController.Edit" ":key" .Model.Identify ":id" ""}}" class="btn btn-default"><i class="fa fa-edit" aria-hidden="true"></i> 编辑</a>
</div>
{{end}}
{{end}}
@ -59,7 +60,7 @@
</div>
<div class="dropdown pull-right" style="margin-right: 10px;">
<button type="button" class="btn btn-primary" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
下载 <span class="caret"></span>
<i class="fa fa-cloud-download" aria-hidden="true"></i> 下载 <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel" style="margin-top: -5px;">
<li><a href="{{urlfor "DocumentController.Export" ":key" .Model.Identify "output" "pdf"}}" target="_blank">PDF</a> </li>
@ -270,6 +271,7 @@
<script src="{{cdnjs "/static/js/jquery.highlight.js"}}" type="text/javascript"></script>
<script src="{{cdnjs "/static/js/kancloud.js"}}" type="text/javascript"></script>
<script src="{{cdnjs "/static/js/splitbar.js"}}" type="text/javascript"></script>
<script src="{{cdnjs "/static/katex/katex.min.js"}}" type="text/javascript"></script>
<script type="text/javascript">
active_book_id = {{.Model.Identify}};
active_doc_id = {{.DocumentId}};

View File

@ -41,7 +41,7 @@
<body>
<div class="m-manual manual-editor">
<div class="manual-head" id="editormd-tools">
<div class="manual-head" id="editormd-tools" style="min-width: 1200px;">
<div class="editormd-group">
<a href="{{urlfor "BookController.Index"}}" data-toggle="tooltip" data-title="返回"><i class="fa fa-chevron-left" aria-hidden="true"></i></a>
</div>
@ -111,7 +111,7 @@
</div>
<div class="manual-tree" id="sidebar"> </div>
</div>
<div class="manual-editor-container" id="manualEditorContainer">
<div class="manual-editor-container" id="manualEditorContainer" style="min-width: 920px;">
<div class="manual-editormd">
<div id="docEditor" class="manual-editormd-active"></div>
</div>

View File

@ -30,10 +30,11 @@
<link href="{{cdncss "/static/css/markdown.css"}}" rel="stylesheet">
<link href="{{cdncss "/static/prettify/themes/atelier-estuary-dark.min.css"}}" rel="stylesheet">
<link href="{{cdncss "/static/css/markdown.preview.css"}}" rel="stylesheet">
{{/*<link href="/static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/prettify.css" rel="stylesheet">*/}}
<link href="/static/katex/katex.min.css" rel="stylesheet">
<link href="/static/quill/quill.core.css" rel="stylesheet">
<link href="/static/quill/quill.snow.css" rel="stylesheet">
<link href="{{cdncss "/static/katex/katex.min.css"}}" rel="stylesheet">
<link href="{{cdncss "/static/quill/quill.core.css"}}" rel="stylesheet">
<link href="{{cdncss "/static/quill/quill.snow.css"}}" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
@ -50,6 +51,13 @@
outline:none;
padding: 5px 5px 30px 5px;
}
#docEditor p{
margin-bottom: 14px;
line-height: 1.7em;
font-size: 14px;
color: #5D5D5D;
}
.ql-picker-options{z-index: 99999;}
.btn-info{background-color: #ffffff !important;}
.btn-info>i{background-color: #cacbcd !important; color: #393939 !important; box-shadow: inset 0 0 0 1px transparent,inset 0 0 0 0 rgba(34,36,38,.15);}
.editor-wrapper>pre{padding: 0;}
@ -182,7 +190,7 @@
<body>
<div class="m-manual manual-editor">
<div class="manual-head btn-toolbar" id="editormd-tools" style="min-width: 1360px;" data-role="editor-toolbar" data-target="#editor">
<div class="manual-head btn-toolbar" id="editormd-tools" style="min-width: 1260px;" data-role="editor-toolbar" data-target="#editor">
<div class="editor-group">
<a href="{{urlfor "BookController.Index"}}" data-toggle="tooltip" data-title="返回"><i class="fa fa-chevron-left" aria-hidden="true"></i></a>
</div>
@ -194,9 +202,6 @@
<a href="javascript:;" data-toggle="tooltip" data-title="撤销 (Ctrl-Z)" class="ql-undo"><i class="fa fa-undo first" name="undo" unselectable="on"></i></a>
<a href="javascript:;" data-toggle="tooltip" data-title="重做 (Ctrl-Y)" class="ql-redo"><i class="fa fa-repeat last" name="redo" unselectable="on"></i></a>
</div>
<div class="editor-group">
<select data-toggle="tooltip" data-title="字体" title="字体" class="ql-font editor-item-select editor-item-single-select"></select>
</div>
<div class="editor-group">
<select data-toggle="tooltip" data-title="字号" title="字号" class="ql-size editor-item-select editor-item-single-select"></select>
</div>
@ -247,9 +252,9 @@
</div>
<div class="manual-tree" id="sidebar"> </div>
</div>
<div class="manual-editor-container" id="manualEditorContainer" style="min-width: 1060px;">
<div class="manual-editor-container" id="manualEditorContainer" style="min-width: 980px;">
<div class="manual-editormd" style="bottom: 0;">
<div id="docEditor" class="manual-editormd-active ql-editor ql-blank"></div>
<div id="docEditor" class="manual-editormd-active ql-editor ql-blank editor-content"></div>
<div class="manual-editor-status" style="border-top: 1px solid #DDDDDD;">
<div id="attachInfo" class="item">0 个附件</div>
</div>
@ -370,23 +375,16 @@
<script src="{{cdnjs "/static/bootstrap/js/bootstrap.min.js"}}"></script>
<script src="{{cdnjs "/static/webuploader/webuploader.min.js"}}" type="text/javascript"></script>
<script src="{{cdnjs "/static/jstree/3.3.4/jstree.min.js"}}" type="text/javascript"></script>
{{/*<script src="/static/bootstrap/plugins/bootstrap-wysiwyg/external/jquery.hotkeys.js"></script>*/}}
{{/*<script src="/static/bootstrap/plugins/bootstrap-wysiwyg/bootstrap-wysiwyg.js" type="text/javascript"></script>*/}}
{{/*<script src="/static/bootstrap/plugins/bootstrap-wysiwyg/external/google-code-prettify/prettify.js"></script>*/}}
<script src="/static/katex/katex.min.js" type="text/javascript"></script>
<script src="/static/to-markdown/dist/to-markdown.js" type="text/javascript"></script>
<script src="/static/quill/quill.js" type="text/javascript"></script>
<script src="/static/quill/quill.icons.js"></script>
<script src="{{cdnjs "/static/katex/katex.min.js"}}" type="text/javascript"></script>
<script src="{{cdnjs "/static/to-markdown/dist/to-markdown.js"}}" type="text/javascript"></script>
<script src="{{cdnjs "/static/quill/quill.js"}}" type="text/javascript"></script>
<script src="{{cdnjs "/static/quill/quill.icons.js"}}" type="text/javascript"></script>
<script src="{{cdnjs "/static/layer/layer.js"}}" type="text/javascript" ></script>
<script src="{{cdnjs "/static/js/jquery.form.js"}}" type="text/javascript"></script>
<script src="/static/js/editor.js" type="text/javascript"></script>
<script src="/static/js/quill.js" type="text/javascript"></script>
<script src="{{cdnjs "/static/js/editor.js"}}" type="text/javascript"></script>
<script src="{{cdnjs "/static/js/quill.js"}}" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$(".editor-code").on("dblclick",function () {
var code = $(this).html();
$("#createCodeToolbarModal").find("textarea").val(code);

View File

@ -1,6 +1,6 @@
<header class="navbar navbar-static-top navbar-fixed-top manual-header" role="banner">
<div class="container">
<div class="navbar-header col-sm-12 col-md-10 col-lg-8">
<div class="navbar-header col-sm-12 col-md-9 col-lg-8">
<a href="/" class="navbar-brand" title="{{.SITE_NAME}}">
{{if .SITE_TITLE}}
{{.SITE_TITLE}}
@ -8,7 +8,7 @@
{{.SITE_NAME}}
{{end}}
</a>
<nav class="collapse navbar-collapse">
<nav class="collapse navbar-collapse col-sm-10">
<ul class="nav navbar-nav">
<li>
<a href="{{urlfor "HomeController.Index" }}" title="首页">首页</a>
@ -27,8 +27,6 @@
</div>
</nav>
<div class="btn-group dropdown-menu-right pull-right slidebar visible-xs-inline-block visible-sm-inline-block">
<button class="btn btn-default dropdown-toggle hidden-lg" type="button" data-toggle="dropdown"><i class="fa fa-align-justify"></i></button>
<ul class="dropdown-menu" role="menu">