This commit is contained in:
shim
2023-04-17 11:06:08 +09:00
parent d0b393aa97
commit 76264e09ad
4686 changed files with 552713 additions and 0 deletions

View File

@@ -0,0 +1,135 @@
<style>
[data-role="menu"] .dropdown>.dropdown-menu {
margin-top: 0;
transition: 0.3s all ease-in-out;
}
[data-role="menu"] .dropdown:hover>.dropdown-menu {
display: block;
top: 80%;
}
[data-role="menu"] .dropdown>.dropdown-toggle:active {
/*Without this, clicking will make it sticky*/
pointer-events: none;
}
[data-role="menu"] .dropdown-submenu {
position: relative;
}
[data-role="menu"] .dropdown-submenu>a:after {
content: "\f0da";
float: right;
border: none;
font-family: 'FontAwesome';
}
[data-role="menu"] .dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: 0px;
margin-left: -1px;
}
[data-role="menu"] .dropdown-submenu:hover>.dropdown-menu {
display: block;
}
</style>
<?php
if (!function_exists('getMenuWidgetTree'))
{
function getMenuWidgetTree($site,$table,$is_child,$parent,$depth,$id,$w,$_C)
{
global $_CA;
if ($depth < $w['limit'])
{
$CD=getDbSelect($table,($site?'site='.$site.' and ':'').'hidden=0 and parent='.$parent.' and depth='.($depth+1).($w['mobile']?' and mobile=1':'').' order by gid asc','*');
echo "\n";
for ($i=0;$i<$depth;$i++) echo "\t";
if($is_child)
{
echo "<ul".($w['dropdown']?' class="dropdown-menu" role="menu" aria-labelledby="dLabel"':'').">\n";
if ($w['dropdown'] && $w['dispfmenu'])
{
echo $_C['link'];
echo '<div class="dropdown-divider"></div>'."\n";
}
}
if ($depth==1) echo '<span class="dropdown-menu-arrow"></span>';
$i=0;while($C=db_fetch_array($CD))
{
$i++;
$_newTree = ($id?$id.'/':'').$C['id'];
$_href = $w['link']=='bookmark'?' data-scroll href="#'.($C['is_child']&&$w['limit']>1&&!$parent&&$w['dropdown']?'':str_replace('/','-',$_newTree)).'"' : ' href="'.RW('c='.$_newTree).'"';
$_dropdown = $w['dropdown']&&$C['is_child']&&$C['depth']==($w['depth']+1)&&$w['olimit']>1?' class=""':'';
$_name = $C['name'];
$_target = $C['target']=='_blank'?' target="_blank"':'';
$_addattr = $C['addattr']?' '.$C['addattr']:'';
for ($i=0;$i<$C['depth'];$i++) echo "\t";
if ($_dropdown) echo '<li class="nav-item dropdown'.(in_array($C['id'],$_CA)?' active':'').'"><a class="nav-link"'.$_addattr.$_href.$_dropdown.$_target.'>'.$_name.'</a>';
else {
if ($is_child) {
echo '<li class="'.($C['is_child'] && ($i<$w['limit'])?'dropdown-submenu ':'').'"><a class="dropdown-item'.(in_array($C['id'],$_CA)?' active':'').'"'.$_addattr.$_href.$_dropdown.$_target.'>'.$_name.'</a>';
} else {
echo '<li'.(in_array($C['id'],$_CA)?' class="nav-item active"':' class="nav-item"').'><a class="nav-link"'.$_addattr.$_href.$_dropdown.$_target.'>'.$_name.'</a>';
}
}
if ($C['is_child'])
{
$C['link'] = '<li><a class="dropdown-item"'.$_addattr.$_href.$_target.'>'.$C['name'].'</a></li>';
getMenuWidgetTree($site,$table,$C['is_child'],$C['uid'],$C['depth'],$_newTree,$w,$C);
}
echo "\n";
}
for ($i=0;$i<$depth;$i++) echo "\t";
if($is_child) echo "</ul>\n";
for ($i=0;$i<$depth;$i++) echo "\t";
}
}
}
$wddvar['limit'] = $wddvar['limit'] < 6 ? $wddvar['limit'] : 5;
if ($wdgvar['smenu'] < 0)
{
if (strstr($c,'/'))
{
$wdgvar['mnarr'] = explode('/',$c);
$wdgvar['count'] = (- $wdgvar['smenu']) - 1;
for ($j = 0; $j <= $wdgvar['count']; $j++) $wdgvar['sid'] .= $wdgvar['mnarr'][$j].'/';
$wdgvar['sid'] = $wdgvar['sid'] ? substr($wdgvar['sid'],0,strlen($wdgvar['sid'])-1): '';
$wdgvar['path'] = getDbData($table['s_menu'],"id='".$wdgvar['mnarr'][$wdgvar['count']]."'",'uid,depth');
$wdgvar['smenu'] = $wdgvar['path']['uid'];
$wdgvar['depth'] = $wdgvar['path']['depth'];
}
else {
$wdgvar['sid'] = $c;
$wdgvar['smenu'] = $_HM['uid'];
$wdgvar['depth'] = $_HM['depth'];
}
}
else if ($wdgvar['smenu'])
{
$wdgvar['mnarr'] = explode('/',$wdgvar['smenu']);
$wdgvar['count'] = count($wdgvar['mnarr']);
for ($j = 0; $j < $wdgvar['count']; $j++)
{
$wdgvar['path'] = getDbData($table['s_menu'],'uid='.(int)$wdgvar['mnarr'][$j],'uid,id,depth');
$wdgvar['sid'] .= $wdgvar['path']['id'].'/';
$wdgvar['smenu'] = $wdgvar['path']['uid'];
$wdgvar['depth'] = $wdgvar['path']['depth'];
}
$wdgvar['sid'] = $wdgvar['sid'] ? substr($wdgvar['sid'],0,strlen($wdgvar['sid'])-1): '';
}
else {
$wdgvar['depth'] = 0;
}
$wdgvar['olimit']= $wdgvar['limit'];
$wdgvar['limit'] = $wdgvar['limit'] + $wdgvar['depth'];
getMenuWidgetTree($s,$table['s_menu'],0,$wdgvar['smenu'],$wdgvar['depth'],$wdgvar['sid'],$wdgvar,array());
?>

