묻고답하기
컨텐츠위젯 기본스킨에서 갤러리형 썸네일 가로크기 %로 설정
2016.07.21 22:03
컨텐츠 위젯의 기본스킨에서 갤러리형 출력방식을 사용할 때 썸네일의 가로 크기를 %로 설정하고 싶습니다.
기본값으로는 '입력된숫자'px로 가로 크기가 출력되는데요. gallery.html 파일을 열어 px값을 %로 바꿔보려해도 쉽지 않네요..
도와주실 분 계신가요?
gallery.html
<ul class="widgetGalleryA" style="width:{$widget_info->cols_list_count*($widget_info->thumbnail_width+28)}px;">
{@$_idx=0}
<!--@foreach($widget_info->content_items as $key => $item)-->
<li<!--@if($_idx>0 && $_idx % $widget_info->cols_list_count==0)--> class="clearLeft"<!--@end--> style="<!--@if($_idx >= $widget_info->list_count)-->display:none;<!--@end-->width:{$widget_info->thumbnail_width}px;">
<!--@foreach($widget_info->option_view_arr as $k => $v)-->
<!--@if($v=='thumbnail')-->
<a href="{$item->getLink()}" class="thumb" style="width:{$widget_info->thumbnail_width}px;height:{$widget_info->thumbnail_height}px" target="_blank"|cond="$widget_info->new_window">
<!--@if($item->getThumbnail())-->
<img src="{$item->getThumbnail()}" style="width:{$widget_info->thumbnail_width}px;height:{$widget_info->thumbnail_height}px"/>
<!--@else-->
<span class="imgNone">{$lang->none_image}</span>
<!--@end-->
<!--@if($widget_info->show_browser_title=='Y' && $item->getBrowserTitle())-->
<strong class="board">{$item->getBrowserTitle()}</strong>
<!--@end-->
<!--@if($widget_info->show_category=='Y' && $item->getCategory())-->
<strong class="category">{$item->getCategory()}</strong>
<!--@end-->
</a>
<!--@else if($v=='title')-->
<a href="{$item->getLink()}" class="title" target="_blank"|cond="$widget_info->new_window">{$item->getTitle($widget_info->subject_cut_size)}</a>
<!--@if($widget_info->show_comment_count=='Y' && $item->getCommentCount())-->
<em class="replyNum" title="Replies"><a href="{$item->getLink()}#comment">{$item->getCommentCount()}</a></em>
<!--@end-->
<!--@if($widget_info->show_trackback_count=='Y' && $item->getTrackbackCount())-->
<em class="trackbackNum" title="Trackbacks"><a href="{$item->getLink()}#trackback">{$item->getTrackbackCount()}</a></em>
<!--@end-->
<!--@if($widget_info->show_icon=='Y')-->
<span class="icon">{$item->printExtraImages()}</span>
<!--@end-->
<!--@else if($v=='nickname')-->
<a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}">{$item->getNickName($widget_info->nickname_cut_size)}</a>
<!--@else if($v=='regdate')-->
<span class="date">{$item->getRegdate("Y-m-d")}</span> <span class="hour">{$item->getRegdate("H:i")}</span>
<!--@end-->
<!--@end-->
</li>
{@$_idx++}
<!--@end-->
</ul>
<!--@if($widget_info->page_count > 1 && $widget_info->list_count<$_idx)-->
<ul class="widgetNavigator">
<li><button type="button" class="prev" title="{$lang->cmd_prev}" onclick="content_widget_prev(jQuery(this).parents('ul.widgetNavigator').prev('ul.widgetGalleryA'),{$widget_info->list_count})"><span>{$lang->cmd_prev}</span></button></li>
<li><button type="button" class="next" title="{$lang->cmd_next}" onclick="content_widget_next(jQuery(this).parents('ul.widgetNavigator').prev('ul.widgetGalleryA'),{$widget_info->list_count})"><span>{$lang->cmd_next}</span></button></li>
</ul>
<!--@end-->
css 파일에
.widgetGalleryA img {width:100%!important}
초가하세요.