Commit c41462d5 authored by webchick's avatar webchick

Issue #1832568 by lewisnyman, Bojhan, JohnAlbin, nod_: Beautify install screen on mobile phone.

parent b3c730d3
(function () {
"use strict";
function findActiveStep (steps) {
for (var i = 0; i < steps.length; i++) {
if (steps[i].className === 'active') {
return i + 1;
}
}
// The final "Finished" step is never "active".
if (steps[steps.length - 1].className === 'done') {
return steps.length;
}
return 0;
}
function installStepsSetup () {
var steps = document.querySelectorAll('.task-list li');
var branding = document.querySelector('#branding');
var stepIndicator = document.createElement('div');
stepIndicator.className = 'step-indicator';
stepIndicator.innerHTML = findActiveStep(steps) + '/' + steps.length;
branding.appendChild(stepIndicator);
}
if (document.addEventListener) {
document.addEventListener('DOMContentLoaded', installStepsSetup);
}
})();
......@@ -873,7 +873,6 @@ body.in-maintenance #content {
width: 72%;
}
body.in-maintenance #page {
overflow: auto;
max-width: 770px;
margin: 0 auto;
padding-top: 2em;
......@@ -903,7 +902,7 @@ body.in-maintenance #logo {
@media all and (max-width: 768px) {
body.in-maintenance #sidebar-first,
body.in-maintenance #content {
float: left;
float: none;
max-width: none;
width: auto;
}
......@@ -926,9 +925,21 @@ ol.task-list li.done {
background: transparent url(images/task-check.png) no-repeat 0 50%;
color: green;
}
body.in-maintenance #branding .step-indicator {
display: none;
}
@media all and (max-width: 768px) {
ol.task-list li {
ol.task-list,
body.in-maintenance #logo {
display: none;
}
body.in-maintenance #branding h1 {
float: left;
width: auto;
}
body.in-maintenance #branding .step-indicator {
display: block;
float: right;
}
}
......
......@@ -121,3 +121,10 @@ function seven_css_alter(&$css) {
$css['core/misc/ui/themes/base/jquery.ui.theme.css']['data'] = drupal_get_path('theme', 'seven') . '/jquery.ui.theme.css';
}
}
/**
* Implements hook_preprocess_install_page().
*/
function seven_preprocess_install_page(&$variables) {
drupal_add_js(drupal_get_path('theme', 'seven') . '/js/mobile.install.js');
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment