bludit/bl-kernel/admin/themes/default/index.php

161 lines
7.4 KiB
PHP
Raw Normal View History

2015-09-13 03:06:20 +02:00
<!DOCTYPE HTML>
2016-05-24 04:32:06 +02:00
<html>
2015-03-27 02:00:01 +01:00
<head>
2015-08-18 04:02:19 +02:00
<meta charset="<?php echo CHARSET ?>">
2015-06-27 00:12:26 +02:00
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2015-09-13 03:06:20 +02:00
<meta name="robots" content="noindex,nofollow">
2015-03-27 02:00:01 +01:00
2015-07-07 00:22:03 +02:00
<title><?php echo $layout['title'] ?></title>
2015-03-27 02:00:01 +01:00
2015-10-19 00:45:58 +02:00
<!-- Favicon -->
2016-05-24 04:32:06 +02:00
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_ADMIN_THEME.'img/favicon.png' ?>">
2015-09-20 23:46:50 +02:00
2015-10-19 00:45:58 +02:00
<!-- CSS -->
2016-05-24 04:32:06 +02:00
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/uikit/uikit.almost-flat.min.css?version='.BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/uikit/upload.almost-flat.min.css?version='.BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/uikit/form-file.almost-flat.min.css?version='.BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/uikit/placeholder.almost-flat.min.css?version='.BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/uikit/progress.almost-flat.min.css?version='.BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/default.css?version='.BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/jquery.datetimepicker.css?version='.BLUDIT_VERSION ?>">
2015-03-27 02:00:01 +01:00
2015-10-19 00:45:58 +02:00
<!-- Javascript -->
2016-05-24 04:32:06 +02:00
<script charset="utf-8" src="<?php echo HTML_PATH_ADMIN_THEME.'js/jquery.min.js?version='.BLUDIT_VERSION ?>"></script>
<script charset="utf-8" src="<?php echo HTML_PATH_ADMIN_THEME.'js/uikit/uikit.min.js?version='.BLUDIT_VERSION ?>"></script>
<script charset="utf-8" src="<?php echo HTML_PATH_ADMIN_THEME.'js/uikit/upload.min.js?version='.BLUDIT_VERSION ?>"></script>
<script charset="utf-8" src="<?php echo HTML_PATH_ADMIN_THEME.'js/jquery.datetimepicker.js?version='.BLUDIT_VERSION ?>"></script>
2015-06-27 00:12:26 +02:00
<!-- Plugins -->
2015-08-07 04:13:55 +02:00
<?php Theme::plugins('adminHead') ?>
2015-03-27 02:00:01 +01:00
</head>
<body>
2015-07-23 03:45:54 +02:00
<!-- Plugins -->
2015-08-07 04:13:55 +02:00
<?php Theme::plugins('adminBodyBegin') ?>
2015-07-23 03:45:54 +02:00
2015-10-22 05:14:22 +02:00
<!-- Alert -->
<script>
$(document).ready(function() {
<?php
if( Alert::defined() ) {
echo '$("#alert").slideDown().delay(3500).slideUp();';
}
?>
$(window).click(function() {
$("#alert").hide();
2015-10-22 05:14:22 +02:00
});
});
</script>
2015-11-07 01:23:50 +01:00
<div id="alert" class="<?php echo (Alert::status()==ALERT_STATUS_OK)?'alert-ok':'alert-fail'; ?>">
2015-10-22 05:14:22 +02:00
<?php Alert::p() ?>
</div>
2015-10-19 00:45:58 +02:00
<!-- Navbar -->
2016-02-14 01:15:19 +01:00
<nav class="uk-navbar bludit-navbar">
2015-10-19 00:45:58 +02:00
<!-- Navbar for Desktop -->
<div class="uk-container uk-container-center uk-hidden-small">
<ul class="uk-navbar-nav">
<li class="bludit-logo">BLUDIT</li>
<li <?php echo ($layout['view']=='dashboard')?'class="uk-active"':'' ?> ><a href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><?php $L->p('Dashboard') ?></a></li>
<li <?php echo ($layout['view']=='new-post')?'class="uk-active"':'' ?>><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-post' ?>"><?php $L->p('New post') ?></a></li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-page' ?>"><?php $L->p('New page') ?></a></li>
<li class="uk-parent" data-uk-dropdown>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-posts' ?>"><?php $L->p('Manage') ?> ▾</a>
<div class="uk-dropdown uk-dropdown-navbar">
<ul class="uk-nav uk-nav-navbar">
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-posts' ?>"><i class="uk-icon-folder-o"></i> <?php $L->p('Posts') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-pages' ?>"><i class="uk-icon-folder-o"></i> <?php $L->p('Pages') ?></a></li>
<?php if($Login->role() == 'admin') { ?>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>"><i class="uk-icon-users"></i> <?php $L->p('Users') ?></a></li>
<?php } ?>
</ul>
</div>
</li>
<?php if($Login->role() == 'admin') { ?>
<li class="uk-parent" data-uk-dropdown>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-general' ?>"><?php $L->p('Settings') ?> ▾</a>
<div class="uk-dropdown uk-dropdown-navbar">
<ul class="uk-nav uk-nav-navbar">
2016-05-10 02:27:05 +02:00
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-general' ?>"><i class="uk-icon-cog"></i> <?php $L->p('General') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-advanced' ?>"><i class="uk-icon-cogs"></i> <?php $L->p('Advanced') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-regional' ?>"><i class="uk-icon-globe"></i> <?php $L->p('Language and timezone') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>"><i class="uk-icon-puzzle-piece"></i> <?php $L->p('Plugins') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'themes' ?>"><i class="uk-icon-paint-brush"></i> <?php $L->p('Themes') ?></a></li>
2016-05-20 05:44:15 +02:00
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'about' ?>"><i class="uk-icon-support"></i> <?php $L->p('About') ?></a></li>
</ul>
</div>
</li>
<?php } ?>
<li><a target="_blank" href="<?php echo HTML_PATH_ROOT ?>"><?php $L->p('Website') ?></a></li>
</ul>
<div class="uk-navbar-flip">
<ul class="uk-navbar-nav">
<li>
<?php
2016-01-02 23:51:12 +01:00
$profilePictureSrc = HTML_PATH_ADMIN_THEME_IMG.'default.png';
if(file_exists(PATH_UPLOADS_PROFILES.$Login->username().'.png')) {
$profilePictureSrc = HTML_PATH_UPLOADS_PROFILES.$Login->username().'.png';
}
?>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$Login->username() ?>">
<img class="uk-border-circle" width="28px" src="<?php echo $profilePictureSrc ?>" alt=""> Welcome <?php echo $Login->username() ?>
</a>
</li>
</ul>
2015-10-19 00:45:58 +02:00
</div>
2015-03-27 02:00:01 +01:00
</div>
<!-- Navbar for Mobile -->
2015-10-19 00:45:58 +02:00
<a href="#offcanvas" class="uk-navbar-toggle uk-visible-small" data-uk-offcanvas></a>
<div class="uk-navbar-brand uk-navbar-center uk-visible-small">BLUDIT</div>
2015-10-19 00:45:58 +02:00
</nav>
<!-- Offcanvas for Mobile -->
2015-10-19 00:45:58 +02:00
<div id="offcanvas" class="uk-offcanvas">
2015-10-24 17:32:26 +02:00
<div class="uk-offcanvas-bar">
<ul class="uk-nav uk-nav-offcanvas">
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><?php $L->p('Dashboard') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-post' ?>"><?php $L->p('New post') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-page' ?>"><?php $L->p('New page') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-posts' ?>"><?php $L->p('Manage posts') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-pages' ?>"><?php $L->p('Manage pages') ?></a></li>
<?php if($Login->role() == 'admin') { ?>
2015-10-24 17:32:26 +02:00
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>"><?php $L->p('Manage users') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-general' ?>"><?php $L->p('General settings') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-advanced' ?>"><?php $L->p('Advanced settings') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-regional' ?>"><?php $L->p('Language and timezone') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>"><?php $L->p('Plugins') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'themes' ?>"><?php $L->p('Themes') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'about' ?>"><?php $L->p('About') ?></a></li>
<?php } ?>
2015-10-24 17:32:26 +02:00
</ul>
</div>
2015-03-27 02:00:01 +01:00
</div>
2015-10-19 00:45:58 +02:00
<!-- View -->
<div class="uk-container uk-container-center bl-view">
2015-05-05 03:00:01 +02:00
<?php
2015-10-19 00:45:58 +02:00
if( Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php') ) {
include(PATH_ADMIN_VIEWS.$layout['view'].'.php');
}
2015-05-05 03:00:01 +02:00
?>
2015-10-19 00:45:58 +02:00
</div>
<!-- Javascript -->
<?php include(PATH_JS.'functions.php') ?>
2015-03-27 02:00:01 +01:00
2015-06-27 00:12:26 +02:00
<!-- Plugins -->
2015-08-07 04:13:55 +02:00
<?php Theme::plugins('adminBodyEnd') ?>
2015-06-27 00:12:26 +02:00
2015-03-27 02:00:01 +01:00
</body>
2016-02-14 01:15:19 +01:00
</html>