[Share] RecentNews phong cách VietYo.Com

Lê Tí

Corporal
Tham gia
29/07/2015
Bài viết
142
Được Like
151
Tình hình là đã hoàn thành nghĩa vụ đời trai rồi ạ rofl~~rofl~~rofl~~
Bài này trước đây mình share rồi nhưng ở đây chưa có nên share lại drunk~~

Sử dụng Xenporta (Portal) để làm

demo online: http://giaitriteen.net


demo ảnh:
gP59DY3.png



Thay toàn bộ template EWRblock_RecentNews bằng code sau:
Mã:
<xen:require css="bb_code.css" /><xen:require css="EWRblock_RecentNews.css" />

<div id="recentNews">
<xen:foreach loop="$RecentNews" value="$news">
           <div class="sectionMainPortal recentNews" id="{$news.thread_id}" style="width:100%">
<div class="tlist fleft rowsolid" style="margin:0px 20px 0px 0px;padding:5px 0px 5px 0px;width:100%;">
               <div class="tc fleft" style="width:85%;margin-right:10px" onmouseover="$(&quot;#hpt_{$news.thread_id}&quot;).show();" onmouseout="$(&quot;#hpt_{$news.thread_id}&quot;).hide();">
<div class="fleft" style="position:relative">
<div style="margin-top:2px;margin-right:7px;background:none;background-size:54px 54px;"><div style="width:54px;height:54px;display:block; background-size:54px 54px;"><xen:avatar user="$news" size="s" itemprop="photo" /></div></div>
<div id="hpt_{$news.thread_id}" class="tc1 ovf hbox" style="position: absolute; left: 0px; top: 2px; text-align: center; width: 55px; height: 55px; line-height: 18px; display: none;"><div style="padding-top:8px;font-weight:bold;font-size:16px;">{xen:number $news.reply_count}</div><div style="font-size:13px">trả lời</div></div>
</div>
<div class="ovf" style="text-align:justify">
<h2 style="font-size:15px"><a href="{xen:link threads, $news}" class="newsTitle">{xen:helper threadPrefix, $news}{$news.title}</a></h2>
<div class="tb">by <a href="{xen:link members, $news}" class="username">{$news.username}</a> at {xen:time $news.post_date, 'absolute'}
</div>
</div>
</div>


               <div class="fright ovf" style="margin:-3px -5px -3px 0px;width:100px;height:58px">

<xen:if is="{$news.promote_icon} != 'disabled'">
<xen:if hascontent="true">

<xen:contentcheck>
<xen:if is="{$news.attach}">
<a href="{xen:link threads, $news}"><img src="{$news.attach.thumbnailUrl}" alt="{$news.attach.filename}" /></a>
<xen:elseif is="{$news.medio}" />
<div style="background: url('{xen:helper medio, $news.medio}') no-repeat;">
<a href="{xen:link 'full:media/media/popout', $news.medio}" class="OverlayTrigger"><img src="styles/8wayrun/EWRmedio_play.png" style="max-height: 150px; max-width: 100px;" /></a>
</div>
<xen:elseif is="{$news.image}" />
<a href="{xen:link threads, $news}"><img src="{$news.image}" alt="{$news.image}" style="max-height: 150px; max-width: 100px;" /></a>
<xen:else />
<a href="{xen:link threads, $news}"><img src="http://xf.buidoi.vn/images/no-image.png" alt="{$news.title}" style="max-height: 150px; max-width: 100px;" /></a>
</xen:if>
</xen:contentcheck>

</xen:if>
</xen:if>
               </div>


</div>
           </div>
</xen:foreach>
</div>
       <div class="clearFix"></div>

<xen:if hascontent="true">
<div class="homepage">
<xen:contentcheck>
<xen:if is="{$option.pagenav} && {$option.count} > {$option.limit}">
<xen:if is="{$category}">
<xen:pagenav link="articles" linkdata="{$category}" page="{$page}" perpage="{$option.limit}" total="{$option.count}" />
<xen:else />
<xen:pagenav link="portal" page="{$page}" perpage="{$option.limit}" total="{$option.count}" />
</xen:if>
</xen:if>
</xen:contentcheck>
</div>
</xen:if>


thay toàn bộ EWRblock_RecentNews.css bằng code sau
Mã:
#recentNews {margin: 30px 0px;
padding-right: 20px;
display: block;
clear: both;
}
.homepage{clear: both;}
h1, h2, h3, h4 {
padding: 0px;
margin: 0px;
}
.rowsolid {
border-bottom: 1px solid #ddd;
padding: 5px 0px 5px 0px;
}
.fleft {
float: left;
}
.ovf {
overflow: hidden;
height: 100%;
}
.hbox {
background: #FFF3AB;
overflow: hidden;
}
.fright {
float: right;
}


Nguồn: RecentNews phong cách VietYo.Com
 

Hướng dẫn sử dụng

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

Mr. Tuấn

Mobile/Zalo: 0988 488 096

Telegram: bluekpro

Email: [email protected]

Nhà Tài Trợ

Mút Xốp Không Gian
pallet Thịnh Phát
Top Bottom