Skip to content

Commit

Permalink
v0.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
zixingyx committed Nov 1, 2021
1 parent b2510d4 commit f2aa809
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
5 changes: 2 additions & 3 deletions css/baolog.css
Expand Up @@ -78,7 +78,7 @@ a:hover {
margin-top: 1em;
}

.thread-content>img {
.thread-content p>img {
max-width: 90% !important;
height: 90% !important;
}
Expand Down Expand Up @@ -158,10 +158,9 @@ a:hover {
.thread-content a {
color: #868e96;
}
.thread-content>img{
.thread-content p>img{
max-height: 100%;
height: 100%;
/*max-width: 80%;*/
height: auto;
display: block;
margin: 20px auto;
Expand Down
19 changes: 0 additions & 19 deletions functions.php
Expand Up @@ -614,25 +614,6 @@ function specs_zan()
die;
}

//add a class name to the post img
function add_responsive_class($content){

$content = mb_convert_encoding($content, 'HTML-ENTITIES', "UTF-8");
$document = new DOMDocument();
libxml_use_internal_errors(true);
$document->loadHTML(utf8_decode($content));

$imgs = $document->getElementsByTagName('img');
foreach ($imgs as $img) {
$img->setAttribute('class','thread-content-img');
}

$html = $document->saveHTML();
return $html;
}
add_filter('the_content', 'add_responsive_class');


//Gravatar缓存头像
//[推荐]七牛镜像源 https://dn-qiniu-avatar.qbox.me/avatar/
//[推荐]WP-China-Yes 镜像源 https://gravatar.wp-china-yes.net/avatar/
Expand Down
2 changes: 1 addition & 1 deletion page-lanzou.php
Expand Up @@ -25,7 +25,7 @@
<button class="btn btn-dark " type="button" id="button-lanzou">开始解析</button>
</div>
</div>
<span class="short-tips text-small text-danger mt-2 d-block">示例链接:https://vpao.lanzouw.com/idwwKve3dzg</span>
<span class="short-tips text-small text-danger mt-2 d-block">示例链接:https://vpao.lanzoui.com/idwwKve3dzg?w</span>
<h5 class="my-4" style="border-left:2px solid #ec1611;padding-left:10px;">解析结果</h5>
<div class="input-group flex-nowrap mt-4">
<div class="input-group-prepend">
Expand Down

0 comments on commit f2aa809

Please sign in to comment.