mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-06-28 15:45:35 +08:00
优化单页打印
This commit is contained in:
parent
c50895d6ba
commit
d0d7af0ff1
@ -139,6 +139,7 @@ table>tbody>tr:hover{
|
|||||||
border-right: 1px solid #ddd;
|
border-right: 1px solid #ddd;
|
||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
}
|
}
|
||||||
|
|
||||||
.m-manual .manual-tab .tab-navg {
|
.m-manual .manual-tab .tab-navg {
|
||||||
zoom:1;border-bottom: 1px solid #ddd
|
zoom:1;border-bottom: 1px solid #ddd
|
||||||
}
|
}
|
||||||
@ -467,6 +468,7 @@ table>tbody>tr:hover{
|
|||||||
min-width: inherit;
|
min-width: inherit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.manual-article .article-content .article-body{
|
.manual-article .article-content .article-body{
|
||||||
min-height: 90px;
|
min-height: 90px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
@ -2,6 +2,7 @@ body {
|
|||||||
position: relative;
|
position: relative;
|
||||||
font-family: Verdana, "Lantinghei SC", "Hiragino Sans GB", "Microsoft Yahei", Helvetica, arial, \5b8b\4f53, sans-serif;
|
font-family: Verdana, "Lantinghei SC", "Hiragino Sans GB", "Microsoft Yahei", Helvetica, arial, \5b8b\4f53, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
a{
|
a{
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
6
static/css/print.css
Normal file
6
static/css/print.css
Normal file
@ -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 -->
|
<!-- Bootstrap -->
|
||||||
<link href="{{cdncss "/static/bootstrap/css/bootstrap.min.css"}}" rel="stylesheet">
|
<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/jstree/3.3.4/themes/default/style.min.css"}}" rel="stylesheet">
|
||||||
|
|
||||||
<link href="{{cdncss "/static/nprogress/nprogress.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/css/markdown.preview.css"}}" rel="stylesheet">
|
||||||
<link href="{{cdncss "/static/highlight/styles/vs.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/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 -->
|
<!-- 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:// -->
|
<!-- 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>
|
<span style="font-size: 12px;font-weight: 100;"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-header pull-right manual-menu">
|
<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 .Member.MemberId 0}}
|
||||||
{{if gt .Model.RelationshipId 0}}
|
{{if gt .Model.RelationshipId 0}}
|
||||||
{{if eq .Model.RoleId 0 1 2}}
|
{{if eq .Model.RoleId 0 1 2}}
|
||||||
@ -59,7 +62,7 @@
|
|||||||
<div class="dropdown pull-right" style="margin-right: 10px;">
|
<div class="dropdown pull-right" style="margin-right: 10px;">
|
||||||
{{if eq .Model.PrivatelyOwned 0}}
|
{{if eq .Model.PrivatelyOwned 0}}
|
||||||
{{if .Model.IsEnableShare}}
|
{{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}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
@ -292,7 +295,14 @@ $(function () {
|
|||||||
return $(body).highlight(window.keyword);
|
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>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user