Dedicated layout partial for custom styles

This commit is contained in:
Sam Georges 2014-10-13 18:08:59 +11:00
parent 79fd2e2afe
commit 640dc04cf5
5 changed files with 28 additions and 19 deletions

View File

@ -0,0 +1,19 @@
<?php
use Backend\Models\BackendSettings;
?>
<?php if (BackendSettings::isConfigured()): ?>
<?php
$logo = Backend\Models\BackendSettings::getLogo();
?>
<style>
.oc-bg-logo {
background-image: linear-gradient(to bottom, rgba(249,249,249,0.7) 0%,rgba(249,249,249,0.7) 100%), url(<?= \Backend\Models\BackendSettings::getLogo() ?>);
}
.oc-logo-white {
background-image: url(<?= $logo ?>);
height: 170px !important;
}
</style>
<?php endif ?>

View File

@ -80,4 +80,5 @@
// -->
</script>
<?= $this->makeAssets() ?>
<?= Block::placeholder('head') ?>
<?= Block::placeholder('head') ?>
<?= $this->makeLayoutPartial('custom_styles') ?>

View File

@ -12,7 +12,7 @@
<script src="<?= URL::to('modules/backend/assets/js/vendor/modernizr.min.js') ?>"></script>
<script src="<?= URL::to('modules/backend/assets/js/october.flashmessage.js') ?>"></script>
<script src="<?= URL::to('modules/backend/assets/js/auth/auth.js') ?>"></script>
<script>
<!--
backendBasePath = '<?= Backend::baseUrl() ?>';
@ -20,10 +20,12 @@
</script>
<?= $this->makeAssets() ?>
<?= Block::placeholder('head') ?>
<?= $this->makeLayoutPartial('custom_styles') ?>
</head>
<body class="outer <?= $this->bodyClass ?>">
<div id="layout-canvas">
<div class="layout">
<div class="layout-row min-size layout-head">
<div class="layout-cell">
<h1 class="oc-logo-white"><?= e(trans('system::lang.app.name')) ?></h1>
@ -41,15 +43,6 @@
</div>
</div><!-- /layout-canvas -->
<?php if ($logo = \Backend\Models\BackendSettings::getLogo()): ?>
<style>
.oc-logo-white {
background-image: url(<?= $logo ?>);
height: 170px !important;
}
</style>
<?php endif ?>
</body>
</html>

View File

@ -47,13 +47,5 @@
</div>
</div>
<?php if ($logo = \Backend\Models\BackendSettings::getLogo()): ?>
<style>
.oc-bg-logo {
background-image: linear-gradient(to bottom, rgba(249,249,249,0.7) 0%,rgba(249,249,249,0.7) 100%), url(<?= \Backend\Models\BackendSettings::getLogo() ?>);
}
</style>
<?php endif ?>
</body>
</html>

View File

@ -35,7 +35,11 @@ class BackendSettings extends Model
{
$this->app_name = Lang::get('system::lang.app.name');
$this->app_motto = Lang::get('system::lang.app.motto');
// Carrot
$this->primary_color = '#e67e22';
// Midnight Blue
$this->secondary_color = '#2b3e50';
}