<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가

//사이트의 통합RSS을 아미나캐시를 활용하여 10분 단위로 갱신합니다.

//위젯 아이프레임 높이 설정
$widget_height = '300';

//최근글 리턴 함수
function widget_latest($id) {
	return latest_amina("amina", "myRssWedget", 5, 255, "type=newgul mode=rss head_skin=none list_wrap=widget-wrap list=widget-list list_type=img img_h=100% img_full=1 icon=none subj=100 target=_blank");
}

?>

<div class="widget-title">
	<div class="widget-share">
		<a href="javascript:share_widget();"><i class="fa fa-share-square fa-lg"></i></a>
	</div>
	<div class="widget-site">
		<a href="<?php echo G5_URL;?>" target="_blank"><i class="fa fa-leaf fa-lg"></i> <?php echo $config['cf_title']; ?></a>
	</div>
</div>

<? echo amina_cache("widget-basic", 1, "widget_latest('myRssWidget')"); //캐시사용 ?>

<script>
	function share_widget(str) {
		var str = "<iframe src=\"<?php echo G5_URL;?>/widget.php?widget=<?php echo $widget;?>\" width=\"100%\" height=\"<?php echo $widget_height; ?>\" scrolling=\"no\" frameborder=\"0\"></iframe>";
		prompt("아래 코드를 사이트에 붙여넣기해 주세요. Ctrl+C를 눌러 복사하거나 확인을 눌러 주세요.", str);
		window.clipboardData.setData("Text",str);
	}
</script>

<style>
	body { color:#000; padding:0px; margin:0px; font-size:12px; font-family:dotum, tahoma; -webkit-text-size-adjust:none; }
	th, td, p, input, button, textarea, select, li { font-family:dotum, tahoma; -webkit-text-size-adjust:none; }
	a, a:link, a:visited, a:active { color:#000; text-decoration: none; }
	a:hover { color:#ed1c24; text-decoration: none; }
	h1, h2, h3, h4, h5, h6, form, fieldset { margin:0px; padding:0px ;border:0px; }
	h1, h2, h3, h4, h5, h6 { font-size:1em; }
	article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display:block; }
	label, input, select, img {	vertical-align:middle; }

	.widget-title { display:block; overflow:hidden; background:#000; padding:10px }
	.widget-share { float:right; padding-left:6px; display:inline-block; }
	.widget-share a { color:#666; text-decoration:none; }
	.widget-share a:hover { color:#fff; }
	.widget-site { display:block; text-overflow:ellipsis; white-space:nowrap; word-wrap:normal; overflow:hidden; }
	.widget-site a { display:block; color:#fff; text-decoration:none; font-weight:bold; letter-spacing:-1px; }
	.widget-site a:hover { color:gold; }
	.widget-wrap { border:1px solid #ddd; border-top:0px; padding:10px 10px 5px; overflow:hidden; }
	.widget-list { margin-top:-6px; }
	.widget-list .la-list { padding:7px 0px; border-top:1px solid #eee;  }
	.widget-list .la-img-box { float:left; width:36px; margin-right:10px; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px; box-shadow: 0 1px 3px rgba(34, 25, 25, 0.4); }
	.widget-list .la-subj { height:36px; white-space:normal !important; line-height:20px; }
	.widget-list .la-img-icon { width:36px; }
</style>

