返回列表 发布新帖
查看: 9|回复: 0

emlog-主题模板添加仿joe留言板

1836

主题

52

回帖

1万

积分

管理员

积分
19864
发表于 2025-10-6 12:44:43 | 查看全部 |阅读模式
来自于typecho主题joe的留言板样式,joe主题有很多地方可以学习,由于习惯了emlog的主题使用,又不太直接换typecho动手就借鉴到emlog的主题留言板里。
<?php /* Custom:page_gusetbookDescription:留言板*/if(!defined(\'EMLOG_ROOT\')) {exit(\'error!\');} ?><div class=\"container container-page\">    <?php include View::getView(\'page/page_side\');?>    <div class=\"content\">        <header class=\"article-header\">        <h1 class=\"article-title\"><?php echo $log_title; ?></h1>        <style>.guestbook_detail__leaving{padding-top:15px;}.guestbook_detail__leaving-none{padding:15px 0;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#fff;}.guestbook_detail__leaving-list{position:relative;height:320px}.guestbook_detail__leaving-list .item{display:none;position:absolute;width:200px;overflow:hidden;box-shadow:0 2px 10px 1px rgba(0,0,0,0.2);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0.88;height:210px;}.guestbook_detail__leaving-list .item .user{display:flex;align-items:center;padding:0 10px;color:#fff;border-bottom:1px dashed rgba(255,255,255,0.85);height:40px;cursor:move}.guestbook_detail__leaving-list .item .user .avatar{width:20px;height:20px;border-radius:50%}.guestbook_detail__leaving-list .item .user .nickname{min-width:0;flex:1;margin:0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.guestbook_detail__leaving-list .item .user .nickname a{color:#fff}.guestbook_detail__leaving-list .item .user .date{margin-left:auto}.guestbook_detail__leaving-list .item .wrapper{padding:10px}.guestbook_detail__leaving-list .item .wrapper .content{height:140px;overflow-y:auto;word-break:break-word;line-height:24px;}.guestbook_detail__leaving-list .item .wrapper .guestbook_content .draw_image{max-width:100%}.guestbook_detail__leaving-list .item .wrapper .guestbook-content .owo_image{max-height:24px}        </style>        </header>          <script src=\"域名/book.js\"></script><div class=\"guestbook_container\">            <div class=\"guestbook_main\">                <div class=\"guestbook_detail\">                </div>            </div>            <?php guestbook($comments); ?>      <!-- 评论开始 -->        <?php if($allow_remark == \'y\'): ?>            <?php blog_comments_post($logid,$ckname,$ckmail,$ckurl,$verifyCode,$allow_remark); ?>            <div id=\"postcomments\" class=\" <?php echo $Tconfig[\"wow\"];?>\">                <ol class=\"commentlist\">                <?php blog_comments($comments); ?>                  </ol>            </div>          <?php endif;?>        <!-- 评论结束 -->    </div></div><?php include View::getView(\'footer\');?>
guestbook.js,上传到主题所引用的js文件夹里,也可以用上述代码自带的外部js,需要给所在主题的添加代码module.php。
进入emlog后台,来到页面,链接别名:页面模板:按照下图来设置,并且需要开启允许评论guestbookpage/page_guestbook最后可以进入页面看看效果了。
下载地址:

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关灯 在本版发帖
扫一扫添加微信客服
QQ客服返回顶部
快速回复 返回顶部 返回列表