From 85a7757d285a31c8d81eb48dfd4f0a9d8d56a8a0 Mon Sep 17 00:00:00 2001 From: crowesn Date: Fri, 7 May 2021 15:45:48 -0400 Subject: [PATCH] remove current issues from journale landing page --- DefaultFogsChildThemePlugin.inc.php | 20 ++---- templates/frontend/pages/indexJournal.tpl | 79 +++++++++++++++++++++++ 2 files changed, 84 insertions(+), 15 deletions(-) create mode 100644 templates/frontend/pages/indexJournal.tpl diff --git a/DefaultFogsChildThemePlugin.inc.php b/DefaultFogsChildThemePlugin.inc.php index de82dae..bb0545a 100644 --- a/DefaultFogsChildThemePlugin.inc.php +++ b/DefaultFogsChildThemePlugin.inc.php @@ -35,12 +35,11 @@ public function init() { $this->removeOption('typography'); } - // Add the option for an accent color - $this->addOption('accentColour', 'FieldColor', [ - 'label' => __('plugins.themes.defaultFogs.option.accentColour.label'), - 'description' => __('plugins.themes.default.option.colour.description'), - 'default' => '#F7BC4A', - ]); + // Remove the Colour option of the parent theme. + // `removeOption` was introduced in OJS 3.0.2 + if (method_exists($this, 'removeOption')) { + $this->removeOption('baseColour'); + } // Load the Montserrat and Open Sans fonts $this->addStyle( @@ -77,15 +76,6 @@ public function init() { $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))); - } } /** diff --git a/templates/frontend/pages/indexJournal.tpl b/templates/frontend/pages/indexJournal.tpl new file mode 100644 index 0000000..2766475 --- /dev/null +++ b/templates/frontend/pages/indexJournal.tpl @@ -0,0 +1,79 @@ +{** + * templates/frontend/pages/indexJournal.tpl + * + * Copyright (c) 2014-2020 Simon Fraser University + * Copyright (c) 2003-2020 John Willinsky + * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. + * + * @brief Display the index page for a journal + * + * @uses $currentJournal Journal This journal + * @uses $journalDescription string Journal description from HTML text editor + * @uses $homepageImage object Image to be displayed on the homepage + * @uses $additionalHomeContent string Arbitrary input from HTML text editor + * @uses $announcements array List of announcements + * @uses $numAnnouncementsHomepage int Number of announcements to display on the + * homepage + * @uses $issue Issue Current issue + *} +{include file="frontend/components/header.tpl" pageTitleTranslated=$currentJournal->getLocalizedName()} + +
+ + {call_hook name="Templates::Index::journal"} + + {if !$activeTheme->getOption('useHomepageImageAsHeader') && $homepageImage} +
+ {$homepageImage.altText|escape} +
+ {/if} + + {* Journal Description *} + {if $activeTheme->getOption('showDescriptionInJournalIndex')} +
+ +

{translate key="about.aboutContext"}

+ {$currentContext->getLocalizedData('description')} +
+ {/if} + + {* Announcements *} + {if $numAnnouncementsHomepage && $announcements|@count} +
+ +

+ {translate key="announcement.announcements"} +

+ {foreach name=announcements from=$announcements item=announcement} + {if $smarty.foreach.announcements.iteration > $numAnnouncementsHomepage} + {break} + {/if} + {if $smarty.foreach.announcements.iteration == 1} + {include file="frontend/objects/announcement_summary.tpl" heading="h3"} +
+ {else} + + {/if} + {/foreach} +
+
+ {/if} + + {* Additional Homepage Content *} + {if $additionalHomeContent} +
+ {$additionalHomeContent} +
+ {/if} +
+ +{include file="frontend/components/footer.tpl"}