105 lines
1.9 KiB
CSS
105 lines
1.9 KiB
CSS
/**
|
|
* AKSRT Print Stylesheet
|
|
*
|
|
* 优化内容打印:隐藏导航、悬浮按钮、侧栏,保留正文和图片。
|
|
*
|
|
* @package AKSRT
|
|
*/
|
|
|
|
@media print {
|
|
/* 隐藏非内容元素 */
|
|
.site-nav,
|
|
.site-footer,
|
|
.footer-tabbar,
|
|
.float-right,
|
|
.float-btn,
|
|
.resource-mobile-fab,
|
|
.resource-mobile-download-bar,
|
|
.sidebar,
|
|
.aksrt-article-sidebar,
|
|
.aksrt-sidebar,
|
|
.widget-area,
|
|
.comments-area,
|
|
.post-navigation,
|
|
.aksrt-breadcrumbs,
|
|
.reading-progress-bar,
|
|
.aksrt-admin-bar,
|
|
#wpadminbar,
|
|
.aksrt-blur-bg {
|
|
display: none !important;
|
|
}
|
|
|
|
/* 正文优化 */
|
|
body {
|
|
font-family: Georgia, "Noto Serif SC", serif;
|
|
font-size: 12pt;
|
|
line-height: 1.6;
|
|
color: #000;
|
|
background: #fff;
|
|
}
|
|
|
|
.site-main,
|
|
.entry-content,
|
|
.article-content {
|
|
max-width: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
/* 标题 */
|
|
h1, h2, h3, h4, h5, h6 {
|
|
page-break-after: avoid;
|
|
page-break-inside: avoid;
|
|
}
|
|
|
|
/* 图片 */
|
|
img {
|
|
max-width: 100% !important;
|
|
height: auto !important;
|
|
page-break-inside: avoid;
|
|
}
|
|
|
|
/* 链接显示 URL */
|
|
a[href^="http"]::after {
|
|
content: " (" attr(href) ")";
|
|
font-size: 0.8em;
|
|
color: #666;
|
|
word-break: break-all;
|
|
}
|
|
|
|
/* 代码块 */
|
|
pre, code {
|
|
page-break-inside: avoid;
|
|
border: 1px solid #ccc;
|
|
padding: 4px;
|
|
}
|
|
|
|
/* 表格 */
|
|
table {
|
|
page-break-inside: avoid;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
th, td {
|
|
border: 1px solid #ccc;
|
|
padding: 6px;
|
|
}
|
|
|
|
/* 资源元信息 */
|
|
.resource-download-box {
|
|
border: 1px solid #ccc;
|
|
padding: 12px;
|
|
margin: 16px 0;
|
|
}
|
|
|
|
.resource-download-box__btn {
|
|
display: none;
|
|
}
|
|
|
|
/* 分页避免 */
|
|
.post-card,
|
|
.entry-card {
|
|
page-break-inside: avoid;
|
|
}
|
|
}
|