1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-21 05:02:02 +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

@ -568,11 +568,26 @@ if ($e107_popup != 1)
// $temp = $tmpl['button'.$kpost];
// echo "ap = ".$active_page;
// echo " act = ".$act."<br /><br />";
if($rid == 'adminhome')
{
$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(" ", "&nbsp;", $e107_vars[$act]['text']);
@ -598,7 +613,7 @@ if ($e107_popup != 1)
$replace[8] = '';
$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'];
}

View File

@ -1407,9 +1407,9 @@ class admin_shortcodes
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']['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']['perm'] = '';
$menu_vars['home']['sort'] = 1;
@ -1474,9 +1474,14 @@ class admin_shortcodes
$tmp[3]['image_large_src'] = '';
$tmp[3]['perm'] = '';
$menu_vars['logout']['text'] = ADMINNAME;
$menu_vars['logout']['text'] = ""; // ADMINNAME;
$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']['perm'] = '';
$menu_vars['logout']['sub'] = $tmp;
@ -1487,11 +1492,13 @@ class admin_shortcodes
$languages = array('English','French');
$c = 0;
foreach($languages as $lng)
{
{
$checked = ($lng == e_LANGUAGE) ? "<i class='icon-ok icon-black'></i> " : "&nbsp;";
$tmp[$c]['text'] = $lng." (TO DO)";
$tmp[$c]['description'] = '';
$tmp[$c]['link'] = '#';
$tmp[$c]['image'] = ""; // TODO Flag icons.
$tmp[$c]['image'] = $checked;
$tmp[$c]['image_large'] = '';
$tmp[$c]['image_src'] = '';
$tmp[$c]['image_large_src'] = '';
@ -1499,9 +1506,9 @@ class admin_shortcodes
$c++;
}
$menu_vars['language']['text'] = e_LANGUAGE;
$menu_vars['language']['text'] = ""; // e_LANGUAGE;
$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']['perm'] = '';
$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-link-text { font-weight:bold; text-decoration: none; padding:3px }
td.center { text-align:center }
td.center, th.center { text-align:center }
.col-label {
width:30%;
@ -59,8 +59,11 @@ td.center { text-align:center }
filter: gray; /* IE6-9 */
-webkit-filter: grayscale(100%); /* Chrome 19+, Safari 6+, Safari 6+ iOS */
}
.dropdown-menu a:hover {
filter: none;
-webkit-filter: grayscale(0%);
@ -106,6 +109,23 @@ input.delete { }
a.link-active i {
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 */
.adminlist, .adminform { width:100%; border:1px solid #ddd;}

View File

@ -41,7 +41,7 @@ $E_ADMIN_NAVIGATION['button'] = '
$E_ADMIN_NAVIGATION['button_active'] = '
<li class="dropdown">
<a class="dropdown-toggle" role="button" data-toggle="dropdown" data-target="#" href="{LINK_URL}">
{LINK_TEXT}
{LINK_IMAGE} {LINK_TEXT}
<b class="caret"></b>
</a>
{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'] = '
<li>
<a role="button" href="{LINK_URL}" >

View File

@ -4,7 +4,7 @@ if ( ! defined('e107_INIT')) { exit(); }
define('STANDARDS_MODE', TRUE);
// include_lan(e_THEME."_blank/languages/".e_LANGUAGE.".php");
e107::js('theme','js/bootstrap.js');
e107::js('theme','js/bootstrap.js');
e107::css('theme','css/bootstrap.css');
e107::css('theme','css/bootstrap-responsive.css');
e107::css('theme','ie_all.css',null,'all',"<!--[if IE]>","<![endif]-->");