View File

@@ -0,0 +1 @@
데스크탑-상단 네비바 메뉴

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -0,0 +1,203 @@
<style media="screen">
.header [data-role="menu"] .nav-item .sub-item {
display: none;
position: fixed;
z-index: 5;
top: 73px;
left: 0;
right: 0;
width: 100%;
border-top: 1px solid #d4d4d4;
border-bottom: 1px solid #d4d4d4;
background-color: #fff;
text-align: center;
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}
body.header-type2 .navbar [data-role="menu"] .nav-item .sub-item {
top: 108px
}
body.header-type3 .header [data-role="menu"] .nav-item .sub-item {
top: 166px;
}
.header .nav .nav-item.hovered .sub-item {
display: block;
}
.header .nav .nav-item .sub-item .col:hover {
background-color: #f5f5f5
}
.header .nav .nav-item .sub-item .col:first-child {
border-left: 1px solid #d4d4d4;
}
.header .nav .nav-item .sub-item .col {
border-right: 1px solid #d4d4d4;
}
.header .sub-item .col h4 a {
font-size: 16px;
letter-spacing: -1px;
}
.header .sub-item .col h4 a.active,
.header .sub-item .col .nav a.active {
color: #007bff;
}
.header .sub-item .col a {
font-size: 13px;
color: #333
}
.header .sub-item .col a:hover {
color: #007bff;
}
.header .dropdown-menu {
margin-top: -10px;
}
.header .dropdown-menu::after {
top: -14px;
left: 30px;
right: auto;
}
.header .dropdown-menu-right::after {
right: 20px;
left: auto;
}
.header .dropdown-menu::before, .dropdown-menu::after {
position: absolute;
display: inline-block;
content: "";
}
.header .dropdown-menu::after {
/* border: 7px solid transparent; */
/* border-bottom-color: #fff; */
}
</style>
<?php
if (!function_exists('getMenuWidgetTree'))
{
function getMenuWidgetTree($site,$table,$is_child,$parent,$depth,$id,$w,$_C)
{
global $_CA,$d;
$_container = $d['layout']['header_container'];
if ($depth < $w['limit'])
{
$CD=getDbSelect($table,($site?'site='.$site.' and ':'').'hidden=0 and parent='.$parent.' and depth='.($depth+1).($w['mobile']?' and mobile=1':'').' order by gid asc','*');
echo "\n";
for ($i=0;$i<$depth;$i++) echo "\t";
if($is_child) {
if ($_C['depth']==1) {
echo "<div class='sub-item'><div class='".$_container."'><div class='row w-100'>\n";
} else {
echo "<nav class='nav flex-column'>\n";
}
}
while($C=db_fetch_array($CD))
{
$_newTree = ($id?$id.'/':'').$C['id'];
$_href = $w['link']=='bookmark'?' data-scroll href="#'.($C['is_child']&&$w['limit']>1&&!$parent?'':str_replace('/','-',$_newTree)).'"' : ' href="'.RW('c='.$_newTree).'"';
$_dropdown = $C['is_child']&&$C['depth']==($w['depth']+1)&&$w['olimit']>1?' class="nav-link"':'';
$_name = $C['name'];
$_target = $C['target']=='_blank'?' target="_blank"':'';
$_addattr = $C['addattr']?' '.$C['addattr']:'';
for ($i=0;$i<$C['depth'];$i++) echo "\t";
if ($_C['depth']==1) {
echo '<div class="col py-4 px-2"><h4 class="mb-0"><a class="nav-link'.(in_array($C['id'],$_CA)?' active':'').'"'.$_addattr.$_href.$_dropdown.$_target.'>'.$_name.'</a></h4>';
} else if ($_C['depth']==2) {
echo '<a class="nav-link '.(in_array($C['id'],$_CA)?' active':'').'"'.$_addattr.$_href.$_dropdown.$_target.'>'.$_name.'</a>';
} else {
echo '<li class="nav-item'.(in_array($C['id'],$_CA)?' active':'').'"><a class="nav-link"'.$_addattr.$_href.$_dropdown.$_target.'>'.$_name.'</a>';
}
if ($C['is_child']){
getMenuWidgetTree($site,$table,$C['is_child'],$C['uid'],$C['depth'],$_newTree,$w,$C);
}
if ($_C['depth']==1) {
echo "</nav></div>\n";
} else if ($_C['depth']==2) {
echo "\n";
} else {
echo "</li>\n";
}
}
for ($i=0;$i<$depth;$i++) echo "\t";
if($is_child) {
if ($_C['depth']==1) {
echo "</div></div></div>\n";
} else if ($_C['depth']==2) {
echo "\n";
} else {
echo "</nav></div>\n";
}
}
for ($i=0;$i<$depth;$i++) echo "\t";
}
}
}
$wddvar['limit'] = $wddvar['limit'] < 6 ? $wddvar['limit'] : 5;
if ($wdgvar['smenu'] < 0)
{
if (strstr($c,'/'))
{
$wdgvar['mnarr'] = explode('/',$c);
$wdgvar['count'] = (- $wdgvar['smenu']) - 1;
for ($j = 0; $j <= $wdgvar['count']; $j++) $wdgvar['sid'] .= $wdgvar['mnarr'][$j].'/';
$wdgvar['sid'] = $wdgvar['sid'] ? substr($wdgvar['sid'],0,strlen($wdgvar['sid'])-1): '';
$wdgvar['path'] = getDbData($table['s_menu'],"id='".$wdgvar['mnarr'][$wdgvar['count']]."'",'uid,depth');
$wdgvar['smenu'] = $wdgvar['path']['uid'];
$wdgvar['depth'] = $wdgvar['path']['depth'];
}
else {
$wdgvar['sid'] = $c;
$wdgvar['smenu'] = $_HM['uid'];
$wdgvar['depth'] = $_HM['depth'];
}
}
else if ($wdgvar['smenu'])
{
$wdgvar['mnarr'] = explode('/',$wdgvar['smenu']);
$wdgvar['count'] = count($wdgvar['mnarr']);
for ($j = 0; $j < $wdgvar['count']; $j++)
{
$wdgvar['path'] = getDbData($table['s_menu'],'uid='.(int)$wdgvar['mnarr'][$j],'uid,id,depth');
$wdgvar['sid'] .= $wdgvar['path']['id'].'/';
$wdgvar['smenu'] = $wdgvar['path']['uid'];
$wdgvar['depth'] = $wdgvar['path']['depth'];
}
$wdgvar['sid'] = $wdgvar['sid'] ? substr($wdgvar['sid'],0,strlen($wdgvar['sid'])-1): '';
}
else {
$wdgvar['depth'] = 0;
}
$wdgvar['olimit']= $wdgvar['limit'];
$wdgvar['limit'] = $wdgvar['limit'] + $wdgvar['depth'];
getMenuWidgetTree($s,$table['s_menu'],0,$wdgvar['smenu'],$wdgvar['depth'],$wdgvar['sid'],$wdgvar,array());
?>
<script>
$('[data-role="menu"] .nav-item').hover(
function() {
$(this).addClass('hovered');
},
function() {
$(this).removeClass('hovered');
}
);
$(window).on('scroll', function() {
$('[data-role="menu"] .nav-item').removeClass('hovered');
});
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -0,0 +1,39 @@
.widget-quick .card {
background-size: cover
}
.widget-quick .card::before {
position: absolute;
top:0;
left:0;
right:0;
bottom:0;
opacity: 1 !important;
content: '';
transform: translate(0px, 0px);
transition-timing-function: ease-in;
transition-duration: 0.3s;
background-color: rgba(0, 0, 0, 0.4) !important;
}
.widget-quick .card:hover::before {
background-color: rgba(0, 0, 0, 0.7) !important;
}
.widget-quick .card-title {
min-height: 50px
}
.widget-quick .card-body {
margin-top: 4.5rem;
margin-bottom: 4.5rem;
z-index: 1
}
.widget-quick a:hover {
text-decoration: none;
}
.widget-quick .card-text {
width: 70%;
margin: 20px auto 0;
padding-top: 20px;
border-top: 2px solid #5cccfa
}

