This commit is contained in:
ivan 2021-07-13 23:13:31 +03:00
parent 6de3581699
commit b85a62d01b
48 changed files with 1702 additions and 1160 deletions

File diff suppressed because it is too large Load Diff

View File

@ -11,44 +11,21 @@ $(document).ready(function() {
if($(window).width() < 992) {
$('main').css('width', $(window).width() + $('aside').outerWidth() );
} else {
$('main').css('width', '100%' );
$('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'
});
}
stickyScroll('.aside_spacer_left', '.aside_spacer_top_left', '.content', parseFloat(window.getComputedStyle(document.querySelector('#region_1')).getPropertyValue('padding-top')), 0);
stickyScroll('.aside_spacer_right', '.aside_spacer_top_right', '.content', parseFloat(window.getComputedStyle(document.querySelector('#region_3')).getPropertyValue('padding-top')), 20);
$('#expand-aside').on('click', toggleAside);
$('section').on('click', function() {
$('#expand-aside').on('click', function() {
if($('main').hasClass('region_1-on')){
toggleAside();
toggleAside('left');
}
});
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();
else {
toggleAside('right');
}
});
@ -92,8 +69,103 @@ $(document).ready(function() {
}
}
setInterval(function () {checkNotify();}, 10 * 1000);
var touch_start = null;
var touch_max = window.innerWidth / 10;
window.addEventListener('touchstart', function(e) {
if (e.touches.length === 1){
//just one finger touched
touch_start = e.touches.item(0).clientX;
if (touch_start < touch_max) {
$('html, body').css('overflow-y', 'hidden');
}
}
else {
//a second finger hit the screen, abort the touch
touch_start = null;
}
});
window.addEventListener('touchend', function(e) {
$('html, body').css('overflow-y', '');
let touch_offset = 30; //at least 30px are a swipe
if (touch_start) {
//the only finger that hit the screen left it
let touch_end = e.changedTouches.item(0).clientX;
if (touch_end > (touch_start + touch_offset)) {
//a left -> right swipe
if (touch_start < touch_max) {
toggleAside('right');
}
}
if (touch_end < (touch_start - touch_offset)) {
//a right -> left swipe
//toggleAside('left');
}
}
});
$(document).on('hz:hqControlsClickAction', function(e) {
toggleAside('left');
});
});
function setStyle(element, cssProperty) {
for (var property in cssProperty){
element.style[property] = cssProperty[property];
}
}
function stickyScroll(sticky, stickyTop, container, topOffset, bottomOffset) {
var lastScrollTop = 0;
var sticky = document.querySelector(sticky);
var stickyHeight = sticky.getBoundingClientRect().height;
var stickyTop = document.querySelector(stickyTop);
var content = document.querySelector(container);
var diff = window.innerHeight - stickyHeight;
var h = 0;
var lasth = 0;
var st = window.pageYOffset || document.documentElement.scrollTop;
var resizeObserver = new ResizeObserver(function(entries) {
stickyHeight = sticky.getBoundingClientRect().height;
st = window.pageYOffset || document.documentElement.scrollTop;
diff = window.innerHeight - stickyHeight;
});
resizeObserver.observe(sticky);
resizeObserver.observe(content);
window.addEventListener('scroll', function() {
if(window.innerHeight > stickyHeight + topOffset) {
setStyle(stickyTop, { height: 0 + 'px' });
setStyle(sticky, { position: 'sticky', top: topOffset + 'px'});
}
else {
st = window.pageYOffset || document.documentElement.scrollTop; // Credits: "https://github.com/qeremy/so/blob/master/so.dom.js#L426"
if (st > lastScrollTop){
// downscroll code
setStyle(stickyTop, { height: lasth + 'px' });
setStyle(sticky, { position: 'sticky', top: Math.round(diff) - bottomOffset + 'px', bottom: '' });
} else {
// upscroll code
h = sticky.getBoundingClientRect().top - content.getBoundingClientRect().top - topOffset;
if(Math.round(stickyTop.getBoundingClientRect().height) === lasth) {
setStyle(stickyTop, { height: Math.round(h) + 'px' });
}
lasth = Math.round(h);
setStyle(sticky, { position: 'sticky', top: '', bottom: Math.round(diff - topOffset) + 'px' });
}
lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
}
}, false);
}
function makeFullScreen(full) {
if(typeof full=='undefined' || full == true) {
$('main').addClass('fullscreen');
@ -104,26 +176,21 @@ function makeFullScreen(full) {
$('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')
function toggleAside(swipe) {
if ($('main').hasClass('region_1-on') && swipe === 'left') {
$('#expand-aside-icon').addClass('fa-arrow-circle-right').removeClass('fa-arrow-circle-left');
$('html, body').css({ 'position': '', left: '' });
$('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')
$('<div id="overlay"></div>').appendTo('section');
$('#left_aside_wrapper').stick_in_parent({
offset_top: $('nav').outerHeight(true) + 10,
parent: '#region_1',
spacer: '#left_aside_spacer'
});
if (!$('main').hasClass('region_1-on') && swipe === 'right') {
$('#expand-aside-icon').removeClass('fa-arrow-circle-right').addClass('fa-arrow-circle-left');
$('html, body').css({ 'position': 'sticky', 'left': '0px'});
$('main').addClass('region_1-on');
$('<div id="overlay"></div>').appendTo('body').one('click', function() { toggleAside('left'); });
}
}

View File

@ -120,10 +120,10 @@ if(file_exists('view/theme/ussrbasic/css/style.css')) {
$x .= $schemecss;
}
$aside_width = 288;
$left_aside_width = 288;
$right_aside_width = 288;
// left aside and right aside are 285px + converse width
$main_width = (($aside_width * 2) + intval($converse_width));
$main_width = $left_aside_width + $right_aside_width + intval($converse_width);
// prevent main_width smaller than 768px
$main_width = (($main_width < 768) ? 768 : $main_width);
@ -150,7 +150,8 @@ if(file_exists('view/theme/ussrbasic/css/style.css')) {
'$pmenu_top' => $pmenu_top,
'$pmenu_reply' => $pmenu_reply,
'$main_width' => $main_width,
'$aside_width' => $aside_width
'$left_aside_width' => $left_aside_width,
'$right_aside_width' => $right_aside_width
);
echo str_replace(array_keys($options), array_values($options), $x);
@ -159,5 +160,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'] != 'ussrbasic')
// set_pconfig(local_channel(), 'ussrbasic', 'schema', '---');
if(local_channel() && App::$channel && App::$channel['channel_theme'] != 'ussrbasic')
set_pconfig(local_channel(), 'ussrbasic', 'schema', '---');

View File

@ -2,15 +2,13 @@
/**
* * Name: Ussrbasic
* * Description: ussr.win default 3 column theme
* * Version: 4.4.2
* * MinVersion: 3.8
* * MaxVersion: 6.0
* * Description: ussr.win 3 column based on Hubzilla standard theme
* * Version: 2.1
* * MinVersion: 5.9
* * MaxVersion: 7.0
* * Author: Fabrixxm
*/
function ussrbasic_init(&$a) {
App::$theme_info['extends'] = 'redbasic';
}

View File

@ -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');

View File

@ -3,10 +3,11 @@
if (! $nav_bg)
$nav_bg = "#f8f9fa";
if (! $nav_icon_colour)
$nav_icon_colour = "rgba(0, 0, 0, 0.5);";
$nav_icon_colour = "rgba(0, 0, 0, 0.5)";
if (! $nav_active_icon_colour)
$nav_active_icon_colour = "rgba(0, 0, 0, 0.7)";
if (! $radius)
$radius = "4px";
if (! $banner_colour)
$banner_colour = "rgba(0, 0, 0, 0.7)";

View File

@ -325,3 +325,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -334,3 +334,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -326,3 +326,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -320,3 +320,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -322,9 +322,6 @@ a, a:visited, a:link, .fakelink, .fakelink:visited, .fakelink:link {
.text-dark {
color: #aaa !important;
}
a.text-dark:focus, a.text-dark:hover {
color: #ddd !important;
}
.group-selected, .fileas-selected, .categories-selected, .search-selected, a.active {
color: #fff !important;
@ -480,3 +477,26 @@ pre {
.widget-nav-pills-checkbox:hover + a {
background-color: #222;
}
/* category badge fix: */
a.text-dark:focus, a.text-dark:hover {
color: #ddd !important;
}
.badge-warning {
/* background-color: #ffc927; */
}
.badge-warning a.text-dark {
color: #333 !important;
}
.badge-warning a.text-dark:focus, .badge-warning a.text-dark:hover {
color: red !important;
text-decoration: none;
}
/* fix color for highlithed text */
span.default-highlight {
color: #333;
border-radius: 4px;
}

View File

@ -346,3 +346,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -22,18 +22,21 @@ body {
margin: 0px;
}
aside {
width: $aside_widthpx;
min-width: $aside_widthpx;
max-width: $aside_widthpx;
}
aside #region_1 {
aside#region_1 {
border-right: 1px solid transparent;
width: $left_aside_widthpx;
min-width: $left_aside_widthpx;
max-width: $left_aside_widthpx;
}
aside #left_aside_wrapper,
aside #right_aside_wrapper {
aside#region_3 {
width: $right_aside_widthpx;
min-width: $left_aside_widthpx;
max-width: $right_aside_widthpx;
}
aside#left_aside_wrapper,
aside#right_aside_wrapper {
margin-bottom: 10px;
}
@ -44,14 +47,13 @@ main {
}
#overlay {
position: absolute;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .5);
left: $left_aside_widthpx;
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, .3);
cursor: pointer;
z-index: 1028;
}
h1, .h1 {
@ -663,7 +665,7 @@ nav .acpopup {
}
.profile-match-name {
width: 116px;
width: 120px;
height: 1.5em;
overflow: hidden !important;
}
@ -679,8 +681,8 @@ nav .acpopup {
.profile-match-wrapper {
float: left;
width: 118px;
height: 118px;
width: 120px;
height: 150px;
padding: 10px;
margin: 8px 10px 0 0;
border-top: 1px solid #eee;
@ -777,7 +779,7 @@ div.jGrowl div.info {
}
#jGrowl.top-right {
top: 4.5rem;
right: 15px;
right: .25rem;
}
div.jGrowl div.jGrowl-notification {
@ -796,8 +798,6 @@ div.jGrowl div.jGrowl-notification {
}
.contactname {
font-weight: bold;
color: $font_colour;
display: block;
overflow: hidden;
text-overflow: ellipsis;
@ -872,10 +872,6 @@ div.jGrowl div.jGrowl-notification {
margin-left: 20px;
}
.reshared-content img {
width: 100%;
}
.shared_header img {
border-radius: $radius;
margin-right: 10px;
@ -884,21 +880,19 @@ div.jGrowl div.jGrowl-notification {
.tag1 {
font-size : 0.9em !important;
}
.tag2 {
font-size : 1.0em !important;
}
.tag3 {
font-size : 1.1em !important;
}
.tag4 {
font-size : 1.2em !important;
}
.tag5 {
font-size : 1.3em !important;
}
@ -918,12 +912,10 @@ div.jGrowl div.jGrowl-notification {
font-size : 1.6em !important;
}
.tag9 {
font-size : 1.7em !important;
}
.tag10 {
font-size : 1.8em !important;
}
@ -1335,6 +1327,14 @@ img.mail-conv-sender-photo {
border-bottom: 3px solid $comment_item_colour;
}
.section-content-success-wrapper {
padding: 21px 10px;
color: #155724;
background-color: #d4edda;
border-bottom: 3px solid $comment_item_colour;
text-align: center;
}
.section-content-info-wrapper {
padding: 21px 10px;
color: #0c5460;
@ -1358,7 +1358,8 @@ img.mail-conv-sender-photo {
border-bottom: 3px solid $comment_item_colour;
text-align: center;
}
.section-content-tools-wrapper .section-content-success-wrapper,
.section-content-wrapper .section-content-success-wrapper,
.section-content-tools-wrapper .section-content-info-wrapper,
.section-content-wrapper .section-content-info-wrapper,
.section-content-tools-wrapper .section-content-warning-wrapper,
@ -1524,10 +1525,8 @@ blockquote {
}
main {
left: -$aside_widthpx;
width: calc( 100% + $aside_widthpx );
left: -$left_aside_widthpx;
width: calc( 100% + $left_aside_widthpx );
}
main.region_1-on {
@ -1599,6 +1598,7 @@ dl.bb-dl > dd > li {
content:"\f069 ";
}
/* Modified original CSS to match input in Redbasic */
.jothidden .bootstrap-tagsinput {
border: 0px solid transparent;
margin-bottom: 0px;
@ -1614,6 +1614,10 @@ dl.bb-dl > dd > li {
font-size: 100%;
}
.bootstrap-tagsinput input {
height: 2.5rem;
}
/* Abusing theme-green is less work than makeing a new new one */
.theme-green .back-bar .selected-bar {
background-color: #000000;
@ -1633,13 +1637,14 @@ dl.bb-dl > dd > li {
}
.form-group.checkbox > div label {
display: block; overflow: hidden; cursor: pointer;
border: 1px solid #ccc;
border-radius: 12px;
margin:0px;
display: block; overflow: hidden; cursor: pointer;
border: 1px solid #ccc;
border-radius: 12px;
margin:0px;
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
font-weight: normal;
}
.form-group.checkbox:hover label {
@ -1803,25 +1808,26 @@ dl.bb-dl > dd > li {
}
.cover-photo-review {
margin-bottom: 10px;
margin-bottom: 10px;
}
.hover-fx-hide {
opacity: 0;
opacity: 0;
}
.hover-fx-show:hover .hover-fx-hide {
opacity: 1;
opacity: 1;
}
.bg-primary {
background-color: #505050 !important;
/* default highlighted text if not specified by schema: */
span.default-highlight {
background-color: yellow;
}
.nav-link.active {
background-color: #505050 !important;
.bootstrap-tagsinput {
width: 100%;
}
#region_3 {
display: none !important;
display: none !important;
}

View File

@ -11,44 +11,21 @@ $(document).ready(function() {
if($(window).width() < 992) {
$('main').css('width', $(window).width() + $('aside').outerWidth() );
} else {
$('main').css('width', '100%' );
$('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'
});
}
stickyScroll('.aside_spacer_left', '.aside_spacer_top_left', '.content', parseFloat(window.getComputedStyle(document.querySelector('#region_1')).getPropertyValue('padding-top')), 0);
stickyScroll('.aside_spacer_right', '.aside_spacer_top_right', '.content', parseFloat(window.getComputedStyle(document.querySelector('#region_3')).getPropertyValue('padding-top')), 20);
$('#expand-aside').on('click', toggleAside);
$('section').on('click', function() {
$('#expand-aside').on('click', function() {
if($('main').hasClass('region_1-on')){
toggleAside();
toggleAside('left');
}
});
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();
else {
toggleAside('right');
}
});
@ -92,8 +69,103 @@ $(document).ready(function() {
}
}
setInterval(function () {checkNotify();}, 10 * 1000);
var touch_start = null;
var touch_max = window.innerWidth / 10;
window.addEventListener('touchstart', function(e) {
if (e.touches.length === 1){
//just one finger touched
touch_start = e.touches.item(0).clientX;
if (touch_start < touch_max) {
$('html, body').css('overflow-y', 'hidden');
}
}
else {
//a second finger hit the screen, abort the touch
touch_start = null;
}
});
window.addEventListener('touchend', function(e) {
$('html, body').css('overflow-y', '');
let touch_offset = 30; //at least 30px are a swipe
if (touch_start) {
//the only finger that hit the screen left it
let touch_end = e.changedTouches.item(0).clientX;
if (touch_end > (touch_start + touch_offset)) {
//a left -> right swipe
if (touch_start < touch_max) {
toggleAside('right');
}
}
if (touch_end < (touch_start - touch_offset)) {
//a right -> left swipe
//toggleAside('left');
}
}
});
$(document).on('hz:hqControlsClickAction', function(e) {
toggleAside('left');
});
});
function setStyle(element, cssProperty) {
for (var property in cssProperty){
element.style[property] = cssProperty[property];
}
}
function stickyScroll(sticky, stickyTop, container, topOffset, bottomOffset) {
var lastScrollTop = 0;
var sticky = document.querySelector(sticky);
var stickyHeight = sticky.getBoundingClientRect().height;
var stickyTop = document.querySelector(stickyTop);
var content = document.querySelector(container);
var diff = window.innerHeight - stickyHeight;
var h = 0;
var lasth = 0;
var st = window.pageYOffset || document.documentElement.scrollTop;
var resizeObserver = new ResizeObserver(function(entries) {
stickyHeight = sticky.getBoundingClientRect().height;
st = window.pageYOffset || document.documentElement.scrollTop;
diff = window.innerHeight - stickyHeight;
});
resizeObserver.observe(sticky);
resizeObserver.observe(content);
window.addEventListener('scroll', function() {
if(window.innerHeight > stickyHeight + topOffset) {
setStyle(stickyTop, { height: 0 + 'px' });
setStyle(sticky, { position: 'sticky', top: topOffset + 'px'});
}
else {
st = window.pageYOffset || document.documentElement.scrollTop; // Credits: "https://github.com/qeremy/so/blob/master/so.dom.js#L426"
if (st > lastScrollTop){
// downscroll code
setStyle(stickyTop, { height: lasth + 'px' });
setStyle(sticky, { position: 'sticky', top: Math.round(diff) - bottomOffset + 'px', bottom: '' });
} else {
// upscroll code
h = sticky.getBoundingClientRect().top - content.getBoundingClientRect().top - topOffset;
if(Math.round(stickyTop.getBoundingClientRect().height) === lasth) {
setStyle(stickyTop, { height: Math.round(h) + 'px' });
}
lasth = Math.round(h);
setStyle(sticky, { position: 'sticky', top: '', bottom: Math.round(diff - topOffset) + 'px' });
}
lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
}
}, false);
}
function makeFullScreen(full) {
if(typeof full=='undefined' || full == true) {
$('main').addClass('fullscreen');
@ -104,26 +176,21 @@ function makeFullScreen(full) {
$('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')
function toggleAside(swipe) {
if ($('main').hasClass('region_1-on') && swipe === 'left') {
$('#expand-aside-icon').addClass('fa-arrow-circle-right').removeClass('fa-arrow-circle-left');
$('html, body').css({ 'position': '', left: '' });
$('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')
$('<div id="overlay"></div>').appendTo('section');
$('#left_aside_wrapper').stick_in_parent({
offset_top: $('nav').outerHeight(true) + 10,
parent: '#region_1',
spacer: '#left_aside_spacer'
});
if (!$('main').hasClass('region_1-on') && swipe === 'right') {
$('#expand-aside-icon').removeClass('fa-arrow-circle-right').addClass('fa-arrow-circle-left');
$('html, body').css({ 'position': 'sticky', 'left': '0px'});
$('main').addClass('region_1-on');
$('<div id="overlay"></div>').appendTo('body').one('click', function() { toggleAside('left'); });
}
}

View File

@ -120,10 +120,10 @@ if(file_exists('view/theme/ussrbasicleft/css/style.css')) {
$x .= $schemecss;
}
$aside_width = 288;
$left_aside_width = 288;
$right_aside_width = 288;
// left aside and right aside are 285px + converse width
$main_width = (($aside_width * 2) + intval($converse_width));
$main_width = $left_aside_width + $right_aside_width + intval($converse_width);
// prevent main_width smaller than 768px
$main_width = (($main_width < 768) ? 768 : $main_width);
@ -150,7 +150,8 @@ if(file_exists('view/theme/ussrbasicleft/css/style.css')) {
'$pmenu_top' => $pmenu_top,
'$pmenu_reply' => $pmenu_reply,
'$main_width' => $main_width,
'$aside_width' => $aside_width
'$left_aside_width' => $left_aside_width,
'$right_aside_width' => $right_aside_width
);
echo str_replace(array_keys($options), array_values($options), $x);
@ -159,5 +160,5 @@ if(file_exists('view/theme/ussrbasicleft/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'] != 'ussrbasicleft')
// set_pconfig(local_channel(), 'ussrbasicleft', 'schema', '---');
if(local_channel() && App::$channel && App::$channel['channel_theme'] != 'ussrbasicleft')
set_pconfig(local_channel(), 'ussrbasicleft', 'schema', '---');

View File

@ -2,15 +2,13 @@
/**
* * Name: Ussrbasicleft
* * Description: 2 column, left navigation panel
* * Version: 4.4.2
* * MinVersion: 3.8
* * MaxVersion: 6.0
* * Description: ussr.win 2 column left based on Hubzilla standard theme
* * Version: 2.1
* * MinVersion: 5.9
* * MaxVersion: 7.0
* * Author: Fabrixxm
*/
function ussrbasicleft_init(&$a) {
App::$theme_info['extends'] = 'redbasic';
}

View File

@ -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');

View File

@ -3,10 +3,11 @@
if (! $nav_bg)
$nav_bg = "#f8f9fa";
if (! $nav_icon_colour)
$nav_icon_colour = "rgba(0, 0, 0, 0.5);";
$nav_icon_colour = "rgba(0, 0, 0, 0.5)";
if (! $nav_active_icon_colour)
$nav_active_icon_colour = "rgba(0, 0, 0, 0.7)";
if (! $radius)
$radius = "4px";
if (! $banner_colour)
$banner_colour = "rgba(0, 0, 0, 0.7)";

View File

@ -325,3 +325,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -334,3 +334,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -326,3 +326,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -320,3 +320,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -322,9 +322,6 @@ a, a:visited, a:link, .fakelink, .fakelink:visited, .fakelink:link {
.text-dark {
color: #aaa !important;
}
a.text-dark:focus, a.text-dark:hover {
color: #ddd !important;
}
.group-selected, .fileas-selected, .categories-selected, .search-selected, a.active {
color: #fff !important;
@ -480,3 +477,26 @@ pre {
.widget-nav-pills-checkbox:hover + a {
background-color: #222;
}
/* category badge fix: */
a.text-dark:focus, a.text-dark:hover {
color: #ddd !important;
}
.badge-warning {
/* background-color: #ffc927; */
}
.badge-warning a.text-dark {
color: #333 !important;
}
.badge-warning a.text-dark:focus, .badge-warning a.text-dark:hover {
color: red !important;
text-decoration: none;
}
/* fix color for highlithed text */
span.default-highlight {
color: #333;
border-radius: 4px;
}

View File

@ -346,3 +346,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -22,18 +22,21 @@ body {
margin: 0px;
}
aside {
width: $aside_widthpx;
min-width: $aside_widthpx;
max-width: $aside_widthpx;
}
aside #region_1 {
aside#region_1 {
border-right: 1px solid transparent;
width: $left_aside_widthpx;
min-width: $left_aside_widthpx;
max-width: $left_aside_widthpx;
}
aside #left_aside_wrapper,
aside #right_aside_wrapper {
aside#region_3 {
width: $right_aside_widthpx;
min-width: $left_aside_widthpx;
max-width: $right_aside_widthpx;
}
aside#left_aside_wrapper,
aside#right_aside_wrapper {
margin-bottom: 10px;
}
@ -44,14 +47,13 @@ main {
}
#overlay {
position: absolute;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .5);
left: $left_aside_widthpx;
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, .3);
cursor: pointer;
z-index: 1028;
}
h1, .h1 {
@ -663,7 +665,7 @@ nav .acpopup {
}
.profile-match-name {
width: 116px;
width: 120px;
height: 1.5em;
overflow: hidden !important;
}
@ -679,8 +681,8 @@ nav .acpopup {
.profile-match-wrapper {
float: left;
width: 118px;
height: 118px;
width: 120px;
height: 150px;
padding: 10px;
margin: 8px 10px 0 0;
border-top: 1px solid #eee;
@ -777,7 +779,7 @@ div.jGrowl div.info {
}
#jGrowl.top-right {
top: 4.5rem;
right: 15px;
right: .25rem;
}
div.jGrowl div.jGrowl-notification {
@ -796,8 +798,6 @@ div.jGrowl div.jGrowl-notification {
}
.contactname {
font-weight: bold;
color: $font_colour;
display: block;
overflow: hidden;
text-overflow: ellipsis;
@ -872,10 +872,6 @@ div.jGrowl div.jGrowl-notification {
margin-left: 20px;
}
.reshared-content img {
width: 100%;
}
.shared_header img {
border-radius: $radius;
margin-right: 10px;
@ -884,21 +880,19 @@ div.jGrowl div.jGrowl-notification {
.tag1 {
font-size : 0.9em !important;
}
.tag2 {
font-size : 1.0em !important;
}
.tag3 {
font-size : 1.1em !important;
}
.tag4 {
font-size : 1.2em !important;
}
.tag5 {
font-size : 1.3em !important;
}
@ -918,12 +912,10 @@ div.jGrowl div.jGrowl-notification {
font-size : 1.6em !important;
}
.tag9 {
font-size : 1.7em !important;
}
.tag10 {
font-size : 1.8em !important;
}
@ -1335,6 +1327,14 @@ img.mail-conv-sender-photo {
border-bottom: 3px solid $comment_item_colour;
}
.section-content-success-wrapper {
padding: 21px 10px;
color: #155724;
background-color: #d4edda;
border-bottom: 3px solid $comment_item_colour;
text-align: center;
}
.section-content-info-wrapper {
padding: 21px 10px;
color: #0c5460;
@ -1358,7 +1358,8 @@ img.mail-conv-sender-photo {
border-bottom: 3px solid $comment_item_colour;
text-align: center;
}
.section-content-tools-wrapper .section-content-success-wrapper,
.section-content-wrapper .section-content-success-wrapper,
.section-content-tools-wrapper .section-content-info-wrapper,
.section-content-wrapper .section-content-info-wrapper,
.section-content-tools-wrapper .section-content-warning-wrapper,
@ -1524,10 +1525,8 @@ blockquote {
}
main {
left: -$aside_widthpx;
width: calc( 100% + $aside_widthpx );
left: -$left_aside_widthpx;
width: calc( 100% + $left_aside_widthpx );
}
main.region_1-on {
@ -1599,6 +1598,7 @@ dl.bb-dl > dd > li {
content:"\f069 ";
}
/* Modified original CSS to match input in Redbasic */
.jothidden .bootstrap-tagsinput {
border: 0px solid transparent;
margin-bottom: 0px;
@ -1614,6 +1614,10 @@ dl.bb-dl > dd > li {
font-size: 100%;
}
.bootstrap-tagsinput input {
height: 2.5rem;
}
/* Abusing theme-green is less work than makeing a new new one */
.theme-green .back-bar .selected-bar {
background-color: #000000;
@ -1633,13 +1637,14 @@ dl.bb-dl > dd > li {
}
.form-group.checkbox > div label {
display: block; overflow: hidden; cursor: pointer;
border: 1px solid #ccc;
border-radius: 12px;
margin:0px;
display: block; overflow: hidden; cursor: pointer;
border: 1px solid #ccc;
border-radius: 12px;
margin:0px;
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
font-weight: normal;
}
.form-group.checkbox:hover label {
@ -1803,25 +1808,26 @@ dl.bb-dl > dd > li {
}
.cover-photo-review {
margin-bottom: 10px;
margin-bottom: 10px;
}
.hover-fx-hide {
opacity: 0;
opacity: 0;
}
.hover-fx-show:hover .hover-fx-hide {
opacity: 1;
opacity: 1;
}
.bg-primary {
background-color: #505050 !important;
/* default highlighted text if not specified by schema: */
span.default-highlight {
background-color: yellow;
}
.nav-link.active {
background-color: #505050 !important;
.bootstrap-tagsinput {
width: 100%;
}
#region_3 {
display: none !important;
display: none !important;
}

View File

@ -11,44 +11,21 @@ $(document).ready(function() {
if($(window).width() < 992) {
$('main').css('width', $(window).width() + $('aside').outerWidth() );
} else {
$('main').css('width', '100%' );
$('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'
});
}
stickyScroll('.aside_spacer_left', '.aside_spacer_top_left', '.content', parseFloat(window.getComputedStyle(document.querySelector('#region_1')).getPropertyValue('padding-top')), 0);
stickyScroll('.aside_spacer_right', '.aside_spacer_top_right', '.content', parseFloat(window.getComputedStyle(document.querySelector('#region_3')).getPropertyValue('padding-top')), 20);
$('#expand-aside').on('click', toggleAside);
$('section').on('click', function() {
$('#expand-aside').on('click', function() {
if($('main').hasClass('region_1-on')){
toggleAside();
toggleAside('left');
}
});
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();
else {
toggleAside('right');
}
});
@ -92,8 +69,103 @@ $(document).ready(function() {
}
}
setInterval(function () {checkNotify();}, 10 * 1000);
var touch_start = null;
var touch_max = window.innerWidth / 10;
window.addEventListener('touchstart', function(e) {
if (e.touches.length === 1){
//just one finger touched
touch_start = e.touches.item(0).clientX;
if (touch_start < touch_max) {
$('html, body').css('overflow-y', 'hidden');
}
}
else {
//a second finger hit the screen, abort the touch
touch_start = null;
}
});
window.addEventListener('touchend', function(e) {
$('html, body').css('overflow-y', '');
let touch_offset = 30; //at least 30px are a swipe
if (touch_start) {
//the only finger that hit the screen left it
let touch_end = e.changedTouches.item(0).clientX;
if (touch_end > (touch_start + touch_offset)) {
//a left -> right swipe
if (touch_start < touch_max) {
toggleAside('right');
}
}
if (touch_end < (touch_start - touch_offset)) {
//a right -> left swipe
//toggleAside('left');
}
}
});
$(document).on('hz:hqControlsClickAction', function(e) {
toggleAside('left');
});
});
function setStyle(element, cssProperty) {
for (var property in cssProperty){
element.style[property] = cssProperty[property];
}
}
function stickyScroll(sticky, stickyTop, container, topOffset, bottomOffset) {
var lastScrollTop = 0;
var sticky = document.querySelector(sticky);
var stickyHeight = sticky.getBoundingClientRect().height;
var stickyTop = document.querySelector(stickyTop);
var content = document.querySelector(container);
var diff = window.innerHeight - stickyHeight;
var h = 0;
var lasth = 0;
var st = window.pageYOffset || document.documentElement.scrollTop;
var resizeObserver = new ResizeObserver(function(entries) {
stickyHeight = sticky.getBoundingClientRect().height;
st = window.pageYOffset || document.documentElement.scrollTop;
diff = window.innerHeight - stickyHeight;
});
resizeObserver.observe(sticky);
resizeObserver.observe(content);
window.addEventListener('scroll', function() {
if(window.innerHeight > stickyHeight + topOffset) {
setStyle(stickyTop, { height: 0 + 'px' });
setStyle(sticky, { position: 'sticky', top: topOffset + 'px'});
}
else {
st = window.pageYOffset || document.documentElement.scrollTop; // Credits: "https://github.com/qeremy/so/blob/master/so.dom.js#L426"
if (st > lastScrollTop){
// downscroll code
setStyle(stickyTop, { height: lasth + 'px' });
setStyle(sticky, { position: 'sticky', top: Math.round(diff) - bottomOffset + 'px', bottom: '' });
} else {
// upscroll code
h = sticky.getBoundingClientRect().top - content.getBoundingClientRect().top - topOffset;
if(Math.round(stickyTop.getBoundingClientRect().height) === lasth) {
setStyle(stickyTop, { height: Math.round(h) + 'px' });
}
lasth = Math.round(h);
setStyle(sticky, { position: 'sticky', top: '', bottom: Math.round(diff - topOffset) + 'px' });
}
lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
}
}, false);
}
function makeFullScreen(full) {
if(typeof full=='undefined' || full == true) {
$('main').addClass('fullscreen');
@ -104,26 +176,21 @@ function makeFullScreen(full) {
$('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')
function toggleAside(swipe) {
if ($('main').hasClass('region_1-on') && swipe === 'left') {
$('#expand-aside-icon').addClass('fa-arrow-circle-right').removeClass('fa-arrow-circle-left');
$('html, body').css({ 'position': '', left: '' });
$('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')
$('<div id="overlay"></div>').appendTo('section');
$('#left_aside_wrapper').stick_in_parent({
offset_top: $('nav').outerHeight(true) + 10,
parent: '#region_1',
spacer: '#left_aside_spacer'
});
if (!$('main').hasClass('region_1-on') && swipe === 'right') {
$('#expand-aside-icon').removeClass('fa-arrow-circle-right').addClass('fa-arrow-circle-left');
$('html, body').css({ 'position': 'sticky', 'left': '0px'});
$('main').addClass('region_1-on');
$('<div id="overlay"></div>').appendTo('body').one('click', function() { toggleAside('left'); });
}
}

View File

@ -120,10 +120,10 @@ if(file_exists('view/theme/ussrbasicpub/css/style.css')) {
$x .= $schemecss;
}
$aside_width = 288;
$left_aside_width = 288;
$right_aside_width = 288;
// left aside and right aside are 285px + converse width
$main_width = (($aside_width * 2) + intval($converse_width));
$main_width = $left_aside_width + $right_aside_width + intval($converse_width);
// prevent main_width smaller than 768px
$main_width = (($main_width < 768) ? 768 : $main_width);
@ -150,7 +150,8 @@ if(file_exists('view/theme/ussrbasicpub/css/style.css')) {
'$pmenu_top' => $pmenu_top,
'$pmenu_reply' => $pmenu_reply,
'$main_width' => $main_width,
'$aside_width' => $aside_width
'$left_aside_width' => $left_aside_width,
'$right_aside_width' => $right_aside_width
);
echo str_replace(array_keys($options), array_values($options), $x);
@ -159,5 +160,5 @@ if(file_exists('view/theme/ussrbasicpub/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'] != 'ussrbasicpub')
// set_pconfig(local_channel(), 'ussrbasicpub', 'schema', '---');
if(local_channel() && App::$channel && App::$channel['channel_theme'] != 'ussrbasicpub')
set_pconfig(local_channel(), 'ussrbasicpub', 'schema', '---');

View File

@ -2,15 +2,13 @@
/**
* * Name: Ussrbasicpub
* * Description: 2 column theme with special informative navbar
* * Version: 4.4.2
* * MinVersion: 3.8
* * MaxVersion: 6.0
* * Description: ussr.win 2 column pub based on Hubzilla standard theme
* * Version: 2.1
* * MinVersion: 5.9
* * MaxVersion: 7.0
* * Author: Fabrixxm
*/
function ussrbasicpub_init(&$a) {
App::$theme_info['extends'] = 'redbasic';
}

View File

@ -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');

View File

@ -3,10 +3,11 @@
if (! $nav_bg)
$nav_bg = "#f8f9fa";
if (! $nav_icon_colour)
$nav_icon_colour = "rgba(0, 0, 0, 0.5);";
$nav_icon_colour = "rgba(0, 0, 0, 0.5)";
if (! $nav_active_icon_colour)
$nav_active_icon_colour = "rgba(0, 0, 0, 0.7)";
if (! $radius)
$radius = "4px";
if (! $banner_colour)
$banner_colour = "rgba(0, 0, 0, 0.7)";

View File

@ -325,3 +325,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -334,3 +334,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -326,3 +326,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -320,3 +320,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -322,9 +322,6 @@ a, a:visited, a:link, .fakelink, .fakelink:visited, .fakelink:link {
.text-dark {
color: #aaa !important;
}
a.text-dark:focus, a.text-dark:hover {
color: #ddd !important;
}
.group-selected, .fileas-selected, .categories-selected, .search-selected, a.active {
color: #fff !important;
@ -480,3 +477,26 @@ pre {
.widget-nav-pills-checkbox:hover + a {
background-color: #222;
}
/* category badge fix: */
a.text-dark:focus, a.text-dark:hover {
color: #ddd !important;
}
.badge-warning {
/* background-color: #ffc927; */
}
.badge-warning a.text-dark {
color: #333 !important;
}
.badge-warning a.text-dark:focus, .badge-warning a.text-dark:hover {
color: red !important;
text-decoration: none;
}
/* fix color for highlithed text */
span.default-highlight {
color: #333;
border-radius: 4px;
}

View File

@ -346,3 +346,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -22,18 +22,21 @@ body {
margin: 0px;
}
aside {
width: $aside_widthpx;
min-width: $aside_widthpx;
max-width: $aside_widthpx;
}
aside #region_1 {
aside#region_1 {
border-right: 1px solid transparent;
width: $left_aside_widthpx;
min-width: $left_aside_widthpx;
max-width: $left_aside_widthpx;
}
aside #left_aside_wrapper,
aside #right_aside_wrapper {
aside#region_3 {
width: $right_aside_widthpx;
min-width: $left_aside_widthpx;
max-width: $right_aside_widthpx;
}
aside#left_aside_wrapper,
aside#right_aside_wrapper {
margin-bottom: 10px;
}
@ -44,14 +47,13 @@ main {
}
#overlay {
position: absolute;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .5);
left: $left_aside_widthpx;
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, .3);
cursor: pointer;
z-index: 1028;
}
h1, .h1 {
@ -663,7 +665,7 @@ nav .acpopup {
}
.profile-match-name {
width: 116px;
width: 120px;
height: 1.5em;
overflow: hidden !important;
}
@ -679,8 +681,8 @@ nav .acpopup {
.profile-match-wrapper {
float: left;
width: 118px;
height: 118px;
width: 120px;
height: 150px;
padding: 10px;
margin: 8px 10px 0 0;
border-top: 1px solid #eee;
@ -777,7 +779,7 @@ div.jGrowl div.info {
}
#jGrowl.top-right {
top: 4.5rem;
right: 15px;
right: .25rem;
}
div.jGrowl div.jGrowl-notification {
@ -796,8 +798,6 @@ div.jGrowl div.jGrowl-notification {
}
.contactname {
font-weight: bold;
color: $font_colour;
display: block;
overflow: hidden;
text-overflow: ellipsis;
@ -872,10 +872,6 @@ div.jGrowl div.jGrowl-notification {
margin-left: 20px;
}
.reshared-content img {
width: 100%;
}
.shared_header img {
border-radius: $radius;
margin-right: 10px;
@ -884,21 +880,19 @@ div.jGrowl div.jGrowl-notification {
.tag1 {
font-size : 0.9em !important;
}
.tag2 {
font-size : 1.0em !important;
}
.tag3 {
font-size : 1.1em !important;
}
.tag4 {
font-size : 1.2em !important;
}
.tag5 {
font-size : 1.3em !important;
}
@ -918,12 +912,10 @@ div.jGrowl div.jGrowl-notification {
font-size : 1.6em !important;
}
.tag9 {
font-size : 1.7em !important;
}
.tag10 {
font-size : 1.8em !important;
}
@ -1335,6 +1327,14 @@ img.mail-conv-sender-photo {
border-bottom: 3px solid $comment_item_colour;
}
.section-content-success-wrapper {
padding: 21px 10px;
color: #155724;
background-color: #d4edda;
border-bottom: 3px solid $comment_item_colour;
text-align: center;
}
.section-content-info-wrapper {
padding: 21px 10px;
color: #0c5460;
@ -1358,7 +1358,8 @@ img.mail-conv-sender-photo {
border-bottom: 3px solid $comment_item_colour;
text-align: center;
}
.section-content-tools-wrapper .section-content-success-wrapper,
.section-content-wrapper .section-content-success-wrapper,
.section-content-tools-wrapper .section-content-info-wrapper,
.section-content-wrapper .section-content-info-wrapper,
.section-content-tools-wrapper .section-content-warning-wrapper,
@ -1524,10 +1525,8 @@ blockquote {
}
main {
left: 0px;
width: 100%;
left: -$left_aside_widthpx;
width: calc( 100% + $left_aside_widthpx );
}
main.region_1-on {
@ -1599,6 +1598,7 @@ dl.bb-dl > dd > li {
content:"\f069 ";
}
/* Modified original CSS to match input in Redbasic */
.jothidden .bootstrap-tagsinput {
border: 0px solid transparent;
margin-bottom: 0px;
@ -1614,6 +1614,10 @@ dl.bb-dl > dd > li {
font-size: 100%;
}
.bootstrap-tagsinput input {
height: 2.5rem;
}
/* Abusing theme-green is less work than makeing a new new one */
.theme-green .back-bar .selected-bar {
background-color: #000000;
@ -1633,13 +1637,14 @@ dl.bb-dl > dd > li {
}
.form-group.checkbox > div label {
display: block; overflow: hidden; cursor: pointer;
border: 1px solid #ccc;
border-radius: 12px;
margin:0px;
display: block; overflow: hidden; cursor: pointer;
border: 1px solid #ccc;
border-radius: 12px;
margin:0px;
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
font-weight: normal;
}
.form-group.checkbox:hover label {
@ -1803,25 +1808,26 @@ dl.bb-dl > dd > li {
}
.cover-photo-review {
margin-bottom: 10px;
margin-bottom: 10px;
}
.hover-fx-hide {
opacity: 0;
opacity: 0;
}
.hover-fx-show:hover .hover-fx-hide {
opacity: 1;
opacity: 1;
}
.bg-primary {
background-color: #505050 !important;
/* default highlighted text if not specified by schema: */
span.default-highlight {
background-color: yellow;
}
.nav-link.active {
background-color: #505050 !important;
.bootstrap-tagsinput {
width: 100%;
}
#region_1 {
display: none;
display: none !important;;
}

View File

@ -11,44 +11,21 @@ $(document).ready(function() {
if($(window).width() < 992) {
$('main').css('width', $(window).width() + $('aside').outerWidth() );
} else {
$('main').css('width', '100%' );
$('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'
});
}
stickyScroll('.aside_spacer_left', '.aside_spacer_top_left', '.content', parseFloat(window.getComputedStyle(document.querySelector('#region_1')).getPropertyValue('padding-top')), 0);
stickyScroll('.aside_spacer_right', '.aside_spacer_top_right', '.content', parseFloat(window.getComputedStyle(document.querySelector('#region_3')).getPropertyValue('padding-top')), 20);
$('#expand-aside').on('click', toggleAside);
$('section').on('click', function() {
$('#expand-aside').on('click', function() {
if($('main').hasClass('region_1-on')){
toggleAside();
toggleAside('left');
}
});
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();
else {
toggleAside('right');
}
});
@ -92,8 +69,103 @@ $(document).ready(function() {
}
}
setInterval(function () {checkNotify();}, 10 * 1000);
var touch_start = null;
var touch_max = window.innerWidth / 10;
window.addEventListener('touchstart', function(e) {
if (e.touches.length === 1){
//just one finger touched
touch_start = e.touches.item(0).clientX;
if (touch_start < touch_max) {
$('html, body').css('overflow-y', 'hidden');
}
}
else {
//a second finger hit the screen, abort the touch
touch_start = null;
}
});
window.addEventListener('touchend', function(e) {
$('html, body').css('overflow-y', '');
let touch_offset = 30; //at least 30px are a swipe
if (touch_start) {
//the only finger that hit the screen left it
let touch_end = e.changedTouches.item(0).clientX;
if (touch_end > (touch_start + touch_offset)) {
//a left -> right swipe
if (touch_start < touch_max) {
toggleAside('right');
}
}
if (touch_end < (touch_start - touch_offset)) {
//a right -> left swipe
//toggleAside('left');
}
}
});
$(document).on('hz:hqControlsClickAction', function(e) {
toggleAside('left');
});
});
function setStyle(element, cssProperty) {
for (var property in cssProperty){
element.style[property] = cssProperty[property];
}
}
function stickyScroll(sticky, stickyTop, container, topOffset, bottomOffset) {
var lastScrollTop = 0;
var sticky = document.querySelector(sticky);
var stickyHeight = sticky.getBoundingClientRect().height;
var stickyTop = document.querySelector(stickyTop);
var content = document.querySelector(container);
var diff = window.innerHeight - stickyHeight;
var h = 0;
var lasth = 0;
var st = window.pageYOffset || document.documentElement.scrollTop;
var resizeObserver = new ResizeObserver(function(entries) {
stickyHeight = sticky.getBoundingClientRect().height;
st = window.pageYOffset || document.documentElement.scrollTop;
diff = window.innerHeight - stickyHeight;
});
resizeObserver.observe(sticky);
resizeObserver.observe(content);
window.addEventListener('scroll', function() {
if(window.innerHeight > stickyHeight + topOffset) {
setStyle(stickyTop, { height: 0 + 'px' });
setStyle(sticky, { position: 'sticky', top: topOffset + 'px'});
}
else {
st = window.pageYOffset || document.documentElement.scrollTop; // Credits: "https://github.com/qeremy/so/blob/master/so.dom.js#L426"
if (st > lastScrollTop){
// downscroll code
setStyle(stickyTop, { height: lasth + 'px' });
setStyle(sticky, { position: 'sticky', top: Math.round(diff) - bottomOffset + 'px', bottom: '' });
} else {
// upscroll code
h = sticky.getBoundingClientRect().top - content.getBoundingClientRect().top - topOffset;
if(Math.round(stickyTop.getBoundingClientRect().height) === lasth) {
setStyle(stickyTop, { height: Math.round(h) + 'px' });
}
lasth = Math.round(h);
setStyle(sticky, { position: 'sticky', top: '', bottom: Math.round(diff - topOffset) + 'px' });
}
lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling
}
}, false);
}
function makeFullScreen(full) {
if(typeof full=='undefined' || full == true) {
$('main').addClass('fullscreen');
@ -104,29 +176,21 @@ function makeFullScreen(full) {
$('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', '');
$('#region_1').css('display', 'none');
$('main').removeClass('region_1-on')
function toggleAside(swipe) {
if ($('main').hasClass('region_1-on') && swipe === 'left') {
$('#expand-aside-icon').addClass('fa-arrow-circle-right').removeClass('fa-arrow-circle-left');
$('html, body').css({ 'position': '', left: '' });
$('main').removeClass('region_1-on');
$('#overlay').remove();
$('#right_aside_wrapper').trigger("sticky_kit:detach");
}
else {
$('html, body').css('overflow-x', 'hidden');
$('#region_1').css('display', 'initial');
$('#left_aside_wrapper').css('width', '274px');
$('main').addClass('region_1-on')
$('<div id="overlay"></div>').appendTo('section');
$('#left_aside_wrapper').stick_in_parent({
offset_top: $('nav').outerHeight(true) + 10,
parent: '#region_1',
spacer: '#left_aside_spacer'
});
if (!$('main').hasClass('region_1-on') && swipe === 'right') {
$('#expand-aside-icon').removeClass('fa-arrow-circle-right').addClass('fa-arrow-circle-left');
$('html, body').css({ 'position': 'sticky', 'left': '0px'});
$('main').addClass('region_1-on');
$('<div id="overlay"></div>').appendTo('body').one('click', function() { toggleAside('left'); });
}
}

View File

@ -120,10 +120,10 @@ if(file_exists('view/theme/ussrbasicright/css/style.css')) {
$x .= $schemecss;
}
$aside_width = 288;
$left_aside_width = 288;
$right_aside_width = 288;
// left aside and right aside are 285px + converse width
$main_width = (($aside_width * 2) + intval($converse_width));
$main_width = $left_aside_width + $right_aside_width + intval($converse_width);
// prevent main_width smaller than 768px
$main_width = (($main_width < 768) ? 768 : $main_width);
@ -150,7 +150,8 @@ if(file_exists('view/theme/ussrbasicright/css/style.css')) {
'$pmenu_top' => $pmenu_top,
'$pmenu_reply' => $pmenu_reply,
'$main_width' => $main_width,
'$aside_width' => $aside_width
'$left_aside_width' => $left_aside_width,
'$right_aside_width' => $right_aside_width
);
echo str_replace(array_keys($options), array_values($options), $x);
@ -159,5 +160,5 @@ if(file_exists('view/theme/ussrbasicright/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'] != 'ussrbasicright')
// set_pconfig(local_channel(), 'ussrbasicright', 'schema', '---');
if(local_channel() && App::$channel && App::$channel['channel_theme'] != 'ussrbasicright')
set_pconfig(local_channel(), 'ussrbasicright', 'schema', '---');

View File

@ -2,15 +2,13 @@
/**
* * Name: Ussrbasicright
* * Description: 2 column, right navigation panel [BETA - some features could not work]
* * Version: 4.4.2
* * MinVersion: 3.8
* * MaxVersion: 6.0
* * Description: ussr.win 2 column left based on Hubzilla standard theme
* * Version: 2.1
* * MinVersion: 5.9
* * MaxVersion: 7.0
* * Author: Fabrixxm
*/
function ussrbasicright_init(&$a) {
App::$theme_info['extends'] = 'redbasic';
}

View File

@ -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');

View File

@ -3,10 +3,11 @@
if (! $nav_bg)
$nav_bg = "#f8f9fa";
if (! $nav_icon_colour)
$nav_icon_colour = "rgba(0, 0, 0, 0.5);";
$nav_icon_colour = "rgba(0, 0, 0, 0.5)";
if (! $nav_active_icon_colour)
$nav_active_icon_colour = "rgba(0, 0, 0, 0.7)";
if (! $radius)
$radius = "4px";
if (! $banner_colour)
$banner_colour = "rgba(0, 0, 0, 0.7)";

View File

@ -325,3 +325,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -334,3 +334,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -326,3 +326,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -320,3 +320,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}

View File

@ -322,9 +322,6 @@ a, a:visited, a:link, .fakelink, .fakelink:visited, .fakelink:link {
.text-dark {
color: #aaa !important;
}
a.text-dark:focus, a.text-dark:hover {
color: #ddd !important;
}
.group-selected, .fileas-selected, .categories-selected, .search-selected, a.active {
color: #fff !important;
@ -480,3 +477,26 @@ pre {
.widget-nav-pills-checkbox:hover + a {
background-color: #222;
}
/* category badge fix: */
a.text-dark:focus, a.text-dark:hover {
color: #ddd !important;
}
.badge-warning {
/* background-color: #ffc927; */
}
.badge-warning a.text-dark {
color: #333 !important;
}
.badge-warning a.text-dark:focus, .badge-warning a.text-dark:hover {
color: red !important;
text-decoration: none;
}
/* fix color for highlithed text */
span.default-highlight {
color: #333;
border-radius: 4px;
}

View File

@ -346,3 +346,12 @@ blockquote {
.table {
color: #dddccc;
}
#notifications, #nav-notify-sub, #nav-network-sub, #nav-all_events-sub {
border: 1px solid #383c4a !important;
border-bottom-color: #383c4a !important;
}
#upgrade_info_aside {
border-color: #383c4a !important;
}