Merge pull request #334 from cvogeley/master
Add option for narrow navbar instead of the bootstrap default
This commit is contained in:
commit
f0a361a7c1
27
view/theme/redbasic/css/narrow_navbar.css
Normal file
27
view/theme/redbasic/css/narrow_navbar.css
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
.navbar-nav > li > a {padding-top:5px !important; padding-bottom:5px !important;}
|
||||||
|
.navbar {min-height:25px !important;}
|
||||||
|
nav img {
|
||||||
|
height: 25px;
|
||||||
|
width: 25px;
|
||||||
|
margin: 2px 0px 1px 10px;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
.navbar-left{height: 30px;}
|
||||||
|
.container-fluid {min-height:30px;}
|
||||||
|
.collapse .navbar-collapse {min-height:30px;}
|
||||||
|
#nav-search-text {margin:5px;}
|
||||||
|
header #banner {margin-top:5px;}
|
||||||
|
nav .dropdown-menu {
|
||||||
|
top: 30px;}
|
||||||
|
nav .badge {
|
||||||
|
position: relative;
|
||||||
|
top: -30px;
|
||||||
|
float: right;
|
||||||
|
font-size: 10px;
|
||||||
|
padding: 2px 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
#jGrowl.top-right {
|
||||||
|
top: 30px;
|
||||||
|
right: 15px;
|
||||||
|
}
|
@ -6,6 +6,7 @@ function theme_content(&$a) {
|
|||||||
$arr = array();
|
$arr = array();
|
||||||
|
|
||||||
$arr['schema'] = get_pconfig(local_user(),'redbasic', 'schema' );
|
$arr['schema'] = get_pconfig(local_user(),'redbasic', 'schema' );
|
||||||
|
$arr['narrow_navbar'] = get_pconfig(local_user(),'redbasic', 'narrow_navbar' );
|
||||||
$arr['nav_colour'] = get_pconfig(local_user(),'redbasic', 'nav_colour' );
|
$arr['nav_colour'] = get_pconfig(local_user(),'redbasic', 'nav_colour' );
|
||||||
$arr['link_colour'] = get_pconfig(local_user(),'redbasic', 'link_colour' );
|
$arr['link_colour'] = get_pconfig(local_user(),'redbasic', 'link_colour' );
|
||||||
$arr['banner_colour'] = get_pconfig(local_user(),'redbasic', 'banner_colour' );
|
$arr['banner_colour'] = get_pconfig(local_user(),'redbasic', 'banner_colour' );
|
||||||
@ -33,6 +34,7 @@ function theme_post(&$a) {
|
|||||||
|
|
||||||
if (isset($_POST['redbasic-settings-submit'])) {
|
if (isset($_POST['redbasic-settings-submit'])) {
|
||||||
set_pconfig(local_user(), 'redbasic', 'schema', $_POST['redbasic_schema']);
|
set_pconfig(local_user(), 'redbasic', 'schema', $_POST['redbasic_schema']);
|
||||||
|
set_pconfig(local_user(), 'redbasic', 'narrow_navbar', $_POST['redbasic_narrow_navbar']);
|
||||||
set_pconfig(local_user(), 'redbasic', 'nav_colour', $_POST['redbasic_nav_colour']);
|
set_pconfig(local_user(), 'redbasic', 'nav_colour', $_POST['redbasic_nav_colour']);
|
||||||
set_pconfig(local_user(), 'redbasic', 'link_colour', $_POST['redbasic_link_colour']);
|
set_pconfig(local_user(), 'redbasic', 'link_colour', $_POST['redbasic_link_colour']);
|
||||||
set_pconfig(local_user(), 'redbasic', 'background_colour', $_POST['redbasic_background_colour']);
|
set_pconfig(local_user(), 'redbasic', 'background_colour', $_POST['redbasic_background_colour']);
|
||||||
@ -97,6 +99,7 @@ if(feature_enabled(local_user(),'expert'))
|
|||||||
'$expert' => $expert,
|
'$expert' => $expert,
|
||||||
'$title' => t("Theme settings"),
|
'$title' => t("Theme settings"),
|
||||||
'$schema' => array('redbasic_schema', t('Set scheme'), $arr['schema'], '', $scheme_choices),
|
'$schema' => array('redbasic_schema', t('Set scheme'), $arr['schema'], '', $scheme_choices),
|
||||||
|
'$narrow_navbar' => array('redbasic_narrow_navbar',t('Narrow navbar'),$arr['narrow_navbar']),
|
||||||
'$nav_colour' => array('redbasic_nav_colour', t('Navigation bar colour'), $arr['nav_colour'], '', $nav_colours),
|
'$nav_colour' => array('redbasic_nav_colour', t('Navigation bar colour'), $arr['nav_colour'], '', $nav_colours),
|
||||||
'$link_colour' => array('redbasic_link_colour', t('link colour'), $arr['link_colour'], '', $link_colours),
|
'$link_colour' => array('redbasic_link_colour', t('link colour'), $arr['link_colour'], '', $link_colours),
|
||||||
'$banner_colour' => array('redbasic_banner_colour', t('Set font-colour for banner'), $arr['banner_colour']),
|
'$banner_colour' => array('redbasic_banner_colour', t('Set font-colour for banner'), $arr['banner_colour']),
|
||||||
|
@ -14,6 +14,7 @@ if(! $a->install) {
|
|||||||
$nav_colour = get_pconfig($uid, "redbasic", "nav_colour");
|
$nav_colour = get_pconfig($uid, "redbasic", "nav_colour");
|
||||||
|
|
||||||
// Load the owners pconfig
|
// Load the owners pconfig
|
||||||
|
$narrow_navbar = get_pconfig($uid,'redbasic','narrow_navbar');
|
||||||
$banner_colour = get_pconfig($uid,'redbasic','banner_colour');
|
$banner_colour = get_pconfig($uid,'redbasic','banner_colour');
|
||||||
$link_colour = get_pconfig($uid, "redbasic", "link_colour");
|
$link_colour = get_pconfig($uid, "redbasic", "link_colour");
|
||||||
$schema = get_pconfig($uid,'redbasic','schema');
|
$schema = get_pconfig($uid,'redbasic','schema');
|
||||||
@ -213,3 +214,6 @@ echo str_replace(array_keys($options), array_values($options), $x);
|
|||||||
if($sloppy_photos && file_exists('view/theme/redbasic/css/sloppy_photos.css')) {
|
if($sloppy_photos && file_exists('view/theme/redbasic/css/sloppy_photos.css')) {
|
||||||
echo file_get_contents('view/theme/redbasic/css/sloppy_photos.css');
|
echo file_get_contents('view/theme/redbasic/css/sloppy_photos.css');
|
||||||
}
|
}
|
||||||
|
if($narrow_navbar && file_exists('view/theme/redbasic/css/narrow_navbar.css')) {
|
||||||
|
echo file_get_contents('view/theme/redbasic/css/narrow_navbar.css');
|
||||||
|
}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
{{if $expert}}
|
{{if $expert}}
|
||||||
{{* include file="field_select.tpl" field=$nav_colour *}}
|
{{* include file="field_select.tpl" field=$nav_colour *}}
|
||||||
|
{{include file="field_checkbox.tpl" field=$narrow_navbar}}
|
||||||
{{include file="field_input.tpl" field=$banner_colour}}
|
{{include file="field_input.tpl" field=$banner_colour}}
|
||||||
{{include file="field_input.tpl" field=$link_colour}}
|
{{include file="field_input.tpl" field=$link_colour}}
|
||||||
{{include file="field_input.tpl" field=$bgcolour}}
|
{{include file="field_input.tpl" field=$bgcolour}}
|
||||||
|
Reference in New Issue
Block a user