Browse Source

Installer use static css, fix #2071

pull/2074/head
Fabrixxm 5 years ago
parent
commit
0a9e017d34
10 changed files with 82 additions and 6 deletions
  1. +8
    -0
      mod/install.php
  2. BIN
      view/install/green.png
  3. BIN
      view/install/info.png
  4. BIN
      view/install/red.png
  5. +58
    -0
      view/install/style.css
  6. BIN
      view/install/yellow.png
  7. +1
    -1
      view/templates/install.tpl
  8. +13
    -3
      view/templates/install_checks.tpl
  9. +1
    -1
      view/templates/install_db.tpl
  10. +1
    -1
      view/templates/install_settings.tpl

+ 8
- 0
mod/install.php 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 View File

Before After
Width: 16  |  Height: 16  |  Size: 323 B

BIN
view/install/info.png View File

Before After
Width: 48  |  Height: 48  |  Size: 2.1 KiB

BIN
view/install/red.png View File

Before After
Width: 16  |  Height: 16  |  Size: 316 B

+ 58
- 0
view/install/style.css 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 View File

Before After
Width: 16  |  Height: 16  |  Size: 280 B

+ 1
- 1
view/templates/install.tpl View File

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


+ 13
- 3
view/templates/install_checks.tpl 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>


+ 1
- 1
view/templates/install_db.tpl View File

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


+ 1
- 1
view/templates/install_settings.tpl View File

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


Loading…
Cancel
Save