const previewCss = `body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,p,blockquote,tr,th,td,span{margin:0;padding:0;box-sizing:border-box}.font-normal{font-family:"PingFang SC Regular", "Microsoft YaHei", Tahoma, Helvetica, Arial, sans-serif}.font-bold{font-family:"PingFang SC Semibold", "Microsoft YaHei", Tahoma, Helvetica, Arial, sans-serif}li{list-style:none}em,i,u{font-style:normal}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}fieldset,img{border:0}.page-error{color:#975ee5;font-size:25px;text-align:center;padding:150px 30px}.mb-15{margin-bottom:15px}.report-page{width:793px;height:1122px;margin:0 auto;position:relative;padding:27px 40px 72px;page-break-after:always;font-size:15px;color:#666;font-family:"PingFang SC", Tahoma, Helvetica, Arial, sans-serif}.report-page .page-body{background:#fff;height:1023px;overflow:hidden}.report-page .page-content{margin-top:20px;position:relative}.report-page .page-foot{position:absolute;width:100%;height:72px;bottom:0;left:0;padding:27px 40px;color:#999}.report-page .page-foot .foot-left{float:left}.report-page .page-foot .foot-right{float:right;height:18px;padding-right:120px;position:relative}.report-page .page-foot .page-num{display:block;line-height:18px;font-size:14px}.report-page .page-foot .foot-num-bg{position:absolute;width:110px;height:4px;top:7px;right:0;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAAGCAYAAABNYTWkAAAAj0lEQVRYR2N0Duj4z0BFsHdDBSOycdPjnlLV/MxF0ijm2y74T1XzDycwophvcPo0Vc2/YGqKYr736RKqmr/VtAfF/F9XXKhqPpvOHhTzb968SVXzGUcTJGpuHE2Q+Eun0QSJFj6jJST+BDNaQqKFz2iVjT/BjFbZ+MNntMpGC5/RKnu0yiapSzVaZQ/vKhsAs/ylQ4nC3o8AAAAASUVORK5CYII=);background-size:100% 100%;background-repeat:no-repeat}.report-page .page-chart{min-height:200px;max-height:100%}.report-page .page-title-1{font-size:27px;font-weight:600;color:#435088;line-height:48px}.report-page .page-title-2{font-size:19px;font-weight:600;color:#435088;line-height:27px}.report-table{width:100%;border-spacing:0;border-collapse:collapse;text-align:center}.report-table th{padding:5px 3px;background-color:#3da0ff;color:#fff;line-height:19px}.report-table td{padding:5px 3px;color:#555;line-height:19px}.report-table-border th{border:1px solid #3589d8}.report-table-border td{border:1px solid #e9e9e9}.report-summary .summary-chart{height:260px}.report-summary .page-title-1{display:none}.report-summary .page-content{margin:0}.report-summary .report-title{font-size:27px;font-weight:600;color:#435088;line-height:48px;text-align:center}.report-summary .report-sub-title{text-align:center;margin-bottom:30px;font-size:19px;font-weight:600;color:#435088;line-height:27px}.college-chart{height:234px}.report-college td.td-college{width:170px}.report-college td.td-college>div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}.report-class td.td-class{width:170px}.report-class td.td-class>div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}.report-teacher td.td-teacher{width:90px}.report-teacher td.td-teacher>div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:80px}.report-teacher td.td-class{width:140px}.report-teacher td.td-class>div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:130px}.report-question td.td-question{width:200px}.report-question td.td-question>div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}`;

export default (domeStr) => {
  return `
    <!DOCTYPE html>
    <html lang="zh-cn">
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>知学知考报告</title>
        <style>${previewCss}</style>
      </head>
      <body>${domeStr}</body>
    </html>
  `;
};
