From 2ba9d19413cac3a01531884d375cbc17e18c3cc4 Mon Sep 17 00:00:00 2001 From: "ussr.win" Date: Mon, 5 Nov 2018 14:31:34 +0100 Subject: [PATCH] 3.9.4 --- ussrbasic/css/style.css | 27 +++- ussrbasic/js/redbasic.js | 2 +- ussrbasic/js/ussrbasic.js | 129 +++++++++++++++ ussrbasic/php/config.php | 114 +++++++------- ussrbasic/php/style.php | 44 +++--- ussrbasic/php/theme.php | 4 +- ussrbasic/tpl/navbar_default.tpl | 235 ++++++++++++++++++++++++++++ ussrbasic/tpl/suggest_widget.tpl | 10 ++ ussrbasic/tpl/theme_settings.tpl | 34 ---- ussrbasicpub/php/theme.php | 2 +- ussrbasicpub/php/theme_init.php | 2 - ussrbasicpub/tpl/navbar_default.tpl | 221 ++++++++++++++++++++++++++ 12 files changed, 697 insertions(+), 127 deletions(-) create mode 100644 ussrbasic/js/ussrbasic.js create mode 100644 ussrbasic/tpl/navbar_default.tpl create mode 100644 ussrbasic/tpl/suggest_widget.tpl delete mode 100644 ussrbasic/tpl/theme_settings.tpl create mode 100644 ussrbasicpub/tpl/navbar_default.tpl diff --git a/ussrbasic/css/style.css b/ussrbasic/css/style.css index 489d717..3c52106 100644 --- a/ussrbasic/css/style.css +++ b/ussrbasic/css/style.css @@ -1,5 +1,5 @@ /** - * Redbasic + * Ussrbasic * * Based on duepuntozero Friendica style * Originally by Fabio Comuni @@ -663,7 +663,7 @@ nav .acpopup { } .profile-match-name { - width: 120px; + width: 116px; height: 1.5em; overflow: hidden !important; } @@ -679,8 +679,8 @@ nav .acpopup { .profile-match-wrapper { float: left; - width: 120px; - height: 150px; + width: 118px; + height: 118px; padding: 10px; margin: 8px 10px 0 0; border-top: 1px solid #eee; @@ -856,15 +856,26 @@ div.jGrowl div.jGrowl-notification { .contact-block-content { margin-top: 10px; } -.contact-block-img.archived, .app-deleted, .dim { +.contact-block-img.archived, +.app-deleted, +.dim { opacity: 0.3; filter:alpha(opacity=30); } -.profile-match-connect { margin-top: 5px; } +.profile-match-connect { + margin-top: 5px; +} + +.reshared-content { + margin-left: 20px; +} + +.reshared-content img { + width: 100%; +} -.reshared-content { margin-left: 20px; } .shared_header img { border-radius: $radius; margin-right: 10px; @@ -1585,7 +1596,7 @@ dl.bb-dl > dd > li { content:"\f069 "; } -/* Modified original CSS to match input in Redbasic */ +/* Modified original CSS to match input in Ussrbasic */ .jothidden .bootstrap-tagsinput { border: 0px solid transparent; margin-bottom: 0px; diff --git a/ussrbasic/js/redbasic.js b/ussrbasic/js/redbasic.js index 688e921..941b259 100644 --- a/ussrbasic/js/redbasic.js +++ b/ussrbasic/js/redbasic.js @@ -1,5 +1,5 @@ /** - * redbasic theme specific JavaScript + * ussrbasic theme specific JavaScript */ $(document).ready(function() { diff --git a/ussrbasic/js/ussrbasic.js b/ussrbasic/js/ussrbasic.js new file mode 100644 index 0000000..941b259 --- /dev/null +++ b/ussrbasic/js/ussrbasic.js @@ -0,0 +1,129 @@ +/** + * ussrbasic theme specific JavaScript + */ + +$(document).ready(function() { + + // CSS3 calc() fallback (for unsupported browsers) + $('body').append(''); + if( $('#css3-calc').width() == 10) { + $(window).resize(function() { + if($(window).width() < 992) { + $('main').css('width', $(window).width() + $('aside').outerWidth() ); + } else { + $('main').css('width', '100%' ); + } + }); + } + $('#css3-calc').remove(); // Remove the test element + + if($(window).width() >= 992) { + $('#left_aside_wrapper, #right_aside_wrapper').stick_in_parent({ + offset_top: parseInt($('aside').css('padding-top')), + parent: 'main', + spacer: '.aside_spacer' + }); + } + + $('#expand-aside').on('click', toggleAside); + + $('section').on('click', function() { + if($('main').hasClass('region_1-on')){ + toggleAside(); + } + }); + + var left_aside_height = $('#left_aside_wrapper').height(); + + $('#left_aside_wrapper').on('click', function() { + if(left_aside_height != $('#left_aside_wrapper').height()) { + $(document.body).trigger("sticky_kit:recalc"); + left_aside_height = $('#left_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()) { + $(document.body).trigger("sticky_kit:recalc"); + right_aside_height = $('#right_aside_wrapper').height(); + } + }); + + $('.usermenu').click(function() { + if($('#navbar-collapse-1, #navbar-collapse-2').hasClass('show')){ + $('#navbar-collapse-1, #navbar-collapse-2').removeClass('show'); + } + }); + + $('#menu-btn').click(function() { + if($('#navbar-collapse-1').hasClass('show')){ + $('#navbar-collapse-1').removeClass('show'); + } + }); + + $('.notifications-btn').click(function(e) { + e.preventDefault(); + e.stopPropagation(); + if($('#navbar-collapse-2').hasClass('show')){ + $('#navbar-collapse-2').removeClass('show'); + } + }); + + $("input[data-role=cat-tagsinput]").tagsinput({ + tagClass: 'badge badge-pill badge-warning text-dark' + }); + + $('a.disabled').click(function(e) { + e.preventDefault(); + e.stopPropagation(); + }); + + var doctitle = document.title; + function checkNotify() { + var notifyUpdateElem = document.getElementById('notify-update'); + if(notifyUpdateElem !== null) { + if(notifyUpdateElem.innerHTML !== "") + document.title = "(" + notifyUpdateElem.innerHTML + ") " + doctitle; + else + document.title = doctitle; + } + } + setInterval(function () {checkNotify();}, 10 * 1000); +}); + +function makeFullScreen(full) { + if(typeof full=='undefined' || full == true) { + $('main').addClass('fullscreen'); + $('header, nav, aside, #fullscreen-btn').attr('style','display:none !important'); + $('#inline-btn').show(); + } + else { + $('main').removeClass('fullscreen'); + $('header, nav, aside, #fullscreen-btn').show(); + $('#inline-btn').hide(); + $(document.body).trigger("sticky_kit:recalc"); + } +} + +function toggleAside() { + $('#expand-aside-icon').toggleClass('fa-arrow-circle-right').toggleClass('fa-arrow-circle-left'); + if($('main').hasClass('region_1-on')){ + $('html, body').css('overflow-x', ''); + $('main').removeClass('region_1-on') + $('#overlay').remove(); + $('#left_aside_wrapper').trigger("sticky_kit:detach"); + } + else { + $('html, body').css('overflow-x', 'hidden'); + $('main').addClass('region_1-on') + $('
').appendTo('section'); + $('#left_aside_wrapper').stick_in_parent({ + offset_top: $('nav').outerHeight(true) + 10, + parent: '#region_1', + spacer: '#left_aside_spacer' + }); + } +} diff --git a/ussrbasic/php/config.php b/ussrbasic/php/config.php index 948c0bd..bcce3db 100644 --- a/ussrbasic/php/config.php +++ b/ussrbasic/php/config.php @@ -2,7 +2,7 @@ namespace Zotlabs\Theme; -class RedbasicConfig { +class UssrbasicConfig { function get_schemas() { $files = glob('view/theme/ussrbasic/schema/*.php'); @@ -37,24 +37,24 @@ class RedbasicConfig { } $arr = array(); - $arr['narrow_navbar'] = get_pconfig(local_channel(),'redbasic', 'narrow_navbar' ); - $arr['nav_bg'] = get_pconfig(local_channel(),'redbasic', 'nav_bg' ); - $arr['nav_icon_colour'] = get_pconfig(local_channel(),'redbasic', 'nav_icon_colour' ); - $arr['nav_active_icon_colour'] = get_pconfig(local_channel(),'redbasic', 'nav_active_icon_colour' ); - $arr['link_colour'] = get_pconfig(local_channel(),'redbasic', 'link_colour' ); - $arr['banner_colour'] = get_pconfig(local_channel(),'redbasic', 'banner_colour' ); - $arr['bgcolour'] = get_pconfig(local_channel(),'redbasic', 'background_colour' ); - $arr['background_image'] = get_pconfig(local_channel(),'redbasic', 'background_image' ); - $arr['item_colour'] = get_pconfig(local_channel(),'redbasic', 'item_colour' ); - $arr['comment_item_colour'] = get_pconfig(local_channel(),'redbasic', 'comment_item_colour' ); - $arr['font_size'] = get_pconfig(local_channel(),'redbasic', 'font_size' ); - $arr['font_colour'] = get_pconfig(local_channel(),'redbasic', 'font_colour' ); - $arr['radius'] = get_pconfig(local_channel(),'redbasic', 'radius' ); - $arr['shadow'] = get_pconfig(local_channel(),'redbasic', 'photo_shadow' ); - $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'); + $arr['narrow_navbar'] = get_pconfig(local_channel(),'ussrbasic', 'narrow_navbar' ); + $arr['nav_bg'] = get_pconfig(local_channel(),'ussrbasic', 'nav_bg' ); + $arr['nav_icon_colour'] = get_pconfig(local_channel(),'ussrbasic', 'nav_icon_colour' ); + $arr['nav_active_icon_colour'] = get_pconfig(local_channel(),'ussrbasic', 'nav_active_icon_colour' ); + $arr['link_colour'] = get_pconfig(local_channel(),'ussrbasic', 'link_colour' ); + $arr['banner_colour'] = get_pconfig(local_channel(),'ussrbasic', 'banner_colour' ); + $arr['bgcolour'] = get_pconfig(local_channel(),'ussrbasic', 'background_colour' ); + $arr['background_image'] = get_pconfig(local_channel(),'ussrbasic', 'background_image' ); + $arr['item_colour'] = get_pconfig(local_channel(),'ussrbasic', 'item_colour' ); + $arr['comment_item_colour'] = get_pconfig(local_channel(),'ussrbasic', 'comment_item_colour' ); + $arr['font_size'] = get_pconfig(local_channel(),'ussrbasic', 'font_size' ); + $arr['font_colour'] = get_pconfig(local_channel(),'ussrbasic', 'font_colour' ); + $arr['radius'] = get_pconfig(local_channel(),'ussrbasic', 'radius' ); + $arr['shadow'] = get_pconfig(local_channel(),'ussrbasic', 'photo_shadow' ); + $arr['converse_width']=get_pconfig(local_channel(),"ussrbasic","converse_width"); + $arr['top_photo']=get_pconfig(local_channel(),"ussrbasic","top_photo"); + $arr['reply_photo']=get_pconfig(local_channel(),"ussrbasic","reply_photo"); + $arr['advanced_theming'] = get_pconfig(local_channel(), 'ussrbasic', 'advanced_theming'); return $this->form($arr); } @@ -63,31 +63,31 @@ class RedbasicConfig { return; } - if (isset($_POST['redbasic-settings-submit'])) { - set_pconfig(local_channel(), 'redbasic', 'narrow_navbar', $_POST['redbasic_narrow_navbar']); - set_pconfig(local_channel(), 'redbasic', 'nav_bg', $_POST['redbasic_nav_bg']); - set_pconfig(local_channel(), 'redbasic', 'nav_icon_colour', $_POST['redbasic_nav_icon_colour']); - set_pconfig(local_channel(), 'redbasic', 'nav_active_icon_colour', $_POST['redbasic_nav_active_icon_colour']); - set_pconfig(local_channel(), 'redbasic', 'link_colour', $_POST['redbasic_link_colour']); - set_pconfig(local_channel(), 'redbasic', 'background_colour', $_POST['redbasic_background_colour']); - set_pconfig(local_channel(), 'redbasic', 'banner_colour', $_POST['redbasic_banner_colour']); - set_pconfig(local_channel(), 'redbasic', 'background_image', $_POST['redbasic_background_image']); - set_pconfig(local_channel(), 'redbasic', 'item_colour', $_POST['redbasic_item_colour']); - set_pconfig(local_channel(), 'redbasic', 'comment_item_colour', $_POST['redbasic_comment_item_colour']); - set_pconfig(local_channel(), 'redbasic', 'font_size', $_POST['redbasic_font_size']); - set_pconfig(local_channel(), 'redbasic', 'font_colour', $_POST['redbasic_font_colour']); - set_pconfig(local_channel(), 'redbasic', 'radius', $_POST['redbasic_radius']); - set_pconfig(local_channel(), 'redbasic', 'photo_shadow', $_POST['redbasic_shadow']); - 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']); + if (isset($_POST['ussrbasic-settings-submit'])) { + set_pconfig(local_channel(), 'ussrbasic', 'narrow_navbar', $_POST['ussrbasic_narrow_navbar']); + set_pconfig(local_channel(), 'ussrbasic', 'nav_bg', $_POST['ussrbasic_nav_bg']); + set_pconfig(local_channel(), 'ussrbasic', 'nav_icon_colour', $_POST['ussrbasic_nav_icon_colour']); + set_pconfig(local_channel(), 'ussrbasic', 'nav_active_icon_colour', $_POST['ussrbasic_nav_active_icon_colour']); + set_pconfig(local_channel(), 'ussrbasic', 'link_colour', $_POST['ussrbasic_link_colour']); + set_pconfig(local_channel(), 'ussrbasic', 'background_colour', $_POST['ussrbasic_background_colour']); + set_pconfig(local_channel(), 'ussrbasic', 'banner_colour', $_POST['ussrbasic_banner_colour']); + set_pconfig(local_channel(), 'ussrbasic', 'background_image', $_POST['ussrbasic_background_image']); + set_pconfig(local_channel(), 'ussrbasic', 'item_colour', $_POST['ussrbasic_item_colour']); + set_pconfig(local_channel(), 'ussrbasic', 'comment_item_colour', $_POST['ussrbasic_comment_item_colour']); + set_pconfig(local_channel(), 'ussrbasic', 'font_size', $_POST['ussrbasic_font_size']); + set_pconfig(local_channel(), 'ussrbasic', 'font_colour', $_POST['ussrbasic_font_colour']); + set_pconfig(local_channel(), 'ussrbasic', 'radius', $_POST['ussrbasic_radius']); + set_pconfig(local_channel(), 'ussrbasic', 'photo_shadow', $_POST['ussrbasic_shadow']); + set_pconfig(local_channel(), 'ussrbasic', 'converse_width', $_POST['ussrbasic_converse_width']); + set_pconfig(local_channel(), 'ussrbasic', 'top_photo', $_POST['ussrbasic_top_photo']); + set_pconfig(local_channel(), 'ussrbasic', 'reply_photo', $_POST['ussrbasic_reply_photo']); + set_pconfig(local_channel(), 'ussrbasic', 'advanced_theming', $_POST['ussrbasic_advanced_theming']); } } function form($arr) { - if(get_pconfig(local_channel(), 'redbasic', 'advanced_theming')) + if(get_pconfig(local_channel(), 'ussrbasic', 'advanced_theming')) $expert = 1; $o .= replace_macros(get_markup_template('theme_settings.tpl'), array( @@ -96,24 +96,24 @@ class RedbasicConfig { '$theme' => \App::$channel['channel_theme'], '$expert' => $expert, '$title' => t("Theme settings"), - '$narrow_navbar' => array('redbasic_narrow_navbar',t('Narrow navbar'),$arr['narrow_navbar'], '', array(t('No'),t('Yes'))), - '$nav_bg' => array('redbasic_nav_bg', t('Navigation bar background color'), $arr['nav_bg']), - '$nav_icon_colour' => array('redbasic_nav_icon_colour', t('Navigation bar icon color '), $arr['nav_icon_colour']), - '$nav_active_icon_colour' => array('redbasic_nav_active_icon_colour', t('Navigation bar active icon color '), $arr['nav_active_icon_colour']), - '$link_colour' => array('redbasic_link_colour', t('Link color'), $arr['link_colour'], '', $link_colours), - '$banner_colour' => array('redbasic_banner_colour', t('Set font-color for banner'), $arr['banner_colour']), - '$bgcolour' => array('redbasic_background_colour', t('Set the background color'), $arr['bgcolour']), - '$background_image' => array('redbasic_background_image', t('Set the background image'), $arr['background_image']), - '$item_colour' => array('redbasic_item_colour', t('Set the background color of items'), $arr['item_colour']), - '$comment_item_colour' => array('redbasic_comment_item_colour', t('Set the background color of comments'), $arr['comment_item_colour']), - '$font_size' => array('redbasic_font_size', t('Set font-size for the entire application'), $arr['font_size'], t('Examples: 1rem, 100%, 16px')), - '$font_colour' => array('redbasic_font_colour', t('Set font-color for posts and comments'), $arr['font_colour']), - '$radius' => array('redbasic_radius', t('Set radius of corners'), $arr['radius'], t('Example: 4px')), - '$shadow' => array('redbasic_shadow', t('Set shadow depth of photos'), $arr['shadow']), - '$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')]] + '$narrow_navbar' => array('ussrbasic_narrow_navbar',t('Narrow navbar'),$arr['narrow_navbar'], '', array(t('No'),t('Yes'))), + '$nav_bg' => array('ussrbasic_nav_bg', t('Navigation bar background color'), $arr['nav_bg']), + '$nav_icon_colour' => array('ussrbasic_nav_icon_colour', t('Navigation bar icon color '), $arr['nav_icon_colour']), + '$nav_active_icon_colour' => array('ussrbasic_nav_active_icon_colour', t('Navigation bar active icon color '), $arr['nav_active_icon_colour']), + '$link_colour' => array('ussrbasic_link_colour', t('Link color'), $arr['link_colour'], '', $link_colours), + '$banner_colour' => array('ussrbasic_banner_colour', t('Set font-color for banner'), $arr['banner_colour']), + '$bgcolour' => array('ussrbasic_background_colour', t('Set the background color'), $arr['bgcolour']), + '$background_image' => array('ussrbasic_background_image', t('Set the background image'), $arr['background_image']), + '$item_colour' => array('ussrbasic_item_colour', t('Set the background color of items'), $arr['item_colour']), + '$comment_item_colour' => array('ussrbasic_comment_item_colour', t('Set the background color of comments'), $arr['comment_item_colour']), + '$font_size' => array('ussrbasic_font_size', t('Set font-size for the entire application'), $arr['font_size'], t('Examples: 1rem, 100%, 16px')), + '$font_colour' => array('ussrbasic_font_colour', t('Set font-color for posts and comments'), $arr['font_colour']), + '$radius' => array('ussrbasic_radius', t('Set radius of corners'), $arr['radius'], t('Example: 4px')), + '$shadow' => array('ussrbasic_shadow', t('Set shadow depth of photos'), $arr['shadow']), + '$converse_width' => array('ussrbasic_converse_width',t('Set maximum width of content region in pixel'),$arr['converse_width'], t('Leave empty for default width')), + '$top_photo' => array('ussrbasic_top_photo', t('Set size of conversation author photo'), $arr['top_photo']), + '$reply_photo' => array('ussrbasic_reply_photo', t('Set size of followup author photos'), $arr['reply_photo']), + '$advanced_theming' => ['ussrbasic_advanced_theming', t('Show advanced settings'), $arr['advanced_theming'], '', [t('No'), t('Yes')]] )); return $o; diff --git a/ussrbasic/php/style.php b/ussrbasic/php/style.php index a191522..d5f8cca 100644 --- a/ussrbasic/php/style.php +++ b/ussrbasic/php/style.php @@ -6,28 +6,28 @@ if(! App::$install) { $uid = get_theme_uid(); if($uid) { - load_pconfig($uid,'redbasic'); + load_pconfig($uid,'ussrbasic'); } // Load the owners pconfig - $nav_bg = get_pconfig($uid, 'redbasic', 'nav_bg'); - $nav_icon_colour = get_pconfig($uid, 'redbasic', 'nav_icon_colour'); - $nav_active_icon_colour = get_pconfig($uid, 'redbasic', 'nav_active_icon_colour'); - $banner_colour = get_pconfig($uid,'redbasic','banner_colour'); - $narrow_navbar = get_pconfig($uid,'redbasic','narrow_navbar'); - $link_colour = get_pconfig($uid, 'redbasic', 'link_colour'); - $schema = get_pconfig($uid,'redbasic','schema'); - $bgcolour = get_pconfig($uid, 'redbasic', 'background_colour'); - $background_image = get_pconfig($uid, 'redbasic', 'background_image'); - $item_colour = get_pconfig($uid, 'redbasic', 'item_colour'); - $comment_item_colour = get_pconfig($uid, 'redbasic', 'comment_item_colour'); - $font_size = get_pconfig($uid, 'redbasic', 'font_size'); - $font_colour = get_pconfig($uid, 'redbasic', 'font_colour'); - $radius = get_pconfig($uid, 'redbasic', 'radius'); - $shadow = get_pconfig($uid,'redbasic','photo_shadow'); - $converse_width=get_pconfig($uid,'redbasic','converse_width'); - $top_photo=get_pconfig($uid,'redbasic','top_photo'); - $reply_photo=get_pconfig($uid,'redbasic','reply_photo'); + $nav_bg = get_pconfig($uid, 'ussrbasic', 'nav_bg'); + $nav_icon_colour = get_pconfig($uid, 'ussrbasic', 'nav_icon_colour'); + $nav_active_icon_colour = get_pconfig($uid, 'ussrbasic', 'nav_active_icon_colour'); + $banner_colour = get_pconfig($uid,'ussrbasic','banner_colour'); + $narrow_navbar = get_pconfig($uid,'ussrbasic','narrow_navbar'); + $link_colour = get_pconfig($uid, 'ussrbasic', 'link_colour'); + $schema = get_pconfig($uid,'ussrbasic','schema'); + $bgcolour = get_pconfig($uid, 'ussrbasic', 'background_colour'); + $background_image = get_pconfig($uid, 'ussrbasic', 'background_image'); + $item_colour = get_pconfig($uid, 'ussrbasic', 'item_colour'); + $comment_item_colour = get_pconfig($uid, 'ussrbasic', 'comment_item_colour'); + $font_size = get_pconfig($uid, 'ussrbasic', 'font_size'); + $font_colour = get_pconfig($uid, 'ussrbasic', 'font_colour'); + $radius = get_pconfig($uid, 'ussrbasic', 'radius'); + $shadow = get_pconfig($uid,'ussrbasic','photo_shadow'); + $converse_width=get_pconfig($uid,'ussrbasic','converse_width'); + $top_photo=get_pconfig($uid,'ussrbasic','top_photo'); + $reply_photo=get_pconfig($uid,'ussrbasic','reply_photo'); } // Now load the scheme. If a value is changed above, we'll keep the settings @@ -56,7 +56,7 @@ if (($schema) && ($schema != '---')) { } // Allow admins to set a default schema for the hub. -// default.php and default.css MUST be symlinks to existing schema files in view/theme/redbasic/schema +// default.php and default.css MUST be symlinks to existing schema files in view/theme/ussrbasic/schema if ((!$schema) || ($schema == '---')) { if(file_exists('view/theme/ussrbasic/schema/default.php')) { @@ -159,5 +159,5 @@ if(file_exists('view/theme/ussrbasic/css/style.css')) { // Set the schema to the default schema in derived themes. See the documentation for creating derived themes how to override this. -if(local_channel() && App::$channel && App::$channel['channel_theme'] != 'redbasic') - set_pconfig(local_channel(), 'redbasic', 'schema', '---'); +if(local_channel() && App::$channel && App::$channel['channel_theme'] != 'ussrbasic') + set_pconfig(local_channel(), 'ussrbasic', 'schema', '---'); diff --git a/ussrbasic/php/theme.php b/ussrbasic/php/theme.php index 335a64e..3ca7c8b 100644 --- a/ussrbasic/php/theme.php +++ b/ussrbasic/php/theme.php @@ -2,7 +2,7 @@ /** * * Name: Ussrbasic - * * Description: Ussr.win Hubzilla standard theme + * * Description: ussr.win hubzilla standard theme * * Version: 2.1 * * MinVersion: 2.3.1 * * MaxVersion: 6.0 @@ -11,6 +11,6 @@ * * Maintainer: Mario Vavti */ -function redbasic_init(&$a) { +function ussrbasic_init(&$a) { } diff --git a/ussrbasic/tpl/navbar_default.tpl b/ussrbasic/tpl/navbar_default.tpl new file mode 100644 index 0000000..a75bcee --- /dev/null +++ b/ussrbasic/tpl/navbar_default.tpl @@ -0,0 +1,235 @@ +{{if $nav.login && !$userinfo}} +
+ {{if $nav.loginmenu.1.4}} + + {{$nav.loginmenu.1.1}} + + {{else}} + + {{$nav.loginmenu.1.1}} + + {{/if}} + {{if $nav.register}} + + {{$nav.register.1}} + + {{/if}} +
+{{/if}} +{{if $userinfo}} + +{{if $sel.name}} + +{{if $settings_url}} + +{{/if}} +{{/if}} +{{/if}} + + + +{{if $nav.help.6}} +
+ {{$nav.help.5}} + +
+{{/if}} diff --git a/ussrbasic/tpl/suggest_widget.tpl b/ussrbasic/tpl/suggest_widget.tpl new file mode 100644 index 0000000..7b9afa6 --- /dev/null +++ b/ussrbasic/tpl/suggest_widget.tpl @@ -0,0 +1,10 @@ +
+

{{$title}}

+{{if $entries}} +{{foreach $entries as $child}} +{{include file="suggest_friends.tpl" entry=$child}} +{{/foreach}} +{{/if}} +
+ +
diff --git a/ussrbasic/tpl/theme_settings.tpl b/ussrbasic/tpl/theme_settings.tpl deleted file mode 100644 index cc403f0..0000000 --- a/ussrbasic/tpl/theme_settings.tpl +++ /dev/null @@ -1,34 +0,0 @@ -{{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}} - {{include file="field_colorinput.tpl" field=$nav_active_icon_colour}} - {{include file="field_colorinput.tpl" field=$banner_colour}} - {{include file="field_colorinput.tpl" field=$bgcolour}} - {{include file="field_colorinput.tpl" field=$background_image}} - {{include file="field_colorinput.tpl" field=$item_colour}} - {{include file="field_colorinput.tpl" field=$comment_item_colour}} - {{*include file="field_colorinput.tpl" field=$comment_border_colour*}} - {{*include file="field_input.tpl" field=$comment_indent*}} - {{include file="field_colorinput.tpl" field=$font_colour}} - {{include file="field_colorinput.tpl" field=$link_colour}} - {{include file="field_input.tpl" field=$radius}} - {{include file="field_input.tpl" field=$shadow}} - {{include file="field_input.tpl" field=$top_photo}} - {{include file="field_input.tpl" field=$reply_photo}} - - -{{/if}} -
- -
diff --git a/ussrbasicpub/php/theme.php b/ussrbasicpub/php/theme.php index 63a2e58..78e8899 100644 --- a/ussrbasicpub/php/theme.php +++ b/ussrbasicpub/php/theme.php @@ -2,7 +2,7 @@ /** * * Name: Ussrbasicpub - * * Description: Hubzilla standard theme + * * Description: Ussr.win Hubzilla public theme * * Version: 2.1 * * MinVersion: 2.3.1 * * MaxVersion: 6.0 diff --git a/ussrbasicpub/php/theme_init.php b/ussrbasicpub/php/theme_init.php index 5f73f67..0ac580f 100644 --- a/ussrbasicpub/php/theme_init.php +++ b/ussrbasicpub/php/theme_init.php @@ -13,5 +13,3 @@ 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'); head_add_js('/library/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.js'); - - diff --git a/ussrbasicpub/tpl/navbar_default.tpl b/ussrbasicpub/tpl/navbar_default.tpl new file mode 100644 index 0000000..1e2b2fa --- /dev/null +++ b/ussrbasicpub/tpl/navbar_default.tpl @@ -0,0 +1,221 @@ +{{if $nav.login && !$userinfo}} +
+ {{if $nav.loginmenu.1.4}} + + {{$nav.loginmenu.1.1}} + + {{else}} + + {{$nav.loginmenu.1.1}} + + {{/if}} + {{if $nav.register}} + + {{$nav.register.1}} + + {{/if}} +
+{{/if}} +{{if $userinfo}} + + +{{if $sel.name}} + +{{/if}} +{{/if}} + + + +{{if $nav.help.6}} +
+ {{$nav.help.5}} + +
+{{/if}}