Commit e7211794 authored by Simon Mitternacht's avatar Simon Mitternacht
Browse files

Add all necessary files, ready to start working.

parent eba9ecb0
dist/
node_modules/
\ No newline at end of file
<?php
import('lib.pkp.classes.plugins.ThemePlugin');
class BoapFrontPageThemePlugin extends ThemePlugin {
/**
* Load the custom styles for our theme
* @return null
*/
public function init() {
$this->addStyle('stylesheet', 'dist/css/style.css');
}
/**
* Get the display name of this theme
* @return string
*/
function getDisplayName() {
return 'BOAP Front Page Theme';
}
/**
* Get the description of this plugin
* @return string
*/
function getDescription() {
return 'BOAP Front Page Theme Plugin.';
}
}
\ No newline at end of file
# BOAP-OJS-front-theme
Theme for BOAP front page
To build the theme type
~~~~
$ npm install
$ npm run build
~~~~
\ No newline at end of file
'use strict';
const gulp = require('gulp');
const sass = require('gulp-sass');
gulp.task('build', function () {
return gulp.src('./styles/style.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./dist/css'));
});
gulp.task('watch', function () {
gulp.watch('./styles/**/*.scss', ['build']);
});
<?php
require_once('BoapFrontPageThemePlugin.inc.php');
return new BoapFrontPageThemePlugin();
?>
\ No newline at end of file
{
"name": "boap-front",
"version": "1.0.0",
"description": "BOAP Front Page OJS Theme",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "gulp build"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ubbdst/BOAP-OJS-front-theme.git"
},
"author": [ "Simon Mitternacht", "Christina Malitius" ],
"license": "ISC",
"bugs": {
"url": "https://github.com/ubbdst/BOAP-OJS-front-theme/issues"
},
"homepage": "https://github.com/ubbdst/BOAP-OJS-front-theme#readme",
"dependencies": {
"bootstrap": "^4.1.1",
"jquery": "^3.3.1",
"popper.js": "^1.14.3"
},
"devDependencies": {
"gulp-sass": "^4.0.1",
"gulp": "^3.9.1"
}
}
$body-bg: green;
$body-color: white;
@import "node_modules/bootstrap/scss/bootstrap";
{**
* templates/frontend/components/footer.tpl
*
* 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.
*
* @brief Common site frontend footer.
*
* @uses $isFullWidth bool Should this page be displayed without sidebars? This
* represents a page-level override, and doesn't indicate whether or not
* sidebars have been configured for thesite.
*}
</main>
{* Sidebars *}
{if empty($isFullWidth)}
{capture assign="sidebarCode"}{call_hook name="Templates::Common::Sidebar"}{/capture}
{if $sidebarCode}
<aside id="sidebar" class="pkp_structure_sidebar left col-xs-12 col-sm-2 col-md-4" role="complementary" aria-label="{translate|escape key="common.navigation.sidebar"}">
{$sidebarCode}
</aside><!-- pkp_sidebar.left -->
{/if}
{/if}
</div><!-- pkp_structure_content -->
<footer class="footer" role="contentinfo">
<div class="container">
<div class="row">
{if $pageFooter}
<div class="col-md-12">
{$pageFooter}
</div>
{/if}
<!--<div class="col-md-2" role="complementary" aria-label="{translate|escape key="about.aboutThisPublishingSystem"}">
<a href="{url page="about" op="aboutThisPublishingSystem"}">
<img alt="{translate key=$packageKey}" src="{$baseUrl}/{$brandImage}" width="70px">
</a>-->
<!--<a href="{$pkpLink}">
<img alt="{translate key="common.publicKnowledgeProject"}" src="{$baseUrl}/lib/pkp/templates/images/pkp_brand.png">
</a>
</div>-->
</div> <!-- .row -->
</div><!-- .container -->
</footer>
<div class="footer-extra"> <!-- line on bottom of page for collaboration content and contact -->
<p>Thin red line</p>
</div>
</div><!-- pkp_structure_page -->
{load_script context="frontend" scripts=$scripts}
{call_hook name="Templates::Common::Footer::PageFooter"}
</body>
</html>
{**
* lib/pkp/templates/frontend/components/header.tpl
*
* 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.
*
* @brief Common frontend site header.
*
* @uses $isFullWidth bool Should this page be displayed without sidebars? This
* represents a page-level override, and doesn't indicate whether or not
* sidebars have been configured for thesite.
*}
{* Determine whether a logo or title string is being displayed *}
{assign var="showingLogo" value=true}
{if $displayPageHeaderTitle && !$displayPageHeaderLogo && is_string($displayPageHeaderTitle)}
{assign var="showingLogo" value=false}
{/if}
<!DOCTYPE html>
<html lang="{$currentLocale|replace:"_":"-"}" xml:lang="{$currentLocale|replace:"_":"-"}">
{if !$pageTitleTranslated}{capture assign="pageTitleTranslated"}{translate key=$pageTitle}{/capture}{/if}
{include file="core:frontend/components/headerHead.tpl"}
<body class="pkp_page_{$requestedPage|escape|default:"index"} pkp_op_{$requestedOp|escape|default:"index"}{if $showingLogo} has_site_logo{/if} container">
<div class="pkp_structure_page">
<nav id="accessibility-nav" class="sr-only navbar" role="navigation" aria-labelled-by="accessible-menu-label">
<div id="accessible-menu-label">
{translate|escape key="plugins.themes.bootstrap3.accessible_menu.label"}
</div>
<ul>
<li><a href="#main-navigation">{translate|escape key="plugins.themes.bootstrap3.accessible_menu.main_navigation"}</a></li>
<li><a href="#main-content">{translate|escape key="plugins.themes.bootstrap3.accessible_menu.main_content"}</a></li>
<li><a href="#sidebar">{translate|escape key="plugins.themes.bootstrap3.accessible_menu.sidebar"}</a></li>
</ul>
{* User profile, login, etc, navigation menu*}
<div class="container-fluid">
<div class="row navTop">
<ul id="navigationUser" class="nav nav-pills tab-list pull-right" role="navigation" aria-label="{translate|escape key="common.navigation.user"}">
{if $isUserLoggedIn}
<li>
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" href="{url router=$smarty.const.ROUTE_PAGE page="submissions"}">
{$loggedInUsername|escape}
<span class="badge">
{$unreadNotificationCount}
</span>
</a>
<ul class="dropdown-menu dropdown-menu-right">
{if array_intersect(array(ROLE_ID_MANAGER, ROLE_ID_ASSISTANT, ROLE_ID_REVIEWER, ROLE_ID_AUTHOR), $userRoles)}
<li>
<a href="{url router=$smarty.const.ROUTE_PAGE page="submissions"}">
{translate key="navigation.dashboard"}
<span class="badge">
{$unreadNotificationCount}
</span>
</a>
</li>
{/if}
<li>
<a href="{url router=$smarty.const.ROUTE_PAGE page="user" op="profile"}">
{translate key="common.viewProfile"}
</a>
</li>
{if array_intersect(array(ROLE_ID_SITE_ADMIN), $userRoles)}
<li>
<a href="{if $multipleContexts}{url router=$smarty.const.ROUTE_PAGE context="index" page="admin" op="index"}{else}{url router=$smarty.const.ROUTE_PAGE page="admin" op="index"}{/if}">
{translate key="navigation.admin"}
</a>
</li>
{/if}
<li>
<a href="{url router=$smarty.const.ROUTE_PAGE page="login" op="signOut"}">
{translate key="user.logOut"}
</a>
</li>
{if $isUserLoggedInAs}
<li>
<a href="{url router=$smarty.const.ROUTE_PAGE page="login" op="signOutAsUser"}">
{translate key="user.logOutAs"} {$loggedInUsername|escape}
</a>
</li>
{/if}
</ul>
</li>
{else}
{if !$hideRegisterLink}
<li><a href="{url router=$smarty.const.ROUTE_PAGE page="user" op="register"}">{translate key="navigation.register"}</a></li>
{/if}
<li><a href="{url router=$smarty.const.ROUTE_PAGE page="login"}">{translate key="navigation.login"}</a></li>
{/if}
</ul>
</div><!-- .row -->
</div><!-- .container-fluid -->
<div class="container-fluid top-menu">
<div class="navbar-header">
{* Mobile hamburger menu *}
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#nav-menu" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{* Logo or site title. Only use <h1> heading on the homepage.
Otherwise that should go to the page title. *}
{if $requestedOp == 'index'}
<h1 class="site-name navbar-brand">
{else}
<div class="site-name navbar-brand">
{/if}
{capture assign="homeUrl"}
{if $currentJournal && $multipleContexts}
{url page="index" router=$smarty.const.ROUTE_PAGE}
{else}
{url context="index" router=$smarty.const.ROUTE_PAGE}
{/if}
{/capture}
{if $displayPageHeaderLogo && is_array($displayPageHeaderLogo)}
<a href="{$homeUrl}" class="navbar-brand navbar-brand-logo">
<img src="{$publicFilesDir}/{$displayPageHeaderLogo.uploadName|escape:"url"}" {if $displayPageHeaderLogo.altText != ''}alt="{$displayPageHeaderLogo.altText|escape}"{else}alt="{translate key="common.pageHeaderLogo.altText"}"{/if}>
</a>
{elseif $displayPageHeaderTitle && !$displayPageHeaderLogo && is_string($displayPageHeaderTitle)}
<a href="{$homeUrl}" class="navbar-brand">{$displayPageHeaderTitle}</a>
{elseif $displayPageHeaderTitle && !$displayPageHeaderLogo && is_array($displayPageHeaderTitle)}
<a href="{$homeUrl}" class="navbar-brand navbar-brand-logo">
<img src="{$publicFilesDir}/{$displayPageHeaderTitle.uploadName|escape:"url"}" alt="{$displayPageHeaderTitle.altText|escape}">
</a>
{else}
<a href="{$homeUrl}" class="navbar-brand">
<img src="{$baseUrl}/templates/images/structure/logo.png" alt="{$applicationName|escape}" title="{$applicationName|escape}" />
</a>
{/if}
{if $requestedOp == 'index'}
</h1>
{else}
</div>
{/if}
</div>
{* Primary site navigation *}
{capture assign="primaryMenu"}
{load_menu name="primary" id="main-navigation" ulClass="nav navbar-nav"}
{/capture}
{if !empty(trim($primaryMenu)) || !$noContextsConfigured}
<nav id="nav-menu" class="navbar-collapse collapse" aria-label="{translate|escape key="common.navigation.site"}">
{* Primary navigation menu for current application *}
{$primaryMenu}
{* Search form *}
{if !$noContextsConfigured}
<div class="pull-md-right">
{include file="frontend/components/searchForm_simple.tpl"}
</div>
{/if}
</nav>
{/if}
</div><!-- .pkp_head_wrapper -->
</nav><!-- .pkp_structure_head -->
{* Wrapper for page content and sidebars *}
<div class="pkp_structure_content container">
<main class="pkp_structure_main col-xs-12 col-sm-10 col-md-8" role="main">
{**
* templates/frontend/pages/indexSite.tpl
*
* Copyright (c) 2014-2018 Simon Fraser University
* Copyright (c) 2003-2018 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Site index.
*
*}
{include file="frontend/components/header.tpl"}
<div class="page_index_site">
{if $about}
<div class="about_site">
{$about|nl2br}
</div>
{/if}
<div class="journals">
<h2>
{translate key="journal.journals"}
</h2>
{if !count($journals)}
{translate key="site.noJournals"}
{else}
<ul>
{iterate from=journals item=journal}
{capture assign="url"}{url journal=$journal->getPath()}{/capture}
{assign var="thumb" value=$journal->getLocalizedSetting('journalThumbnail')}
{assign var="description" value=$journal->getLocalizedDescription()}
<li{if $thumb} class="has_thumb"{/if}>
{if $thumb}
{assign var="altText" value=$journal->getLocalizedSetting('journalThumbnailAltText')}
<div class="thumb">
<a href="{$url|escape}">
<img src="{$journalFilesPath}{$journal->getId()}/{$thumb.uploadName|escape:"url"}"{if $altText} alt="{$altText|escape}"{/if}>
</a>
</div>
{/if}
<div class="body">
<h3>
<a href="{$url|escape}" rel="bookmark">
{$journal->getLocalizedName()}
</a>
</h3>
{if $description}
<div class="description">
{$description|nl2br}
</div>
{/if}
<ul class="links">
<li class="view">
<a href="{$url|escape}">
{translate key="site.journalView"}
</a>
</li>
<li class="current">
<a href="{url|escape journal=$journal->getPath() page="issue" op="current"}">
{translate key="site.journalCurrent"}
</a>
</li>
</ul>
</div>
</li>
{/iterate}
</ul>
{if $journals->getPageCount() > 0}
<div class="cmp_pagination">
{page_info iterator=$journals}
{page_links anchor="journals" name="journals" iterator=$journals}
</div>
{/if}
{/if}
</div>
</div><!-- .page -->
{include file="frontend/components/footer.tpl"}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment