进行了一些小修复
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,898 @@
|
|||||||
|
/* source: assets/css/frontend/post-card.css */
|
||||||
|
/**
|
||||||
|
* legacy 9.0 article list/card contract.
|
||||||
|
* Source baseline: css/main.css (SHA-256 recorded in tests/visual).
|
||||||
|
*/
|
||||||
|
|
||||||
|
.posts-row {
|
||||||
|
margin-right: -8px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
margin-left: -8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-row > *:not(.post_ajax_loader) {
|
||||||
|
margin-right: 8px !important;
|
||||||
|
margin-left: 8px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item {
|
||||||
|
margin: 15px 0;
|
||||||
|
padding: 20px;
|
||||||
|
overflow: hidden;
|
||||||
|
background: var(--main-bg-color, #fff);
|
||||||
|
border-radius: var(--main-radius, 8px);
|
||||||
|
box-shadow: 0 0 10px var(--main-shadow, rgba(116, 116, 116, 0.08));
|
||||||
|
transition: 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.flex,
|
||||||
|
.posts-item .flex,
|
||||||
|
.posts-mini .flex {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .flex.xx,
|
||||||
|
.posts-mini .flex.xx {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .flex.ac,
|
||||||
|
.posts-mini .flex.ac {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .flex.jsb,
|
||||||
|
.posts-mini .flex.jsb {
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .flex1,
|
||||||
|
.posts-mini .flex1 {
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .post-graphic:not(.order1) {
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .order1.post-graphic {
|
||||||
|
margin-right: 0;
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .item-thumbnail {
|
||||||
|
position: relative;
|
||||||
|
display: block;
|
||||||
|
width: 190px;
|
||||||
|
height: 0;
|
||||||
|
padding-bottom: var(--posts-list-scale, 70%);
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: var(--main-radius, 8px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-thumbnail.contain img {
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-slide.gradient-bg .dplayer-poster img,
|
||||||
|
.swiper-slide.gradient-bg > * > img {
|
||||||
|
object-fit: contain !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-thumbnail .swiper-wrapper {
|
||||||
|
height: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list .item-thumbnail .aksrt-slider,
|
||||||
|
.list .item-thumbnail.new-swiper {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-thumbnail .dplayer.dplayer-thumb {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
z-index: 1;
|
||||||
|
padding-bottom: var(--posts-list-scale, 70%);
|
||||||
|
background: #000;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card .item-thumbnail .dplayer.dplayer-thumb {
|
||||||
|
padding-bottom: var(--posts-card-scale, 70%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-thumbnail .dplayer-thumb video,
|
||||||
|
.item-thumbnail .swiper-wrapper,
|
||||||
|
.item-thumbnail img {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-thumbnail .swiper-pagination {
|
||||||
|
right: 0 !important;
|
||||||
|
bottom: 0 !important;
|
||||||
|
left: 0 !important;
|
||||||
|
padding: 0 2px !important;
|
||||||
|
text-align: center !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.thumb-dplayer-playing .dplayer-thumb {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.thumb-dplayer-playing .abs-center {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .item-heading {
|
||||||
|
display: -webkit-box;
|
||||||
|
max-height: 2.8em;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
overflow: hidden;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 1.4em;
|
||||||
|
white-space: normal;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.font-bold {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list.style2 .item-thumbnail {
|
||||||
|
width: 130px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list.style2 .item-heading {
|
||||||
|
display: unset;
|
||||||
|
max-height: 1.4em;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .item-heading > a {
|
||||||
|
color: var(--key-color, #333);
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .item-heading > a:hover {
|
||||||
|
color: var(--focus-color, #f04494);
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .item-excerpt {
|
||||||
|
margin: 0 0 6px;
|
||||||
|
overflow: hidden;
|
||||||
|
color: var(--muted-color, #777);
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .item-meta item {
|
||||||
|
margin-right: 8px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .item-meta svg.icon,
|
||||||
|
.posts-mini .item-meta svg.icon {
|
||||||
|
display: inline-block;
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
margin-right: 2px;
|
||||||
|
fill: currentColor;
|
||||||
|
overflow: hidden;
|
||||||
|
vertical-align: -0.15em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .meta-right item:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-meta .avatar-mini {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border-radius: 50%;
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-meta .meta-pay {
|
||||||
|
padding: 0 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-meta .meta-pay img {
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
object-fit: contain;
|
||||||
|
vertical-align: -0.15em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .item-meta a,
|
||||||
|
.posts-mini .item-meta a {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .item-tags a {
|
||||||
|
margin-right: 5px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .item-tags a .fa {
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.card {
|
||||||
|
display: inline-block;
|
||||||
|
width: calc(33.333% - 16px);
|
||||||
|
margin: 8px;
|
||||||
|
padding: 10px;
|
||||||
|
vertical-align: top;
|
||||||
|
transition: 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.card:last-child {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.card .item-body {
|
||||||
|
width: 100%;
|
||||||
|
margin: 10px 0 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.card .item-meta item {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-mini-con .item-heading,
|
||||||
|
.posts-item.card .item-heading {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.card .item-heading {
|
||||||
|
min-height: 2.8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.card .item-tags {
|
||||||
|
min-height: 23px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.card .item-thumbnail {
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: var(--posts-card-scale, 70%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.card.style2 {
|
||||||
|
background: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.card.style2:hover {
|
||||||
|
background: var(--main-bg-color, #fff);
|
||||||
|
box-shadow: 0 0 10px var(--main-shadow, rgba(116, 116, 116, 0.08));
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.card.style3 {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.card.style3 .item-thumbnail,
|
||||||
|
.posts-item.card.style3 .item-thumbnail img {
|
||||||
|
border-radius: var(--main-radius, 8px) var(--main-radius, 8px) 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.card.style3 .item-body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.mult-thumb .thumb-items {
|
||||||
|
margin: 0 -3px 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.mult-thumb .thumb-items > span {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
width: calc(25% - 6px);
|
||||||
|
height: 0;
|
||||||
|
margin: 0 3px;
|
||||||
|
padding-bottom: calc(var(--posts-list-scale, 70%) / 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.mult-thumb .thumb-items > span > img {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.mult-thumb .thumb-items.contain > span {
|
||||||
|
overflow: hidden;
|
||||||
|
background: var(--main-border-color, rgba(50, 50, 50, 0.06));
|
||||||
|
border-radius: var(--main-radius, 8px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.mult-thumb .thumb-items.contain > span > img {
|
||||||
|
object-fit: contain;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.no_margin {
|
||||||
|
margin: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.no-thumb .item-excerpt {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.no-thumb .item-body {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item + .pagenav {
|
||||||
|
margin-top: -15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.card + .pagenav {
|
||||||
|
margin-top: -10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no_margin:first-of-type {
|
||||||
|
margin-top: 10px;
|
||||||
|
border-radius: var(--main-radius, 8px) var(--main-radius, 8px) 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no_margin:last-of-type {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
border-radius: 0 0 var(--main-radius, 8px) var(--main-radius, 8px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-mini {
|
||||||
|
padding: 10px;
|
||||||
|
display: inline-flex;
|
||||||
|
width: 50%;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-mini-con {
|
||||||
|
flex: auto;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-mini .item-thumbnail {
|
||||||
|
width: 96px;
|
||||||
|
height: 0;
|
||||||
|
padding-bottom: var(--posts-list-scale, 70%);
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: var(--main-radius, 8px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-mini .item-thumbnail img {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-mini .item-heading {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-mini .item-heading.icon-circle {
|
||||||
|
margin-left: -5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-mini .item-meta {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-mini-con .badg {
|
||||||
|
min-width: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .posts-mini,
|
||||||
|
.mobile-nav-widget .posts-mini {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-nav-widget .posts-mini {
|
||||||
|
padding-right: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-mini:last-of-type {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-mini-lists {
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-mini-lists .tab-nav-theme {
|
||||||
|
padding: 0 5px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-nav-widget .posts-mini-lists .tab-nav-theme {
|
||||||
|
margin: 0 -5px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-main-post.style-list .widget-ajaxpager,
|
||||||
|
.widget-main-post.style-card .widget-ajaxpager,
|
||||||
|
.widget-tab-post.index-tab .tab-content > .tab-pane {
|
||||||
|
margin: -8px -8px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-tab-post.style-list .tab-content > .tab-pane {
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-main-post.style-list .posts-item,
|
||||||
|
.widget-tab-post.style-list .posts-item {
|
||||||
|
margin-right: 8px;
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-mini:hover img,
|
||||||
|
.posts-item:hover .item-thumbnail img,
|
||||||
|
.posts-item.mult-thumb .thumb-items > span > img:hover {
|
||||||
|
transform: scale(1.02);
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-scroll .posts-item {
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin: 0 16px 0 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-scroll .posts-item.list {
|
||||||
|
width: calc(50% - 8px) !important;
|
||||||
|
min-width: 520px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-scroll .posts-item.posts-mini {
|
||||||
|
width: 360px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-scroll .posts-item.card {
|
||||||
|
width: calc(33.333% - 11px) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-badge {
|
||||||
|
position: absolute;
|
||||||
|
top: 8px;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-badge.left {
|
||||||
|
left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
.fluid-widget-wrap .posts-item.card,
|
||||||
|
.site-layout-1 .posts-item.card {
|
||||||
|
width: calc(25% - 16px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fluid-widget-wrap .posts-item:not(.card),
|
||||||
|
.site-layout-1 .posts-item:not(.card) {
|
||||||
|
display: inline-flex;
|
||||||
|
width: calc(50% - 16px);
|
||||||
|
margin: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fluid-widget-wrap .posts-item.no_margin,
|
||||||
|
.site-layout-1 .posts-item.no_margin {
|
||||||
|
border-radius: var(--main-radius, 8px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fluid-widget-wrap .posts-mini,
|
||||||
|
.site-layout-1 .posts-mini {
|
||||||
|
width: 33.333%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .posts-item.card,
|
||||||
|
.sidebar .posts-item.list {
|
||||||
|
width: 100% !important;
|
||||||
|
min-width: 0 !important;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.posts-row {
|
||||||
|
margin-right: -5px;
|
||||||
|
margin-left: -5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-row > *:not(.post_ajax_loader) {
|
||||||
|
margin-right: 5px !important;
|
||||||
|
margin-left: 5px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .item-thumbnail {
|
||||||
|
width: 138px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-mini .item-thumbnail,
|
||||||
|
.list.style2 .item-thumbnail {
|
||||||
|
width: 90px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .post-graphic:not(.order1) {
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .order1.post-graphic {
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item .item-heading {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item:not(.no-thumb) .item-excerpt {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.card {
|
||||||
|
width: calc(50% - 10px);
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-main-post.style-list .widget-ajaxpager,
|
||||||
|
.widget-main-post.style-card .widget-ajaxpager,
|
||||||
|
.widget-tab-post.index-tab .tab-content > .tab-pane {
|
||||||
|
margin: -5px -5px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-tab-post.style-list .tab-content > .tab-pane,
|
||||||
|
.widget-main-post.style-list .widget-ajaxpager {
|
||||||
|
margin-top: -15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-tab-post.style-list .posts-item {
|
||||||
|
margin-right: 5px;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-scroll .posts-item {
|
||||||
|
margin-right: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.card:nth-child(odd) {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.card:nth-child(even) {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.mult-thumb .thumb-items > span {
|
||||||
|
width: calc(33.333% - 6px);
|
||||||
|
padding-bottom: calc(var(--posts-list-scale, 70%) / 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item.mult-thumb .thumb-items > span:nth-child(4) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-scroll .posts-item.card {
|
||||||
|
width: calc(50% - 5px) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-scroll .posts-item.list {
|
||||||
|
width: 100% !important;
|
||||||
|
min-width: auto !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 640px) {
|
||||||
|
.posts-item:not(.no-thumb) .meta-right item {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-mini {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-item {
|
||||||
|
margin: 10px 0;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aksrt-panel .posts-item.no_margin {
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.posts-item,
|
||||||
|
.posts-item img {
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* source: assets/css/frontend/sidebar.css */
|
||||||
|
/* ========== 侧边栏 — 对齐 legacy sidebar ========== */
|
||||||
|
/* Width/float geometry is owned by body.site-layout-* in layout.css.
|
||||||
|
* Keep only non-layout chrome here. */
|
||||||
|
.sidebar {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-inner {
|
||||||
|
position: sticky;
|
||||||
|
top: calc(var(--nav-height, 60px) + 20px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Widget 通用 */
|
||||||
|
.widget {
|
||||||
|
background: var(--surface-1, #fff);
|
||||||
|
border-radius: var(--main-radius, var(--radius, 8px));
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
border: none;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-title {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--color-ink, #333);
|
||||||
|
padding-bottom: 10px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-title i {
|
||||||
|
color: var(--color-primary, #f04494);
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-content {
|
||||||
|
padding: var(--card-padding-lg, 20px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-content--flush {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Widget 链接 */
|
||||||
|
.widget a {
|
||||||
|
color: var(--color-ink-2, #4e5358);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget a:hover {
|
||||||
|
color: var(--color-primary, #f04494);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .widget a 的链接色不得覆盖 .but 按钮自身配色(zibll 的 zib-widget 不设置链接色) */
|
||||||
|
.widget a.but {
|
||||||
|
color: var(--this-color, #fff);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Widget 标签云 */
|
||||||
|
.widget-tag-cloud .tagcloud {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-tag-cloud .tagcloud a {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 3px 10px;
|
||||||
|
font-size: 12px !important;
|
||||||
|
background: var(--surface-2, #eee);
|
||||||
|
border-radius: 4px;
|
||||||
|
color: var(--color-ink-2, #4e5358);
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-tag-cloud .tagcloud a:hover {
|
||||||
|
background: var(--color-primary-soft, rgba(240, 68, 148, 0.1));
|
||||||
|
color: var(--color-primary, #f04494);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Widget 列表 */
|
||||||
|
.widget ul {
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget ul li {
|
||||||
|
padding: 8px 0;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget ul li:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 热门文章 widget */
|
||||||
|
.widget-hot-posts .hot-post-item {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 8px 0;
|
||||||
|
border-bottom: 1px solid var(--color-line-soft, rgba(0, 0, 0, 0.03));
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-hot-posts .hot-post-item:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-hot-posts .hot-post-item__thumb {
|
||||||
|
width: 60px;
|
||||||
|
height: 45px;
|
||||||
|
border-radius: 4px;
|
||||||
|
object-fit: cover;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-hot-posts .hot-post-item__title {
|
||||||
|
font-size: 13px;
|
||||||
|
color: var(--color-ink, #333);
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-hot-posts .hot-post-item__meta {
|
||||||
|
font-size: 11px;
|
||||||
|
color: var(--color-ink-4, #999);
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 侧边栏响应式 — width/float 由 layout.css 的 --sidebar-width + site-layout-* 拥有。
|
||||||
|
* 禁止在这里硬编码 280px(会与 content-layout gutter 失配导致叠层/空隙)。 */
|
||||||
|
@media (max-width: 991px) {
|
||||||
|
.sidebar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* source: assets/css/frontend/breadcrumb.css */
|
||||||
|
/* ========== 面包屑导航 — 对齐 legacy .breadcrumb (main.css) ========== */
|
||||||
|
/* Single source for breadcrumb chrome. Do not re-define in layout.css. */
|
||||||
|
|
||||||
|
.breadcrumb,
|
||||||
|
ul.breadcrumb,
|
||||||
|
.breadcrumb-nav,
|
||||||
|
.breadcrumbs-wrap {
|
||||||
|
background: transparent;
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 0 8px;
|
||||||
|
margin: 0 0 12px;
|
||||||
|
opacity: 0.6;
|
||||||
|
line-height: 1.8;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb-nav ol,
|
||||||
|
.breadcrumb-nav ul,
|
||||||
|
ul.breadcrumb,
|
||||||
|
.breadcrumbs.breadcrumb {
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* legacy uses flat li + li:before separators (not flex-gap nodes) */
|
||||||
|
.breadcrumb > li,
|
||||||
|
ul.breadcrumb > li,
|
||||||
|
.breadcrumb-nav li,
|
||||||
|
.breadcrumbs.breadcrumb > li {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb > li + li:before,
|
||||||
|
ul.breadcrumb > li + li:before,
|
||||||
|
.breadcrumb-nav li + li:before {
|
||||||
|
content: "/";
|
||||||
|
padding: 0 0 0 6px;
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Archive/nav variant may still stamp sep nodes — keep neutral */
|
||||||
|
.breadcrumbs.breadcrumb .breadcrumbs__sep {
|
||||||
|
padding: 0 6px;
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb a,
|
||||||
|
ul.breadcrumb a,
|
||||||
|
.breadcrumb-nav a,
|
||||||
|
.breadcrumbs a {
|
||||||
|
color: var(--muted-2-color, var(--color-ink-4, #999));
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb a:hover,
|
||||||
|
ul.breadcrumb a:hover,
|
||||||
|
.breadcrumb-nav a:hover,
|
||||||
|
.breadcrumbs a:hover {
|
||||||
|
color: var(--focus-color, var(--color-primary, #f04494));
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb > li:last-child,
|
||||||
|
ul.breadcrumb > li:last-child,
|
||||||
|
.breadcrumb-nav .current,
|
||||||
|
.breadcrumbs__item.is-current {
|
||||||
|
color: var(--main-color, var(--color-ink-2, #4e5358));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Cover / video footer breadcrumb — legacy single-cover-con / single-video */
|
||||||
|
.single-cover-con .breadcrumb,
|
||||||
|
.single-cover-con ul.breadcrumb,
|
||||||
|
.single-cover-con .breadcrumb-nav,
|
||||||
|
.post-breadcrumbs .breadcrumb,
|
||||||
|
.single-video .breadcrumb {
|
||||||
|
font-size: 13px;
|
||||||
|
margin: 5px 0 0 -6px;
|
||||||
|
opacity: unset;
|
||||||
|
padding: 0;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.single-video .breadcrumb {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.single-cover-con .breadcrumb,
|
||||||
|
.single-cover-con ul.breadcrumb,
|
||||||
|
.single-cover-con .breadcrumb-nav {
|
||||||
|
color: rgba(255, 255, 255, 0.85);
|
||||||
|
}
|
||||||
|
|
||||||
|
.single-cover-con .breadcrumb a,
|
||||||
|
.single-cover-con ul.breadcrumb a,
|
||||||
|
.single-cover-con .breadcrumb-nav a {
|
||||||
|
color: rgba(255, 255, 255, 0.85);
|
||||||
|
}
|
||||||
|
|
||||||
|
.single-cover-con .breadcrumb a:hover,
|
||||||
|
.single-cover-con ul.breadcrumb a:hover,
|
||||||
|
.single-cover-con .breadcrumb-nav a:hover {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.single-cover-con .breadcrumb > li:last-child,
|
||||||
|
.single-cover-con ul.breadcrumb > li:last-child {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.breadcrumb,
|
||||||
|
ul.breadcrumb,
|
||||||
|
.breadcrumb-nav,
|
||||||
|
.breadcrumbs-wrap {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* source: assets/css/frontend/homepage-fixed/base.css */
|
/* source: assets/css/frontend/homepage-fixed/base.css */
|
||||||
/**
|
/**
|
||||||
* Homepage Fixed Layout — legacy Visual Parity
|
* Homepage Fixed Layout — legacy Visual Parity
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -61,7 +61,6 @@ tbquire.config({
|
|||||||
'enlighterjs' : 'enlighter/enlighterjs.min',
|
'enlighterjs' : 'enlighter/enlighterjs.min',
|
||||||
'imgbox' : 'imgbox.min',
|
'imgbox' : 'imgbox.min',
|
||||||
'section-navs' : 'section-navs.min',
|
'section-navs' : 'section-navs.min',
|
||||||
'main' : 'main.min',
|
|
||||||
'poster-share' : 'poster-share.min',
|
'poster-share' : 'poster-share.min',
|
||||||
'slidercaptcha' : 'slidercaptcha.min',
|
'slidercaptcha' : 'slidercaptcha.min',
|
||||||
'comment' : 'comment.min',
|
'comment' : 'comment.min',
|
||||||
@@ -83,5 +82,3 @@ tbquire.config({
|
|||||||
'shop—main' : _win.uri+'/inc/functions/shop/assets/js/main.min',
|
'shop—main' : _win.uri+'/inc/functions/shop/assets/js/main.min',
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tbquire(['main']);
|
|
||||||
|
|||||||
@@ -1885,6 +1885,7 @@ _win.bd.on('click', '[remote-box]', function () {
|
|||||||
jQuery.post(remote, null, function (data) {
|
jQuery.post(remote, null, function (data) {
|
||||||
_this.html(data).removeAttr('remote-box');
|
_this.html(data).removeAttr('remote-box');
|
||||||
auto_fun();
|
auto_fun();
|
||||||
|
_this.trigger('aksrt:remote-loaded');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -3580,9 +3581,19 @@ _win.bd.on('submit', '.main-search form', function () {
|
|||||||
//搜索功能
|
//搜索功能
|
||||||
_win.bd.on('click', '.main-search-btn', function () {
|
_win.bd.on('click', '.main-search-btn', function () {
|
||||||
var _this = jQuery(this);
|
var _this = jQuery(this);
|
||||||
var _search_form = jQuery('.main-search form');
|
|
||||||
jQuery('.main-search').addClass('show');
|
jQuery('.main-search').addClass('show');
|
||||||
|
|
||||||
|
var _remote_search = jQuery('.main-search [remote-box]').first();
|
||||||
|
if (_remote_search.length) {
|
||||||
|
_remote_search.one('aksrt:remote-loaded', function () {
|
||||||
|
_this.trigger('click');
|
||||||
|
});
|
||||||
|
_remote_search.trigger('click');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var _search_form = jQuery('.main-search form');
|
||||||
|
|
||||||
if (_search_form.length) {
|
if (_search_form.length) {
|
||||||
var attr_ = 'search-';
|
var attr_ = 'search-';
|
||||||
var obj = {
|
var obj = {
|
||||||
@@ -4470,6 +4481,11 @@ function tilt_cases_init() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var cases = jQuery('.vanilla-tilt:not(.is-initialized)');
|
||||||
|
if (!cases.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
function setTranslate3d(imgs, translate3d) {
|
function setTranslate3d(imgs, translate3d) {
|
||||||
//先获取原有的transform
|
//先获取原有的transform
|
||||||
var transform = imgs[0].style.transform;
|
var transform = imgs[0].style.transform;
|
||||||
@@ -4483,7 +4499,7 @@ function tilt_cases_init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tbquire(['tilt'], function () {
|
tbquire(['tilt'], function () {
|
||||||
jQuery('.vanilla-tilt:not(.is-initialized)').each(function () {
|
cases.each(function () {
|
||||||
var _this = jQuery(this);
|
var _this = jQuery(this);
|
||||||
var imgs = _this.find('img');
|
var imgs = _this.find('img');
|
||||||
|
|
||||||
@@ -4584,13 +4600,6 @@ jQuery(document).ready(function () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(function () {
|
|
||||||
//获取登录用户数据,延迟2秒执行
|
|
||||||
jQuery.post(_win.ajax_url, {
|
|
||||||
action: 'get_current_user',
|
|
||||||
});
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
//内容高度限制
|
//内容高度限制
|
||||||
posts_limit_height();
|
posts_limit_height();
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -165,6 +165,30 @@ add_action('enqueue_block_editor_assets', function () {
|
|||||||
add_action('enqueue_block_assets', function () {
|
add_action('enqueue_block_assets', function () {
|
||||||
if (is_admin()) return; // Already loaded in editor
|
if (is_admin()) return; // Already loaded in editor
|
||||||
|
|
||||||
|
$posts = [];
|
||||||
|
$queried = get_queried_object();
|
||||||
|
if ($queried instanceof \WP_Post) {
|
||||||
|
$posts[$queried->ID] = $queried;
|
||||||
|
}
|
||||||
|
|
||||||
|
global $wp_query;
|
||||||
|
if ($wp_query instanceof \WP_Query) {
|
||||||
|
foreach ((array) $wp_query->posts as $post) {
|
||||||
|
if ($post instanceof \WP_Post) {
|
||||||
|
$posts[$post->ID] = $post;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$has_carousel = false;
|
||||||
|
foreach ($posts as $post) {
|
||||||
|
if (has_block('aksrt/carousel', $post)) {
|
||||||
|
$has_carousel = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!$has_carousel) return;
|
||||||
|
|
||||||
$base_uri = get_template_directory_uri();
|
$base_uri = get_template_directory_uri();
|
||||||
$blocks_css = get_template_directory() . '/assets/css/gutenberg-blocks.css';
|
$blocks_css = get_template_directory() . '/assets/css/gutenberg-blocks.css';
|
||||||
if (file_exists($blocks_css)) {
|
if (file_exists($blocks_css)) {
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ if (!function_exists('aksrt_footer_navbar_search')) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
$remote = aksrt_get_remote_box([
|
$remote = aksrt_get_remote_box([
|
||||||
'type' => 'load',
|
'type' => 'click',
|
||||||
'class' => '',
|
'class' => '',
|
||||||
'loader' => '<div class="search-input"><p><i class="placeholder s1 mr6"></i><i class="placeholder s1 mr6"></i><i class="placeholder s1 mr6"></i></p><p class="placeholder k2"></p><p class="placeholder t1"></p><p><i class="placeholder s1 mr6"></i><i class="placeholder s1 mr6"></i><i class="placeholder s1 mr6"></i><i class="placeholder s1 mr6"></i></p><p class="placeholder k1"></p><p class="placeholder t1"></p><p></p><p class="placeholder k1" style="height:80px;"></p></div>',
|
'loader' => '<div class="search-input"><p><i class="placeholder s1 mr6"></i><i class="placeholder s1 mr6"></i><i class="placeholder s1 mr6"></i></p><p class="placeholder k2"></p><p class="placeholder t1"></p><p><i class="placeholder s1 mr6"></i><i class="placeholder s1 mr6"></i><i class="placeholder s1 mr6"></i><i class="placeholder s1 mr6"></i></p><p class="placeholder k1"></p><p class="placeholder t1"></p><p></p><p class="placeholder k1" style="height:80px;"></p></div>',
|
||||||
'query' => [
|
'query' => [
|
||||||
@@ -110,20 +110,8 @@ if (!function_exists('aksrt_footer_navbar_search')) :
|
|||||||
}
|
}
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if (!function_exists('aksrt_ajax_legacy_current_user_ping')) :
|
|
||||||
/** Satisfy the reference runtime's one-shot user-state refresh request. */
|
|
||||||
function aksrt_ajax_legacy_current_user_ping(): void {
|
|
||||||
wp_send_json_success([
|
|
||||||
'logged_in' => is_user_logged_in(),
|
|
||||||
'user_id' => get_current_user_id(),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
endif;
|
|
||||||
|
|
||||||
add_action('wp_ajax_menu_search', 'aksrt_ajax_menu_search');
|
add_action('wp_ajax_menu_search', 'aksrt_ajax_menu_search');
|
||||||
add_action('wp_ajax_nopriv_menu_search', 'aksrt_ajax_menu_search');
|
add_action('wp_ajax_nopriv_menu_search', 'aksrt_ajax_menu_search');
|
||||||
add_action('wp_ajax_search_box', 'aksrt_ajax_search_box');
|
add_action('wp_ajax_search_box', 'aksrt_ajax_search_box');
|
||||||
add_action('wp_ajax_nopriv_search_box', 'aksrt_ajax_search_box');
|
add_action('wp_ajax_nopriv_search_box', 'aksrt_ajax_search_box');
|
||||||
add_action('wp_ajax_get_current_user', 'aksrt_ajax_legacy_current_user_ping');
|
|
||||||
add_action('wp_ajax_nopriv_get_current_user', 'aksrt_ajax_legacy_current_user_ping');
|
|
||||||
add_action('wp_footer', 'aksrt_footer_navbar_search', 10);
|
add_action('wp_footer', 'aksrt_footer_navbar_search', 10);
|
||||||
|
|||||||
+18
-50
@@ -13,54 +13,29 @@ trait ScriptsPart1b {
|
|||||||
$base_uri = get_template_directory_uri();
|
$base_uri = get_template_directory_uri();
|
||||||
$version = AKSRT_VERSION;
|
$version = AKSRT_VERSION;
|
||||||
|
|
||||||
$runtime_uri = $base_uri . '/assets';
|
|
||||||
$fa5_uri = $base_uri . '/assets/fontawesome5';
|
|
||||||
|
|
||||||
// Keep the WordPress handle but make its modern core build the only runtime.
|
// Keep the WordPress handle but make its modern core build the only runtime.
|
||||||
$wp_scripts = wp_scripts();
|
$wp_scripts = wp_scripts();
|
||||||
if (isset($wp_scripts->registered['jquery'])) {
|
if (isset($wp_scripts->registered['jquery'])) {
|
||||||
$wp_scripts->registered['jquery']->deps = ['jquery-core'];
|
$wp_scripts->registered['jquery']->deps = ['jquery-core'];
|
||||||
}
|
}
|
||||||
wp_enqueue_script('jquery');
|
wp_enqueue_script('jquery');
|
||||||
|
|
||||||
wp_enqueue_script(
|
|
||||||
'aksrt-passive-events',
|
|
||||||
$base_uri . '/assets/js/passive-events.js',
|
|
||||||
[],
|
|
||||||
$version,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
wp_enqueue_style('_bootstrap', $runtime_uri . '/css/bootstrap.min.css', [], '3.4.1');
|
|
||||||
wp_enqueue_style('_fontawesome', $fa5_uri . '/css/all.min.css', [], '5.15.4');
|
|
||||||
wp_enqueue_style('_main', $runtime_uri . '/css/main.min.css', ['_bootstrap', '_fontawesome'], $version);
|
|
||||||
wp_enqueue_script('bootstrap', $runtime_uri . '/js/runtime/libs/bootstrap.min.js', ['jquery'], '3.4.1', true);
|
|
||||||
|
|
||||||
wp_enqueue_style('aksrt-style', get_stylesheet_uri(), ['_main'], $version);
|
|
||||||
$lazy_animation = class_exists('\AKSRT\Settings\Settings')
|
|
||||||
? (string) \AKSRT\Settings\Settings::get_value('lazy_animation', 'blur')
|
|
||||||
: 'blur';
|
|
||||||
if ($lazy_animation === 'fade') {
|
|
||||||
wp_add_inline_style('aksrt-style', '.lazyloaded{--lazy-animation:lazy_fade!important;}');
|
|
||||||
} elseif ($lazy_animation === 'scale') {
|
|
||||||
wp_add_inline_style('aksrt-style', '.lazyloaded{--lazy-animation:lazy_scale!important;}');
|
|
||||||
}
|
|
||||||
|
|
||||||
$core_bundle = get_template_directory() . '/assets/css/build/core.css';
|
|
||||||
wp_enqueue_style(
|
|
||||||
'aksrt-core',
|
|
||||||
$base_uri . '/assets/css/build/core.css',
|
|
||||||
['aksrt-style'],
|
|
||||||
file_exists($core_bundle) ? (string) filemtime($core_bundle) : $version
|
|
||||||
);
|
|
||||||
|
|
||||||
$public_bundle = get_template_directory() . '/assets/css/build/public.css';
|
$public_bundle = get_template_directory() . '/assets/css/build/public.css';
|
||||||
wp_enqueue_style(
|
wp_enqueue_style(
|
||||||
'aksrt-public',
|
'aksrt-public',
|
||||||
$base_uri . '/assets/css/build/public.css',
|
$base_uri . '/assets/css/build/public.css',
|
||||||
['aksrt-core', '_fontawesome'],
|
[],
|
||||||
file_exists($public_bundle) ? (string) filemtime($public_bundle) : $version
|
file_exists($public_bundle) ? (string) filemtime($public_bundle) : $version
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$lazy_animation = class_exists('\AKSRT\Settings\Settings')
|
||||||
|
? (string) \AKSRT\Settings\Settings::get_value('lazy_animation', 'blur')
|
||||||
|
: 'blur';
|
||||||
|
if ($lazy_animation === 'fade') {
|
||||||
|
wp_add_inline_style('aksrt-public', '.lazyloaded{--lazy-animation:lazy_fade!important;}');
|
||||||
|
} elseif ($lazy_animation === 'scale') {
|
||||||
|
wp_add_inline_style('aksrt-public', '.lazyloaded{--lazy-animation:lazy_scale!important;}');
|
||||||
|
}
|
||||||
|
|
||||||
$core_dep = 'aksrt-public';
|
$core_dep = 'aksrt-public';
|
||||||
|
|
||||||
$deps = [$core_dep];
|
$deps = [$core_dep];
|
||||||
@@ -100,7 +75,7 @@ trait ScriptsPart1b {
|
|||||||
&& class_exists('\AKSRT\Settings\Settings')
|
&& class_exists('\AKSRT\Settings\Settings')
|
||||||
&& !empty(\AKSRT\Settings\Settings::get_signin_reward_settings()['enabled']);
|
&& !empty(\AKSRT\Settings\Settings::get_signin_reward_settings()['enabled']);
|
||||||
$vip_coordinator = get_template_directory() . '/assets/js/vip-purchase-coordinator.js';
|
$vip_coordinator = get_template_directory() . '/assets/js/vip-purchase-coordinator.js';
|
||||||
if (($vip_on || $credits_on || $affiliate_on) && file_exists($vip_coordinator)) {
|
if ((($vip_on && is_user_logged_in()) || $credits_on || $affiliate_on) && file_exists($vip_coordinator)) {
|
||||||
wp_enqueue_script(
|
wp_enqueue_script(
|
||||||
'aksrt-vip-coordinator',
|
'aksrt-vip-coordinator',
|
||||||
$base_uri . '/assets/js/vip-purchase-coordinator.js',
|
$base_uri . '/assets/js/vip-purchase-coordinator.js',
|
||||||
@@ -111,7 +86,7 @@ trait ScriptsPart1b {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// VIP modal (legacy .pay-vip)
|
// VIP modal (legacy .pay-vip)
|
||||||
if ($vip_on) {
|
if ($vip_on && is_user_logged_in()) {
|
||||||
$vip_css = get_template_directory() . '/assets/css/frontend/vip-modal.css';
|
$vip_css = get_template_directory() . '/assets/css/frontend/vip-modal.css';
|
||||||
if (file_exists($vip_css)) {
|
if (file_exists($vip_css)) {
|
||||||
wp_enqueue_style(
|
wp_enqueue_style(
|
||||||
@@ -189,7 +164,7 @@ trait ScriptsPart1b {
|
|||||||
// CMS route detection.
|
// CMS route detection.
|
||||||
$is_cms_mode = function_exists('aksrt_is_cms_mode') ? aksrt_is_cms_mode() : false;
|
$is_cms_mode = function_exists('aksrt_is_cms_mode') ? aksrt_is_cms_mode() : false;
|
||||||
// 首页/归档/搜索:卡片 + 侧栏
|
// 首页/归档/搜索:卡片 + 侧栏
|
||||||
if ($is_home_or_archive) {
|
if ($is_home_or_archive && !$is_fixed_homepage) {
|
||||||
$enqueue_module('post-card');
|
$enqueue_module('post-card');
|
||||||
$enqueue_module('sidebar');
|
$enqueue_module('sidebar');
|
||||||
$enqueue_module('breadcrumb');
|
$enqueue_module('breadcrumb');
|
||||||
@@ -531,7 +506,7 @@ trait ScriptsPart1b {
|
|||||||
wp_enqueue_script(
|
wp_enqueue_script(
|
||||||
'aksrt-messages',
|
'aksrt-messages',
|
||||||
$base_uri . '/assets/js/messages.js',
|
$base_uri . '/assets/js/messages.js',
|
||||||
['loader_js'],
|
['aksrt-runtime'],
|
||||||
(string) filemtime($messages_js),
|
(string) filemtime($messages_js),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
@@ -546,7 +521,7 @@ trait ScriptsPart1b {
|
|||||||
wp_enqueue_script(
|
wp_enqueue_script(
|
||||||
'aksrt-share-data',
|
'aksrt-share-data',
|
||||||
$base_uri . '/assets/js/share-data-builder.js',
|
$base_uri . '/assets/js/share-data-builder.js',
|
||||||
['loader_js'],
|
['aksrt-runtime'],
|
||||||
(string) filemtime($share_data_js),
|
(string) filemtime($share_data_js),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
@@ -560,7 +535,7 @@ trait ScriptsPart1b {
|
|||||||
wp_enqueue_script(
|
wp_enqueue_script(
|
||||||
'aksrt-poster-share',
|
'aksrt-poster-share',
|
||||||
$base_uri . '/assets/js/poster-share.js',
|
$base_uri . '/assets/js/poster-share.js',
|
||||||
['loader_js', 'aksrt-share-data'],
|
['aksrt-runtime', 'aksrt-share-data'],
|
||||||
(string) filemtime($poster_js),
|
(string) filemtime($poster_js),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
@@ -610,18 +585,11 @@ trait ScriptsPart1b {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($is_fixed_homepage) {
|
if ($is_fixed_homepage) {
|
||||||
$enqueue_module('post-card');
|
|
||||||
$homepage_style_deps = ['aksrt-public', 'aksrt-post-card'];
|
|
||||||
$homepage_style_deps = array_values(array_filter(
|
|
||||||
$homepage_style_deps,
|
|
||||||
static fn(string $handle): bool => wp_style_is($handle, 'registered')
|
|
||||||
));
|
|
||||||
|
|
||||||
$homepage_bundle = get_template_directory() . '/assets/css/build/homepage.css';
|
$homepage_bundle = get_template_directory() . '/assets/css/build/homepage.css';
|
||||||
wp_enqueue_style(
|
wp_enqueue_style(
|
||||||
'aksrt-homepage-fixed',
|
'aksrt-homepage-fixed',
|
||||||
$base_uri . '/assets/css/build/homepage.css',
|
$base_uri . '/assets/css/build/homepage.css',
|
||||||
$homepage_style_deps,
|
['aksrt-public'],
|
||||||
file_exists($homepage_bundle) ? (string) filemtime($homepage_bundle) : $version
|
file_exists($homepage_bundle) ? (string) filemtime($homepage_bundle) : $version
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-36
@@ -19,21 +19,20 @@ trait ScriptsPart1c {
|
|||||||
/**
|
/**
|
||||||
* Fonts / FA / global JS stack / aksrtData (split from enqueue_public).
|
* Fonts / FA / global JS stack / aksrtData (split from enqueue_public).
|
||||||
*/
|
*/
|
||||||
private function enqueue_public_fonts_js_and_data($base_uri, $core_dep, $deps, $is_fixed_homepage, $is_home_or_archive, $is_single_post, $is_single_resource, $version): void {
|
private function enqueue_public_fonts_js_and_data($base_uri, $core_dep, $deps, $is_fixed_homepage, $is_home_or_archive, $is_single_post, $is_single_resource, $version): void {
|
||||||
$runtime_uri = $base_uri . '/assets';
|
$runtime_uri = $base_uri . '/assets';
|
||||||
$runtime_loader_path = get_template_directory() . '/assets/js/runtime/loader.js';
|
|
||||||
$runtime_main_path = get_template_directory() . '/assets/js/runtime/main.min.js';
|
$runtime_main_path = get_template_directory() . '/assets/js/runtime/main.min.js';
|
||||||
$runtime_loader_version = file_exists($runtime_loader_path) ? (string) filemtime($runtime_loader_path) : $version;
|
|
||||||
$runtime_version = file_exists($runtime_main_path) ? (string) filemtime($runtime_main_path) : $version;
|
$runtime_version = file_exists($runtime_main_path) ? (string) filemtime($runtime_main_path) : $version;
|
||||||
|
$public_runtime_path = get_template_directory() . '/assets/js/build/public.js';
|
||||||
wp_enqueue_script(
|
wp_enqueue_script(
|
||||||
'loader_js',
|
'aksrt-runtime',
|
||||||
$runtime_uri . '/js/runtime/loader.js',
|
$base_uri . '/assets/js/build/public.js',
|
||||||
['jquery', 'bootstrap'],
|
['jquery'],
|
||||||
$runtime_loader_version,
|
file_exists($public_runtime_path) ? (string) filemtime($public_runtime_path) : $version,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
wp_localize_script(
|
wp_localize_script(
|
||||||
'loader_js',
|
'aksrt-runtime',
|
||||||
'_win',
|
'_win',
|
||||||
[
|
[
|
||||||
'views' => '',
|
'views' => '',
|
||||||
@@ -82,16 +81,6 @@ trait ScriptsPart1c {
|
|||||||
],
|
],
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
$public_runtime_path = get_template_directory() . '/assets/js/build/public.js';
|
|
||||||
wp_enqueue_script(
|
|
||||||
'aksrt-runtime',
|
|
||||||
$base_uri . '/assets/js/build/public.js',
|
|
||||||
['loader_js'],
|
|
||||||
file_exists($public_runtime_path) ? (string) filemtime($public_runtime_path) : $version,
|
|
||||||
true
|
|
||||||
);
|
|
||||||
|
|
||||||
// AJAX 调试(WP_DEBUG 或 ?aksrt_ajax_debug=1):记录所有失败的
|
// AJAX 调试(WP_DEBUG 或 ?aksrt_ajax_debug=1):记录所有失败的
|
||||||
// jQuery ajax / fetch 请求,用于定位 vendor main.min.js 的 400 "0" 来源。
|
// jQuery ajax / fetch 请求,用于定位 vendor main.min.js 的 400 "0" 来源。
|
||||||
if (function_exists('aksrt_ajax_debug_enabled') && aksrt_ajax_debug_enabled()) {
|
if (function_exists('aksrt_ajax_debug_enabled') && aksrt_ajax_debug_enabled()) {
|
||||||
@@ -133,18 +122,6 @@ trait ScriptsPart1c {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Instant page prefetch (hover to preload)
|
|
||||||
$instant_page_js = get_template_directory() . '/assets/js/instant-page.js';
|
|
||||||
if (file_exists($instant_page_js)) {
|
|
||||||
wp_enqueue_script(
|
|
||||||
'aksrt-instant-page',
|
|
||||||
$base_uri . '/assets/js/instant-page.js',
|
|
||||||
[],
|
|
||||||
(string) filemtime($instant_page_js),
|
|
||||||
false // load in <head> for early prefetch capability
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Section navs: article TOC / scrollspy
|
// Section navs: article TOC / scrollspy
|
||||||
$section_navs_js = get_template_directory() . '/assets/js/section-navs.js';
|
$section_navs_js = get_template_directory() . '/assets/js/section-navs.js';
|
||||||
if (is_singular() && file_exists($section_navs_js)) {
|
if (is_singular() && file_exists($section_navs_js)) {
|
||||||
@@ -321,7 +298,7 @@ trait ScriptsPart1c {
|
|||||||
wp_enqueue_script(
|
wp_enqueue_script(
|
||||||
'aksrt-weixin-share',
|
'aksrt-weixin-share',
|
||||||
$base_uri . '/assets/js/weixin-share.js',
|
$base_uri . '/assets/js/weixin-share.js',
|
||||||
['loader_js'],
|
['aksrt-runtime'],
|
||||||
(string) filemtime($weixin_share_path),
|
(string) filemtime($weixin_share_path),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
@@ -332,7 +309,7 @@ trait ScriptsPart1c {
|
|||||||
wp_enqueue_script(
|
wp_enqueue_script(
|
||||||
'aksrt-post-share',
|
'aksrt-post-share',
|
||||||
$base_uri . '/assets/js/post-share.js',
|
$base_uri . '/assets/js/post-share.js',
|
||||||
['loader_js', 'aksrt-weixin-share', 'aksrt-share-data'],
|
['aksrt-runtime', 'aksrt-weixin-share', 'aksrt-share-data'],
|
||||||
(string) filemtime($post_share_path),
|
(string) filemtime($post_share_path),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
@@ -348,10 +325,7 @@ trait ScriptsPart1c {
|
|||||||
// 数据注入 - 全站统一消费 window.aksrtData
|
// 数据注入 - 全站统一消费 window.aksrtData
|
||||||
// Attach to aksrt-runtime (loaded before all core modules) so ajaxUrl/nonce
|
// Attach to aksrt-runtime (loaded before all core modules) so ajaxUrl/nonce
|
||||||
// exist before pagination/search/article handlers run.
|
// exist before pagination/search/article handlers run.
|
||||||
$aksrt_data_handle = wp_script_is('aksrt-runtime', 'registered') || wp_script_is('aksrt-runtime', 'enqueued')
|
wp_localize_script('aksrt-runtime', 'aksrtData', [
|
||||||
? 'aksrt-runtime'
|
|
||||||
: 'loader_js';
|
|
||||||
wp_localize_script($aksrt_data_handle, 'aksrtData', [
|
|
||||||
'ajaxUrl' => admin_url('admin-ajax.php'),
|
'ajaxUrl' => admin_url('admin-ajax.php'),
|
||||||
'nonce' => wp_create_nonce('aksrt_public_nonce'),
|
'nonce' => wp_create_nonce('aksrt_public_nonce'),
|
||||||
'restNonce' => wp_create_nonce('wp_rest'),
|
'restNonce' => wp_create_nonce('wp_rest'),
|
||||||
|
|||||||
@@ -51,8 +51,8 @@ final class AssetManager {
|
|||||||
$uri = get_template_directory_uri();
|
$uri = get_template_directory_uri();
|
||||||
$css = $root . '/assets/widgets/frontend.css';
|
$css = $root . '/assets/widgets/frontend.css';
|
||||||
$js = $root . '/assets/widgets/frontend.js';
|
$js = $root . '/assets/widgets/frontend.js';
|
||||||
wp_register_style(self::STYLE_HANDLE, $uri . '/assets/widgets/frontend.css', ['aksrt-style'], is_file($css) ? (string) filemtime($css) : null);
|
wp_register_style(self::STYLE_HANDLE, $uri . '/assets/widgets/frontend.css', ['aksrt-public'], is_file($css) ? (string) filemtime($css) : null);
|
||||||
wp_register_script(self::SCRIPT_HANDLE, $uri . '/assets/widgets/frontend.js', ['loader_js'], is_file($js) ? (string) filemtime($js) : null, true);
|
wp_register_script(self::SCRIPT_HANDLE, $uri . '/assets/widgets/frontend.js', ['aksrt-runtime'], is_file($js) ? (string) filemtime($js) : null, true);
|
||||||
$third_party = $uri . '/assets/widgets/third-party/';
|
$third_party = $uri . '/assets/widgets/third-party/';
|
||||||
wp_register_script('aksrt-widget-hls', $third_party . 'hls.min.js', [], 'reference-pinned', true);
|
wp_register_script('aksrt-widget-hls', $third_party . 'hls.min.js', [], 'reference-pinned', true);
|
||||||
wp_register_script('aksrt-widget-flv', $third_party . 'flv.min.js', [], 'reference-pinned', true);
|
wp_register_script('aksrt-widget-flv', $third_party . 'flv.min.js', [], 'reference-pinned', true);
|
||||||
|
|||||||
@@ -127,6 +127,8 @@ test('the legacy runtime owns lazySizes while AKSRT consumers share one image-at
|
|||||||
const scripts = read('src/Core/ScriptsPart1c.php');
|
const scripts = read('src/Core/ScriptsPart1c.php');
|
||||||
const routeScripts = read('src/Core/ScriptsPart1b.php');
|
const routeScripts = read('src/Core/ScriptsPart1b.php');
|
||||||
const builder = read('tools/build-public-assets.mjs');
|
const builder = read('tools/build-public-assets.mjs');
|
||||||
|
const loader = read('assets/js/runtime/loader.js');
|
||||||
|
const searchShell = read('inc/helpers/header/aksrt-header-menu-search.php');
|
||||||
const pagination = read('assets/js/core/pagination.js');
|
const pagination = read('assets/js/core/pagination.js');
|
||||||
const widgets = read('assets/widgets/frontend.js');
|
const widgets = read('assets/widgets/frontend.js');
|
||||||
|
|
||||||
@@ -134,7 +136,9 @@ test('the legacy runtime owns lazySizes while AKSRT consumers share one image-at
|
|||||||
assert.match(bridge, /window\.aksrtGetLazyImageAttr = function/);
|
assert.match(bridge, /window\.aksrtGetLazyImageAttr = function/);
|
||||||
assert.match(builder, /assets\/js\/lazy-image-attr\.js/);
|
assert.match(builder, /assets\/js\/lazy-image-attr\.js/);
|
||||||
assert.match(builder, /assets\/js\/rehydrate\.js/);
|
assert.match(builder, /assets\/js\/rehydrate\.js/);
|
||||||
assert.match(scripts, /assets\/js\/build\/public\.js'[\s\S]*?\['loader_js'\]/);
|
assert.match(builder, /assets\/js\/runtime\/main\.min\.js/);
|
||||||
|
assert.doesNotMatch(loader, /['"]main['"]\s*:|tbquire\(\[['"]main['"]\]\)/);
|
||||||
|
assert.match(scripts, /assets\/js\/build\/public\.js'[\s\S]*?\['jquery'\]/);
|
||||||
for (const file of ['pay-vip.js', 'order-center.js', 'page-navs.js', 'credits.js']) {
|
for (const file of ['pay-vip.js', 'order-center.js', 'page-navs.js', 'credits.js']) {
|
||||||
const blocks = enqueueBlocksFor(routeScripts, file);
|
const blocks = enqueueBlocksFor(routeScripts, file);
|
||||||
assert.ok(blocks.length > 0, `${file} must be enqueued`);
|
assert.ok(blocks.length > 0, `${file} must be enqueued`);
|
||||||
@@ -147,6 +151,10 @@ test('the legacy runtime owns lazySizes while AKSRT consumers share one image-at
|
|||||||
assert.match(runtime, /var bg = _this\.attr\('data-bg'\)[\s\S]*?background-image/);
|
assert.match(runtime, /var bg = _this\.attr\('data-bg'\)[\s\S]*?background-image/);
|
||||||
assert.match(runtime, /var lazyload_action = _this\.attr\('lazyload-action'\)/);
|
assert.match(runtime, /var lazyload_action = _this\.attr\('lazyload-action'\)/);
|
||||||
assert.match(runtime, /if \(_this\.attr\('remote-box'\)\)[\s\S]*?_this\.click\(\)/);
|
assert.match(runtime, /if \(_this\.attr\('remote-box'\)\)[\s\S]*?_this\.click\(\)/);
|
||||||
|
assert.match(searchShell, /'type'\s*=>\s*'click'/);
|
||||||
|
assert.match(runtime, /aksrt:remote-loaded/);
|
||||||
|
assert.doesNotMatch(runtime, /action:\s*'get_current_user'/);
|
||||||
|
assert.match(runtime, /var cases = jQuery\('\.vanilla-tilt:not\(\.is-initialized\)'\);[\s\S]*?if \(!cases\.length\)[\s\S]*?tbquire\(\['tilt'\]/);
|
||||||
assert.doesNotMatch(pagination, /IntersectionObserver|new Image\(/);
|
assert.doesNotMatch(pagination, /IntersectionObserver|new Image\(/);
|
||||||
assert.doesNotMatch(widgets, /IntersectionObserver/);
|
assert.doesNotMatch(widgets, /IntersectionObserver/);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -280,6 +280,12 @@ test('AJAX pagination can recover, caps auto loading and rehydrates appended med
|
|||||||
assert.match(read('tools/build-public-assets.mjs'), /assets\/js\/grade\.min\.js/);
|
assert.match(read('tools/build-public-assets.mjs'), /assets\/js\/grade\.min\.js/);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('front-end carousel CSS is conditional on carousel block content', () => {
|
||||||
|
const hooks = read('inc/core-hooks/part-3.php');
|
||||||
|
assert.match(hooks, /has_block\('aksrt\/carousel', \$post\)/);
|
||||||
|
assert.match(hooks, /if \(!\$has_carousel\) return;[\s\S]*?'aksrt-gutenberg-blocks-front'/);
|
||||||
|
});
|
||||||
|
|
||||||
test('the pinned visual baseline records all source checksums', () => {
|
test('the pinned visual baseline records all source checksums', () => {
|
||||||
const baseline = JSON.parse(read('tests/visual/zibll-9.0-article-baseline.json'));
|
const baseline = JSON.parse(read('tests/visual/zibll-9.0-article-baseline.json'));
|
||||||
assert.equal(baseline.theme, 'Zibll');
|
assert.equal(baseline.theme, 'Zibll');
|
||||||
|
|||||||
@@ -191,7 +191,8 @@ test('notyf CSS and WordPress enqueue match the reference contract', () => {
|
|||||||
|
|
||||||
assert.match(builder, /assets\/js\/notyf\.js/);
|
assert.match(builder, /assets\/js\/notyf\.js/);
|
||||||
assert.match(builder, /assets\/css\/frontend\/notyf\.css/);
|
assert.match(builder, /assets\/css\/frontend\/notyf\.css/);
|
||||||
assert.match(scripts, /'aksrt-runtime',[\s\S]*?'\/assets\/js\/build\/public\.js',[\s\S]*?\['loader_js'\]/);
|
assert.match(builder, /assets\/js\/runtime\/loader\.js/);
|
||||||
|
assert.match(scripts, /'aksrt-runtime',[\s\S]*?'\/assets\/js\/build\/public\.js',[\s\S]*?\['jquery'\]/);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('balance center actions use direct fixed-id notyf flows', () => {
|
test('balance center actions use direct fixed-id notyf flows', () => {
|
||||||
@@ -306,7 +307,7 @@ test('payment entry points never load the removed legacy pay runtime', () => {
|
|||||||
assert.match(content, /data-aksrt-pay-content/);
|
assert.match(content, /data-aksrt-pay-content/);
|
||||||
assert.match(scripts, /'aksrt-pay-vip'/);
|
assert.match(scripts, /'aksrt-pay-vip'/);
|
||||||
assert.match(scripts, /'aksrt-cms-download'/);
|
assert.match(scripts, /'aksrt-cms-download'/);
|
||||||
assert.match(scripts, /\$runtime_loader_version = file_exists\(\$runtime_loader_path\)/);
|
assert.match(scripts, /\$public_runtime_path = get_template_directory\(\) \. '\/assets\/js\/build\/public\.js'/);
|
||||||
assert.match(scripts, /\$runtime_version = file_exists\(\$runtime_main_path\)/);
|
assert.match(scripts, /\$runtime_version = file_exists\(\$runtime_main_path\)/);
|
||||||
assert.match(scripts, /'ver'\s*=> \$runtime_version/);
|
assert.match(scripts, /'ver'\s*=> \$runtime_version/);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,7 +7,11 @@ const cssBuildDir = path.join(repoRoot, 'assets/css/build');
|
|||||||
const jsBuildDir = path.join(repoRoot, 'assets/js/build');
|
const jsBuildDir = path.join(repoRoot, 'assets/js/build');
|
||||||
|
|
||||||
const cssBundles = {
|
const cssBundles = {
|
||||||
'core.css': [
|
'public.css': [
|
||||||
|
'assets/css/bootstrap.min.css',
|
||||||
|
'assets/fontawesome5/css/all.min.css',
|
||||||
|
'assets/css/main.min.css',
|
||||||
|
'style.css',
|
||||||
'assets/css/core/tokens.css',
|
'assets/css/core/tokens.css',
|
||||||
'assets/css/core/reset.css',
|
'assets/css/core/reset.css',
|
||||||
'assets/css/core/typography.css',
|
'assets/css/core/typography.css',
|
||||||
@@ -17,8 +21,6 @@ const cssBundles = {
|
|||||||
'assets/css/core/animations.css',
|
'assets/css/core/animations.css',
|
||||||
'assets/css/core/components-ext.css',
|
'assets/css/core/components-ext.css',
|
||||||
'assets/css/core/color-utilities.css',
|
'assets/css/core/color-utilities.css',
|
||||||
],
|
|
||||||
'public.css': [
|
|
||||||
'assets/css/frontend/base.css',
|
'assets/css/frontend/base.css',
|
||||||
'assets/css/frontend/header-userbox.css',
|
'assets/css/frontend/header-userbox.css',
|
||||||
'assets/css/frontend/card-primitives.css',
|
'assets/css/frontend/card-primitives.css',
|
||||||
@@ -35,6 +37,9 @@ const cssBundles = {
|
|||||||
'assets/css/frontend/notyf.css',
|
'assets/css/frontend/notyf.css',
|
||||||
],
|
],
|
||||||
'homepage.css': [
|
'homepage.css': [
|
||||||
|
'assets/css/frontend/post-card.css',
|
||||||
|
'assets/css/frontend/sidebar.css',
|
||||||
|
'assets/css/frontend/breadcrumb.css',
|
||||||
'assets/css/frontend/homepage-fixed/base.css',
|
'assets/css/frontend/homepage-fixed/base.css',
|
||||||
'assets/css/frontend/homepage-fixed/ajax-tab-skeleton-placeholder.css',
|
'assets/css/frontend/homepage-fixed/ajax-tab-skeleton-placeholder.css',
|
||||||
'assets/css/frontend/homepage-fixed/ajax-tab-error-state.css',
|
'assets/css/frontend/homepage-fixed/ajax-tab-error-state.css',
|
||||||
@@ -42,6 +47,9 @@ const cssBundles = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const publicScripts = [
|
const publicScripts = [
|
||||||
|
'assets/js/passive-events.js',
|
||||||
|
'assets/js/runtime/libs/bootstrap.min.js',
|
||||||
|
'assets/js/runtime/loader.js',
|
||||||
'assets/js/lazy-image-attr.js',
|
'assets/js/lazy-image-attr.js',
|
||||||
'assets/js/rehydrate.js',
|
'assets/js/rehydrate.js',
|
||||||
'assets/js/notyf.js',
|
'assets/js/notyf.js',
|
||||||
@@ -67,6 +75,8 @@ const publicScripts = [
|
|||||||
'assets/js/enhancements2.js',
|
'assets/js/enhancements2.js',
|
||||||
'assets/js/color-extract.js',
|
'assets/js/color-extract.js',
|
||||||
'assets/js/effects.js',
|
'assets/js/effects.js',
|
||||||
|
'assets/js/runtime/main.min.js',
|
||||||
|
'assets/js/instant-page.js',
|
||||||
];
|
];
|
||||||
|
|
||||||
function normalizePath(filePath) {
|
function normalizePath(filePath) {
|
||||||
|
|||||||
Reference in New Issue
Block a user