diff options
| author | Eltrac <45323514+BigCoke233@users.noreply.github.com> | 2019-07-14 15:15:28 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-14 15:15:28 +0800 |
| commit | 04457c3f793c46c1bd34f8c1c8b1715ccba5f207 (patch) | |
| tree | 1a26ef730200eca79a1839c793d2b7152e97c2ef /libs/Contents.php | |
| parent | 9f76c533f9688c8fb76daf366c651e813093aade (diff) | |
图片懒加载、修复灯箱 BUG、优化某些样式在夜间模式下的显示
Diffstat (limited to 'libs/Contents.php')
| -rw-r--r-- | libs/Contents.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/Contents.php b/libs/Contents.php index a5a2da7..c007d0a 100644 --- a/libs/Contents.php +++ b/libs/Contents.php @@ -10,7 +10,9 @@ class Contents { $text = preg_replace('/<pre><code>/s','<pre><code class="language-html">',$text); $text = preg_replace('/<img(.*?)src="(.*?)"(.*?)alt="(.*?)"(.*?)>/s','<center><a data-fancybox="gallery" href="${2}" class="gallery-link"><img${1}src="${2}"${3}></a></center>',$text); - + //LazyLoad + $text = preg_replace('/<img (.*?)src(.*?)(\/)?>/','<img $1src="/usr/themes/Miracles/images/loading.gif"'.$style.' data-original$2 />',$text); + //解析友链盒子 $reg = '/\[links\](.*?)\[\/links\]/s'; $rp = '<div class="links-box container-fluid"><div class="row">${1}</div></div>'; |
