1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-12 02:26:21 +02:00

Improved Bootstrap navbar with icons.

This commit is contained in:
Cameron
2012-11-26 20:29:38 -08:00
parent c2f7cf4328
commit 045a8a77fe
5 changed files with 99 additions and 13 deletions

View File

@ -574,6 +574,21 @@ if ($e107_popup != 1)
$temp = $tmpl['button_other'.$kpost]; $temp = $tmpl['button_other'.$kpost];
} }
if($rid == 'home')
{
$temp = $tmpl['button_home'.$kpost];
}
if($rid == 'language')
{
$temp = $tmpl['button_language'.$kpost];
}
if($rid == 'logout')
{
$temp = $tmpl['button_logout'.$kpost];
}
$replace[0] = str_replace(" ", " ", $e107_vars[$act]['text']); $replace[0] = str_replace(" ", " ", $e107_vars[$act]['text']);
// valid URLs // valid URLs
@ -598,7 +613,7 @@ if ($e107_popup != 1)
$replace[8] = ''; $replace[8] = '';
$replace[9] = varset($e107_vars[$act]['image']); $replace[9] = varset($e107_vars[$act]['image']);
if($rid == 'logout' || $rid == 'home') if($rid == 'logout' || $rid == 'home' || $rid == 'language')
{ {
$START_SUB = $tmpl['start_other_sub']; $START_SUB = $tmpl['start_other_sub'];
} }

View File

