| Server IP : 10.10.92.66 / Your IP : 104.23.197.230 Web Server : Apache/2.4.52 (Ubuntu) System : Linux jurnalpolinema 5.15.0-177-generic #187-Ubuntu SMP Sat Apr 11 22:54:33 UTC 2026 x86_64 User : jurnal ( 1001) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/jurnal/public_html/plugins/themes/defaultManuscript/ |
Upload File : |
<?php
/**
* @file plugins/themes/default/DefaultManuscriptChildThemePlugin.inc.php
*
* Copyright (c) 2014-2017 Simon Fraser University Library
* Copyright (c) 2003-2017 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class DefaultManuscriptChildThemePlugin
* @ingroup plugins_themes_default_manuscript
*
* @brief Default theme
*/
import('lib.pkp.classes.plugins.ThemePlugin');
class DefaultManuscriptChildThemePlugin extends ThemePlugin {
/**
* Initialize the theme's styles, scripts and hooks. This is only run for
* the currently active theme.
*
* @return null
*/
public function init() {
// Initialize the parent theme
$this->setParent('defaultthemeplugin');
// Add custom styles
$this->modifyStyle('stylesheet', array('addLess' => array('styles/index.less')));
// Remove the typography options of the parent theme.
// `removeOption` was introduced in OJS 3.0.2
if (method_exists($this, 'removeOption')) {
$this->removeOption('typography');
}
// Add the option for an accent color
$this->addOption('accentColour', 'colour', array(
'label' => 'plugins.themes.defaultManuscript.option.accentColour.label',
'description' => 'plugins.themes.default.option.colour.description',
'default' => '#F7BC4A',
));
// Load the Montserrat and Open Sans fonts
$this->addStyle(
'font',
'//fonts.googleapis.com/css?family=Montserrat:400,700|Noto+Serif:400,400i,700,700i',
array('baseUrl' => '')
);
// Dequeue any fonts loaded by parent theme
// `removeStyle` was introduced in OJS 3.0.2
if (method_exists($this, 'removeStyle')) {
$this->removeStyle('fontNotoSans');
$this->removeStyle('fontNotoSerif');
$this->removeStyle('fontNotoSansNotoSerif');
$this->removeStyle('fontLato');
$this->removeStyle('fontLora');
$this->removeStyle('fontLoraOpenSans');
$this->removeStyle('fontNotoSerif');
$this->removeStyle('fontNotoSerif');
$this->removeStyle('fontNotoSerif');
$this->removeStyle('fontNotoSerif');
$this->removeStyle('fontNotoSerif');
}
// Start with a fresh array of additionalLessVariables so that we can
// ignore those added by the parent theme. This gets rid of @font
// variable overrides from the typography option
$additionalLessVariables = array();
// Update colour based on theme option from parent theme
if ($this->getOption('baseColour') !== '#1E6292') {
$additionalLessVariables[] = '@bg-base:' . $this->getOption('baseColour') . ';';
if (!$this->isColourDark($this->getOption('baseColour'))) {
$additionalLessVariables[] = '@text-bg-base:rgba(0,0,0,0.84);';
}
}
// Update accent colour based on theme option
if ($this->getOption('accentColour') !== '#F7BC4A') {
$additionalLessVariables[] = '@accent:' . $this->getOption('accentColour') . ';';
}
if ($this->getOption('baseColour') && $this->getOption('accentColour')) {
$this->modifyStyle('stylesheet', array('addLessVariables' => join('', $additionalLessVariables)));
}
}
/**
* Get the display name of this plugin
* @return string
*/
function getDisplayName() {
return __('plugins.themes.defaultManuscript.name');
}
/**
* Get the description of this plugin
* @return string
*/
function getDescription() {
return __('plugins.themes.defaultManuscript.description');
}
}
?>