init
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<update handle="mpblog_news_banner"/>
|
||||
<head>
|
||||
<css src="Mageplaza_Blog::css/news-list.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<attribute name="class" value="esun-news-list-page"/>
|
||||
<referenceBlock name="mp.blog.category.post.list" template="Mageplaza_Blog::post/news-list.phtml"/>
|
||||
<referenceBlock name="catalog.compare.sidebar" remove="true"/>
|
||||
<referenceBlock name="wishlist_sidebar" remove="true"/>
|
||||
</body>
|
||||
</page>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0"?>
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<body>
|
||||
<referenceContainer name="top.container">
|
||||
<container name="esun.news.top.banner.container"
|
||||
htmlTag="div"
|
||||
htmlClass="esun-news-top-banner"
|
||||
before="-">
|
||||
<block class="Magento\Cms\Block\Block" name="esun.news.top.banner">
|
||||
<arguments>
|
||||
<argument name="block_id" xsi:type="string">news_list_top_banner</argument>
|
||||
</arguments>
|
||||
</block>
|
||||
</container>
|
||||
</referenceContainer>
|
||||
</body>
|
||||
</page>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<update handle="mpblog_news_banner"/>
|
||||
<head>
|
||||
<css src="Mageplaza_Blog::css/news-list.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<attribute name="class" value="esun-news-list-page"/>
|
||||
<referenceBlock name="mpblog.post.list" template="Mageplaza_Blog::post/news-list.phtml"/>
|
||||
<referenceBlock name="mpblog.copy.right" remove="true"/>
|
||||
<referenceBlock name="catalog.compare.sidebar" remove="true"/>
|
||||
<referenceBlock name="wishlist_sidebar" remove="true"/>
|
||||
</body>
|
||||
</page>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0"?>
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<head>
|
||||
<css src="Mageplaza_Blog::css/news-detail.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<referenceBlock name="page.main.title" remove="true"/>
|
||||
<referenceContainer name="content">
|
||||
<block class="Mageplaza\Blog\Block\Post\View"
|
||||
name="esun.news.detail.header"
|
||||
before="mpblog.post.view"
|
||||
template="Mageplaza_Blog::post/news-detail-header.phtml"
|
||||
cacheable="false">
|
||||
<block class="Mageplaza\SocialShare\Block\SocialShare"
|
||||
name="esun.news.detail.social.share"
|
||||
as="social_share"
|
||||
template="Mageplaza_SocialShare::socialshare.phtml">
|
||||
<arguments>
|
||||
<argument name="page" xsi:type="string">home_page</argument>
|
||||
<argument name="position" xsi:type="string">bottom_content</argument>
|
||||
<argument name="type" xsi:type="string">inline</argument>
|
||||
</arguments>
|
||||
</block>
|
||||
</block>
|
||||
</referenceContainer>
|
||||
<referenceBlock name="mpblog.post.view">
|
||||
<block class="Esun\Homepage\Block\NewsPostNavigation"
|
||||
name="esun.news.detail.navigation"
|
||||
as="mp_blog_post_view_add"
|
||||
template="Mageplaza_Blog::post/news-navigation.phtml"
|
||||
cacheable="false"/>
|
||||
</referenceBlock>
|
||||
<referenceBlock name="mp_blog_post_info" remove="true"/>
|
||||
<referenceBlock name="catalog.compare.sidebar" remove="true"/>
|
||||
<referenceBlock name="wishlist_sidebar" remove="true"/>
|
||||
</body>
|
||||
</page>
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Mageplaza\Blog\Block\Post\View;
|
||||
use Mageplaza\Blog\Model\Category;
|
||||
use Magento\Framework\Escaper;
|
||||
|
||||
/** @var View $block */
|
||||
/** @var Escaper $escaper */
|
||||
|
||||
$post = $block->getPost();
|
||||
$category = $post->getSelectedCategoriesCollection()->getFirstItem();
|
||||
$publishDate = $post->getPublishDate()
|
||||
? $block->getDateFormat($post->getPublishDate())
|
||||
: '';
|
||||
$views = (int) $post->getViewTraffic();
|
||||
$socialShareHtml = trim($block->getChildHtml('social_share'));
|
||||
?>
|
||||
<header class="esun-news-detail-header">
|
||||
<?php /** @var Category $category */ ?>
|
||||
<?php if ($category->getId()): ?>
|
||||
<a class="esun-news-detail-header__category"
|
||||
href="<?= $escaper->escapeUrl($block->getCategoryUrl($category)) ?>">
|
||||
<?= $escaper->escapeHtml($category->getName()) ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<h1 class="esun-news-detail-header__title">
|
||||
<?= $escaper->escapeHtml($post->getName()) ?>
|
||||
</h1>
|
||||
|
||||
<div class="esun-news-detail-header__meta">
|
||||
<?php if ($publishDate): ?>
|
||||
<time datetime="<?= $escaper->escapeHtmlAttr($post->getPublishDate()) ?>"
|
||||
class="esun-news-detail-header__meta-item">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
<rect x="3" y="5" width="18" height="16" rx="2"/>
|
||||
<path d="M16 3v4M8 3v4M3 10h18"/>
|
||||
<path d="M8 14h.01M12 14h.01M16 14h.01M8 18h.01M12 18h.01"/>
|
||||
</svg>
|
||||
<span><?= $escaper->escapeHtml($publishDate) ?></span>
|
||||
</time>
|
||||
<?php endif; ?>
|
||||
|
||||
<span class="esun-news-detail-header__meta-item">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path d="M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z"/>
|
||||
<circle cx="12" cy="12" r="2.75"/>
|
||||
</svg>
|
||||
<span><?= $escaper->escapeHtml(__('%1 views', $views)) ?></span>
|
||||
</span>
|
||||
|
||||
<?php if ($socialShareHtml !== ''): ?>
|
||||
<div class="esun-news-detail-header__social-share"
|
||||
aria-label="<?= $escaper->escapeHtmlAttr(__('Share this post')) ?>">
|
||||
<?= /* @noEscape */ $socialShareHtml ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</header>
|
||||
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Mageplaza\Blog\Block\Listpost;
|
||||
use Mageplaza\Blog\Helper\Data as BlogHelper;
|
||||
use Mageplaza\Blog\Model\Post;
|
||||
use Magento\Framework\Escaper;
|
||||
|
||||
/** @var Listpost $block */
|
||||
/** @var Escaper $escaper */
|
||||
|
||||
$postCollection = $block->getPostCollection();
|
||||
?>
|
||||
<div class="post-list-content esun-news-list" id="mpblog-list-container">
|
||||
<?php if ($postCollection && $postCollection->getSize()): ?>
|
||||
<div class="post-list-body">
|
||||
<?php /** @var Post $post */ ?>
|
||||
<?php foreach ($postCollection as $post): ?>
|
||||
<?php
|
||||
$postUrl = (string) $post->getUrl();
|
||||
$imageUrl = $post->getImage()
|
||||
? $block->resizeImage($post->getImage(), '600x')
|
||||
: $block->getViewFileUrl('Mageplaza_Blog::media/images/mageplaza-logo-default.png');
|
||||
$description = trim((string) preg_replace(
|
||||
'/\s+/u',
|
||||
' ',
|
||||
// phpcs:ignore Magento2.Functions.DiscouragedFunction
|
||||
html_entity_decode(
|
||||
strip_tags((string) $post->getShortDescription()),
|
||||
ENT_QUOTES | ENT_HTML5
|
||||
)
|
||||
));
|
||||
$publishDate = (string) $post->getPublishDate();
|
||||
$formattedDate = $block->dateTime->date('Y-m-d', $publishDate);
|
||||
$viewCount = (int) $post->getViewTraffic();
|
||||
$primaryCategory = null;
|
||||
$categories = $block->getBlogHelper()->getCategoryCollection($post->getCategoryIds());
|
||||
if ($categories) {
|
||||
foreach ($categories as $category) {
|
||||
$primaryCategory = $category;
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<article class="item product product-item post-list-item esun-news-list__item">
|
||||
<div class="post-item-wraper esun-news-list__card">
|
||||
<a class="post-image esun-news-list__image-link"
|
||||
href="<?= $escaper->escapeUrl($postUrl) ?>"
|
||||
aria-label="<?= $escaper->escapeHtmlAttr($post->getName()) ?>">
|
||||
<img class="img-responsive esun-news-list__image"
|
||||
src="<?= $escaper->escapeUrl($imageUrl) ?>"
|
||||
alt="<?= $escaper->escapeHtmlAttr($post->getName()) ?>"
|
||||
loading="lazy" />
|
||||
</a>
|
||||
|
||||
<div class="post-info-wraper esun-news-list__content">
|
||||
<div class="mp-post-info esun-news-list__meta">
|
||||
<span class="esun-news-list__type">
|
||||
<?php if ($primaryCategory): ?>
|
||||
<a class="esun-news-list__category"
|
||||
href="<?= $escaper->escapeUrl($block->getBlogHelper()->getBlogUrl(
|
||||
$primaryCategory,
|
||||
BlogHelper::TYPE_CATEGORY
|
||||
)) ?>">
|
||||
<?= $escaper->escapeHtml($primaryCategory->getName()) ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<h2 class="mp-post-title esun-news-list__title">
|
||||
<a class="post-link-title"
|
||||
href="<?= $escaper->escapeUrl($postUrl) ?>">
|
||||
<?= $escaper->escapeHtml($post->getName()) ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<?php if ($description): ?>
|
||||
<p class="post-short-description esun-news-list__description">
|
||||
<?= $escaper->escapeHtml($description) ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="esun-news-list__footer">
|
||||
<div class="esun-news-list__footer-meta">
|
||||
<time class="esun-news-list__date"
|
||||
datetime="<?= $escaper->escapeHtmlAttr($publishDate) ?>">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
<rect x="3" y="5" width="18" height="16" rx="2" />
|
||||
<path d="M8 3v4M16 3v4M3 10h18" />
|
||||
</svg>
|
||||
<?= $escaper->escapeHtml($formattedDate) ?>
|
||||
</time>
|
||||
<?php if ($viewCount > 0): ?>
|
||||
<span class="esun-news-list__views"
|
||||
aria-label="<?= $escaper->escapeHtmlAttr(__('%1 views', $viewCount)) ?>">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path d="M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z" />
|
||||
<circle cx="12" cy="12" r="2.75" />
|
||||
</svg>
|
||||
<?= (int) $viewCount ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<a class="mp-read-more esun-news-list__read-more"
|
||||
href="<?= $escaper->escapeUrl($postUrl) ?>">
|
||||
<?= $escaper->escapeHtml(__('Read more')) ?>
|
||||
<span aria-hidden="true">→</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?= $block->getPagerHtml() ?>
|
||||
<?php else: ?>
|
||||
<p><?= $escaper->escapeHtml(__('There are no posts at this moment')) ?></p>
|
||||
<?php endif; ?>
|
||||
<?= $block->getChildHtml('additional') ?>
|
||||
</div>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Esun\Homepage\Block\NewsPostNavigation;
|
||||
use Magento\Framework\Escaper;
|
||||
|
||||
/** @var NewsPostNavigation $block */
|
||||
/** @var Escaper $escaper */
|
||||
$previousPost = $block->getPreviousPost();
|
||||
$nextPost = $block->getNextPost();
|
||||
$storeId = $block->getCurrentStoreId();
|
||||
?>
|
||||
<?php if ($previousPost || $nextPost): ?>
|
||||
<nav class="esun-news-bottom-nav"
|
||||
aria-label="<?= $escaper->escapeHtmlAttr(__('News previous and next')) ?>">
|
||||
<?php if ($previousPost): ?>
|
||||
<a class="esun-news-bottom-link esun-news-bottom-link--previous"
|
||||
href="<?= $escaper->escapeUrl($previousPost->getUrl($storeId)) ?>">
|
||||
<span class="esun-news-bottom-arrow" aria-hidden="true"></span>
|
||||
<span class="esun-news-bottom-text">
|
||||
<strong><?= $escaper->escapeHtml(__('Previous News')) ?></strong>
|
||||
<span><?= $escaper->escapeHtml((string) $previousPost->getName()) ?></span>
|
||||
</span>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<span class="esun-news-bottom-link esun-news-bottom-link--previous is-disabled"
|
||||
aria-hidden="true"></span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($nextPost): ?>
|
||||
<a class="esun-news-bottom-link esun-news-bottom-link--next"
|
||||
href="<?= $escaper->escapeUrl($nextPost->getUrl($storeId)) ?>">
|
||||
<span class="esun-news-bottom-text">
|
||||
<strong><?= $escaper->escapeHtml(__('Next News')) ?></strong>
|
||||
<span><?= $escaper->escapeHtml((string) $nextPost->getName()) ?></span>
|
||||
</span>
|
||||
<span class="esun-news-bottom-arrow esun-news-bottom-arrow--next" aria-hidden="true"></span>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<span class="esun-news-bottom-link esun-news-bottom-link--next is-disabled"
|
||||
aria-hidden="true"></span>
|
||||
<?php endif; ?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,237 @@
|
||||
.mpblog-post-view .page-wrapper .breadcrumbs {
|
||||
width: min(83.333333%, 1600px);
|
||||
margin: 20px auto 20px auto;
|
||||
}
|
||||
.mpblog-post-view .page-main {
|
||||
width: min(83.333333%, 1600px);
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.mpblog-post-view.page-layout-2columns-left .esun-news-detail-header {
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
box-sizing: border-box;
|
||||
margin: 0 0 34px;
|
||||
padding: 0 0 34px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mpblog-post-view.page-layout-2columns-left .esun-news-detail-header__category {
|
||||
background: #d9e9ff;
|
||||
border-radius: 16px;
|
||||
color: #15549a;
|
||||
display: inline-flex;
|
||||
font-size: 17px;
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
padding: 9px 20px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.mpblog-post-view.page-layout-2columns-left
|
||||
.esun-news-detail-header__category:hover {
|
||||
background: #c9ddf8;
|
||||
color: #10467f;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.mpblog-post-view.page-layout-2columns-left .esun-news-detail-header__title {
|
||||
color: #0b0b0b;
|
||||
font-size: clamp(38px, 3.25vw, 40px);
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.025em;
|
||||
line-height: 1.2;
|
||||
margin: 30px 0 42px;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.mpblog-post-view.page-layout-2columns-left .esun-news-detail-header__meta {
|
||||
align-items: center;
|
||||
color: #888883;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
font-size: 18px;
|
||||
gap: 18px 30px;
|
||||
}
|
||||
|
||||
.mpblog-post-view.page-layout-2columns-left
|
||||
.esun-news-detail-header__meta-item {
|
||||
align-items: center;
|
||||
display: inline-flex;
|
||||
gap: 10px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.mpblog-post-view.page-layout-2columns-left
|
||||
.esun-news-detail-header__meta-item
|
||||
svg {
|
||||
fill: none;
|
||||
height: 25px;
|
||||
stroke: currentColor;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
stroke-width: 1.8;
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
.mpblog-post-view.page-layout-2columns-left
|
||||
.esun-news-detail-header__social-share {
|
||||
align-items: center;
|
||||
display: inline-flex;
|
||||
min-height: 32px;
|
||||
}
|
||||
|
||||
.mpblog-post-view.page-layout-2columns-left
|
||||
.esun-news-detail-header__social-share
|
||||
.mp_social_share_inline {
|
||||
float: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mpblog-post-view .mp-blog-view #sharing {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mpblog-post-view.page-layout-2columns-left
|
||||
.esun-news-detail-header
|
||||
+ .mp-blog-view
|
||||
.post-list-content {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mpblog-post-view .esun-news-bottom-nav {
|
||||
border-top: 1px solid #e2e2e2;
|
||||
display: grid;
|
||||
gap: 28px;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
||||
margin: 48px 0 24px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.mpblog-post-view .esun-news-bottom-link {
|
||||
align-items: center;
|
||||
color: #2b2e33;
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
grid-template-columns: 18px minmax(0, 1fr);
|
||||
min-height: 96px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.mpblog-post-view .esun-news-bottom-link--next {
|
||||
grid-template-columns: minmax(0, 1fr) 18px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.mpblog-post-view .esun-news-bottom-link.is-disabled {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.mpblog-post-view .esun-news-bottom-text {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.mpblog-post-view .esun-news-bottom-text strong {
|
||||
color: #333;
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0;
|
||||
line-height: 1.05;
|
||||
}
|
||||
|
||||
.mpblog-post-view .esun-news-bottom-text span {
|
||||
color: #999;
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
line-height: 1.35;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.mpblog-post-view .esun-news-bottom-arrow::before {
|
||||
border-left: 3px solid #17a957;
|
||||
border-top: 3px solid #17a957;
|
||||
content: "";
|
||||
display: block;
|
||||
height: 12px;
|
||||
transform: rotate(-45deg);
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
.mpblog-post-view .esun-news-bottom-arrow--next::before {
|
||||
transform: rotate(135deg);
|
||||
}
|
||||
|
||||
.mpblog-post-view .esun-news-bottom-link:hover,
|
||||
.mpblog-post-view .esun-news-bottom-link:focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.mpblog-post-view .esun-news-bottom-link:hover .esun-news-bottom-text strong,
|
||||
.mpblog-post-view .esun-news-bottom-link:hover .esun-news-bottom-text span,
|
||||
.mpblog-post-view .esun-news-bottom-link:focus .esun-news-bottom-text strong,
|
||||
.mpblog-post-view .esun-news-bottom-link:focus .esun-news-bottom-text span {
|
||||
color: #10a956;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.mpblog-post-view.page-layout-2columns-left
|
||||
.esun-news-detail-header__title {
|
||||
font-size: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.mpblog-post-view.page-layout-2columns-left .esun-news-detail-header {
|
||||
margin-bottom: 26px;
|
||||
padding-bottom: 26px;
|
||||
}
|
||||
|
||||
.mpblog-post-view.page-layout-2columns-left
|
||||
.esun-news-detail-header__category {
|
||||
font-size: 15px;
|
||||
padding: 7px 16px;
|
||||
}
|
||||
|
||||
.mpblog-post-view.page-layout-2columns-left
|
||||
.esun-news-detail-header__title {
|
||||
font-size: 32px;
|
||||
line-height: 1.25;
|
||||
margin: 24px 0 30px;
|
||||
}
|
||||
|
||||
.mpblog-post-view.page-layout-2columns-left .esun-news-detail-header__meta {
|
||||
font-size: 16px;
|
||||
gap: 14px 22px;
|
||||
}
|
||||
|
||||
.mpblog-post-view.page-layout-2columns-left
|
||||
.esun-news-detail-header__meta-item
|
||||
svg {
|
||||
height: 22px;
|
||||
width: 22px;
|
||||
}
|
||||
|
||||
.mpblog-post-view .esun-news-bottom-nav {
|
||||
gap: 0;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
margin-top: 36px;
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.mpblog-post-view .esun-news-bottom-link {
|
||||
min-height: 84px;
|
||||
}
|
||||
|
||||
.mpblog-post-view .esun-news-bottom-link--next {
|
||||
border-top: 1px solid #ededed;
|
||||
}
|
||||
|
||||
.mpblog-post-view .esun-news-bottom-link.is-disabled {
|
||||
display: none;
|
||||
}
|
||||
.mpblog-post-view .page-wrapper .breadcrumbs{
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,403 @@
|
||||
.esun-news-list-page .page-main {
|
||||
width: min(83.333333%, 1600px);
|
||||
margin: 0 auto;
|
||||
}
|
||||
.esun-news-list-page .esun-news-list {
|
||||
--esun-news-blue: #17a957;
|
||||
--esun-news-pill: #d9e9ff;
|
||||
--esun-news-text: #111;
|
||||
--esun-news-muted: #626262;
|
||||
--esun-news-border: #e2e2e2;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .post-list-body {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__item {
|
||||
border-bottom: 1px solid var(--esun-news-border);
|
||||
box-sizing: border-box;
|
||||
float: none;
|
||||
margin: 0;
|
||||
padding: 36px 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__item:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__card,
|
||||
.esun-news-list-page .esun-news-list__card:hover {
|
||||
align-items: stretch;
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
display: grid;
|
||||
gap: clamp(24px, 3vw, 42px);
|
||||
grid-template-columns: minmax(240px, 34%) minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__image-link {
|
||||
align-self: start;
|
||||
aspect-ratio: 4 / 3;
|
||||
background: #f5f5f5;
|
||||
border-radius: 8px;
|
||||
display: block;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__image {
|
||||
aspect-ratio: 4 / 3;
|
||||
display: block;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
object-fit: cover;
|
||||
transition: transform 0.3s ease;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__card:hover .esun-news-list__image {
|
||||
transform: scale(1.025);
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
vertical-align: initial;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__meta {
|
||||
align-items: center;
|
||||
color: #8a8985;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
gap: 10px 14px;
|
||||
line-height: 1.4;
|
||||
margin: 0 0 14px;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__meta span,
|
||||
.esun-news-list-page .esun-news-list__meta a,
|
||||
.esun-news-list-page .esun-news-list__meta time {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__type {
|
||||
background: var(--esun-news-pill);
|
||||
border-radius: 16px;
|
||||
color: var(--esun-news-blue) !important;
|
||||
font-weight: 600;
|
||||
padding: 4px 16px;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__category {
|
||||
color: #555 !important;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__category:hover {
|
||||
color: var(--esun-news-blue) !important;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__date,
|
||||
.esun-news-list-page .esun-news-list__views {
|
||||
align-items: center;
|
||||
display: inline-flex;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__date svg,
|
||||
.esun-news-list-page .esun-news-list__views svg {
|
||||
fill: none;
|
||||
height: 19px;
|
||||
stroke: currentColor;
|
||||
stroke-width: 1.8;
|
||||
width: 19px;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__title {
|
||||
font-size: clamp(23px, 2vw, 32px);
|
||||
font-weight: 600;
|
||||
line-height: 1.25;
|
||||
margin: 0 0 14px;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__title a,
|
||||
.esun-news-list-page .esun-news-list__title a:visited {
|
||||
color: var(--esun-news-text) !important;
|
||||
text-decoration: none;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__title a:hover {
|
||||
color: var(--esun-news-blue) !important;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__description {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
color: var(--esun-news-muted);
|
||||
display: -webkit-box;
|
||||
font-size: 18px;
|
||||
line-height: 1.55;
|
||||
margin: 0;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__footer {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
justify-content: space-between;
|
||||
margin-top: auto;
|
||||
padding-top: 22px;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__footer-meta {
|
||||
align-items: center;
|
||||
color: #8a8985;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
gap: 10px 22px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__read-more,
|
||||
.esun-news-list-page .esun-news-list a.esun-news-list__read-more {
|
||||
align-items: center;
|
||||
align-self: flex-start;
|
||||
color: var(--esun-news-blue) !important;
|
||||
display: inline-flex;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
gap: 10px;
|
||||
flex-shrink: 0;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__read-more span {
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__read-more:hover span {
|
||||
transform: translateX(4px);
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .pager {
|
||||
align-items: center;
|
||||
border-top: 1px solid var(--esun-news-border);
|
||||
display: grid;
|
||||
gap: 24px;
|
||||
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
||||
margin: 0;
|
||||
padding: 34px 0 10px;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .toolbar-amount {
|
||||
color: var(--esun-news-muted);
|
||||
float: none;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .pages {
|
||||
float: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .pages-label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .pages-items {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
justify-content: center;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .pages-items .item {
|
||||
margin: 0;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .pages-items .page,
|
||||
.esun-news-list-page .esun-news-list .pages-items .action {
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
border: 1px solid #d8d8d8;
|
||||
border-radius: 6px;
|
||||
box-sizing: border-box;
|
||||
color: #555;
|
||||
display: inline-flex;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
height: 42px;
|
||||
justify-content: center;
|
||||
line-height: 1;
|
||||
margin: 0;
|
||||
min-width: 42px;
|
||||
padding: 0 12px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .pages-items a.page:hover,
|
||||
.esun-news-list-page .esun-news-list .pages-items .action:hover {
|
||||
border-color: var(--esun-news-blue);
|
||||
color: var(--esun-news-blue);
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .pages-items .current .page {
|
||||
background: var(--esun-news-blue);
|
||||
border-color: var(--esun-news-blue);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .pages-items .action::before {
|
||||
margin-left: -15px;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .limiter {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
float: none;
|
||||
gap: 10px;
|
||||
justify-self: end;
|
||||
margin: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .limiter-label,
|
||||
.esun-news-list-page .esun-news-list .limiter-text {
|
||||
color: var(--esun-news-muted);
|
||||
font-size: 14px;
|
||||
line-height: 42px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .limiter-options {
|
||||
box-sizing: border-box;
|
||||
height: 42px;
|
||||
margin: 0;
|
||||
min-width: 76px;
|
||||
padding: 0 30px 0 12px;
|
||||
width: 76px;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.esun-news-list-page .esun-news-list__card,
|
||||
.esun-news-list-page .esun-news-list__card:hover {
|
||||
grid-template-columns: minmax(210px, 36%) minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__description {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.esun-news-list-page .esun-news-list__item {
|
||||
padding: 28px 0;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__card,
|
||||
.esun-news-list-page .esun-news-list__card:hover {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__image-link {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__image {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__meta {
|
||||
font-size: 14px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__title {
|
||||
font-size: 23px;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__read-more,
|
||||
.esun-news-list-page .esun-news-list a.esun-news-list__read-more {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__footer {
|
||||
gap: 12px;
|
||||
padding-top: 18px;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__footer-meta {
|
||||
font-size: 14px;
|
||||
gap: 8px 12px;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list__read-more,
|
||||
.esun-news-list-page .esun-news-list a.esun-news-list__read-more {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .pager {
|
||||
gap: 20px 12px;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
padding-top: 28px;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .pages {
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 1;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .toolbar-amount {
|
||||
grid-column: 1;
|
||||
grid-row: 2;
|
||||
}
|
||||
|
||||
.esun-news-list-page .esun-news-list .limiter {
|
||||
grid-column: 2;
|
||||
grid-row: 2;
|
||||
}
|
||||
.esun-news-list-page .top-container{
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.esun-news-list-page .esun-news-list__image,
|
||||
.esun-news-list-page .esun-news-list__read-more span {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
.esun-news-top-banner {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
.esun-news-top-banner img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
Reference in New Issue
Block a user