From bc23d8f96e5b691988f2b4f5c5bdc89ff9c923d8 Mon Sep 17 00:00:00 2001 From: Albirew Date: Fri, 19 Apr 2019 19:19:02 +0200 Subject: [PATCH 01/11] Front page graphical update Changed index page to make it more like admin page. --- Core/Frameworks/Baikal/Controller/Main.php | 40 +++++++++++++ .../Navigation/Topbar/Anonymous.php | 39 +++++++++++++ .../Baikal/Resources/Images/logo-baikal.png | Bin 0 -> 10115 bytes .../Baikal/Resources/Templates/Main.html | 14 +++++ .../Navigation/Topbar/Anonymous.html | 20 +++++++ .../Resources/Templates/Page/index.html | 53 ++++++++++++++++++ Core/Frameworks/Baikal/View/Main.php | 32 +++++++++++ .../View/Navigation/Topbar/Anonymous.php | 32 +++++++++++ Core/Resources/Web/Baikal | 1 + 9 files changed, 231 insertions(+) create mode 100644 Core/Frameworks/Baikal/Controller/Main.php create mode 100644 Core/Frameworks/Baikal/Controller/Navigation/Topbar/Anonymous.php create mode 100644 Core/Frameworks/Baikal/Resources/Images/logo-baikal.png create mode 100644 Core/Frameworks/Baikal/Resources/Templates/Main.html create mode 100644 Core/Frameworks/Baikal/Resources/Templates/Navigation/Topbar/Anonymous.html create mode 100644 Core/Frameworks/Baikal/Resources/Templates/Page/index.html create mode 100644 Core/Frameworks/Baikal/View/Main.php create mode 100644 Core/Frameworks/Baikal/View/Navigation/Topbar/Anonymous.php create mode 100644 Core/Resources/Web/Baikal diff --git a/Core/Frameworks/Baikal/Controller/Main.php b/Core/Frameworks/Baikal/Controller/Main.php new file mode 100644 index 0000000..abcc694 --- /dev/null +++ b/Core/Frameworks/Baikal/Controller/Main.php @@ -0,0 +1,40 @@ + +# 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\Controller; + +class Main extends \Flake\Core\Controller { + + function execute() { + } + + function render() { + $oView = new \Baikal\View\Main(); + return $oView->render(); + } +} + diff --git a/Core/Frameworks/Baikal/Controller/Navigation/Topbar/Anonymous.php b/Core/Frameworks/Baikal/Controller/Navigation/Topbar/Anonymous.php new file mode 100644 index 0000000..6bc45ca --- /dev/null +++ b/Core/Frameworks/Baikal/Controller/Navigation/Topbar/Anonymous.php @@ -0,0 +1,39 @@ + +# 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\Controller\Navigation\Topbar; + +class Anonymous extends \Flake\Core\Controller { + + function execute() { + } + + function render() { + $oView = new \Baikal\View\Navigation\Topbar\Anonymous(); + return $oView->render(); + } +} diff --git a/Core/Frameworks/Baikal/Resources/Images/logo-baikal.png b/Core/Frameworks/Baikal/Resources/Images/logo-baikal.png new file mode 100644 index 0000000000000000000000000000000000000000..1a623ea3ed8408457235fbf8198d48c05e1d99d4 GIT binary patch literal 10115 zcmZ`lg79tp zzVFX(*S71~dCs}-`<&;zXYaLZaXMO03Gp7|0RR9(RTV`&004s<^}@kGT0-Lfy#N5v zf^{?ul#m~dM=q_erS{46p0A}P)s31$=rA9Arkg8f`v3c2WcgdNSn_nJp2f=eKnjonUC+E-9) zo&?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c7Mb^6g+x_hB2Zk}iPo#QcjcBU7SVB*O+XQ04YMr%a_(a#RojAiCuJ6k>y47>M8$ zL9c&Y_IL;1p$t$xW(c!nYl3|hS8f$kX|L}Z%Ej;dbriV+R6cy=Mk!<#3DiA5j&jhA zc%t%jSd5y2LJ?>~LOum~M!s9$>S)r(!Ihm3lT!w3V_I9r*{X9)n~pY3%(EK)(H%&c z-sAvyi_>E=a#S{L<&jkaFrR(L>7&iB0YvWEN6EC`fdO*As?XR(e5`_6(wAgSKUvod z+z=HFvg!MC6Mb)?2z8pL?+Z81J7ecJKqn3>?=YJiaD%$W)H9MRDJLeWDE_Apf*$d%#7Mn*R$22NE%;|Ow{2kH z_#<@$`a6xdDzI{pg4A65-{!85I?nxd!`e|#3p9CNl3B)II|T|hciD7_{~DOL)!XDO zw3xI4724jh*3_K8o?E22=wezVz8TiNDSEue87Q*PYlADcf*|Lq$M64PocGJX&0b3?Y<>SBE7O}$bGs84J(J-4}Q-~xsMcMgLT>0R{k62AN7 zWD))yEc=cF;Pb4A|2E{nQAL^ZJ9ZN9FJJdNM&9s&s!WSFw{PWCS88uZlIgaU2?lhi zM2;GB3n^8y8AAtBH>XxqX%G#0FT{6I$*v=L}RQMPC|}tZT3w z)cTDM>zWW-ca8lURgP^P9AL$#Fi}Xv7dq@DyqAzy_2T^vTC7VNCD5+4I_-qO+I`;Rot)mZ=UAE;1H Y7|f~#rY{#BGo!pzm9!LV<*md22RZYLe*gdg literal 0 HcmV?d00001 diff --git a/Core/Frameworks/Baikal/Resources/Templates/Main.html b/Core/Frameworks/Baikal/Resources/Templates/Main.html new file mode 100644 index 0000000..5dff464 --- /dev/null +++ b/Core/Frameworks/Baikal/Resources/Templates/Main.html @@ -0,0 +1,14 @@ +{% autoescape false %} +
+

