You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .php/Resource/Main.php
+34-4Lines changed: 34 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -38,8 +38,16 @@ class Main
38
38
public$scripts = ['all'];
39
39
public$styles = ['all'];
40
40
41
+
public$pathScript = false;
42
+
public$pathStyle = false;
43
+
41
44
public$navbar = null;
42
45
46
+
public$patchHtml = _HTML;
47
+
public$header = false;
48
+
public$footer = false;
49
+
public$pageName = null;
50
+
43
51
44
52
/** Abstratic Controller constructor
45
53
* -- Bypass it in your controller
@@ -68,7 +76,7 @@ function __construct($config = [])
68
76
functionindex()
69
77
{
70
78
if (!file_exists(_HTML.'nopage.html')) {
71
-
exit('<div style="position:absolute;top:50%;left:50%;width:300px;margin:-65px 0 0 -150px;text-align:center"><h1>Hello World!</h1>More info in <a href="https://github.com/devbr/website">Github</a>.</div>');
79
+
exit('<style>h1{font-size:2em;margin:0;padding:5px 0}div{position:absolute;top:50%;left:50%;width:50%;margin:-145px 0 0 -25%;text-align:center}</style><a href="https://github.com/devbr/website"><div><h1>Hello World!</h1>More info in Github.</div></a>');
72
80
}
73
81
//Configuration of style & script
74
82
$this->scripts = ['main'];
@@ -99,7 +107,7 @@ function indexTest($rqst, $param)
99
107
functionpageNotFound()
100
108
{
101
109
if (!file_exists(_HTML.'nopage.html')) {
102
-
exit('<div style="position:absolute;top:50%;left:50%;width:300px;margin:-65px 0 0 -150px;text-align:center"><h1>Page not found!</h1>Go back to <a href="'._URL.'">homepage</a>.</div>');
110
+
exit('<style>h1{font-size:2em;margin:0;padding:5px 0}div{position:absolute;top:50%;left:50%;width:50%;margin:-145px 0 0 -25%;text-align:center}</style><a href="'._URL.'"><div><h1>Page not found!</h1>Click to homepage.</div></a>');
103
111
}
104
112
105
113
//Else...
@@ -160,6 +168,24 @@ final function sendEncriptedData($dt)
0 commit comments