Merge pull request #779 from Albirew/patch-1

Front page graphical update
This commit is contained in:
H. Lehmann 2019-04-24 17:59:19 +02:00 committed by GitHub
commit 4b136d8329
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 279 additions and 12 deletions

View file

@ -0,0 +1,39 @@
<?php
#################################################################
# Copyright notice
#
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# The GNU General Public License can be found at
# http://www.gnu.org/copyleft/gpl.html.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# This copyright notice MUST APPEAR in all copies of the script!
#################################################################
namespace Baikal\Controller;
class Main extends \Flake\Core\Controller {
function execute() {
}
function render() {
$oView = new \Baikal\View\Main();
return $oView->render();
}
}

View file

@ -0,0 +1,39 @@
<?php
#################################################################
# Copyright notice
#
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# The GNU General Public License can be found at
# http://www.gnu.org/copyleft/gpl.html.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# This copyright notice MUST APPEAR in all copies of the script!
#################################################################
namespace Baikal\Controller\Navigation\Topbar;
class Anonymous extends \Flake\Core\Controller {
function execute() {
}
function render() {
$oView = new \Baikal\View\Navigation\Topbar\Anonymous();
return $oView->render();
}
}

View file

@ -0,0 +1,36 @@
<?php
#################################################################
# Copyright notice
#
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# The GNU General Public License can be found at
# http://www.gnu.org/copyleft/gpl.html.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# This copyright notice MUST APPEAR in all copies of the script!
#################################################################
namespace Baikal\Core;
class View extends \Flake\Core\View {
function templatesPath() {
$sViewName = get_class($this);
$sTemplate = str_replace("\\", "/", substr($sViewName, strlen("Baikal\\View\\"))) . ".html";
return PROJECT_PATH_ROOT . "Core/Resources/Web/Baikal/Templates/" . $sTemplate;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

View file

@ -0,0 +1,14 @@
{% autoescape false %}
<header class="jumbotron subhead" id="overview" style="padding-bottom:7em;">
<h1><img style="height:150px; float:left;" src="res/core/Baikal/Images/logo-baikal.png" /> Baïkal
<p class="lead">Lightweight CalDAV+CardDAV server.</p></h1>
</header>
{{ message }}
<section id="about">
<div class="page-header">
<h1>Baïkal is running alright.</h1>
</div>
</section>
{% endautoescape %}

View file

@ -0,0 +1,20 @@
{% autoescape false %}
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="{{ homelink }}"><img style="vertical-align: text-top; line-height: 20px;" src="res/core/BaikalAdmin/Templates/Page/baikal-text-20.png" /> Server</a>
<div class="nav-collapse">
<ul class="nav">
<li> <a href="admin/"><i class="icon-eject icon-white" style="transform: rotate(90deg)"></i> Login</a></li>
<li> <a target="_blank" rel="noopener noreferrer" href="http://sabre.io/baikal/"><i class="icon-heart icon-white"></i> Get your own</a></li>
</ul>
</div>
</div>
</div>
</div>
{% endautoescape %}

View file

@ -0,0 +1,53 @@
{% autoescape false %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>{{ pagetitle }}</title>
<base href="{{ baseurl }}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Le styles -->
<link href="res/core/TwitterBootstrap/css/bootstrap.css" rel="stylesheet" />
<link href="res/core/BaikalAdmin/GlyphiconsPro/glyphpro.css" rel="stylesheet" />
<link href="res/core/BaikalAdmin/GlyphiconsPro/glyphpro-2x.css" rel="stylesheet" />
<link href="res/core/BaikalAdmin/Templates/Page/style.css" rel="stylesheet" />
<link href="res/core/TwitterBootstrap/css/bootstrap-responsive.css" rel="stylesheet" />
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="res/core/BaikalAdmin/html5.js"></script>
<![endif]-->
{{ head }}
</head>
<body>
{{ navbar }}
<div class="container">
{{ Payload }}
</div> <!-- /container -->
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="res/core/TwitterBootstrap/js/jquery-3.1.0.min.js"></script>
<script src="res/core/TwitterBootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript">
$("[rel=tooltip]").tooltip();
$(".popover-hover").popover();
$(".popover-focus").popover({
trigger: 'focus'
});
$(".popover-focus-top").popover({
trigger: 'focus',
placement: 'top'
});
$(".popover-focus-bottom").popover({
trigger: 'focus',
placement: 'bottom'
});
</script>
{{ javascript }}
</body>
</html>
{% endautoescape %}

View file

@ -0,0 +1,32 @@
<?php
#################################################################
# Copyright notice
#
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# The GNU General Public License can be found at
# http://www.gnu.org/copyleft/gpl.html.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# This copyright notice MUST APPEAR in all copies of the script!
#################################################################
namespace Baikal\View;
class Main extends \Baikal\Core\View {
}

View file

@ -0,0 +1,32 @@
<?php
#################################################################
# Copyright notice
#
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# The GNU General Public License can be found at
# http://www.gnu.org/copyleft/gpl.html.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# This copyright notice MUST APPEAR in all copies of the script!
#################################################################
namespace Baikal\View\Navigation\Topbar;
class Anonymous extends \Baikal\Core\View {
}

View file

@ -49,16 +49,17 @@ require PROJECT_PATH_ROOT . 'vendor/autoload.php';
\Flake\Framework::bootstrap();
# Bootstrapping Baïkal
\Baikal\Framework::bootstrap();
\BaikalAdmin\Framework::bootstrap();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Baïkal Server</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
</head>
<body>
<h2>Baïkal is running alright.</h2>
</body>
</html>
# Create and setup a page object
$oPage = new \Flake\Controller\Page(PROJECT_PATH_ROOT . "Core/Resources/Web/Baikal/Templates/Page/index.html");
$oPage->injectHTTPHeaders();
$oPage->setTitle("Baïkal server");
$oPage->setBaseUrl(PROJECT_URI);
# Draw page
$oPage->zone("navbar")->addBlock(new \Baikal\Controller\Navigation\Topbar\Anonymous());
$oPage->zone("Payload")->addBlock(new \Baikal\Controller\Main());
# Render the page
echo $oPage->render();

1
Core/Resources/Web/Baikal Symbolic link
View file

@ -0,0 +1 @@
../../Frameworks/Baikal/Resources