Skip to content

Commit

Permalink
remove current issues from journale landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
crowesn committed May 7, 2021
1 parent 6877c21 commit 85a7757
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 15 deletions.
20 changes: 5 additions & 15 deletions DefaultFogsChildThemePlugin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)));
}
}

/**
Expand Down
79 changes: 79 additions & 0 deletions templates/frontend/pages/indexJournal.tpl
Original file line number Diff line number Diff line change
@@ -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()}

<div class="page_index_journal">

{call_hook name="Templates::Index::journal"}

{if !$activeTheme->getOption('useHomepageImageAsHeader') && $homepageImage}
<div class="homepage_image">
<img src="{$publicFilesDir}/{$homepageImage.uploadName|escape:"url"}"{if $homepageImage.altText} alt="{$homepageImage.altText|escape}"{/if}>
</div>
{/if}

{* Journal Description *}
{if $activeTheme->getOption('showDescriptionInJournalIndex')}
<section class="homepage_about">
<a id="homepageAbout"></a>
<h2>{translate key="about.aboutContext"}</h2>
{$currentContext->getLocalizedData('description')}
</section>
{/if}

{* Announcements *}
{if $numAnnouncementsHomepage && $announcements|@count}
<section class="cmp_announcements highlight_first">
<a id="homepageAnnouncements"></a>
<h2>
{translate key="announcement.announcements"}
</h2>
{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"}
<div class="more">
{else}
<article class="obj_announcement_summary">
<h4>
<a href="{url router=$smarty.const.ROUTE_PAGE page="announcement" op="view" path=$announcement->getId()}">
{$announcement->getLocalizedTitle()|escape}
</a>
</h4>
<div class="date">
{$announcement->getDatePosted()}
</div>
</article>
{/if}
{/foreach}
</div><!-- .more -->
</section>
{/if}

{* Additional Homepage Content *}
{if $additionalHomeContent}
<div class="additional_content">
{$additionalHomeContent}
</div>
{/if}
</div><!-- .page -->

{include file="frontend/components/footer.tpl"}

0 comments on commit 85a7757

Please sign in to comment.