Baïkal +

Lightweight CalDAV+CardDAV server.

+
+ +{{ message }} + +
+ +
+{% endautoescape %} \ No newline at end of file diff --git a/Core/Frameworks/Baikal/Resources/Templates/Navigation/Topbar/Anonymous.html b/Core/Frameworks/Baikal/Resources/Templates/Navigation/Topbar/Anonymous.html new file mode 100644 index 0000000..8717b26 --- /dev/null +++ b/Core/Frameworks/Baikal/Resources/Templates/Navigation/Topbar/Anonymous.html @@ -0,0 +1,20 @@ +{% autoescape false %} + +{% endautoescape %} diff --git a/Core/Frameworks/Baikal/Resources/Templates/Page/index.html b/Core/Frameworks/Baikal/Resources/Templates/Page/index.html new file mode 100644 index 0000000..c85f01c --- /dev/null +++ b/Core/Frameworks/Baikal/Resources/Templates/Page/index.html @@ -0,0 +1,53 @@ +{% autoescape false %} + + + + + {{ pagetitle }} + + + + + + + + + + + + + {{ head }} + + + {{ navbar }} + +
+ {{ Payload }} +
+ + + + + + + {{ javascript }} + + +{% endautoescape %} diff --git a/Core/Frameworks/Baikal/View/Main.php b/Core/Frameworks/Baikal/View/Main.php new file mode 100644 index 0000000..6bd4fdf --- /dev/null +++ b/Core/Frameworks/Baikal/View/Main.php @@ -0,0 +1,32 @@ + +# 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 { + +} diff --git a/Core/Frameworks/Baikal/View/Navigation/Topbar/Anonymous.php b/Core/Frameworks/Baikal/View/Navigation/Topbar/Anonymous.php new file mode 100644 index 0000000..48afed6 --- /dev/null +++ b/Core/Frameworks/Baikal/View/Navigation/Topbar/Anonymous.php @@ -0,0 +1,32 @@ + +# 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 { + +} diff --git a/Core/Resources/Web/Baikal b/Core/Resources/Web/Baikal new file mode 100644 index 0000000..9f5895a --- /dev/null +++ b/Core/Resources/Web/Baikal @@ -0,0 +1 @@ +../../Frameworks/Baikal/Resources \ No newline at end of file From 6feba12e8aceaa516311a75e303a780c87cff85e Mon Sep 17 00:00:00 2001 From: Albirew Date: Fri, 19 Apr 2019 19:21:15 +0200 Subject: [PATCH 02/11] removed file not converted to simlink --- Core/Resources/Web/Baikal | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Core/Resources/Web/Baikal diff --git a/Core/Resources/Web/Baikal b/Core/Resources/Web/Baikal deleted file mode 100644 index 9f5895a..0000000 --- a/Core/Resources/Web/Baikal +++ /dev/null @@ -1 +0,0 @@ -../../Frameworks/Baikal/Resources \ No newline at end of file From a62f92147b052529aaddf51398f0136f20d53ef9 Mon Sep 17 00:00:00 2001 From: Albirew Date: Fri, 19 Apr 2019 19:31:15 +0200 Subject: [PATCH 03/11] fixed simlink --- Core/Resources/Web/Baikal | 1 + 1 file changed, 1 insertion(+) create mode 120000 Core/Resources/Web/Baikal diff --git a/Core/Resources/Web/Baikal b/Core/Resources/Web/Baikal new file mode 120000 index 0000000..9f5895a --- /dev/null +++ b/Core/Resources/Web/Baikal @@ -0,0 +1 @@ +../../Frameworks/Baikal/Resources \ No newline at end of file From c5ef60c747305d7be33a48db9b6a5abbfe04b50a Mon Sep 17 00:00:00 2001 From: Albirew Date: Fri, 19 Apr 2019 19:44:27 +0200 Subject: [PATCH 04/11] added forgotten views --- Core/Frameworks/Baikal/Core/View.php | 36 ++++++++++++++++++++++++ Core/Frameworks/Baikal/WWWRoot/index.php | 26 +++++++++-------- 2 files changed, 50 insertions(+), 12 deletions(-) create mode 100644 Core/Frameworks/Baikal/Core/View.php diff --git a/Core/Frameworks/Baikal/Core/View.php b/Core/Frameworks/Baikal/Core/View.php new file mode 100644 index 0000000..f48e9fa --- /dev/null +++ b/Core/Frameworks/Baikal/Core/View.php @@ -0,0 +1,36 @@ + +# 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; + } +} diff --git a/Core/Frameworks/Baikal/WWWRoot/index.php b/Core/Frameworks/Baikal/WWWRoot/index.php index 7f8b36e..b00a2ba 100644 --- a/Core/Frameworks/Baikal/WWWRoot/index.php +++ b/Core/Frameworks/Baikal/WWWRoot/index.php @@ -49,16 +49,18 @@ require PROJECT_PATH_ROOT . 'vendor/autoload.php'; \Flake\Framework::bootstrap(); # Bootstrapping Baïkal -\Baikal\Framework::bootstrap(); +//\Baikal\Framework::bootstrap(); +\BaikalAdmin\Framework::bootstrap(); -?> - - - Baïkal Server - - - -

