|
@@ -0,0 +1,77 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
|
+ <title>{$info['title'] ?? ''}</title>
|
|
|
+ <link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico"/>
|
|
|
+ <style>
|
|
|
+ html, body, div, span, applet, object, iframe,
|
|
|
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
|
|
+ a, abbr, acronym, address, big, cite, code,
|
|
|
+ del, dfn, em, img, ins, kbd, q, s, samp,
|
|
|
+ small, strike, sub, sup, tt, var,
|
|
|
+ u, i, center,
|
|
|
+ dl, dt, dd, ol, ul, li,
|
|
|
+ fieldset, form, label, legend,
|
|
|
+ table, caption, tbody, tfoot, thead, tr, th, td,
|
|
|
+ article, aside, canvas, details, embed,
|
|
|
+ figure, figcaption, footer, header, hgroup,
|
|
|
+ menu, nav, output, ruby, section, summary,
|
|
|
+ time, mark, audio, video {
|
|
|
+ margin: 0;
|
|
|
+ padding: 0;
|
|
|
+ border: 0;
|
|
|
+ font-size: 100%;
|
|
|
+ font: inherit;
|
|
|
+ vertical-align: baseline;
|
|
|
+ box-sizing: border-box;
|
|
|
+ font-family: Source Han Sans CN;
|
|
|
+ }
|
|
|
+ .title{
|
|
|
+ font-weight: 600;
|
|
|
+ font-size: 18px;
|
|
|
+ color: #0a0a0a;
|
|
|
+ padding: 5px 10px;
|
|
|
+ }
|
|
|
+ .time{
|
|
|
+ font-size: 12px;
|
|
|
+ color: #999999;
|
|
|
+ font-weight: 400;
|
|
|
+ padding: 5px 10px;
|
|
|
+ }
|
|
|
+ .page{
|
|
|
+ padding: 10px;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 25px;
|
|
|
+ color:#333;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div class="title">{$info['title'] ?? ''}</div>
|
|
|
+<div class="time">{$info['create_time_text'] ?? ''}</div>
|
|
|
+<div class="page">
|
|
|
+ {$info['content'] ?? ''}
|
|
|
+</div>
|
|
|
+<script src="/assets/js/jquery-3.1.1.min.js"></script>
|
|
|
+<script>
|
|
|
+ function replaceDetail(){
|
|
|
+ var details = $('.page').html();
|
|
|
+ //newContent仅是details替换后内容;
|
|
|
+ let newContent = details.replace(/<img[^>]*>/gi, function (match, capture) { //去除三标签
|
|
|
+ match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
|
|
|
+ match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
|
|
|
+ match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
|
|
|
+ return match;
|
|
|
+ });
|
|
|
+ newContent = newContent.replace(/<br[^>]*\/>/gi, '');
|
|
|
+ newContent = newContent.replace(/<img/gi, '<img style="max-width:100%;height:auto;display:block;margin:0 auto;"');
|
|
|
+ $('.page').html('');
|
|
|
+ $('.page').html(newContent);
|
|
|
+ }
|
|
|
+ replaceDetail();
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|