1
0
Fork 0

Merge pull request #2074 from fabrixxm/issue_2071

Use static css in install procedure
This commit is contained in:
Tobias Diekershoff 2015-11-13 12:50:41 +01:00
commit 009b3364e5
11 changed files with 86 additions and 6 deletions

View file

@ -20,6 +20,10 @@ function replace_macros($s,$r) {
$stamp1 = microtime(true);
$a = get_app();
// pass $baseurl to all templates
$r['$baseurl'] = $a->get_baseurl();
$t = $a->template_engine();
try {

View file

@ -11,6 +11,14 @@ function install_init(&$a){
echo "ok";
killme();
}
// We overwrite current theme css, because during install we could not have a working mod_rewrite
// so we could not have a css at all. Here we set a static css file for the install procedure pages
$a->config['system']['theme'] = "../install";
$a->theme['stylesheet'] = $a->get_baseurl()."/view/install/style.css";
global $install_wizard_pass;
if (x($_POST,'pass'))
$install_wizard_pass = intval($_POST['pass']);

BIN
view/install/green.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

BIN
view/install/info.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
view/install/red.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

58
view/install/style.css Normal file
View file

@ -0,0 +1,58 @@
/***
* Friendica Communcation Server
*
* This is the static css for the install procedure
*/
body {
background-color: #FFF;
max-width: 750px;
margin: 0 auto;
}
section {
background-color: rgb(252, 252, 252);
padding: 0.5em 2em;
}
h1 img {
vertical-align: sub;
}
td {
padding: 0.2em;
border-bottom: 1px solid rgb(238, 238, 238);
}
td.help {
border-width: 0px 0px 2px 2px;
border-style: solid;
border-color: #000;
background: transparent url("/friendica/view/install/info.png") no-repeat scroll 5px 5px;
}
td.help blockquote {
margin-left: 60px;
}
input[type="submit"] {
margin: 2em 0;
}
tt {
background-color: rgb(238, 238, 238);
padding: 0.1em 0.2em;
}
.field {
margin-bottom: 0.5em;
}
.field label,
.field input, .field select, .field textarea {
width: 100%;
display: block;
}
.field .field_help {
color: #999;
text-align: right;
width: 100%;
display: block;
font-size: 0.8em;
}

BIN
view/install/yellow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

View file

@ -1,6 +1,6 @@
<h1>{{$title}}</h1>
<h1><img src="{{$baseurl}}/images/friendica-32.png"> {{$title}}</h1>
<h2>{{$pass}}</h2>

View file

@ -1,12 +1,22 @@
<h1>{{$title}}</h1>
<h1><img src="{{$baseurl}}/images/friendica-32.png"> {{$title}}</h1>
<h2>{{$pass}}</h2>
<form action="{{$baseurl}}/index.php?q=install" method="post">
<table>
{{foreach $checks as $check}}
<tr><td>{{$check.title}} </td><td><span class="icon s22 {{if $check.status}}on{{else}}{{if $check.required}}off{{else}}yellow{{/if}}{{/if}}"></td><td>{{if $check.required}}(required){{/if}}</td></tr>
<tr><td>{{$check.title}} </td><td>
{{if $check.status}}
<img src="{{$baseurl}}/view/install/green.png" alt="Ok">
{{else}}
{{if $check.required}}
<img src="{{$baseurl}}/view/install/red.png" alt="Requirement not satisfied">
{{else}}
<img src="{{$baseurl}}/view/install/yellow.png" alt="Optional requirement not satisfied">
{{/if}}
{{/if}}
</td><td>{{if $check.required}}(required){{/if}}</td></tr>
{{if $check.help}}
<tr><td colspan="3"><blockquote>{{$check.help}}</blockquote></td></tr>
<tr><td class="help" colspan="3"><blockquote>{{$check.help}}</blockquote></td></tr>
{{/if}}
{{/foreach}}
</table>

View file

@ -1,6 +1,6 @@
<h1>{{$title}}</h1>
<h1><img src="{{$baseurl}}/images/friendica-32.png"> {{$title}}</h1>
<h2>{{$pass}}</h2>

View file

@ -1,6 +1,6 @@
<h1>{{$title}}</h1>
<h1><img src="{{$baseurl}}/images/friendica-32.png"> {{$title}}</h1>
<h2>{{$pass}}</h2>