diff options
author | Max Kostikov <max@kostikov.co> | 2018-09-28 15:46:14 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2018-09-28 15:46:14 +0200 |
commit | 4a904fa3a8af1c101ede76657249fb7eb47faf60 (patch) | |
tree | 544509813fb68579ef2b556ce879a971d183269a /view/theme/redbasic | |
parent | f5f6ec3d71acb3e0488386819d5060e59331ec23 (diff) | |
parent | c13d7e29ef9676b0f0e4ae23aa52e203f4ad8895 (diff) | |
download | volse-hubzilla-4a904fa3a8af1c101ede76657249fb7eb47faf60.tar.gz volse-hubzilla-4a904fa3a8af1c101ede76657249fb7eb47faf60.tar.bz2 volse-hubzilla-4a904fa3a8af1c101ede76657249fb7eb47faf60.zip |
Merge branch 'patch-29' into 'dev'
Patch 29
See merge request Kostikov/core!3
Diffstat (limited to 'view/theme/redbasic')
-rw-r--r-- | view/theme/redbasic/css/style.css | 18 | ||||
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 19 | ||||
-rw-r--r-- | view/theme/redbasic/php/config.php | 6 | ||||
-rw-r--r-- | view/theme/redbasic/php/style.php | 6 | ||||
-rw-r--r-- | view/theme/redbasic/php/theme_init.php | 4 | ||||
-rw-r--r-- | view/theme/redbasic/tpl/theme_settings.tpl | 1 |
6 files changed, 18 insertions, 36 deletions
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 943b27637..a9ea29ba1 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -32,13 +32,9 @@ aside #region_1 { border-right: 1px solid transparent; } -aside #left_aside_wrapper { - /*margin-bottom: 10px;*/ - margin-bottom: $bottom_margin; -} +aside #left_aside_wrapper, aside #right_aside_wrapper { - /*margin-bottom: 10px;*/ - margin-bottom: $bottom_margin; + margin-bottom: 10px; } main { @@ -47,10 +43,6 @@ main { max-width: $main_widthpx; } -main #region_2 { - margin-bottom: $bottom_margin; -} - #overlay { position: absolute; top: 0; @@ -1522,11 +1514,15 @@ blockquote { left: 0px; } - #nav-app-link-wrapper { + #nav-app-link-wrapper.has_location { min-width: 0; flex-basis: 25%; } + #nav-app-link-wrapper { + margin-right: 0.5rem; + } + #navbar-collapse-2 .navbar-app i { font-size: 1rem; margin-right: 0.5rem; diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index c905c92cb..688e92148 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -18,26 +18,13 @@ $(document).ready(function() { $('#css3-calc').remove(); // Remove the test element if($(window).width() >= 992) { - $('#left_aside_wrapper').stick_in_parent({ + $('#left_aside_wrapper, #right_aside_wrapper').stick_in_parent({ offset_top: parseInt($('aside').css('padding-top')), parent: 'main', - spacer: '#left_aside_spacer' + spacer: '.aside_spacer' }); } - if($(window).width() >= 992) { - $('#right_aside_wrapper').stick_in_parent({ - offset_top: parseInt($('aside').css('padding-top')), - parent: 'main', - spacer: '#right_aside_spacer' - }); - } - - - $('#notifications_wrapper.fs #notifications').stick_in_parent({ - parent: '#notifications_wrapper' - }); - $('#expand-aside').on('click', toggleAside); $('section').on('click', function() { @@ -56,7 +43,7 @@ $(document).ready(function() { }); - var right_aside_height = $('#rightt_aside_wrapper').height(); + var right_aside_height = $('#right_aside_wrapper').height(); $('#right_aside_wrapper').on('click', function() { if(right_aside_height != $('#right_aside_wrapper').height()) { diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php index f98182739..0a779529d 100644 --- a/view/theme/redbasic/php/config.php +++ b/view/theme/redbasic/php/config.php @@ -54,6 +54,7 @@ class RedbasicConfig { $arr['converse_width']=get_pconfig(local_channel(),"redbasic","converse_width"); $arr['top_photo']=get_pconfig(local_channel(),"redbasic","top_photo"); $arr['reply_photo']=get_pconfig(local_channel(),"redbasic","reply_photo"); + $arr['advanced_theming'] = get_pconfig(local_channel(), 'redbasic', 'advanced_theming'); return $this->form($arr); } @@ -80,15 +81,15 @@ class RedbasicConfig { set_pconfig(local_channel(), 'redbasic', 'converse_width', $_POST['redbasic_converse_width']); set_pconfig(local_channel(), 'redbasic', 'top_photo', $_POST['redbasic_top_photo']); set_pconfig(local_channel(), 'redbasic', 'reply_photo', $_POST['redbasic_reply_photo']); + set_pconfig(local_channel(), 'redbasic', 'advanced_theming', $_POST['redbasic_advanced_theming']); } } function form($arr) { - if(feature_enabled(local_channel(),'advanced_theming')) + if(get_pconfig(local_channel(), 'redbasic', 'advanced_theming')) $expert = 1; - $o .= replace_macros(get_markup_template('theme_settings.tpl'), array( '$submit' => t('Submit'), '$baseurl' => z_root(), @@ -112,6 +113,7 @@ class RedbasicConfig { '$converse_width' => array('redbasic_converse_width',t('Set maximum width of content region in pixel'),$arr['converse_width'], t('Leave empty for default width')), '$top_photo' => array('redbasic_top_photo', t('Set size of conversation author photo'), $arr['top_photo']), '$reply_photo' => array('redbasic_reply_photo', t('Set size of followup author photos'), $arr['reply_photo']), + '$advanced_theming' => ['redbasic_advanced_theming', t('Show advanced settings'), $arr['advanced_theming'], '', [t('No'), t('Yes')]] )); return $o; diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 0631fa142..91cc0b85b 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -106,8 +106,6 @@ if(! $top_photo) $top_photo = '2.3rem'; if(! $reply_photo) $reply_photo = '2.3rem'; -if(! $bottom_margin) - $bottom_margin = '200px'; // Apply the settings if(file_exists('view/theme/redbasic/css/style.css')) { @@ -152,9 +150,7 @@ if(file_exists('view/theme/redbasic/css/style.css')) { '$pmenu_top' => $pmenu_top, '$pmenu_reply' => $pmenu_reply, '$main_width' => $main_width, - '$aside_width' => $aside_width, - '$bottom_margin' => $bottom_margin - + '$aside_width' => $aside_width ); echo str_replace(array_keys($options), array_values($options), $x); diff --git a/view/theme/redbasic/php/theme_init.php b/view/theme/redbasic/php/theme_init.php index d9750de42..5f73f6736 100644 --- a/view/theme/redbasic/php/theme_init.php +++ b/view/theme/redbasic/php/theme_init.php @@ -1,14 +1,14 @@ <?php head_add_css('/library/fork-awesome/css/fork-awesome.min.css'); -head_add_css('/library/bootstrap/css/bootstrap.min.css'); +head_add_css('/vendor/twbs/bootstrap/dist/css/bootstrap.min.css'); head_add_css('/library/bootstrap-tagsinput/bootstrap-tagsinput.css'); head_add_css('/view/css/bootstrap-red.css'); head_add_css('/library/datetimepicker/jquery.datetimepicker.css'); head_add_css('/library/bootstrap-colorpicker/dist/css/bootstrap-colorpicker.min.css'); require_once('view/php/theme_init.php'); -head_add_js('/library/bootstrap/js/bootstrap.bundle.min.js'); +head_add_js('/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.min.js'); head_add_js('/library/bootbox/bootbox.min.js'); head_add_js('/library/bootstrap-tagsinput/bootstrap-tagsinput.js'); head_add_js('/library/datetimepicker/jquery.datetimepicker.js'); diff --git a/view/theme/redbasic/tpl/theme_settings.tpl b/view/theme/redbasic/tpl/theme_settings.tpl index 7c552b49e..cc403f0a7 100644 --- a/view/theme/redbasic/tpl/theme_settings.tpl +++ b/view/theme/redbasic/tpl/theme_settings.tpl @@ -1,6 +1,7 @@ {{include file="field_checkbox.tpl" field=$narrow_navbar}} {{include file="field_input.tpl" field=$converse_width}} {{include file="field_input.tpl" field=$font_size}} +{{include file="field_checkbox.tpl" field=$advanced_theming}} {{if $expert}} {{include file="field_colorinput.tpl" field=$nav_bg}} {{include file="field_colorinput.tpl" field=$nav_icon_colour}} |