Baïkal is running alright.

- - +# 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(); From da9f981ae99e258922fe07f1483ba99902c54e7d Mon Sep 17 00:00:00 2001 From: Albirew Date: Tue, 23 Apr 2019 13:32:09 +0200 Subject: [PATCH 05/11] PR review: fixed line break --- Core/Frameworks/Baikal/Resources/Templates/Main.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Frameworks/Baikal/Resources/Templates/Main.html b/Core/Frameworks/Baikal/Resources/Templates/Main.html index 5dff464..7c71394 100644 --- a/Core/Frameworks/Baikal/Resources/Templates/Main.html +++ b/Core/Frameworks/Baikal/Resources/Templates/Main.html @@ -1,5 +1,5 @@ {% autoescape false %} -
+

Baïkal

Lightweight CalDAV+CardDAV server.

From bc84ed7d86b18c84ce83869a27ed6c9876cdbcff Mon Sep 17 00:00:00 2001 From: Albirew Date: Tue, 23 Apr 2019 13:34:50 +0200 Subject: [PATCH 06/11] PR review: fixed URL in comment --- Core/Frameworks/Baikal/Controller/Main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Frameworks/Baikal/Controller/Main.php b/Core/Frameworks/Baikal/Controller/Main.php index abcc694..500ead8 100644 --- a/Core/Frameworks/Baikal/Controller/Main.php +++ b/Core/Frameworks/Baikal/Controller/Main.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # All rights reserved # -# http://baikal-server.com +# 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 From 9dac98d6d4c42e3c1ab9c15ab2e93ab1e0bc87be Mon Sep 17 00:00:00 2001 From: Albirew Date: Tue, 23 Apr 2019 13:35:50 +0200 Subject: [PATCH 07/11] PR review: added line break --- Core/Frameworks/Baikal/Resources/Templates/Main.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Frameworks/Baikal/Resources/Templates/Main.html b/Core/Frameworks/Baikal/Resources/Templates/Main.html index 7c71394..1f2ed22 100644 --- a/Core/Frameworks/Baikal/Resources/Templates/Main.html +++ b/Core/Frameworks/Baikal/Resources/Templates/Main.html @@ -11,4 +11,4 @@