@ -1407,9 +1407,9 @@ class admin_shortcodes
if($type == 'home') if($type == 'home')
{ {
$menu_vars['home']['text'] = ADLAN_53; $menu_vars['home']['text'] = ""; // ADLAN_53;
$menu_vars['home']['link'] = e_HTTP.'index.php'; $menu_vars['home']['link'] = e_HTTP.'index.php';
$menu_vars['home']['image'] = "<img src='".E_16_NAV_LEAV."' alt='".ADLAN_151."' class='icon S16' />"; $menu_vars['home']['image'] = "<i class='icon-home icon-white'></i>" ; // "<img src='".E_16_NAV_LEAV."' alt='".ADLAN_151."' class='icon S16' />";
$menu_vars['home']['image_src'] = ADLAN_151; $menu_vars['home']['image_src'] = ADLAN_151;
$menu_vars['home']['perm'] = ''; $menu_vars['home']['perm'] = '';
$menu_vars['home']['sort'] = 1; $menu_vars['home']['sort'] = 1;
@ -1474,9 +1474,14 @@ class admin_shortcodes
$tmp[3]['image_large_src'] = ''; $tmp[3]['image_large_src'] = '';
$tmp[3]['perm'] = ''; $tmp[3]['perm'] = '';
$menu_vars['logout']['text'] = ADMINNAME;
$menu_vars['logout']['text'] = ""; // ADMINNAME;
$menu_vars['logout']['link'] = '#'; $menu_vars['logout']['link'] = '#';
$menu_vars['logout']['image'] = "<img src='".E_16_NAV_LGOT."' alt='".ADLAN_151."' class='icon S16' />"; $menu_vars['logout']['image'] = "<i class='icon-user icon-white'></i>"; // "<img src='".E_16_NAV_LGOT."' alt='".ADLAN_151."' class='icon S16' />";
$menu_vars['logout']['image_src'] = ADLAN_46; $menu_vars['logout']['image_src'] = ADLAN_46;
$menu_vars['logout']['perm'] = ''; $menu_vars['logout']['perm'] = '';
$menu_vars['logout']['sub'] = $tmp; $menu_vars['logout']['sub'] = $tmp;
@ -1488,10 +1493,12 @@ class admin_shortcodes
$c = 0; $c = 0;
foreach($languages as $lng) foreach($languages as $lng)
{ {
$checked = ($lng == e_LANGUAGE) ? "<i class='icon-ok icon-black'></i> " : "&nbsp;";
$tmp[$c]['text'] = $lng." (TO DO)"; $tmp[$c]['text'] = $lng." (TO DO)";
$tmp[$c]['description'] = ''; $tmp[$c]['description'] = '';
$tmp[$c]['link'] = '#'; $tmp[$c]['link'] = '#';
$tmp[$c]['image'] = ""; // TODO Flag icons. $tmp[$c]['image'] = $checked;
$tmp[$c]['image_large'] = ''; $tmp[$c]['image_large'] = '';
$tmp[$c]['image_src'] = ''; $tmp[$c]['image_src'] = '';
$tmp[$c]['image_large_src'] = ''; $tmp[$c]['image_large_src'] = '';
@ -1499,9 +1506,9 @@ class admin_shortcodes
$c++; $c++;
} }
$menu_vars['language']['text'] = e_LANGUAGE; $menu_vars['language']['text'] = ""; // e_LANGUAGE;
$menu_vars['language']['link'] = '#'; $menu_vars['language']['link'] = '#';
$menu_vars['language']['image'] = "<img src='".E_16_NAV_LGOT."' alt='".ADLAN_151."' class='icon S16' />"; $menu_vars['language']['image'] = "<i class='icon-globe icon-white'></i>" ;
$menu_vars['language']['image_src'] = ADLAN_46; $menu_vars['language']['image_src'] = ADLAN_46;
$menu_vars['language']['perm'] = ''; $menu_vars['language']['perm'] = '';
$menu_vars['language']['sub'] = $tmp; $menu_vars['language']['sub'] = $tmp;

View File

@ -38,7 +38,7 @@
.core-mainpanel-block { text-align:center; width:100px; float:left; height:48px; display:block;margin:15px; } .core-mainpanel-block { text-align:center; width:100px; float:left; height:48px; display:block;margin:15px; }
.core-mainpanel-link-text { font-weight:bold; text-decoration: none; padding:3px } .core-mainpanel-link-text { font-weight:bold; text-decoration: none; padding:3px }
td.center { text-align:center } td.center, th.center { text-align:center }
.col-label { .col-label {
width:30%; width:30%;
@ -59,8 +59,11 @@ td.center { text-align:center }
filter: gray; /* IE6-9 */ filter: gray; /* IE6-9 */
-webkit-filter: grayscale(100%); /* Chrome 19+, Safari 6+, Safari 6+ iOS */ -webkit-filter: grayscale(100%); /* Chrome 19+, Safari 6+, Safari 6+ iOS */
} }
.dropdown-menu a:hover { .dropdown-menu a:hover {
filter: none; filter: none;
-webkit-filter: grayscale(0%); -webkit-filter: grayscale(0%);
@ -106,6 +109,23 @@ input.delete { }
a.link-active i { a.link-active i {
opacity: 1.0; opacity: 1.0;
} }
a.dropdown-toggle i {
transition: opacity .20s ease-in-out;
-moz-transition: opacity .20s ease-in-out;
-webkit-transition: opacity .20s ease-in-out;
opacity: 0.3
}
a.dropdown-toggle:hover i {
opacity: 1.0
}
/*******************************************************************************************************************/ /*******************************************************************************************************************/
/* Admin List Table */ /* Admin List Table */
.adminlist, .adminform { width:100%; border:1px solid #ddd;} .adminlist, .adminform { width:100%; border:1px solid #ddd;}

View File

@ -41,7 +41,7 @@ $E_ADMIN_NAVIGATION['button'] = '
$E_ADMIN_NAVIGATION['button_active'] = ' $E_ADMIN_NAVIGATION['button_active'] = '
<li class="dropdown"> <li class="dropdown">
<a class="dropdown-toggle" role="button" data-toggle="dropdown" data-target="#" href="{LINK_URL}"> <a class="dropdown-toggle" role="button" data-toggle="dropdown" data-target="#" href="{LINK_URL}">
{LINK_TEXT} {LINK_IMAGE} {LINK_TEXT}
<b class="caret"></b> <b class="caret"></b>
</a> </a>
{SUB_MENU} {SUB_MENU}
@ -49,6 +49,50 @@ $E_ADMIN_NAVIGATION['button_active'] = '
'; ';
// Leave Admin Area.
$E_ADMIN_NAVIGATION['button_home'] = '
<li class="dropdown">
<a class="dropdown-toggle" title="'.ADLAN_53.'" role="button" data-toggle="dropdown" data-target="#" href="{LINK_URL}" >
{LINK_IMAGE} {LINK_TEXT}
<b class="caret"></b>
</a>
{SUB_MENU}
</li>
';
// Change Language
$E_ADMIN_NAVIGATION['button_language'] = '
<li class="dropdown">
<a class="dropdown-toggle" title="Change Language" role="button" data-toggle="dropdown" data-target="#" href="{LINK_URL}" >
{LINK_IMAGE} {LINK_TEXT}
<b class="caret"></b>
</a>
{SUB_MENU}
</li>
';
$str = str_replace('.', '', ADMINPERMS);
if ($str == '0')
{
$label = ADLAN_48.': '.ADMINNAME.' ('.ADLAN_49.') ';
}
else
{
$label = ADLAN_48.': '.ADMINNAME.' ';
}
// Logout / Settings / Personalize
$E_ADMIN_NAVIGATION['button_logout'] = '
<li class="dropdown">
<a class="dropdown-toggle" title="'.$label.'" role="button" data-toggle="dropdown" data-target="#" href="{LINK_URL}" >
{LINK_IMAGE} {LINK_TEXT}
<b class="caret"></b>
</a>
{SUB_MENU}
</li>
';
$E_ADMIN_NAVIGATION['button_other'] = ' $E_ADMIN_NAVIGATION['button_other'] = '
<li> <li>
<a role="button" href="{LINK_URL}" > <a role="button" href="{LINK_URL}" >