View File

@@ -0,0 +1,29 @@
<h3><?php echo $wdgvar['title'] ?></h3>
<section class="widget-quick">
<div class="row gutter-half">
<?php
$_MENUQ1=getDbData($table['s_menu'],'site='.$s." and id='".$wdgvar['smenu']."'",'uid');
$_MENUQ2=getDbSelect($table['s_menu'],'site='.$s.' and parent='.$_MENUQ1['uid'].' and hidden=0 order by gid asc','*');
?>
<?php while($_M2=db_fetch_array($_MENUQ2)):?>
<?php
if($_M2['upload']) {
$ufilesArray = getArrayString($_M2['upload']);
$_IMG = getDbData($table['s_upload'], 'uid='.$ufilesArray['data'][0], '*');
$Topimg_URL = $_IMG['url'].$_IMG['folder'].'/'.$_IMG['tmpname'];
}
?>
<div class="col-4 mb-3">
<div class="card text-center bg-secondary border-0" <?php if ($_M2['upload']): ?>style="background-image: url('<?php echo getPreviewResize($Topimg_URL,'z')?>')"<?php endif; ?>>
<a href="<?php echo RW('c='.$wdgvar['smenu'].'/'.$_M2['id'])?>" class="card-body text-white">
<h4 class="card-title"><?php echo $_M2['addinfo']?> </h4>
<p class="card-text mb-0"><?php echo $_M2['name']?></p>
</a>
</div><!-- /.card -->
</div><!-- /.col-4 -->
<?php endwhile?>
</div><!-- /.row -->
</section>

