aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme
diff options
context:
space:
mode:
Diffstat (limited to 'view/theme')
-rw-r--r--view/theme/redbasic/css/narrow_navbar.css27
-rw-r--r--view/theme/redbasic/css/style.css417
-rw-r--r--view/theme/redbasic/js/redbasic.js5
-rw-r--r--view/theme/redbasic/php/config.php48
-rw-r--r--view/theme/redbasic/php/style.php126
-rw-r--r--view/theme/redbasic/php/theme_init.php9
-rw-r--r--view/theme/redbasic/schema/BS-Default.php20
-rw-r--r--view/theme/redbasic/tpl/theme_settings.tpl10
8 files changed, 271 insertions, 391 deletions
diff --git a/view/theme/redbasic/css/narrow_navbar.css b/view/theme/redbasic/css/narrow_navbar.css
new file mode 100644
index 000000000..b05f46797
--- /dev/null
+++ b/view/theme/redbasic/css/narrow_navbar.css
@@ -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;
+} \ No newline at end of file
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index db4773b70..8ad18e6c7 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -74,6 +74,10 @@ input[type="submit"] {
text-decoration: none;
}
+pre code {
+ border: none;
+}
+
code {
font-family: Courier, monospace;
display: block;
@@ -228,49 +232,6 @@ header #banner #logo-text {
font-size: 22px;
}
-.nav-commlink, .nav-login-link {
- display: block;
- height: 15px;
- margin-top: 67px;
- margin-right: 2px;
- padding: 6px 3px;
- float: left;
- bottom: 140px;
- border: 1px solid #babdb6;
- border-bottom: 0px;
- background-color: #aec0d3;
- color: #565854;
- -moz-border-radius: $radiuspx;
- border-radius: $radiuspx;
-}
-
-nav .nav-link {
- float: right;
- margin: 0.2em 0em;
- padding: 0em 0.5em;
- background-color: transparent !important;
-}
-
-.nav-commlink.active {
- background-color: #ffffff;
- border-bottom: 1px solid #ffffff;
- color: #000000 !important;
- margin-top: 64px;
- padding-top: 6px;
- padding-bottom: 8px;
-}
-
-.nav-ajax-left {
- font-size: 0.8em;
- float: left;
- margin-top: 62px;
-}
-
-
-nav #nav-link-wrapper .nav-link {
- border-right: 1px solid #babdb6;
-}
-
.tabs {
height: 28px;
border-bottom: 1px solid #aaaaaa;
@@ -469,6 +430,11 @@ footer {
text-decoration: none;
}
+.vcard .dropdown-menu {
+ position: absolute;
+ left: 200px;
+ top: 18px;
+}
#profile-extra-links {
clear: both;
@@ -485,9 +451,7 @@ footer {
margin-top: 5px;
}
-.profile-edit-side-div {
- float: right;
-}
+
.profile-edit-side-link {
opacity: 0.3;
filter:alpha(opacity=30);
@@ -528,14 +492,6 @@ footer {
padding: 12px;
}
-#profiles-menu.menu-popup {
- left: 200px;
- right: auto;
- top: 22px;
-}
-
-
-
#profile-in-dir-yes-label,
#profile-in-dir-no-label,
#profile-in-netdir-yes-label,
@@ -775,6 +731,24 @@ footer {
}
+.pmenu.horizontal {
+ padding: 0 0 0 0;
+ border-bottom: none;
+}
+
+.pmenu.horizontal .pmenu-title {
+ display: none;
+}
+.pmenu.horizontal ul {
+ -moz-padding-start: 0;
+}
+
+.pmenu.horizontal li {
+ margin-left: 0;
+ display: inline;
+ padding-right: 15px;
+}
+
#settings-default-perms-menu {
margin-top: 15px;
margin-bottom: 15px;
@@ -789,7 +763,7 @@ footer {
display: block;
color: #FFFFFF;
margin-top: 15px;
- background-color: $nav_bg_2;
+ background-color: $nav_bg;
-webkit-border-radius: $radiuspx ;
-moz-border-radius: $radiuspx;
border-radius: $radiuspx;
@@ -878,7 +852,7 @@ footer {
#nav-search-spinner {
float: left;
margin: 25px 0px 0px 25px;
- color: #fff;
+ color: $nav_active_icon_colour;
}
#nav-search-text:hover,
@@ -892,7 +866,7 @@ footer {
margin: 15px;
padding: 0px 5px 0px 5px;
border-radius: 10px;
- border: none;
+ border-color: $nav_bd;
background-color: $search_background;
transition: background-color 300ms ease 0s;
}
@@ -917,17 +891,6 @@ footer {
font-family: FontAwesome;
}
-.nav-dropdown-indicator {
- opacity: 0.8;
- filter:alpha(opacity=80);
-}
-
-.nav-dropdown-indicator:hover {
- opacity: 1.0;
- filter:alpha(opacity=100);
-}
-
-
.location-label, .gender-label, .marital-label, .homepage-label {
float: left;
text-align: right;
@@ -1141,12 +1104,6 @@ footer {
margin-bottom: 15px;
}
-#language-selector {
- position: absolute;
- top: 0px;
- left: 16px;
-}
-
#group-members {
margin-top: 20px;
padding: 10px;
@@ -1527,7 +1484,7 @@ div.jGrowl div.info {
padding-left: 58px;
}
#jGrowl.top-right {
- top: 15px;
+ top: 65px;
right: 15px;
}
@@ -1542,7 +1499,7 @@ div.jGrowl div.info {
#nav-search-text-ac .autocomplete {
position: fixed;
top: 51px;
- border: 1px solid #222;
+ border: 1px solid $nav_bd;
border-top: none;
}
@@ -1593,25 +1550,15 @@ div.jGrowl div.info {
width: 90%;
}
-a.rconnect,
-nav a,
-nav a:active,
-nav a:visited,
-nav a:link {
+a.rconnect {
color: #ffffff;
text-decoration: none;
outline: none;
}
-a.rconnect:hover, nav a:hover {
+a.rconnect:hover {
color: #0080FF;
}
-nav .fakelink {
- color: #ffffff;
- text-decoration: none;
- outline: none;
-}
-nav .fakelink:hover { text-decoration: none; }
#profiles-menu li a {
color: #ffffff;
@@ -1621,138 +1568,7 @@ nav .fakelink:hover { text-decoration: none; }
color: #000000;
}
-nav .nav-menu-icon {
- position: relative;
- height: 22px;
- padding: 5px;
-/* margin: 3px 10px; */
- -moz-border-radius: $radiuspx;
- -webkit-border-radius: $radiuspx;
- border-radius: $radiuspx;
-}
-nav .nav-menu-icon.active {
- background-color: #FF0000;
-}
-nav .nav-menu-icon img {
- width: 22px;
- height: 22px;
-}
-nav .nav-menu-icon .nav-notify {
- top: 3px;
-}
-nav .nav-menu {
- position: relative;
- height: 16px;
- padding: 5px;
- margin: 0px 5px 0px;
- font-size: 1.0em;
-/* border-bottom: 3px solid #f88; */
-}
-
-nav:hover .nav-menu {
-/* border-bottom: 3px solid #f00; */
-}
-nav .nav-menu.active i {
- color: $active_colour;
-}
-
-nav .nav-notify {
- background-color: #0080FF;
- color: #fff;
- -moz-border-radius: $radiuspx;
- -webkit-border-radius: $radiuspx;
- border-radius: $radiuspx;
-/* opacity: 0.6;
- filter:alpha(opacity=60); */
-
-}
-.nav-notify:hover, nav .nav-notify.active span {
- color: #ffffff;
-}
-
-nav .nav-notify.show {
- display: block;
-}
-nav #nav-help-link,
-nav #nav-login-link,
-nav #nav-search-link,
-nav #nav-directory-link,
-nav #nav-apps-link {
- float: right;
-}
-nav #nav-help-link .menu-popup,
-nav #nav-search-link .menu-popup,
-nav #nav-directory-link .menu-popup,
-nav #nav-apps-link .menu-popup,
-nav #nav-site-linkmenu .menu-popup {
- right: 0px;
- left: auto;
-}
-nav #nav-notifications-linkmenu.on .icon.s22.notify,
-nav #nav-notifications-linkmenu.active .icon.s22.notify {
- background-image: url("../../../../images/icons/22/notify_on.png");
-}
-nav #nav-apps-link.active {
- background-color: #364e59;
-}
-ul.menu-popup {
- position: absolute;
- display: none;
- width: 10em;
- background: #0080FF;
- color: #eec;
- padding: 0px;
- list-style: none;
-/* border-radius: 0px 0px 20px 20px; */
- z-index: 100000;
- -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
- -moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
- box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
-}
-ul.menu-popup a {
- display: block;
- color: #FFFFFF;
- padding: 5px 10px;
- text-decoration: none;
-}
-
-
-ul.menu-popup a:hover {
- background-color: #888888;
- color: #FFFFFF;
-}
-ul.menu-popup .menu-sep {
- border-top: 1px solid #9eabb0;
-}
-ul.menu-popup li {
- float: none;
- overflow: auto;
- height: auto;
- display: block;
-}
-ul.menu-popup li img {
- float: left;
- width: 16px;
- height: 16px;
- padding-right: 5px;
-}
-ul.menu-popup .empty {
- padding: 5px;
- text-align: center;
- color: #9eabb0;
-}
-ul.menu-popup .toolbar {
- background-color: #9eabb0;
- height: auto;
- overflow: auto;
-}
-ul.menu-popup .toolbar a {
- float: right;
-}
-ul.menu-popup .toolbar a:hover {
- background-color: #ffffff;
-}
/* header */
header {
position: fixed;
@@ -1764,66 +1580,6 @@ header {
color: #fff;
}
-
-/* notifications popup menu */
-.nav-notify {
- display: none;
- position: absolute;
- font-size: 10px;
- padding: 1px 3px;
- top: 0px;
- right: -5px;
- min-width: 15px;
- text-align: right;
-}
-.nav-notify.show {
- display: block;
-}
-ul.menu-popup {
- position: absolute;
- display: none;
- width: 10em;
- margin: 0px;
- padding: 0px;
- list-style: none;
- z-index: 100000;
-/* top: 90px; */
-/* left: 400px; */
-}
-
-.notify-menus {
- width: 320px !important;
- max-height: 400px;
- overflow-y: scroll;overflow-style:scrollbar;
-}
-
-#nav-notifications-menu {
- width: 320px;
- max-height: 400px;
- overflow-y: scroll;overflow-style:scrollbar;
- background-color:#FFFFFF;
- -moz-border-radius: $radiuspx;
- -webkit-border-radius: $radiuspx;
- border-radius: $radiuspx;
- border: 1px solid #888;
-}
-#nav-notifications-menu .contactname { font-weight: bold; font-size: 0.9em; }
-#nav-notifications-menu img { float: left; margin-right: 5px; }
-#nav-notifications-menu .notif-when { font-size: 0.8em; display: block; }
-#nav-notifications-menu li {
- padding: 7px 0px 7px 10px;
- word-wrap:normal;
- border-bottom: 1px solid #000;
-}
-
-#nav-notifications-menu li:hover {
-
-}
-
-#nav-notifications-menu a:hover {
- text-decoration: underline;
-}
-
.notif-item a {
color: #000000;
}
@@ -2052,11 +1808,6 @@ margin-right: 50px;
color: $toolicon_colour;
}
-.nav-icon {
- font-size: 1.4em;
- margin-right: 15px;
-}
-
a .drop-icons {
color: $toolicon_colour;;
font-size: 1.2em;
@@ -2441,6 +2192,7 @@ img.mail-list-sender-photo {
}
/* nav bootstrap */
+
nav i {
font-size: 14px;
}
@@ -2448,7 +2200,7 @@ nav i {
nav img {
height: 47px;
width: 47px;
- margin: 2px 0px 1px 10px;
+ margin-top: 2px;
border-radius: $radiuspx;
}
@@ -2456,13 +2208,6 @@ nav ul li {
max-height: 50px
}
-nav a,
-nav a:active,
-nav a:visited,
-nav a:link {
- color: #333;
-}
-
nav .badge {
border-radius: $radiuspx;
}
@@ -2474,3 +2219,91 @@ nav .dropdown-menu {
border-bottom-right-radius: $radiuspx;
border-bottom-left-radius: $radiuspx;
}
+
+#usermenu-caret {
+ color: $nav_icon_colour;
+}
+
+#avatar:hover + #usermenu-caret {
+ color: $nav_active_icon_colour;
+}
+
+/* bootstrap overrides */
+blockquote {
+ font-size: $body_font_size;
+}
+
+.dropdown-menu {
+ font-size: $body_font_size;
+ border-radius: $radiuspx;
+}
+
+.dropdown-menu img {
+ border-radius: $radiuspx;
+}
+
+.navbar-inverse {
+ background-image: -webkit-linear-gradient(top, $nav_gradient_top 0%, $nav_gradient_bottom 100%);
+ background-image: linear-gradient(to bottom, $nav_gradient_top 0%, $nav_gradient_bottom 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=$nav_gradient_top, endColorstr=$nav_gradient_bottom, GradientType=0);
+ background-color: $nav_bg;
+ border-color: $nav_bd;
+}
+
+.navbar-inverse .navbar-collapse {
+ border-color: $nav_bd;
+}
+
+.navbar-inverse .navbar-nav > .active > a {
+ background-image: -webkit-linear-gradient(top, $nav_active_gradient_top 0%, $nav_active_gradient_bottom 100%);
+ background-image: linear-gradient(to bottom, $nav_active_gradient_top 0%, $nav_active_gradient_bottom 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=$nav_active_gradient_top, endColorstr=$nav_active_gradient_bottom, GradientType=0);
+}
+
+
+.navbar-inverse .navbar-nav > li > a {
+ color: $nav_icon_colour;
+ text-shadow: 0px 0px 0px;
+}
+
+.navbar-inverse .navbar-nav > li > a:hover,
+.navbar-inverse .navbar-nav > li > a:focus {
+ color: $nav_active_icon_colour;
+}
+
+.navbar-inverse .navbar-nav > .active > a,
+.navbar-inverse .navbar-nav > .active > a:hover,
+.navbar-inverse .navbar-nav > .active > a:focus {
+ color: $nav_active_icon_colour;
+}
+
+.navbar-inverse .navbar-nav > .open > a,
+.navbar-inverse .navbar-nav > .open > a:hover,
+.navbar-inverse .navbar-nav > .open > a:focus {
+ background-color: $nav_bd;
+ color: $nav_active_icon_colour;
+}
+
+.navbar-inverse .navbar-toggle {
+ border-color: $nav_bd;
+}
+.navbar-inverse .navbar-toggle:hover,
+.navbar-inverse .navbar-toggle:focus {
+ background-color: $nav_bg;
+}
+
+.navbar-inverse .navbar-toggle .icon-bar {
+ background-color: $nav_active_icon_colour;
+}
+
+#expand-aside {
+ color: $nav_active_icon_colour;
+ padding: 7px 10px;
+}
+
+@media (max-width:767px) {
+ aside#region_1 {
+ background: rgba(0, 0, 0, .1);
+ border-right: 1px solid $nav_bd;
+ }
+}
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js
index e41fde2b8..7e957a4f4 100644
--- a/view/theme/redbasic/js/redbasic.js
+++ b/view/theme/redbasic/js/redbasic.js
@@ -22,6 +22,11 @@ function cmtBbClose(comment, id) {
$(document).ready(function() {
+$('[data-toggle=show_hide]').click(function() {
+ $('#expand-aside-icon').toggleClass('icon-circle-arrow-right').toggleClass('icon-circle-arrow-left');
+ $('#region_1').toggleClass('hidden-xs');
+});
+
$('.group-edit-icon').hover(
function() {
$(this).css('opacity','1.0');},
diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php
index 68a72fffd..608a9bda7 100644
--- a/view/theme/redbasic/php/config.php
+++ b/view/theme/redbasic/php/config.php
@@ -6,7 +6,15 @@ function theme_content(&$a) {
$arr = array();
$arr['schema'] = get_pconfig(local_user(),'redbasic', 'schema' );
- $arr['nav_colour'] = get_pconfig(local_user(),'redbasic', 'nav_colour' );
+ $arr['narrow_navbar'] = get_pconfig(local_user(),'redbasic', 'narrow_navbar' );
+ $arr['nav_bg'] = get_pconfig(local_user(),'redbasic', 'nav_bg' );
+ $arr['nav_gradient_top'] = get_pconfig(local_user(),'redbasic', 'nav_gradient_top' );
+ $arr['nav_gradient_bottom'] = get_pconfig(local_user(),'redbasic', 'nav_gradient_bottom' );
+ $arr['nav_active_gradient_top'] = get_pconfig(local_user(),'redbasic', 'nav_active_gradient_top' );
+ $arr['nav_active_gradient_bottom'] = get_pconfig(local_user(),'redbasic', 'nav_active_gradient_bottom' );
+ $arr['nav_bd'] = get_pconfig(local_user(),'redbasic', 'nav_bd' );
+ $arr['nav_icon_colour'] = get_pconfig(local_user(),'redbasic', 'nav_icon_colour' );
+ $arr['nav_active_icon_colour'] = get_pconfig(local_user(),'redbasic', 'nav_active_icon_colour' );
$arr['link_colour'] = get_pconfig(local_user(),'redbasic', 'link_colour' );
$arr['banner_colour'] = get_pconfig(local_user(),'redbasic', 'banner_colour' );
$arr['bgcolour'] = get_pconfig(local_user(),'redbasic', 'background_colour' );
@@ -33,7 +41,15 @@ function theme_post(&$a) {
if (isset($_POST['redbasic-settings-submit'])) {
set_pconfig(local_user(), 'redbasic', 'schema', $_POST['redbasic_schema']);
- set_pconfig(local_user(), 'redbasic', 'nav_colour', $_POST['redbasic_nav_colour']);
+ set_pconfig(local_user(), 'redbasic', 'narrow_navbar', $_POST['redbasic_narrow_navbar']);
+ set_pconfig(local_user(), 'redbasic', 'nav_bg', $_POST['redbasic_nav_bg']);
+ set_pconfig(local_user(), 'redbasic', 'nav_gradient_top', $_POST['redbasic_nav_gradient_top']);
+ set_pconfig(local_user(), 'redbasic', 'nav_gradient_bottom', $_POST['redbasic_nav_gradient_bottom']);
+ set_pconfig(local_user(), 'redbasic', 'nav_active_gradient_top', $_POST['redbasic_nav_active_gradient_top']);
+ set_pconfig(local_user(), 'redbasic', 'nav_active_gradient_bottom', $_POST['redbasic_nav_active_gradient_bottom']);
+ set_pconfig(local_user(), 'redbasic', 'nav_bd', $_POST['redbasic_nav_bd']);
+ set_pconfig(local_user(), 'redbasic', 'nav_icon_colour', $_POST['redbasic_nav_icon_colour']);
+ set_pconfig(local_user(), 'redbasic', 'nav_active_icon_colour', $_POST['redbasic_nav_active_icon_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', 'banner_colour', $_POST['redbasic_banner_colour']);
@@ -58,8 +74,6 @@ function theme_post(&$a) {
function redbasic_form(&$a, $arr) {
-
-
$scheme_choices = array();
$scheme_choices["---"] = t("Default");
$files = glob('view/theme/redbasic/schema/*.php');
@@ -70,22 +84,6 @@ function redbasic_form(&$a, $arr) {
$scheme_choices[$f] = $scheme_name;
}
}
-
-
- $nav_colours = array (
- '' => t('Scheme Default'),
- 'red' => 'red',
- 'pink' => 'pink',
- 'green' => 'green',
- 'blue' => 'blue',
- 'purple' => 'purple',
- 'black' => 'black',
- 'orange' => 'orange',
- 'brown' => 'brown',
- 'grey' => 'grey',
- 'gold' => 'gold',
- 'silver' => t('silver'),
- );
if(feature_enabled(local_user(),'expert'))
$expert = 1;
@@ -97,7 +95,15 @@ if(feature_enabled(local_user(),'expert'))
'$expert' => $expert,
'$title' => t("Theme settings"),
'$schema' => array('redbasic_schema', t('Set scheme'), $arr['schema'], '', $scheme_choices),
- '$nav_colour' => array('redbasic_nav_colour', t('Navigation bar colour'), $arr['nav_colour'], '', $nav_colours),
+ '$narrow_navbar' => array('redbasic_narrow_navbar',t('Narrow navbar'),$arr['narrow_navbar']),
+ '$nav_bg' => array('redbasic_nav_bg', t('Navigation bar background colour'), $arr['nav_bg']),
+ '$nav_gradient_top' => array('redbasic_nav_gradient_top', t('Navigation bar gradient top colour'), $arr['nav_gradient_top']),
+ '$nav_gradient_bottom' => array('redbasic_nav_gradient_bottom', t('Navigation bar gradient bottom colour'), $arr['nav_gradient_bottom']),
+ '$nav_active_gradient_top' => array('redbasic_nav_active_gradient_top', t('Navigation active button gradient top colour'), $arr['nav_active_gradient_top']),
+ '$nav_active_gradient_bottom' => array('redbasic_nav_active_gradient_bottom', t('Navigation active button gradient bottom colour'), $arr['nav_active_gradient_bottom']),
+ '$nav_bd' => array('redbasic_nav_bd', t('Navigation bar border colour '), $arr['nav_bd']),
+ '$nav_icon_colour' => array('redbasic_nav_icon_colour', t('Navigation bar icon colour '), $arr['nav_icon_colour']),
+ '$nav_active_icon_colour' => array('redbasic_nav_active_icon_colour', t('Navigation bar active icon colour '), $arr['nav_active_icon_colour']),
'$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']),
'$bgcolour' => array('redbasic_background_colour', t('Set the background colour'), $arr['bgcolour']),
diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php
index 8d5c23a03..8fb4de381 100644
--- a/view/theme/redbasic/php/style.php
+++ b/view/theme/redbasic/php/style.php
@@ -7,13 +7,16 @@ if(! $a->install) {
if($uid)
load_pconfig($uid,'redbasic');
-// Nav colours are mess. Set $nav_colour as a single word for the sake of letting folk pick one
-// but it actually consists of at least two colours to form a gradient - $nav_bg_1 and $nav_bg_2
-// A further two - $nav_bg_3 and $nav_bg_4 are used to create the hover, if any particular scheme
-// wants to implement that
- $nav_colour = get_pconfig($uid, "redbasic", "nav_colour");
-
// Load the owners pconfig
+ $nav_bg = get_pconfig($uid, "redbasic", "nav_bg");
+ $nav_gradient_top = get_pconfig($uid, "redbasic", "nav_gradient_top");
+ $nav_gradient_bottom = get_pconfig($uid, "redbasic", "nav_gradient_bottom");
+ $nav_active_gradient_top = get_pconfig($uid, "redbasic", "nav_active_gradient_top");
+ $nav_active_gradient_bottom = get_pconfig($uid, "redbasic", "nav_active_gradient_bottom");
+ $nav_bd = get_pconfig($uid, "redbasic", "nav_bd");
+ $nav_icon_colour = get_pconfig($uid, "redbasic", "nav_icon_colour");
+ $nav_active_icon_colour = get_pconfig($uid, "redbasic", "nav_active_icon_colour");
+ $narrow_navbar = get_pconfig($uid,'redbasic','narrow_navbar');
$banner_colour = get_pconfig($uid,'redbasic','banner_colour');
$link_colour = get_pconfig($uid, "redbasic", "link_colour");
$schema = get_pconfig($uid,'redbasic','schema');
@@ -36,10 +39,16 @@ if(! $a->install) {
}
-// Now load the scheme. If a value is changed above, we'll keep the settings
-// If not, we'll keep those defined by the schema
-// Setting $scheme to '' wasn't working for some reason, so we'll check it's
-// not --- like the mobile theme does instead.
+ // Now load the scheme. If a value is changed above, we'll keep the settings
+ // If not, we'll keep those defined by the schema
+ // Setting $schema to '' wasn't working for some reason, so we'll check it's
+ // not --- like the mobile theme does instead.
+
+
+ // Allow layouts to over-ride the schema
+
+ if($_REQUEST['schema'])
+ $schema = $_REQUEST['schema'];
if (($schema) && ($schema != '---')) {
// Check it exists, because this setting gets distributed to clones
@@ -61,17 +70,28 @@ if(! $a->install) {
//Set some defaults - we have to do this after pulling owner settings, and we have to check for each setting
//individually. If we don't, we'll have problems if a user has set one, but not all options.
- if (! $nav_colour) {
- $nav_colour = "red";
- $nav_bg_1 = "#f88";
- $nav_bg_2 = "#b00";
- $nav_bg_3 = "#f00";
- $nav_bg_4 = "#b00";
- }
+ if (! $nav_bg)
+ $nav_bg = "#222";
+ if (! $nav_gradient_top)
+ $nav_gradient_top = "#3c3c3c";
+ if (! $nav_gradient_bottom)
+ $nav_gradient_bottom = "#222";
+ if (! $nav_active_gradient_top)
+ $nav_active_gradient_top = "#222";
+ if (! $nav_active_gradient_bottom)
+ $nav_active_gradient_bottom = "#282828";
+ if (! $nav_bd)
+ $nav_bd = "#222";
+ if (! $nav_icon_colour)
+ $nav_icon_colour = "#999";
+ if (! $nav_active_icon_colour)
+ $nav_active_icon_colour = "#fff";
if (! $link_colour)
$link_colour = "#0080FF";
if (! $banner_colour)
- $banner_colour = "fff";
+ $banner_colour = "#fff";
+ if (! $search_background)
+ $search_background = "#eee";
if (! $bgcolour)
$bgcolour = "#fdfdfd";
if (! $background_image)
@@ -116,70 +136,20 @@ if(! $a->install) {
$nav_float_min_opacity = (float) $nav_min_opacity;
$nav_percent_min_opacity = (int) 100 * $nav_min_opacity;
}
-
-
-// Nav colours have nested values, so we have to define the actual variables
-// used in the CSS from the higher level "red", "black", etc here
- if ($nav_colour == "red") {
- $nav_bg_1 = $nav_bg_3 = "#ba002f";
- $nav_bg_2 = $nav_bg_4 = "#ad002c";
- $search_background = "#EEEEEE";
- $active_colour = '#444444';
- }
-
- if ($nav_colour == "black") {
- $nav_bg_1 = $nav_bg_3 = "#000";
- $nav_bg_2 = $nav_bg_4 = "#222";
- $search_background = '#EEEEEE';
- $active_colour = '#AAAAAA';
- }
- if ($nav_colour == "silver") {
- $nav_bg_1 = $nav_bg_2 = $nav_bg_3 = $nav_bg_4 = "silver";
- $search_background = '#EEEEEE';
- }
- if($nav_colour === "pink") {
- $nav_bg_1 = $nav_bg_3 = "#FFC1CA";
- $nav_bg_2 = $nav_bg_4 = "#FFC1CA";
- }
- if($nav_colour === "green") {
- $nav_bg_1 = $nav_bg_3 = "#5CD65C";
- $nav_bg_2 = $nav_bg_4 = "#5CD65C";
- }
- if($nav_colour === "blue") {
- $nav_bg_1 = $nav_bg_3 = "#1872a2";
- $nav_bg_2 = $nav_bg_4 = "#1872a2";
- }
- if($nav_colour === "purple") {
- $nav_bg_1 = $nav_bg_3 = "#551A8B";
- $nav_bg_2 = $nav_bg_4 = "#551A8B";
- }
- if($nav_colour === "orange") {
- $nav_bg_1 = $nav_bg_3 = "#FF3D0D";
- $nav_bg_2 = $nav_bg_4 = "#FF3D0D";
- }
- if($nav_colour === "brown") {
- $nav_bg_1 = $nav_bg_3 = "#330000";
- $nav_bg_2 = $nav_bg_4 = "#330000";
- }
- if($nav_colour === "grey") {
- $nav_bg_1 = $nav_bg_3 = "#2e2f2e";
- $nav_bg_2 = $nav_bg_4 = "#2e2f2e";
- }
- if($nav_colour === "gold") {
- $nav_bg_1 = $nav_bg_3 = "#FFAA00";
- $nav_bg_2 = $nav_bg_4 = "#FFAA00";
- }
-
// Apply the settings
if(file_exists('view/theme/redbasic/css/style.css')) {
$x = file_get_contents('view/theme/redbasic/css/style.css');
$options = array (
-'$nav_bg_1' => $nav_bg_1,
-'$nav_bg_2' => $nav_bg_2,
-'$nav_bg_3' => $nav_bg_3,
-'$nav_bg_4' => $nav_bg_4,
+'$nav_bg' => $nav_bg,
+'$nav_gradient_top' => $nav_gradient_top,
+'$nav_gradient_bottom' => $nav_gradient_bottom,
+'$nav_active_gradient_top' => $nav_active_gradient_top,
+'$nav_active_gradient_bottom' => $nav_active_gradient_bottom,
+'$nav_bd' => $nav_bd,
+'$nav_icon_colour' => $nav_icon_colour,
+'$nav_active_icon_colour' => $nav_active_icon_colour,
'$link_colour' => $link_colour,
'$banner_colour' => $banner_colour,
'$search_background' => $search_background,
@@ -207,9 +177,11 @@ $options = array (
);
echo str_replace(array_keys($options), array_values($options), $x);
-
}
if($sloppy_photos && file_exists('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');
+}
diff --git a/view/theme/redbasic/php/theme_init.php b/view/theme/redbasic/php/theme_init.php
index ccb85a070..12f49efa7 100644
--- a/view/theme/redbasic/php/theme_init.php
+++ b/view/theme/redbasic/php/theme_init.php
@@ -1,5 +1,14 @@
<?php
head_add_css('library/font_awesome/css/font-awesome.min.css');
+head_add_css('library/bootstrap/css/bootstrap-theme.min.css');
+head_add_css('library/bootstrap/css/bootstrap.min.css');
+head_add_css('view/css/bootstrap-red.css');
+head_add_css('library/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css');
+
require_once('view/php/theme_init.php');
+head_add_js('library/bootstrap/js/bootstrap.min.js');
+head_add_js('library/bootstrap/js/bootbox.min.js');
+head_add_js('library/bootstrap-datetimepicker/js/moment.js');
+head_add_js('library/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js');
diff --git a/view/theme/redbasic/schema/BS-Default.php b/view/theme/redbasic/schema/BS-Default.php
new file mode 100644
index 000000000..f93e879e3
--- /dev/null
+++ b/view/theme/redbasic/schema/BS-Default.php
@@ -0,0 +1,20 @@
+<?php
+
+ if (! $nav_bg)
+ $nav_bg = "#f8f8f8";
+ if (! $nav_bd)
+ $nav_bd = "#e7e7e7";
+ if (! $nav_gradient_top)
+ $nav_gradient_top = "#fff";
+ if (! $nav_gradient_bottom)
+ $nav_gradient_bottom = "#f8f8f8";
+ if (! $nav_active_gradient_top)
+ $nav_active_gradient_top = "#ebebeb";
+ if (! $nav_active_gradient_bottom)
+ $nav_active_gradient_bottom = "#f3f3f3";
+ if (! $nav_icon_colour)
+ $nav_icon_colour = "#777";
+ if (! $nav_active_icon_colour)
+ $nav_active_icon_colour = "#555";
+ if (! $radius)
+ $radius = "4";
diff --git a/view/theme/redbasic/tpl/theme_settings.tpl b/view/theme/redbasic/tpl/theme_settings.tpl
index 49b9b7e92..34c04e91c 100644
--- a/view/theme/redbasic/tpl/theme_settings.tpl
+++ b/view/theme/redbasic/tpl/theme_settings.tpl
@@ -4,7 +4,15 @@
</div>
{{if $expert}}
-{{include file="field_select.tpl" field=$nav_colour}}
+{{include file="field_checkbox.tpl" field=$narrow_navbar}}
+{{include file="field_input.tpl" field=$nav_bg}}
+{{include file="field_input.tpl" field=$nav_gradient_top}}
+{{include file="field_input.tpl" field=$nav_gradient_bottom}}
+{{include file="field_input.tpl" field=$nav_active_gradient_top}}
+{{include file="field_input.tpl" field=$nav_active_gradient_bottom}}
+{{include file="field_input.tpl" field=$nav_bd}}
+{{include file="field_input.tpl" field=$nav_icon_colour}}
+{{include file="field_input.tpl" field=$nav_active_icon_colour}}
{{include file="field_input.tpl" field=$banner_colour}}
{{include file="field_input.tpl" field=$link_colour}}
{{include file="field_input.tpl" field=$bgcolour}}