博客主页
博主头像
老姚日记--随心记录,胡乱折腾
:日记,文章收藏

Blog:

老姚日记--随心记录,胡乱折腾
2023年1月28日
你想成为幸福的人吗?但愿你首先学会吃得起苦。——屠格涅夫
最新
无标签
爱一个懂你的人
分类: SuiYu
简介:常有人说:被人懂,是幸运;有人懂,是幸福。这一年尤其难熬,跌跌撞撞,太多心酸无从说起;这个冬天尤其冷,喜怒哀乐,太多情绪起起落落。疲惫的你是不是这样:累了,就一个人躲在寂静的角落里休息?痛了,就一个人在夜色中疗伤?我希望,新的一年,能有个懂你的人,成为你的人间光亮。我一直相信,每个人内心深处,都有一颗孤独的心,渴望有人懂。像心头的另一个自己,不言不语,却知你心中烟火,懂你心意,叹你悲伤,赞你欢喜。人生颠簸,比爱你更难得的,是懂你。他不必无所不能,却不惧陪你共担风雨;他不必常伴左右,却与你有着深入骨髓的默契。古语有云:“知我者,谓我心忧;不知我者,谓我何求。”爱你的人想靠近,懂你的人知进退;爱你的人求回报,懂你的人抚创伤。懂你,便是明白你的欲言又止,领会你的言下之意。懂得,让真挚的爱挣脱束缚,让沉重的心变得轻盈,让不安的灵魂有处安放。懂得,是不负时光的等候,是流年深情的慈悲,是岁月难酬的期待。如果你已经拥有,请加倍珍惜,人易离散,须要双向奔赴;如果你还未拥有,请继续寻找,不期而遇,都需历尽千帆。夜深了,夜听陪你等待,善良又努力的你,终会得遇良人,从此三冬暖,春不寒。愿他懂得你的眉间心事,默许你的岁月从容,慰藉你的怅然忧郁,奉陪你的欢天喜地。从此余生,愿你有人牵挂,今后的每一个春去冬来,都是温暖的时节;愿你有人相伴,往后的每一次历经山河,仍会觉得人间值得。
2021年1月4日
置顶
主题移动端,样式下添加二级分类
简介:1. 代码修改header.php 相关j sidebar xs中的部分,主要是替换下面这一部分 <div class="card"> <div class="title">类目归类</div> <ul class="category nav"> <?php while ($categorys >next()) : ?> <?php $children = $categorys >getAllChildren($categorys >mid); ?> <?php if ($categorys >levels === 0): ?> <?php if (empty($children)): ?> <li class='<?php if ($this >is('category', $categorys >slug)) _e("active"); ?>'> <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"> <path d="M325.31499999 764.323l1e 8 508.83099999c0 28.16 22.598 50.934 50.757 50.93400001 13.09300001 0 24.932 5.024 33.901 13.092l335.755 251.633c22.24 16.859 26.905 48.607 10.044 71.024 2.87099999 3.947 6.281 7.355 10.045 10.045l 339.338 254.51c 22.241 16.676 54.16 12.193 70.844 10.225 6.996 9.15 10.225 19.73 10.225 30.31v0z" p id="6117"></path> </svg> <a href="<?php $categorys >permalink(); ?>"><?php $categorys >name(); ?></a> </li> <?php else: ?> <li class='<?php if ($this >is('category', $categorys >slug)) _e("active"); ?>'> <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"> <path d="M325.31499999 764.323l1e 8 508.83099999c0 28.16 22.598 50.934 50.757 50.93400001 13.09300001 0 24.932 5.024 33.901 13.092l335.755 251.633c22.24 16.859 26.905 48.607 10.044 71.024 2.87099999 3.947 6.281 7.355 10.045 10.045l 339.338 254.51c 22.241 16.676 54.16 12.193 70.844 10.225 6.996 9.15 10.225 19.73 10.225 30.31v0z" p id="6117"></path> </svg> <a href="<?php $categorys >permalink(); ?>"><?php $categorys >name(); ?> <span><i class="icon iconfont icon Chevronrighticon text right"></i><i class="icon iconfont icon Chevrondownicon text down"></i></span> </a> <ul> <?php foreach ($children as $mid):?> <?php $child = $categorys >getCategory($mid); ?> <li <?php if($this >is('category', $child['slug'])): ?> class="active"<?php endif; ?>> <a href="<?php echo $child['permalink'] ?>" title="<?php echo $child['name']; ?>"><?php echo $child['name']; ?></a> </li> <?php endforeach; ?> </ul> </li> <?php endif; ?> <?php endif; ?> <?php endwhile; ?> </ul> </div>2. 添加js 控制 $('.j sidebar xs .item.category ul li a').unbind().bind('click',function (ev) { let c = $(this); c.parent().siblings(".active").toggleClass("active") if(c.next().is("ul") && c.parent().toggleClass("active") && ev.preventDefault()) return false; })3. 添加css .item.category{ ul.category nav li ul{ display: none; padding left: 2.5em; opacity: 0; height: 0; overflow: auto; webkit transition: all .2s ease in out 0s; transition: all .2s ease in out 0s; li:last child{ border bottom: none; } } ul.category nav li a { span{ float: right; } .text down{ display: none; } } ul.category nav li.active { ul { display: block; opacity: 1; height: auto; } a .text right{ display: none; } a .text down{ display: block; } } } .j sidebar xs .content .item .card ul li { display: block; <! 将原来的flex改为block > }
2021年1月4日
置顶
主题 添加author page
简介:1.在joe主题同级目录下添加一个author.php<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?> <?php if (empty($this >uid)) { $str = $_SERVER["REQUEST_URI"]; if (preg_match('/\d+/', $str, $arr)) { $id = $arr[0]; if ($this >user >hasLogin() && $this >user >uid == $id) { $lock = 0; } else { $lock = 1; } $info = userok($id); $this >user >uid = $id; $this >user >screenName = $info['screenName']; $this >user >mail = $info['mail']; $this >user >group = $info['group']; } } ?> <!DOCTYPE html> <html lang="en"> <head> <?php $this >need('public/head.php'); ?> </head> <body> <?php $this >options >JCustomBodyStart() ?> <section id="joe"> <! 头部 > <?php $this >need('public/header.php'); ?> <! 主体 > <section class="container j index j author"> <section class="j adaption"> <div class="col md 12"> <! 创作中心s > <header class="page header"> <div class="author header meta"> <?php $email = $this >user >mail; $imgUrl = ParseAvatar($email, 1); echo '<img src="' . $imgUrl . '" class="avatar avatar 120 photo" height="50" width="50">'; ?> <div class="name"><?php $this >user >screenName(); ?></div> <div class="desc"><?php autvip($this >user >mail); ?></div> <div class="desc"> <svg t="1608204283958" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p id="3189" width="1em" height="1em"><path d="M826.46929 339.76682s19.698076 58.094327 94.090811 133.586954c0 0 55.19461 291.571526 302.170491 473.353774 0 0 99.090323 228.177717 108.089445 377.063177 0 0 78.792305 102.390001 226.677863 117.488526 0 0 61.394004 95.290694 56.394492 188.081633s 80.292159 196.880773 38.896201 328.567913c34.19666 108.789376 116.588614 214.879016 274.373206 247.775803 21.597891 54.894639 32.396836 112.589005 5.399472 261.774436 0 0 1.399863 123.587931 226.177913 255.275071 216.978811 57.494385 447.656284 264.574163 207.579728 677.733815z" p id="3190" fill="#7a7b7c"></path></svg> <?php echo allviewnum($this >user >uid); ?> </div> </div> </header> </div> <section class="main <?php $this >options >JListType() ?>"> <div class="row author page"> <div class="col md 12"> <! 创作中心e > <section class="j index article article"> <! 列表 > <?php $this >need('component/index.list.php'); ?> </section> </div> </section> </section> </section> <! 尾部 > <?php $this >need('public/footer.php'); ?> </section> <! 配置文件 > <?php $this >need('public/config.php'); ?> </body> </html>functions.php 或者 core.php // 会员页判断是否会员id function userok($id){ $db = Typecho_Db::get(); $userinfo=$db >fetchRow($db >select() >from ('table.users') >where ('table.users.uid=?',$id)); return $userinfo; } function allviewnum($id){ $db = Typecho_Db::get(); $postnum=$db >fetchRow($db >select(array('Sum(views)'=>'allviewnum')) >from ('table.contents') >where ('table.contents.authorId=?',$id) >where('table.contents.type=?', 'post')); $postnum = $postnum['allviewnum']; if($postnum=='0') { return '暂无访问'; } elseif ($postnum>=10000) { return ' 1万+访问'; } elseif ($postnum<10000 && $postnum>5000) { return ' 5K+访问'; } else{ return ' '.$postnum.' °c 访问'; } }3. 添加一点样式 .j author{ .author header meta{ text align: center; margin: 50px 0; .avatar { border radius: 100%; margin top: 10px; margin bottom: 10px; position: relative; } .name { font size: 18px; font weight: 600; margin bottom: 10px; } .desc { color: var( routine); font size: 14px; margin bottom: 10px; } } }
主题移动端,样式下添加二级分类
简介:1. 代码修改header.php 相关j sidebar xs中的部分,主要是替换下面这一部分 <div class="card"> <div class="title">类目归类</div> <ul class="category nav"> <?php while ($categorys >next()) : ?> <?php $children = $categorys >getAllChildren($categorys >mid); ?> <?php if ($categorys >levels === 0): ?> <?php if (empty($children)): ?> <li class='<?php if ($this >is('category', $categorys >slug)) _e("active"); ?>'> <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"> <path d="M325.31499999 764.323l1e 8 508.83099999c0 28.16 22.598 50.934 50.757 50.93400001 13.09300001 0 24.932 5.024 33.901 13.092l335.755 251.633c22.24 16.859 26.905 48.607 10.044 71.024 2.87099999 3.947 6.281 7.355 10.045 10.045l 339.338 254.51c 22.241 16.676 54.16 12.193 70.844 10.225 6.996 9.15 10.225 19.73 10.225 30.31v0z" p id="6117"></path> </svg> <a href="<?php $categorys >permalink(); ?>"><?php $categorys >name(); ?></a> </li> <?php else: ?> <li class='<?php if ($this >is('category', $categorys >slug)) _e("active"); ?>'> <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"> <path d="M325.31499999 764.323l1e 8 508.83099999c0 28.16 22.598 50.934 50.757 50.93400001 13.09300001 0 24.932 5.024 33.901 13.092l335.755 251.633c22.24 16.859 26.905 48.607 10.044 71.024 2.87099999 3.947 6.281 7.355 10.045 10.045l 339.338 254.51c 22.241 16.676 54.16 12.193 70.844 10.225 6.996 9.15 10.225 19.73 10.225 30.31v0z" p id="6117"></path> </svg> <a href="<?php $categorys >permalink(); ?>"><?php $categorys >name(); ?> <span><i class="icon iconfont icon Chevronrighticon text right"></i><i class="icon iconfont icon Chevrondownicon text down"></i></span> </a> <ul> <?php foreach ($children as $mid):?> <?php $child = $categorys >getCategory($mid); ?> <li <?php if($this >is('category', $child['slug'])): ?> class="active"<?php endif; ?>> <a href="<?php echo $child['permalink'] ?>" title="<?php echo $child['name']; ?>"><?php echo $child['name']; ?></a> </li> <?php endforeach; ?> </ul> </li> <?php endif; ?> <?php endif; ?> <?php endwhile; ?> </ul> </div>2. 添加js 控制 $('.j sidebar xs .item.category ul li a').unbind().bind('click',function (ev) { let c = $(this); c.parent().siblings(".active").toggleClass("active") if(c.next().is("ul") && c.parent().toggleClass("active") && ev.preventDefault()) return false; })3. 添加css .item.category{ ul.category nav li ul{ display: none; padding left: 2.5em; opacity: 0; height: 0; overflow: auto; webkit transition: all .2s ease in out 0s; transition: all .2s ease in out 0s; li:last child{ border bottom: none; } } ul.category nav li a { span{ float: right; } .text down{ display: none; } } ul.category nav li.active { ul { display: block; opacity: 1; height: auto; } a .text right{ display: none; } a .text down{ display: block; } } } .j sidebar xs .content .item .card ul li { display: block; <! 将原来的flex改为block > }
主题 添加author page
简介:1.在joe主题同级目录下添加一个author.php<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?> <?php if (empty($this >uid)) { $str = $_SERVER["REQUEST_URI"]; if (preg_match('/\d+/', $str, $arr)) { $id = $arr[0]; if ($this >user >hasLogin() && $this >user >uid == $id) { $lock = 0; } else { $lock = 1; } $info = userok($id); $this >user >uid = $id; $this >user >screenName = $info['screenName']; $this >user >mail = $info['mail']; $this >user >group = $info['group']; } } ?> <!DOCTYPE html> <html lang="en"> <head> <?php $this >need('public/head.php'); ?> </head> <body> <?php $this >options >JCustomBodyStart() ?> <section id="joe"> <! 头部 > <?php $this >need('public/header.php'); ?> <! 主体 > <section class="container j index j author"> <section class="j adaption"> <div class="col md 12"> <! 创作中心s > <header class="page header"> <div class="author header meta"> <?php $email = $this >user >mail; $imgUrl = ParseAvatar($email, 1); echo '<img src="' . $imgUrl . '" class="avatar avatar 120 photo" height="50" width="50">'; ?> <div class="name"><?php $this >user >screenName(); ?></div> <div class="desc"><?php autvip($this >user >mail); ?></div> <div class="desc"> <svg t="1608204283958" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p id="3189" width="1em" height="1em"><path d="M826.46929 339.76682s19.698076 58.094327 94.090811 133.586954c0 0 55.19461 291.571526 302.170491 473.353774 0 0 99.090323 228.177717 108.089445 377.063177 0 0 78.792305 102.390001 226.677863 117.488526 0 0 61.394004 95.290694 56.394492 188.081633s 80.292159 196.880773 38.896201 328.567913c34.19666 108.789376 116.588614 214.879016 274.373206 247.775803 21.597891 54.894639 32.396836 112.589005 5.399472 261.774436 0 0 1.399863 123.587931 226.177913 255.275071 216.978811 57.494385 447.656284 264.574163 207.579728 677.733815z" p id="3190" fill="#7a7b7c"></path></svg> <?php echo allviewnum($this >user >uid); ?> </div> </div> </header> </div> <section class="main <?php $this >options >JListType() ?>"> <div class="row author page"> <div class="col md 12"> <! 创作中心e > <section class="j index article article"> <! 列表 > <?php $this >need('component/index.list.php'); ?> </section> </div> </section> </section> </section> <! 尾部 > <?php $this >need('public/footer.php'); ?> </section> <! 配置文件 > <?php $this >need('public/config.php'); ?> </body> </html>functions.php 或者 core.php // 会员页判断是否会员id function userok($id){ $db = Typecho_Db::get(); $userinfo=$db >fetchRow($db >select() >from ('table.users') >where ('table.users.uid=?',$id)); return $userinfo; } function allviewnum($id){ $db = Typecho_Db::get(); $postnum=$db >fetchRow($db >select(array('Sum(views)'=>'allviewnum')) >from ('table.contents') >where ('table.contents.authorId=?',$id) >where('table.contents.type=?', 'post')); $postnum = $postnum['allviewnum']; if($postnum=='0') { return '暂无访问'; } elseif ($postnum>=10000) { return ' 1万+访问'; } elseif ($postnum<10000 && $postnum>5000) { return ' 5K+访问'; } else{ return ' '.$postnum.' °c 访问'; } }3. 添加一点样式 .j author{ .author header meta{ text align: center; margin: 50px 0; .avatar { border radius: 100%; margin top: 10px; margin bottom: 10px; position: relative; } .name { font size: 18px; font weight: 600; margin bottom: 10px; } .desc { color: var( routine); font size: 14px; margin bottom: 10px; } } }
主题添加移动端下边栏
简介:joe 主题移动样式下面无法登录,所以索性给 joe 主题加上下边栏1.首先在component文件夹里新建一个footer.navimobi.php,其中JNavigation是我自己之前美化加的,你可以换成自己的链接。 <?php if (!Helper::options() >JMobiset) return; //$settings = Helper::options() >JNavmobi; $all = Typecho_Plugin::export(); $loginUrl = $this >options >loginUrl; if (array_key_exists('TePass', $all['activated'])){ if ($this >user >hasLogin()) $loginUrl = $this >options >index.'/admin/extending.php?panel=TePass/theme/ucenter/profile.php'; else $loginUrl = $this >options >index.'/tepass/signin'; } ?> <nav class="navigation tab"> <! ><?php // $navtops_list = array(); // if (strpos($settings,'||')) { // //解析关键词数组 // $kwsets = array_filter(preg_split("/(\r|\n|\r\n)/",$settings)); // foreach ($kwsets as $kwset) { // $navtops_list[] = explode('||',trim($kwset)); // } // } // ?> <div class="navigation tab item"><a href="<?php echo $this >options >index ?>" target="_self"><span class="navigation tab__icon"><i class="iconfont icon iconfont icon zhuye"></i></span></a></div> <div class="navigation tab item"><a href="<?php echo $loginUrl ?>" target="_blank"><span class="navigation tab__icon"><i class="iconfont icon iconfont icon denglu"></i></span></a></div> <div class="navigation tab item <?php if ($this >is('page')) _e('active'); ?>" id="load_mobinav"><a href="<?php echo $this >options >JNavigation ?>" target="_self"><span class="navigation tab__icon"><i class="iconfont icon iconfont icon paihangbang"></i></span></a></div> <div class="navigation tab item" id="mob_goTop"><a><span class="navigation tab__icon"><i class="iconfont icon iconfont icon gotop"></i></span></a></div> <div class="navigation tab overlay"></div> </nav> 2.然后在functions.php里面加上一个开关 // 手机底部导航栏样式 $JMobiset = new Typecho_Widget_Helper_Form_Element_Select('JMobiset',array(0=>'不开启',1=>'开启'),0,'<h2>移动设置 Info</h2><hr>移动底部菜单设置','移动端页脚底部菜单'); $JMobiset >setAttribute('class', 'j setting content j setting index'); $form >addInput($JMobiset);3.在 public/config.php 里面(顶部)引入我们刚刚的文件<?php $this >need('component/footer.navmobi.php'); ?>最后加上控制js和 样式css $(".navigation tab item").bind('click',function() { $(".navigation tab item").removeClass("active"); $(this).addClass("active"); $(".navigation tab overlay").css({ left: 25 * $(this).prevAll().length + "%" }) }) $("#mob_goTop").click(function () { $("#backToTop").click() }) let load_mobi = $('#load_mobinav') if (load_mobi.hasClass('active')){ $(".navigation tab overlay").css({ left: 25 * load_mobi.prevAll().length + "%" }) }4.以下代码为scss ,自己手动转css @media (max width: 768px) { .navigation tab { display: flex !important; } } .navigation tab{ height: 60px; width: 100%; line height: 1; background color: #fff; box shadow: 0px 0px 20px 5px rgba(158, 158, 158, 0.22); overflow: hidden; border: 10px solid #fff; display: none; flex shrink: 0; position: fixed; bottom: 0; z index: 40; .navigation tab item{ display: flex; flex direction: column; align items: center; justify content: center; width: 25%; flex shrink: 0; line height: 1; cursor: pointer; transition: 0.3s; position: relative; z index: 2; &.active { width: 25%; } .navigation tab__icon { display: block; color: #4298e7; transition duration: 0.3s; line height: 1; svg{ width: 24px; height: 24px; fill:#4298e7; } i{ font size: 24px; } } } .navigation tab overlay { border radius: 20px; background color: #e4f2ff; height: 100%; width: 25%; position: absolute; left: 0; top: 0; transition: 0.3s; } }
EMlog添加评论者邮箱等级
简介:简介为你的EMlog博客 评论区添加评论者等级 评论者的等级由评论的QQ邮箱的次数来分配你的等级 评论的时候填写你的QQ邮箱 比如等级二 需要20次评论 评论20次就可以从1级升级到2级的 默认都是一级的 核心代码可以任意设置多少级 达到多少次评论升几级 任你设置 好了 不废话来 直接开始教程把 咋地了 嫌弃我嫌弃我的B话多了吗 嘿嘿 往下面看 小老弟们 呵呵!第一步你的模版/module.php增加如下代码 别放错了哦 <?php //邮箱输出评论者等级 function echo_levels($comment_author_email,$comment_author_url){ $DB = Database::getInstance(); global $CACHE; $user_cache = $CACHE >readCache('user'); $adminEmail = '"'.$user_cache[1]['mail'].'"'; if($comment_author_email==$adminEmail){ echo '<a class="admin" title="这货就是管理员"><img src="'.TEMPLATE_URL.'images/admin.png"></a>'; } $sql = "SELECT cid as author_count,mail FROM ".DB_PREFIX."comment WHERE mail != '' and mail = $comment_author_email and hide ='n'"; $res = $DB >query($sql); $author_count = $DB >num_rows($res); if($author_count>=0 && $author_count<5 && $comment_author_email!=$adminEmail) echo '<a class="vip1" title="VIP等级:初入联盟 LV.1"><i class="pro"></i><i class="level">Lv.1</i></a>'; else if($author_count>=5 && $author_count<10 && $comment_author_email!=$adminEmail) echo '<a class="vip2" title="VIP等级:英勇黄铜 LV.2"><i class="pro"></i><i class="level">Lv.2</i></a>'; else if($author_count>=10 && $author_count<20 && $comment_author_email!=$adminEmail) echo '<a class="vip3" title="VIP等级:不屈白银 LV.3"><i class="pro"></i><i class="level">Lv.3</i></a>'; else if($author_count>=20 && $author_count<30 && $comment_author_email!=$adminEmail) echo '<a class="vip4" title="VIP等级:华贵铂金 LV.4"><i class="pro"></i><i class="level">Lv.4</i></a>'; else if($author_count>=30 &&$author_count<40 && $comment_author_email!=$adminEmail) echo '<a class="vip5" title="VIP等级:璀璨钻石 LV.5"><i class="pro"></i><i class="level">Lv.5</i></a>'; else if($author_count>=40 && $author_coun<50 && $comment_author_email!=$adminEmail) echo '<a class="vip6" title="VIP等级:超凡大师 LV.6"><i class="pro"></i><i class="level">Lv.6</i></a>'; else if($author_count>=50 && $author_coun<60 && $comment_author_email!=$adminEmail) echo '<a class="vip7" title="VIP等级:最强王者 LV.7"><i class="pro"></i><i class="level">Lv.7</i></a>'; else if($author_count>=60 && $author_coun<70 && $comment_author_email!=$adminEmail) echo '<a class="vip8" title="VIP等级:职业选手 LV.8"><i class="pro"></i><i class="level">Lv.8</i></a>'; } ?>第二步放完第一步核心代码来 下来还是module.php文件这句代码 代表是评论等级在什么地方显示 放在你要显示的地方哦 <span class="comment reply"><?php echo echo_levels("\"".strip_tags($comment['mail'])."\"","\"".$isuserlink."\"");?></span>第三步上面的两步完成来 真的很不错来啊 还有最后一步哦 等级的css哦下面颜色代表是每个等级的颜色哦 可以自行设置哦 放在你的公用的Css文件如果还有什么不会的评论 或者直接联系我哦 .vip1 {margin left: 1px;font size: 12px;color: #fff;background color: #348be8;padding: 0 4px;border radius: 2px;font size: 12px;cursor: pointer; webkit transition: .3s; khtml opacity: .5;opacity: .5;line height: 150%;display: inline block;vertical align: middle;} .vip2 {margin left: 1px;font size: 12px;color: #fff;background color: #0bf;padding: 0 4px;border radius: 2px;font size: 12px;cursor: pointer; webkit transition: .3s; khtml opacity: .5;opacity: .5;line height: 150%;display: inline block;vertical align: middle;} .vip3 {margin left: 1px;font size: 12px;color: #fff;background color: #fd8edb;padding: 0 4px;border radius: 2px;font size: 12px;cursor: pointer; webkit transition: .3s; khtml opacity: .5;opacity: .5;line height: 150%;display: inline block;vertical align: middle;} .vip4 {margin left: 1px;font size: 12px;color: #fff;background color: #eb5055;padding: 0 4px;border radius: 2px;font size: 12px;cursor: pointer; webkit transition: .3s; khtml opacity: .5;opacity: .5;line height: 150%;display: inline block;vertical align: middle;} .vip5 {margin left: 1px;font size: 12px;color: #fff;background color: #6f8ec5;padding: 0 4px;border radius: 2px;font size: 12px;cursor: pointer; webkit transition: .3s; khtml opacity: .5;opacity: .5;line height: 150%;display: inline block;vertical align: middle;} .vip6 {margin left: 1px;font size: 12px;color: #fff;background color: #5fb878;padding: 0 4px;border radius: 2px;font size: 12px;cursor: pointer; webkit transition: .3s; khtml opacity: .5;opacity: .5;line height: 150%;display: inline block;vertical align: middle;} .vip7 {margin left: 1px;font size: 12px;color: #fff;background color: #c0c000;padding: 0 4px;border radius: 2px;font size: 12px;cursor: pointer; webkit transition: .3s; khtml opacity: .5;opacity: .5;line height: 150%;display: inline block;vertical align: middle;} .vip8 {margin left: 1px;font size: 12px;color: #fff;background color: #292929;padding: 0 4px;border radius: 2px;font size: 12px;cursor: pointer; webkit transition: .3s; khtml opacity: .5;opacity: .5;line height: 150%;display: inline block;vertical align: middle;}
Emlog模版文章页标题自动变颜色方法
简介:1、打开模板下的 css 文件 ,把下面颜色代码添加进去,里面颜色自己修改,众口难调每个人喜好的颜色都不一样.... #bianse{animation:change 10s linear 0s infinite;} @keyframes change{0%{color:#333;}25%{color:#fff0;}50%{color:#f60;}75%{color:#cf0;}100%{color:#f00;}}2、打开模板下的 文章页文件 echo_log.php 找到 <?php echo $log_title; ?> 如果模版没有改过就是被 h2 标签嵌套的,只需要在 h2 标签里面调用 id="bianse" 即可。 <h2 class="post title" id="bianse">这里是标题内容</h2>
emlog文章页添加已阅读时间
简介:将代码添加至模板文件echo_log.php适当位置(建议添加在正文结束后面)css: #tingliu{margin: 30px 0px 15px 0px; padding: 5px 0px 10px 0px; height: 100%; line height: 2; text align:center; font size:14px; background: #f8f8f8; border: 1px dashed #CEB8A3; transition:all 0.2s ease in out 0s; moz transition:all 0.2s ease in out 0s; webkit transition:all 0.2s ease in out 0s;} #tingliu:hover{background: #F4F1EF; border: 1px dashed #D9007C; border radius:0px; webkit border radius:0px; moz border radius:0px;} .tingliu2{color:#7C4500;} .tingliu3{color: #C03131;} .tingliu4{position:relative; left:0px; top:3px;} .tingliu5{position:relative; left:0px; top:5px;}代码: <! 统计文章阅读时间开始 > <div id="tingliu"><span class="tingliu2 hint top hint bounce" data hint="希望这篇文章能给你带来收获,去发表评论吧!?"> <img src="http://ww4.sinaimg.cn/large/0060lm7Tgw1f8qy1bokcrg300q00oq2r.gif" class="tingliu5"></span> &nbsp; <span class="tingliu2">您阅读这篇文章共花了:</span>&nbsp; <span class="tingliu3" id="stime"></span></div> <script language="JavaScript">var ss=0,mm=0,hh=0;function TimeGo(){ss++;if(ss>=60){mm+=1;ss=0}if(mm>=60){hh+=1;mm=0}ss_str=(ss<10?"0"+ss:ss);mm_str=(mm<10?"0"+mm:mm);tMsg=""+hh+"小时"+mm_str+"分"+ss_str+"秒";document.getElementById("stime").innerHTML=tMsg;setTimeout("TimeGo()",1000)}TimeGo();</script> <! 统计文章阅读时间结束 >
博客主页 老姚日记--随心记录,胡乱折腾 日记,文章收藏 百度统计
萌ICP备20231199号 湘ICP备20014671号-1 湘公网安备 43092302000133号 本站已运行 2 年 200 天 23 小时 52 分 Copyright © 2020 ~ 2023. 老姚日记--随心记录,胡乱折腾 All rights reserved.
历史足迹
分类目录
  • typecho
  • dynamic
  • SuiYu
  • Emlog
  • xiuno
  • 打赏图
    打赏博主
    欢迎