View File

@@ -0,0 +1,20 @@
<?php
$wdgvar_smenu_arr = explode('/' , $wdgvar['smenu']);
$wdgvar_smenu_arr_end = array_pop($wdgvar_smenu_arr);
$_MENUQ1=getDbData($table['s_menu'],'site='.$s." and id='".$wdgvar_smenu_arr_end."'",'uid,name');
$_MENUQ2=getDbSelect($table['s_menu'],'site='.$s.' and parent='.$_MENUQ1['uid'].' and hidden=0 order by gid asc','*');
?>
<div class="btn-group">
<button type="button" class="btn btn-white btn-sm dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="min-width: 170px">
<?php echo $_MENUQ1['name'] ?>
</button>
<div class="dropdown-menu dropdown-menu-right shadow-sm f14" style="min-width: 170px">
<?php while($_M2=db_fetch_array($_MENUQ2)):?>
<a class="dropdown-item" href="<?php echo $_M2['joint']?>" target="_blank">
<?php echo $_M2['name']?>
</a>
<?php endwhile?>
</div>
</div>

View File

@@ -0,0 +1 @@
드롭다운 조인트

View File

@@ -0,0 +1 @@
사용안내

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,14 @@
<?php
$wdgvar_smenu_arr = explode('/' , $wdgvar['smenu']);
$wdgvar_smenu_arr_end = array_pop($wdgvar_smenu_arr);
$_MENUQ1=getDbData($table['s_menu'],'site='.$s." and id='".$wdgvar_smenu_arr_end."'",'uid,name');
$_MENUQ2=getDbSelect($table['s_menu'],'site='.$s.' and parent='.$_MENUQ1['uid'].' and hidden=0 order by gid asc','*');
?>
<?php while($_M2=db_fetch_array($_MENUQ2)):?>
<li class="list-inline-item">
<a class="muted-link" href="<?php echo RW('c='.$wdgvar['smenu'].'/'.$_M2['id'])?>">
<?php echo $_M2['name']?>
</a>
</li>
<?php endwhile?>

View File

@@ -0,0 +1 @@
리스트 인라인

View File

@@ -0,0 +1 @@
사용안내

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB