导航菜单

有人求 Joe 5.X 主题集成这个功能,花了20分钟整好了,主要花时间在调试CSS上。

调用方式

同时兼容两种格式,记得去掉@

[@post]文章 ID[@/post]

{@post cid="文章 ID" /}

添加自定义 JS

你想放到哪里都可以

.linked-post {
    padding: 20px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--classC);
    margin: 20px 0;
}
.linked-post a {
    display: flex !important;
    color: var(--main) !important;
    padding-top: 5px;
}
.linked-post a span {
    width: 100%;
    min-width: 260px;
    height: 130px;
    display: flex;
}
.linked-post a span img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.linked-post a .content {
    height: 130px;
    overflow: hidden;
    margin-left: 10px;
    transition: transform 0.35s, box-shadow 0.35s, -webkit-transform 0.35s;
}
.linked-post a .content h5 {
    margin-bottom: 5px;
}
.linked-post a .content p {
    height: 100px;
    line-height: 25px;
    overflow: hidden;
    margin-bottom: 0;
}
.linked-post a:hover:after{
    display: none !important;
}
.linked-post a:hover span img {
    transform: translateY(-5px);
}
.linked-post a:hover .content {
    transform: translateY(-5px);
}

@media (max-width:768px) {
    .linked-post a {
        flex-wrap: wrap;
    }
    .linked-post a span {
        max-width: unset;
    }
    .linked-post a .content {
        margin-top: 10px;
        margin-left: 0;
    }
}
价格: 5.00 元
VIP会员价格:5.00元终身会员价格:5.00元
温馨提示:登录付款后可永久阅读隐藏内容。 付费可读

已有 6 条评论

  1. chenmo
    湖南省

    $widget->author 会提示 Object of class Widget_Users_Author could not be converted to string 错误

    1. Ryan
      未知地区

      没记错应该是$widget->author->screenName

      1. chenmo
        湖南省

        OK
        那这些 '.$created.' 日期 '.$post_views.' 阅读 评论什么的是要怎么什么写呢?

  2. kingkare
    山西省

    大佬joe7.x版本的如何添加这个文章引用功能啊 我按照教程试了一遍不行啊 好多教程里面的函数都没有