Hello,
I decided to create a child theme of the Bootstrap 3 theme. But the styles/variables.less file is not being loaded/compiled because the font is still the same after I’ve changed it in variables file.
I followed the theming guide and here’s my public function init code:
$this->setParent('bootstrapthreethemeplugin');
$this->modifyStyle('bootstrap', array('addLess' => array('styles/variables.less')));
$this->addStyle('stylesheet', 'styles/index.less');
$this->addStyle('my-custom-style', 'styles/stylesheet.min.css');
The stylesheet file is being loaded correctly though.
I also noticed after enabling the theme from admin backend, the other bundled bootstrap themes such as paper, cerulean, are also appearing as options below the theme. So I just selected cerulean and copied it’s variables.less to styles folder and edited it.
I’m using OJS 3.3.0.12 and I’ve worked with the manuscript child theme before but I’m having problems with the bootstrap theme.
Here is the error log I got:
[18-May-2023 17:34:19 UTC] PHP Fatal error: Uncaught Less_Exception_Compiler: variable @gray is undefined in file /home/devtrac1/public_html/journals/plugins/themes/mediterranean-blue/styles/variables.less in variables.less on line 12, column 14
10| @brand-danger: rgb(199, 28, 34);
11| @body-bg: #f5f5f5;
12| @text-color: @gray;
13| @link-hover-decoration: none;
14| @font-family-sans-serif: “Open Sans”, “Helvetica Neue”, Helvetica, Arial, sans-serif;
15| @font-family-serif: Georgia, “Times New Roman”, Times, serif; in /home/devtrac1/public_html/journals/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Tree/Variable.php:48
Stack trace:
#0 /home/devtrac1/public_html/journals/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Tree/Expression.php(51): Less_Tree_Variable->compile(Object(Less_Environment))
#1 /home/devtrac1/public_html/journals/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Tree/Value.php(26): Less_Tree_Expression->compile(Object(Less_Environment))
#2 /home/devtrac1/public_html/journals/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Tree/Rul in /home/devtrac1/public_html/journals/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Tree/Variable.php on line 48