Baïkal is running alright.

-{% endautoescape %} \ No newline at end of file +{% endautoescape %} From 0934fab4f0fdb70fe541f47655ffd6b6d45036cc Mon Sep 17 00:00:00 2001 From: Albirew Date: Tue, 23 Apr 2019 13:47:31 +0200 Subject: [PATCH 08/11] PR review: rotated login icon --- .../Baikal/Resources/Templates/Navigation/Topbar/Anonymous.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Frameworks/Baikal/Resources/Templates/Navigation/Topbar/Anonymous.html b/Core/Frameworks/Baikal/Resources/Templates/Navigation/Topbar/Anonymous.html index 8717b26..c6bb24b 100644 --- a/Core/Frameworks/Baikal/Resources/Templates/Navigation/Topbar/Anonymous.html +++ b/Core/Frameworks/Baikal/Resources/Templates/Navigation/Topbar/Anonymous.html @@ -10,7 +10,7 @@ Server From 0913b887458cff0fb9a6cecf4fa6129bcd6101ab Mon Sep 17 00:00:00 2001 From: Albirew Date: Tue, 23 Apr 2019 13:51:53 +0200 Subject: [PATCH 09/11] PR review: open "get your own" in new tab also added basic security, see https://medium.com/@jitbit/target-blank-the-most-underestimated-vulnerability-ever-96e328301f4c --- .../Baikal/Resources/Templates/Navigation/Topbar/Anonymous.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Frameworks/Baikal/Resources/Templates/Navigation/Topbar/Anonymous.html b/Core/Frameworks/Baikal/Resources/Templates/Navigation/Topbar/Anonymous.html index c6bb24b..e2ab048 100644 --- a/Core/Frameworks/Baikal/Resources/Templates/Navigation/Topbar/Anonymous.html +++ b/Core/Frameworks/Baikal/Resources/Templates/Navigation/Topbar/Anonymous.html @@ -11,7 +11,7 @@ From 6293df67ddb58f74137a481a12be599627d10a74 Mon Sep 17 00:00:00 2001 From: Albirew Date: Tue, 23 Apr 2019 14:05:57 +0200 Subject: [PATCH 10/11] fixed URL in comment --- Core/Frameworks/Baikal/Controller/Main.php | 1 - .../Baikal/Controller/Navigation/Topbar/Anonymous.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Core/Frameworks/Baikal/Controller/Main.php b/Core/Frameworks/Baikal/Controller/Main.php index 500ead8..9ee579c 100644 --- a/Core/Frameworks/Baikal/Controller/Main.php +++ b/Core/Frameworks/Baikal/Controller/Main.php @@ -37,4 +37,3 @@ class Main extends \Flake\Core\Controller { return $oView->render(); } } - diff --git a/Core/Frameworks/Baikal/Controller/Navigation/Topbar/Anonymous.php b/Core/Frameworks/Baikal/Controller/Navigation/Topbar/Anonymous.php index 6bc45ca..69d5182 100644 --- a/Core/Frameworks/Baikal/Controller/Navigation/Topbar/Anonymous.php +++ b/Core/Frameworks/Baikal/Controller/Navigation/Topbar/Anonymous.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # All rights reserved # -# http://baikal-server.com +# 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 From e8320ff738823ba87fb559a2c323e53a1727a34e Mon Sep 17 00:00:00 2001 From: Albirew Date: Wed, 24 Apr 2019 15:55:36 +0200 Subject: [PATCH 11/11] PR review, cleaned commented code --- Core/Frameworks/Baikal/WWWRoot/index.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Core/Frameworks/Baikal/WWWRoot/index.php b/Core/Frameworks/Baikal/WWWRoot/index.php index b00a2ba..6ac8fb5 100644 --- a/Core/Frameworks/Baikal/WWWRoot/index.php +++ b/Core/Frameworks/Baikal/WWWRoot/index.php @@ -49,7 +49,6 @@ require PROJECT_PATH_ROOT . 'vendor/autoload.php'; \Flake\Framework::bootstrap(); # Bootstrapping Baïkal -//\Baikal\Framework::bootstrap(); \BaikalAdmin\Framework::bootstrap(); # Create and setup a page object