fixes according to rebasic 11.2 - 1265

This commit is contained in:
2026-04-11 10:52:14 +03:00
parent cea76873e9
commit e66a52a212
12 changed files with 227 additions and 212 deletions

View File

@@ -508,8 +508,8 @@ footer {
}
.contact-block-img {
width: 2.94rem;
height: 2.94rem;
width: 2.92rem;
height: 2.92rem;
margin-bottom: 3px;
}
@@ -953,6 +953,7 @@ a .drop-icons:hover {
}
.wall-item-pinned i {
display: inline-block;
transform: rotate(45deg);
}

View File

@@ -2,8 +2,8 @@
* ussrbasic theme specific JavaScript
*/
let ussrbasic_dark_mode = localStorage.getItem('ussrbasic_dark_mode');
let ussrbasic_theme_color = localStorage.getItem('ussrbasic_theme_color');
const ussrbasic_dark_mode = localStorage.getItem('ussrbasic_dark_mode');
const ussrbasic_theme_color = localStorage.getItem('ussrbasic_theme_color');
if (ussrbasic_dark_mode == 1) {
document.documentElement.setAttribute('data-bs-theme', 'dark');
@@ -41,19 +41,19 @@ document.addEventListener('DOMContentLoaded', function () {
darkElements.forEach(el => el.setAttribute('data-bs-theme', 'light'));
}
let navBackgroundColor = document.querySelector('nav').style.backgroundColor;
const navBackgroundColor = document.querySelector('nav').style.backgroundColor;
if (ussrbasic_theme_color !== navBackgroundColor) {
document.querySelector('meta[name=theme-color]').setAttribute('content', navBackgroundColor);
localStorage.setItem('ussrbasic_theme_color', navBackgroundColor);
}
// CSS3 calc() fallback (for unsupported browsers)
let testElem = document.createElement('div');
const testElem = document.createElement('div');
testElem.style.width = 'calc(10px + 10px)';
testElem.style.display = 'none';
testElem.id = 'css3-calc';
document.body.appendChild(testElem);
if (testElem.offsetWidth === 10) {
window.addEventListener('resize', function () {
if (window.innerWidth < 992) {
@@ -66,10 +66,20 @@ document.addEventListener('DOMContentLoaded', function () {
testElem.remove(); // Remove the test element
if (window.innerWidth < 1200) {
let rightAsideWrapper = document.getElementById("right_aside_wrapper");
let leftAsideWrapper = document.getElementById("left_aside_wrapper");
leftAsideWrapper.appendChild(...rightAsideWrapper.children);
document.getElementById('notifications_wrapper').classList.add('d-none');
const rightAsideWrapper = document.getElementById("right_aside_wrapper");
const leftAsideWrapper = document.getElementById("left_aside_wrapper");
const notificationsWrapper = document.getElementById("notifications_wrapper");
if (leftAsideWrapper && rightAsideWrapper) {
const children = rightAsideWrapper.children;
if (children.length) {
leftAsideWrapper.append(...children);
}
}
if (notificationsWrapper) {
notificationsWrapper.classList.add('d-none');
}
}
if (document.getElementById('region_1')) {
@@ -92,7 +102,7 @@ document.addEventListener('DOMContentLoaded', function () {
});
document.getElementById('theme-switch').addEventListener('click', function () {
let html = document.documentElement;
const html = document.documentElement;
if (html.getAttribute('data-bs-theme') === 'dark') {
let nav = document.querySelector('nav');
if (nav.dataset.bsTheme === 'dark') {
@@ -118,23 +128,12 @@ document.addEventListener('DOMContentLoaded', function () {
});
document.getElementById('menu-btn').addEventListener('click', function () {
let navCollapse = document.getElementById('navbar-collapse-1');
if (navCollapse.classList.contains('show')) {
const navCollapse = document.getElementById('navbar-collapse-1');
if (navCollapse && navCollapse.classList.contains('show')) {
navCollapse.classList.remove('show');
}
});
document.querySelectorAll('.notifications-btn').forEach(function (element) {
element.addEventListener('click', function (e) {
e.preventDefault();
e.stopPropagation();
let navCollapse = document.getElementById('navbar-collapse-2');
if (navCollapse.classList.contains('show')) {
navCollapse.classList.remove('show');
}
});
});
$("input[data-role=cat-tagsinput]").tagsinput({
tagClass: 'badge rounded-pill bg-warning text-dark'
});
@@ -146,7 +145,7 @@ document.addEventListener('DOMContentLoaded', function () {
});
});
let doctitle = document.title;
const doctitle = document.title;
function checkNotify() {
let notifyUpdateElem = document.getElementById('notify-update');
if (notifyUpdateElem && notifyUpdateElem.innerHTML !== '') {
@@ -159,7 +158,7 @@ document.addEventListener('DOMContentLoaded', function () {
setInterval(checkNotify, 10 * 1000);
let touch_start = null;
let touch_max = window.innerWidth / 10;
const touch_max = window.innerWidth / 10;
window.addEventListener('touchstart', function (e) {
if (e.touches.length === 1) {
@@ -190,7 +189,7 @@ document.addEventListener('DOMContentLoaded', function () {
});
function setStyle(element, cssProperty) {
for (var property in cssProperty) {
for (let property in cssProperty) {
element.style[property] = cssProperty[property];
}
}
@@ -204,8 +203,8 @@ function stickyScroll(sticky, stickyTop, container, topOffset, bottomOffset) {
}
let stickyHeight = stickyElement.getBoundingClientRect().height;
let stickyTopElement = document.querySelector(stickyTop);
let content = document.querySelector(container);
const stickyTopElement = document.querySelector(stickyTop);
const content = document.querySelector(container);
let diff = window.innerHeight - stickyHeight;
let h = 0;

View File

@@ -4,6 +4,7 @@ namespace Zotlabs\Theme;
use ScssPhp\ScssPhp\Compiler;
use ScssPhp\ScssPhp\OutputStyle;
use ScssPhp\ScssPhp\ValueConverter;
class UssrbasicConfig {
@@ -68,85 +69,89 @@ class UssrbasicConfig {
}
if (isset($_POST['ussrbasic-settings-submit'])) {
if (isset($_POST['ussrbasic_primary_color']) || isset($_POST['ussrbasic_radius'])) {
$primary_color = '';
$color_changed = false;
$success_color = '';
$info_color = '';
$warning_color = '';
$danger_color = '';
$radius = floatval($_POST['ussrbasic_radius']);
$radius_changed = $_POST['ussrbasic_radius'] !== get_pconfig(local_channel(),'ussrbasic', 'radius');
$primary_color = '';
$success_color = '';
$info_color = '';
$warning_color = '';
$danger_color = '';
$radius = floatval($_POST['ussrbasic_radius']);
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasic_primary_color'])) {
$primary_color = $_POST['ussrbasic_primary_color'];
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasic_primary_color'])) {
if (!$color_changed) {
$color_changed = $_POST['ussrbasic_primary_color'] !== get_pconfig(local_channel(),'ussrbasic', 'primary_color');
}
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasic_success_color'])) {
$success_color = $_POST['ussrbasic_success_color'];
$primary_color = $_POST['ussrbasic_primary_color'];
}
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasic_success_color'])) {
if (!$color_changed) {
$color_changed = $_POST['ussrbasic_success_color'] !== get_pconfig(local_channel(),'ussrbasic', 'success_color');
}
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasic_info_color'])) {
$info_color = $_POST['ussrbasic_info_color'];
$success_color = $_POST['ussrbasic_success_color'];
}
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasic_info_color'])) {
if (!$color_changed) {
$color_changed = $_POST['ussrbasic_info_color'] !== get_pconfig(local_channel(),'ussrbasic', 'info_color');
}
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasic_warning_color'])) {
$warning_color = $_POST['ussrbasic_warning_color'];
$info_color = $_POST['ussrbasic_info_color'];
}
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasic_warning_color'])) {
if (!$color_changed) {
$color_changed = $_POST['ussrbasic_warning_color'] !== get_pconfig(local_channel(),'ussrbasic', 'warning_color');
}
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasic_danger_color'])) {
$danger_color = $_POST['ussrbasic_danger_color'];
$warning_color = $_POST['ussrbasic_warning_color'];
}
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasic_danger_color'])) {
if (!$color_changed) {
$color_changed = $_POST['ussrbasic_danger_color'] !== get_pconfig(local_channel(),'ussrbasic', 'danger_color');
}
$danger_color = $_POST['ussrbasic_danger_color'];
}
if ($primary_color || $success_color || $info_color || $warning_color || $danger_color || $radius) {
if (!$primary_color && !$success_color && !$info_color && !$warning_color && !$danger_color && !$radius) {
set_pconfig(local_channel(), 'ussrbasic', 'bootstrap', '');
}
else if ($color_changed || $radius_changed) {
try {
$compiler = new Compiler();
$compiler->setImportPaths('vendor/twbs/bootstrap/scss');
$compiler->setOutputStyle(OutputStyle::COMPRESSED);
try {
$cache_dir = 'store/[data]/[scss]/';
if(!is_dir($cache_dir)) {
os_mkdir($cache_dir, STORAGE_DEFAULT_PERMISSIONS, true);
}
$options = [
'cacheDir' => $cache_dir,
'prefix' => 'ussrbasic_',
'forceRefresh' => false
];
$compiler = new Compiler($options);
$compiler->setImportPaths('vendor/twbs/bootstrap/scss');
$compiler->setOutputStyle(OutputStyle::COMPRESSED);
// Set Variables
if ($primary_color) {
$variables['$primary'] = $primary_color;
}
if ($success_color) {
$variables['$success'] = $success_color;
}
if ($info_color) {
$variables['$info'] = $info_color;
}
if ($warning_color) {
$variables['$warning'] = $warning_color;
}
if ($danger_color) {
$variables['$danger'] = $danger_color;
}
if ($radius) {
$variables['$border-radius'] = $radius . 'rem';
$variables['$border-radius-sm'] = $radius/1.5 . 'rem';
$variables['$border-radius-lg'] = $radius*1.333 . 'rem';
$variables['$border-radius-xl'] = $radius*2.666 . 'rem';
$variables['$border-radius-xxl'] = $radius*5.333 . 'rem';
}
// Replace Bootstrap Variables with Customizer Variables
$compiler->replaceVariables($variables);
$bs = $compiler->compileString('@import "bootstrap.scss";');
set_pconfig(local_channel(), 'ussrbasic', 'bootstrap', $bs->getCss());
} catch (\Exception $e) {
logger('scssphp: Unable to compile content');
// Set Variables
if ($primary_color) {
$variables['$primary'] = ValueConverter::parseValue($primary_color);
}
}
else {
set_pconfig(local_channel(), 'ussrbasic', 'bootstrap', '');
if ($success_color) {
$variables['$success'] = ValueConverter::parseValue($success_color);
}
if ($info_color) {
$variables['$info'] = ValueConverter::parseValue($info_color);
}
if ($warning_color) {
$variables['$warning'] = ValueConverter::parseValue($warning_color);
}
if ($danger_color) {
$variables['$danger'] = ValueConverter::parseValue($danger_color);
}
if ($radius) {
$variables['$border-radius'] = ValueConverter::parseValue($radius . 'rem');
$variables['$border-radius-sm'] = ValueConverter::parseValue($radius/1.5 . 'rem');
$variables['$border-radius-lg'] = ValueConverter::parseValue($radius*1.333 . 'rem');
$variables['$border-radius-xl'] = ValueConverter::parseValue($radius*2.666 . 'rem');
$variables['$border-radius-xxl'] = ValueConverter::parseValue($radius*5.333 . 'rem');
}
// Replace Bootstrap Variables with Customizer Variables
if ($variables) {
$compiler->replaceVariables($variables);
}
$bs = $compiler->compileString('@import "bootstrap.scss";');
set_pconfig(local_channel(), 'ussrbasic', 'bootstrap', $bs->getCss());
} catch (\Exception $e) {
logger('scssphp: Unable to compile content');
}
}

View File

@@ -4,7 +4,7 @@
* * Name: Ussrbasic
* * Description: ussr.win theme based on Hubzilla standard theme
* * Version: 2.2
* * MinVersion: 8.9
* * MinVersion: 10.6
* * MaxVersion: 12.9
* * Author: Fabrixxm
* * Maintainer: ivan zlax

View File

@@ -9,7 +9,6 @@ head_add_css('/library/bootstrap-tagsinput/bootstrap-tagsinput.css');
head_add_css('/library/bootstrap-colorpicker/dist/css/bootstrap-colorpicker.min.css');
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/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.js');

View File

@@ -1,4 +1,5 @@
.comment .wall-item-body {
.comment .wall-item-body,
.comment .wall-item-tools-left {
padding-left: 3.4rem;
}
@@ -37,3 +38,8 @@
border-right: 0;
border-left: 0;
}
.contact-block-img {
width: 2.89rem;
height: 2.89rem;
}

View File

@@ -508,8 +508,8 @@ footer {
}
.contact-block-img {
width: 2.94rem;
height: 2.94rem;
width: 2.92rem;
height: 2.92rem;
margin-bottom: 3px;
}
@@ -953,6 +953,7 @@ a .drop-icons:hover {
}
.wall-item-pinned i {
display: inline-block;
transform: rotate(45deg);
}
@@ -1389,7 +1390,7 @@ dl.bb-dl > dd > li {
content: "\F659";
}
/* Modified original CSS to match input in Ussrbasic */
/* Modified original CSS to match input in Ussrbasicpub */
.jothidden .bootstrap-tagsinput {
border: 0px solid transparent;
margin-bottom: 0px;
@@ -1637,8 +1638,3 @@ dl.bb-dl > dd > li {
}
.generic-content-wrapper-styled {
background-color: #aa2b2b;
padding: 10px;
border-radius: var(--bs-border-radius);
}

View File

@@ -2,8 +2,8 @@
* ussrbasicpub theme specific JavaScript
*/
let ussrbasicpub_dark_mode = localStorage.getItem('ussrbasicpub_dark_mode');
let ussrbasicpub_theme_color = localStorage.getItem('ussrbasicpub_theme_color');
const ussrbasicpub_dark_mode = localStorage.getItem('ussrbasicpub_dark_mode');
const ussrbasicpub_theme_color = localStorage.getItem('ussrbasicpub_theme_color');
if (ussrbasicpub_dark_mode == 1) {
document.documentElement.setAttribute('data-bs-theme', 'dark');
@@ -41,19 +41,19 @@ document.addEventListener('DOMContentLoaded', function () {
darkElements.forEach(el => el.setAttribute('data-bs-theme', 'light'));
}
let navBackgroundColor = document.querySelector('nav').style.backgroundColor;
const navBackgroundColor = document.querySelector('nav').style.backgroundColor;
if (ussrbasicpub_theme_color !== navBackgroundColor) {
document.querySelector('meta[name=theme-color]').setAttribute('content', navBackgroundColor);
localStorage.setItem('ussrbasicpub_theme_color', navBackgroundColor);
}
// CSS3 calc() fallback (for unsupported browsers)
let testElem = document.createElement('div');
const testElem = document.createElement('div');
testElem.style.width = 'calc(10px + 10px)';
testElem.style.display = 'none';
testElem.id = 'css3-calc';
document.body.appendChild(testElem);
if (testElem.offsetWidth === 10) {
window.addEventListener('resize', function () {
if (window.innerWidth < 992) {
@@ -66,10 +66,20 @@ document.addEventListener('DOMContentLoaded', function () {
testElem.remove(); // Remove the test element
if (window.innerWidth < 1200) {
let rightAsideWrapper = document.getElementById("right_aside_wrapper");
let leftAsideWrapper = document.getElementById("left_aside_wrapper");
leftAsideWrapper.appendChild(...rightAsideWrapper.children);
document.getElementById('notifications_wrapper').classList.add('d-none');
const rightAsideWrapper = document.getElementById("right_aside_wrapper");
const leftAsideWrapper = document.getElementById("left_aside_wrapper");
const notificationsWrapper = document.getElementById("notifications_wrapper");
if (leftAsideWrapper && rightAsideWrapper) {
const children = rightAsideWrapper.children;
if (children.length) {
leftAsideWrapper.append(...children);
}
}
if (notificationsWrapper) {
notificationsWrapper.classList.add('d-none');
}
}
if (document.getElementById('region_1')) {
@@ -92,7 +102,7 @@ document.addEventListener('DOMContentLoaded', function () {
});
document.getElementById('theme-switch').addEventListener('click', function () {
let html = document.documentElement;
const html = document.documentElement;
if (html.getAttribute('data-bs-theme') === 'dark') {
let nav = document.querySelector('nav');
if (nav.dataset.bsTheme === 'dark') {
@@ -118,23 +128,12 @@ document.addEventListener('DOMContentLoaded', function () {
});
document.getElementById('menu-btn').addEventListener('click', function () {
let navCollapse = document.getElementById('navbar-collapse-1');
if (navCollapse.classList.contains('show')) {
const navCollapse = document.getElementById('navbar-collapse-1');
if (navCollapse && navCollapse.classList.contains('show')) {
navCollapse.classList.remove('show');
}
});
document.querySelectorAll('.notifications-btn').forEach(function (element) {
element.addEventListener('click', function (e) {
e.preventDefault();
e.stopPropagation();
let navCollapse = document.getElementById('navbar-collapse-2');
if (navCollapse.classList.contains('show')) {
navCollapse.classList.remove('show');
}
});
});
$("input[data-role=cat-tagsinput]").tagsinput({
tagClass: 'badge rounded-pill bg-warning text-dark'
});
@@ -146,7 +145,7 @@ document.addEventListener('DOMContentLoaded', function () {
});
});
let doctitle = document.title;
const doctitle = document.title;
function checkNotify() {
let notifyUpdateElem = document.getElementById('notify-update');
if (notifyUpdateElem && notifyUpdateElem.innerHTML !== '') {
@@ -159,7 +158,7 @@ document.addEventListener('DOMContentLoaded', function () {
setInterval(checkNotify, 10 * 1000);
let touch_start = null;
let touch_max = window.innerWidth / 10;
const touch_max = window.innerWidth / 10;
window.addEventListener('touchstart', function (e) {
if (e.touches.length === 1) {
@@ -190,7 +189,7 @@ document.addEventListener('DOMContentLoaded', function () {
});
function setStyle(element, cssProperty) {
for (var property in cssProperty) {
for (let property in cssProperty) {
element.style[property] = cssProperty[property];
}
}
@@ -204,8 +203,8 @@ function stickyScroll(sticky, stickyTop, container, topOffset, bottomOffset) {
}
let stickyHeight = stickyElement.getBoundingClientRect().height;
let stickyTopElement = document.querySelector(stickyTop);
let content = document.querySelector(container);
const stickyTopElement = document.querySelector(stickyTop);
const content = document.querySelector(container);
let diff = window.innerHeight - stickyHeight;
let h = 0;

View File

@@ -4,6 +4,7 @@ namespace Zotlabs\Theme;
use ScssPhp\ScssPhp\Compiler;
use ScssPhp\ScssPhp\OutputStyle;
use ScssPhp\ScssPhp\ValueConverter;
class UssrbasicpubConfig {
@@ -68,85 +69,89 @@ class UssrbasicpubConfig {
}
if (isset($_POST['ussrbasicpub-settings-submit'])) {
if (isset($_POST['ussrbasicpub_primary_color']) || isset($_POST['ussrbasicpub_radius'])) {
$primary_color = '';
$color_changed = false;
$success_color = '';
$info_color = '';
$warning_color = '';
$danger_color = '';
$radius = floatval($_POST['ussrbasicpub_radius']);
$radius_changed = $_POST['ussrbasicpub_radius'] !== get_pconfig(local_channel(),'ussrbasicpub', 'radius');
$primary_color = '';
$success_color = '';
$info_color = '';
$warning_color = '';
$danger_color = '';
$radius = floatval($_POST['ussrbasicpub_radius']);
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasicpub_primary_color'])) {
$primary_color = $_POST['ussrbasicpub_primary_color'];
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasicpub_primary_color'])) {
if (!$color_changed) {
$color_changed = $_POST['ussrbasicpub_primary_color'] !== get_pconfig(local_channel(),'ussrbasicpub', 'primary_color');
}
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasicpub_success_color'])) {
$success_color = $_POST['ussrbasicpub_success_color'];
$primary_color = $_POST['ussrbasicpub_primary_color'];
}
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasicpub_success_color'])) {
if (!$color_changed) {
$color_changed = $_POST['ussrbasicpub_success_color'] !== get_pconfig(local_channel(),'ussrbasicpub', 'success_color');
}
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasicpub_info_color'])) {
$info_color = $_POST['ussrbasicpub_info_color'];
$success_color = $_POST['ussrbasicpub_success_color'];
}
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasicpub_info_color'])) {
if (!$color_changed) {
$color_changed = $_POST['ussrbasicpub_info_color'] !== get_pconfig(local_channel(),'ussrbasicpub', 'info_color');
}
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasicpub_warning_color'])) {
$warning_color = $_POST['ussrbasicpub_warning_color'];
$info_color = $_POST['ussrbasicpub_info_color'];
}
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasicpub_warning_color'])) {
if (!$color_changed) {
$color_changed = $_POST['ussrbasicpub_warning_color'] !== get_pconfig(local_channel(),'ussrbasicpub', 'warning_color');
}
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasicpub_danger_color'])) {
$danger_color = $_POST['ussrbasicpub_danger_color'];
$warning_color = $_POST['ussrbasicpub_warning_color'];
}
if (preg_match('/^#([A-Fa-f0-9]{3}){1,2}$/', $_POST['ussrbasicpub_danger_color'])) {
if (!$color_changed) {
$color_changed = $_POST['ussrbasicpub_danger_color'] !== get_pconfig(local_channel(),'ussrbasicpub', 'danger_color');
}
$danger_color = $_POST['ussrbasicpub_danger_color'];
}
if ($primary_color || $success_color || $info_color || $warning_color || $danger_color || $radius) {
if (!$primary_color && !$success_color && !$info_color && !$warning_color && !$danger_color && !$radius) {
set_pconfig(local_channel(), 'ussrbasicpub', 'bootstrap', '');
}
else if ($color_changed || $radius_changed) {
try {
$compiler = new Compiler();
$compiler->setImportPaths('vendor/twbs/bootstrap/scss');
$compiler->setOutputStyle(OutputStyle::COMPRESSED);
try {
$cache_dir = 'store/[data]/[scss]/';
if(!is_dir($cache_dir)) {
os_mkdir($cache_dir, STORAGE_DEFAULT_PERMISSIONS, true);
}
$options = [
'cacheDir' => $cache_dir,
'prefix' => 'ussrbasicpub_',
'forceRefresh' => false
];
$compiler = new Compiler($options);
$compiler->setImportPaths('vendor/twbs/bootstrap/scss');
$compiler->setOutputStyle(OutputStyle::COMPRESSED);
// Set Variables
if ($primary_color) {
$variables['$primary'] = $primary_color;
}
if ($success_color) {
$variables['$success'] = $success_color;
}
if ($info_color) {
$variables['$info'] = $info_color;
}
if ($warning_color) {
$variables['$warning'] = $warning_color;
}
if ($danger_color) {
$variables['$danger'] = $danger_color;
}
if ($radius) {
$variables['$border-radius'] = $radius . 'rem';
$variables['$border-radius-sm'] = $radius/1.5 . 'rem';
$variables['$border-radius-lg'] = $radius*1.333 . 'rem';
$variables['$border-radius-xl'] = $radius*2.666 . 'rem';
$variables['$border-radius-xxl'] = $radius*5.333 . 'rem';
}
// Replace Bootstrap Variables with Customizer Variables
$compiler->replaceVariables($variables);
$bs = $compiler->compileString('@import "bootstrap.scss";');
set_pconfig(local_channel(), 'ussrbasicpub', 'bootstrap', $bs->getCss());
} catch (\Exception $e) {
logger('scssphp: Unable to compile content');
// Set Variables
if ($primary_color) {
$variables['$primary'] = ValueConverter::parseValue($primary_color);
}
}
else {
set_pconfig(local_channel(), 'ussrbasicpub', 'bootstrap', '');
if ($success_color) {
$variables['$success'] = ValueConverter::parseValue($success_color);
}
if ($info_color) {
$variables['$info'] = ValueConverter::parseValue($info_color);
}
if ($warning_color) {
$variables['$warning'] = ValueConverter::parseValue($warning_color);
}
if ($danger_color) {
$variables['$danger'] = ValueConverter::parseValue($danger_color);
}
if ($radius) {
$variables['$border-radius'] = ValueConverter::parseValue($radius . 'rem');
$variables['$border-radius-sm'] = ValueConverter::parseValue($radius/1.5 . 'rem');
$variables['$border-radius-lg'] = ValueConverter::parseValue($radius*1.333 . 'rem');
$variables['$border-radius-xl'] = ValueConverter::parseValue($radius*2.666 . 'rem');
$variables['$border-radius-xxl'] = ValueConverter::parseValue($radius*5.333 . 'rem');
}
// Replace Bootstrap Variables with Customizer Variables
if ($variables) {
$compiler->replaceVariables($variables);
}
$bs = $compiler->compileString('@import "bootstrap.scss";');
set_pconfig(local_channel(), 'ussrbasicpub', 'bootstrap', $bs->getCss());
} catch (\Exception $e) {
logger('scssphp: Unable to compile content');
}
}

View File

@@ -4,7 +4,7 @@
* * Name: Ussrbasicpub
* * Description: ussr.win public theme based on Hubzilla standard theme
* * Version: 2.2
* * MinVersion: 8.9
* * MinVersion: 10.6
* * MaxVersion: 12.9
* * Author: Fabrixxm
* * Maintainer: ivan zlax

View File

@@ -9,7 +9,6 @@ head_add_css('/library/bootstrap-tagsinput/bootstrap-tagsinput.css');
head_add_css('/library/bootstrap-colorpicker/dist/css/bootstrap-colorpicker.min.css');
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/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.js');

View File

@@ -1,4 +1,5 @@
.comment .wall-item-body {
.comment .wall-item-body,
.comment .wall-item-tools-left {
padding-left: 3.4rem;
}
@@ -37,3 +38,8 @@
border-right: 0;
border-left: 0;
}
.contact-block-img {
width: 2.89rem;
height: 2.89rem;
}