1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-17 02:24:05 +02:00

Infrastructure changes: Default Theme - use entity name Entries/Entry instead of entity name Pages/Page

This commit is contained in:
Awilum
2018-12-22 13:49:52 +03:00
parent c5a5484568
commit 1a809b0ad6
5 changed files with 22 additions and 28 deletions

View File

@@ -1,4 +1,4 @@
<?php namespace Flextype; ?>
<?php namespace Flextype ?>
<?php Themes::view('partials/tail')->display() ?>
<div class="powered">
Powered by <a href="http://flextype.org">Flextype</a>

View File

@@ -1,28 +1,26 @@
<?php
namespace Flextype;
use Flextype\Component\{Event\Event, Http\Http, Registry\Registry, Assets\Assets, Text\Text, Html\Html};
?>
<?php namespace Flextype ?>
<?php use Flextype\Component\{Event\Event, Http\Http, Registry\Registry, Assets\Assets, Text\Text, Html\Html} ?>
<!doctype html>
<html lang="<?= Registry::get('settings.locale'); ?>">
<html lang="<?= Registry::get('settings.locale') ?>">
<head>
<meta charset="<?= Text::lowercase(Registry::get('settings.charset')); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="<?= (isset($page['description']) ? Html::toText($page['description']) : Html::toText(Registry::get('settings.description'))); ?>">
<meta name="keywords" content="<?= (isset($page['keywords']) ? $page['keywords'] : Registry::get('settings.keywords')); ?>">
<meta name="robots" content="<?= (isset($page['robots']) ? $page['robots'] : Registry::get('settings.robots')); ?>">
<meta name="generator" content="Powered by Flextype <?= Flextype::VERSION; ?>" />
<meta name="description" content="<?= (isset($entry['description']) ? Html::toText($entry['description']) : Html::toText(Registry::get('settings.description'))) ?>">
<meta name="keywords" content="<?= (isset($entry['keywords']) ? $entry['keywords'] : Registry::get('settings.keywords')) ?>">
<meta name="robots" content="<?= (isset($entry['robots']) ? $entry['robots'] : Registry::get('settings.robots')) ?>">
<meta name="generator" content="Powered by Flextype <?= Flextype::VERSION ?>" />
<?php Event::dispatch('onThemeMeta'); ?>
<title><?= Html::toText($page['title']); ?> | <?= Html::toText(Registry::get('settings.title')); ?></title>
<title><?= Html::toText($entry['title']); ?> | <?= Html::toText(Registry::get('settings.title')); ?></title>
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700' rel='stylesheet' type='text/css'>
<?php Assets::add('css', Http::getBaseUrl() . '/site/themes/' . Registry::get('settings.theme') . '/assets/dist/css/bootstrap.min.css', 'site', 1); ?>
<?php Assets::add('css', Http::getBaseUrl() . '/site/themes/' . Registry::get('settings.theme') . '/assets/dist/css/simple.min.css', 'site', 2); ?>
<?php Assets::add('css', Http::getBaseUrl() . '/site/themes/' . Registry::get('settings.theme') . '/assets/dist/css/bootstrap.min.css', 'site', 1) ?>
<?php Assets::add('css', Http::getBaseUrl() . '/site/themes/' . Registry::get('settings.theme') . '/assets/dist/css/simple.min.css', 'site', 2) ?>
<?php foreach(Assets::get('css', 'site') as $assets_by_priorities): ?>
<?php foreach($assets_by_priorities as $assets): ?>
<link href="<?= $assets['asset']; ?>" rel="stylesheet">
<link href="<?= $assets['asset'] ?>" rel="stylesheet">
<?php endforeach ?>
<?php endforeach ?>

View File

@@ -1,17 +1,15 @@
<?php
namespace Flextype;
use Flextype\Component\{Http\Http, Registry\Registry};
?>
<?php namespace Flextype ?>
<?php use Flextype\Component\{Http\Http, Registry\Registry} ?>
<nav class="navbar navbar-expand-lg navbar-light bg-white border-bottom box-shadow">
<div class="container">
<a class="navbar-brand" href="<?= Http::getBaseUrl(); ?>"><?= Registry::get('settings.title'); ?></a>
<a class="navbar-brand" href="<?= Http::getBaseUrl() ?>"><?= Registry::get('settings.title') ?></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link <?php if(Http::getUriSegment(0) == 'home' || Http::getUriSegment(0) == ''): ?>active<?php endif ?>" href="<?= Http::getBaseUrl(); ?>">Home</a>
<a class="nav-link <?php if(Http::getUriSegment(0) == 'home' || Http::getUriSegment(0) == ''): ?>active<?php endif ?>" href="<?= Http::getBaseUrl() ?>">Home</a>
</li>
</ul>
</div>

View File

@@ -1,11 +1,9 @@
<?php
namespace Flextype;
use Flextype\Component\{Event\Event, Http\Http, Registry\Registry, Assets\Assets};
?>
<?php Assets::add('js', Http::getBaseUrl() . '/site/themes/' . Registry::get('settings.theme') . '/assets/dist/js/simple.min.js', 'site', 1); ?>
<?php namespace Flextype ?>
<?php use Flextype\Component\{Event\Event, Http\Http, Registry\Registry, Assets\Assets} ?>
<?php Assets::add('js', Http::getBaseUrl() . '/site/themes/' . Registry::get('settings.theme') . '/assets/dist/js/simple.min.js', 'site', 1) ?>
<?php foreach(Assets::get('js', 'site') as $assets_by_priorities): ?>
<?php foreach($assets_by_priorities as $assets): ?>
<script src="<?= $assets['asset']; ?>"></script>
<script src="<?= $assets['asset'] ?>"></script>
<?php endforeach ?>
<?php endforeach ?>
<?php Event::dispatch('onThemeFooter'); ?>

View File

@@ -1,4 +1,4 @@
<?php namespace Flextype; ?>
<?php namespace Flextype ?>
<?php Themes::view('partials/head')->display() ?>
<?= $page['content'] ?>
<?= $entry['content'] ?>
<?php Themes::view('partials/footer')->display() ?>