mirror of https://github.com/mindoc-org/mindoc.git
优化单页打印
parent
c50895d6ba
commit
d0d7af0ff1
|
@ -139,6 +139,7 @@ table>tbody>tr:hover{
|
|||
border-right: 1px solid #ddd;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
.m-manual .manual-tab .tab-navg {
|
||||
zoom:1;border-bottom: 1px solid #ddd
|
||||
}
|
||||
|
@ -467,6 +468,7 @@ table>tbody>tr:hover{
|
|||
min-width: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.manual-article .article-content .article-body{
|
||||
min-height: 90px;
|
||||
padding: 5px;
|
||||
|
|
|
@ -2,6 +2,7 @@ body {
|
|||
position: relative;
|
||||
font-family: Verdana, "Lantinghei SC", "Hiragino Sans GB", "Microsoft Yahei", Helvetica, arial, \5b8b\4f53, sans-serif;
|
||||
}
|
||||
|
||||
a{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
body {font-size: 12pt !important;}
|
||||
.m-manual .manual-left,.navbar {display: none;}
|
||||
.m-manual .manual-right{left: 0;}
|
||||
pre, code {white-space: pre-wrap !important;word-wrap: break-word !important;}
|
||||
a:link, a:visited {color: blue !important;text-decoration: underline !important;}
|
||||
body a:link:after, body a:visited:after {content: " (" attr(href) ") ";}
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<!-- Bootstrap -->
|
||||
<link href="{{cdncss "/static/bootstrap/css/bootstrap.min.css"}}" rel="stylesheet">
|
||||
<link href="{{cdncss "/static/font-awesome/css/font-awesome.min.css"}}" rel="stylesheet">
|
||||
|
||||
<link href="{{cdncss "/static/jstree/3.3.4/themes/default/style.min.css"}}" rel="stylesheet">
|
||||
|
||||
<link href="{{cdncss "/static/nprogress/nprogress.css"}}" rel="stylesheet">
|
||||
|
@ -26,6 +26,8 @@
|
|||
<link href="{{cdncss "/static/css/markdown.preview.css"}}" rel="stylesheet">
|
||||
<link href="{{cdncss "/static/highlight/styles/vs.css"}}" rel="stylesheet">
|
||||
<link href="{{cdncss "/static/katex/katex.min.css"}}" rel="stylesheet">
|
||||
<link href="{{cdncss "/static/css/print.css"}}" media="print" rel="stylesheet">
|
||||
<link href="{{cdncss "/static/font-awesome/css/font-awesome.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,6 +46,7 @@
|
|||
<span style="font-size: 12px;font-weight: 100;"></span>
|
||||
</div>
|
||||
<div class="navbar-header pull-right manual-menu">
|
||||
<button id="printSinglePage" class="btn btn-default" style="margin-right: 10px;"><i class="fa fa-print"></i> 打印</button>
|
||||
{{if gt .Member.MemberId 0}}
|
||||
{{if gt .Model.RelationshipId 0}}
|
||||
{{if eq .Model.RoleId 0 1 2}}
|
||||
|
@ -59,7 +62,7 @@
|
|||
<div class="dropdown pull-right" style="margin-right: 10px;">
|
||||
{{if eq .Model.PrivatelyOwned 0}}
|
||||
{{if .Model.IsEnableShare}}
|
||||
<button type="button" class="btn btn-success" data-toggle="modal" data-target="#shareProject"><i class="fa fa-share-alt" aria-hidden="true"></i> 分享</button>
|
||||
<button type="button" class="btn btn-success" data-toggle="modal" data-target="#shareProject"><i class="fa fa-share-square" aria-hidden="true"></i> 分享</button>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
|
@ -292,7 +295,14 @@ $(function () {
|
|||
return $(body).highlight(window.keyword);
|
||||
});
|
||||
});
|
||||
|
||||
//打印设置
|
||||
$("#printSinglePage").on("click",function () {
|
||||
var body = $("body");
|
||||
var bodyContent = body.html();
|
||||
body.html($(".manual-right").html());
|
||||
window.print();
|
||||
body.html(bodyContent);
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue