Merge pull request #3352 from nextcloud/public-page-guest-css-loader
Fix public page css fallback loading
This commit is contained in:
commit
5157f16d28
5 changed files with 78 additions and 109 deletions
|
@ -169,8 +169,6 @@ class LoginController extends Controller {
|
||||||
$parameters['user_autofocus'] = true;
|
$parameters['user_autofocus'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
\OC_Util::addStyle('guest');
|
|
||||||
|
|
||||||
return new TemplateResponse(
|
return new TemplateResponse(
|
||||||
$this->appName, 'login', $parameters, 'guest'
|
$this->appName, 'login', $parameters, 'guest'
|
||||||
);
|
);
|
||||||
|
|
|
@ -92,7 +92,6 @@ class SetupController {
|
||||||
|
|
||||||
\OC_Util::addVendorScript('strengthify/jquery.strengthify');
|
\OC_Util::addVendorScript('strengthify/jquery.strengthify');
|
||||||
\OC_Util::addVendorStyle('strengthify/strengthify');
|
\OC_Util::addVendorStyle('strengthify/strengthify');
|
||||||
\OC_Util::addStyle('guest');
|
|
||||||
\OC_Util::addScript('setup');
|
\OC_Util::addScript('setup');
|
||||||
\OC_Template::printGuestPage('', 'installation', $parameters);
|
\OC_Template::printGuestPage('', 'installation', $parameters);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,11 +37,8 @@ p.info a,
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
#remember_login:hover+label,
|
#remember_login:hover+label,
|
||||||
#remember_login:focus+label,
|
|
||||||
#forgot-password:hover,
|
#forgot-password:hover,
|
||||||
#forgot-password:focus,
|
p.info a:hover {
|
||||||
p.info a:hover,
|
|
||||||
p.info a:focus {
|
|
||||||
opacity: .6;
|
opacity: .6;
|
||||||
}
|
}
|
||||||
em {
|
em {
|
||||||
|
@ -68,7 +65,7 @@ h3 {
|
||||||
padding-top: 100px;
|
padding-top: 100px;
|
||||||
}
|
}
|
||||||
#header .logo {
|
#header .logo {
|
||||||
background-image: url(../img/logo-icon.svg?v=1);
|
background-image: url('../img/logo-icon.svg?v=1');
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 175px;
|
background-size: 175px;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
|
@ -180,113 +177,63 @@ button.primary {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Radio and Checkbox */
|
/* Checkboxes */
|
||||||
input[type="checkbox"].checkbox {
|
input[type='checkbox'].checkbox {
|
||||||
position: absolute;
|
height:1px;
|
||||||
left:-10000px;
|
left:-10000px;
|
||||||
|
overflow:hidden;
|
||||||
|
position:absolute;
|
||||||
top:auto;
|
top:auto;
|
||||||
width:1px;
|
width:1px;
|
||||||
height: 1px;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
input[type="checkbox"].checkbox + label:before {
|
input[type='checkbox'].checkbox + label {
|
||||||
content: "";
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
height: 20px;
|
|
||||||
width: 20px;
|
|
||||||
vertical-align: middle;
|
|
||||||
|
|
||||||
background: url('../img/actions/checkbox.svg') left top no-repeat;
|
|
||||||
}
|
|
||||||
input[type="checkbox"].checkbox:disabled +label:before { opacity: .6; }
|
|
||||||
input[type="checkbox"].checkbox.u-left +label:before { float: left; }
|
|
||||||
input[type="checkbox"].checkbox.u-hidden + label:before { display: none; }
|
|
||||||
input[type="checkbox"].checkbox:checked + label:before {
|
|
||||||
background-image: url('../img/actions/checkbox-checked.svg');
|
|
||||||
}
|
|
||||||
input[type="checkbox"].checkbox:indeterminate + label:before {
|
|
||||||
background-image: url('../img/actions/checkbox-mixed.svg');
|
|
||||||
}
|
|
||||||
input[type="checkbox"].checkbox:disabled + label:before {
|
|
||||||
background-image: url('../img/actions/checkbox-disabled.svg');
|
|
||||||
}
|
|
||||||
input[type="checkbox"].checkbox:checked:disabled + label:before {
|
|
||||||
background-image: url('../img/actions/checkbox-checked-disabled.svg');
|
|
||||||
}
|
|
||||||
input[type="checkbox"].checkbox:indeterminate:disabled + label:before {
|
|
||||||
background-image: url('../img/actions/checkbox-mixed-disabled.svg');
|
|
||||||
}
|
|
||||||
input[type="checkbox"].checkbox--white + label:before {
|
|
||||||
background-image: url('../img/actions/checkbox-white.svg');
|
|
||||||
}
|
|
||||||
input[type="checkbox"].checkbox--white:checked + label:before {
|
|
||||||
background-image: url('../img/actions/checkbox-checked-white.svg');
|
|
||||||
}
|
|
||||||
input[type="checkbox"].checkbox--white:indeterminate + label:before {
|
|
||||||
background-image: url('../img/actions/checkbox-mixed-white.svg');
|
|
||||||
}
|
|
||||||
input[type="checkbox"].checkbox--white:disabled + label:before {
|
|
||||||
background-image: url('../img/actions/checkbox-disabled-white.svg');
|
|
||||||
}
|
|
||||||
input[type="checkbox"].checkbox--white:checked:disabled + label:before {
|
|
||||||
background-image: url('../img/actions/checkbox-checked-disabled.svg');
|
|
||||||
}
|
|
||||||
input[type="checkbox"].checkbox--white:indeterminate:disabled + label:before {
|
|
||||||
background-image: url('../img/actions/checkbox-mixed-disabled.svg');
|
|
||||||
}
|
|
||||||
input[type="checkbox"].checkbox:hover+label:before, input[type="checkbox"]:focus+label:before {
|
|
||||||
color:#111 !important;
|
|
||||||
}
|
|
||||||
input[type="checkbox"]+label {
|
|
||||||
position: relative;
|
|
||||||
margin: 0;
|
|
||||||
padding: 14px;
|
|
||||||
vertical-align: middle;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select:none;
|
user-select:none;
|
||||||
}
|
}
|
||||||
|
input[type='checkbox'].checkbox:disabled + label,
|
||||||
input[type="radio"].radio {
|
input[type='checkbox'].checkbox:disabled + label:before {
|
||||||
position: absolute;
|
cursor:default;
|
||||||
left:-10000px;
|
|
||||||
top: auto;
|
|
||||||
width: 1px;
|
|
||||||
height: 1px;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
input[type="radio"].radio + label:before {
|
input[type='checkbox'].checkbox + label:before {
|
||||||
content: "";
|
background-position:center;
|
||||||
|
border:1px solid #888;
|
||||||
|
border-radius:1px;
|
||||||
|
content:'';
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
|
height:10px;
|
||||||
height: 20px;
|
margin:3px;
|
||||||
width: 20px;
|
margin-top:1px;
|
||||||
vertical-align:middle;
|
vertical-align:middle;
|
||||||
|
width:10px;
|
||||||
background: url('../img/actions/radio.svg') left top no-repeat;
|
|
||||||
}
|
}
|
||||||
input[type="radio"].radio:checked + label:before {
|
input[type='checkbox'].checkbox--white:not(:disabled):not(:checked) + label:hover:before,
|
||||||
background-image: url('../img/actions/radio-checked.svg');
|
input[type='checkbox'].checkbox--white:focus + label:before {
|
||||||
|
border-color:#fff;
|
||||||
}
|
}
|
||||||
input[type="radio"].radio:disabled + label:before {
|
input[type='checkbox'].checkbox--white:checked + label:before,
|
||||||
background-image: url('../img/actions/radio-disabled.svg');
|
input[type='checkbox'].checkbox--white.checkbox:indeterminate + label:before {
|
||||||
|
border-color:#fff;
|
||||||
|
background-color: #eee;
|
||||||
}
|
}
|
||||||
input[type="radio"].radio:checked:disabled + label:before {
|
input[type='checkbox'].checkbox--white:disabled + label:before {
|
||||||
background-image: url('../img/actions/radio-checked-disabled.svg');
|
background-color:#666;
|
||||||
|
border-color:#999;
|
||||||
}
|
}
|
||||||
input[type="radio"].radio--white + label:before {
|
input[type='checkbox'].checkbox--white:checked:disabled + label:before {
|
||||||
background-image: url('../img/actions/radio-white.svg');
|
border-color:#666;
|
||||||
}
|
}
|
||||||
input[type="radio"].radio--white:checked + label:before {
|
input[type='checkbox'].checkbox--white:checked + label:before {
|
||||||
background-image: url('../img/actions/radio-checked-white.svg');
|
background-image:url('../img/actions/checkbox-mark-white.svg');
|
||||||
}
|
}
|
||||||
input[type="radio"].radio--white:disabled + label:before {
|
input[type='checkbox'].checkbox--white:indeterminate + label:before {
|
||||||
background-image: url('../img/actions/radio-disabled.svg');
|
background-image:url('../img/actions/checkbox-mixed-white.svg');
|
||||||
}
|
}
|
||||||
input[type="radio"].radio--white:checked:disabled + label:before {
|
input[type='checkbox'].checkbox--white:indeterminate:disabled + label:after {
|
||||||
background-image: url('../img/actions/radio-checked-disabled.svg');
|
background-color:#aaa;
|
||||||
|
border-color:#888;
|
||||||
|
}
|
||||||
|
input[type='checkbox'].checkbox--white + label:before,
|
||||||
|
input[type='checkbox'].checkbox--white:checked:disabled + label:after {
|
||||||
|
border-color:#aaa;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* keep the labels for screen readers but hide them since we use placeholders */
|
/* keep the labels for screen readers but hide them since we use placeholders */
|
||||||
|
@ -372,6 +319,24 @@ form .warning input[type="checkbox"]+label {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TOTP */
|
||||||
|
.two-factor-header {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.two-factor-provider {
|
||||||
|
text-align: center;
|
||||||
|
width: 258px !important;
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 0 !important;
|
||||||
|
background-color: rgba(0, 0, 0, 0.3) !important;
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
.two-factor-link {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 12px;
|
||||||
|
color: rgba(255, 255, 255, 0.75);
|
||||||
|
}
|
||||||
|
|
||||||
/* Additional login options */
|
/* Additional login options */
|
||||||
#remember_login {
|
#remember_login {
|
||||||
margin: 18px 5px 0 16px !important;
|
margin: 18px 5px 0 16px !important;
|
||||||
|
@ -573,8 +538,15 @@ p.info {
|
||||||
|
|
||||||
/* Icons */
|
/* Icons */
|
||||||
.icon-info-white {
|
.icon-info-white {
|
||||||
background-image: url(../img/actions/info-white.svg?v=1);
|
background-image: url('../img/actions/info-white.svg?v=2');
|
||||||
}
|
}
|
||||||
|
.icon-confirm {
|
||||||
|
background-image: url('../img/actions/confirm.svg?v=2');
|
||||||
|
}
|
||||||
|
.icon-confirm-white {
|
||||||
|
background-image: url('../img/actions/confirm-white.svg?v=2');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Loading */
|
/* Loading */
|
||||||
.float-spinner {
|
.float-spinner {
|
||||||
|
|
|
@ -281,7 +281,6 @@ class OC {
|
||||||
// render error page
|
// render error page
|
||||||
$template = new OC_Template('', 'update.user', 'guest');
|
$template = new OC_Template('', 'update.user', 'guest');
|
||||||
OC_Util::addScript('maintenance-check');
|
OC_Util::addScript('maintenance-check');
|
||||||
OC_Util::addStyle('guest');
|
|
||||||
$template->printPage();
|
$template->printPage();
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
@ -355,8 +354,6 @@ class OC {
|
||||||
header('Status: 503 Service Temporarily Unavailable');
|
header('Status: 503 Service Temporarily Unavailable');
|
||||||
header('Retry-After: 120');
|
header('Retry-After: 120');
|
||||||
|
|
||||||
OC_Util::addStyle('guest');
|
|
||||||
|
|
||||||
// render error page
|
// render error page
|
||||||
$template = new OC_Template('', 'update.use-cli', 'guest');
|
$template = new OC_Template('', 'update.use-cli', 'guest');
|
||||||
$template->assign('productName', 'nextcloud'); // for now
|
$template->assign('productName', 'nextcloud'); // for now
|
||||||
|
@ -378,7 +375,6 @@ class OC {
|
||||||
$systemConfig->setValue('theme', '');
|
$systemConfig->setValue('theme', '');
|
||||||
OC_Util::addScript('config'); // needed for web root
|
OC_Util::addScript('config'); // needed for web root
|
||||||
OC_Util::addScript('update');
|
OC_Util::addScript('update');
|
||||||
OC_Util::addStyle('guest');
|
|
||||||
|
|
||||||
/** @var \OC\App\AppManager $appManager */
|
/** @var \OC\App\AppManager $appManager */
|
||||||
$appManager = \OC::$server->getAppManager();
|
$appManager = \OC::$server->getAppManager();
|
||||||
|
|
|
@ -164,11 +164,15 @@ class TemplateLayout extends \OC_Template {
|
||||||
// Do not load scss for update, errors, installation or login page
|
// Do not load scss for update, errors, installation or login page
|
||||||
if(\OC::$server->getSystemConfig()->getValue('installed', false)
|
if(\OC::$server->getSystemConfig()->getValue('installed', false)
|
||||||
&& !\OCP\Util::needUpgrade()
|
&& !\OCP\Util::needUpgrade()
|
||||||
&& strpos(\OC::$server->getRequest()->getRequestUri(), \OC::$server->getURLGenerator()->linkToRoute('core.login.tryLogin')) !== 0) {
|
&& !preg_match('/^\/login/', \OC::$server->getRequest()->getPathInfo())) {
|
||||||
$cssFiles = self::findStylesheetFiles(\OC_Util::$styles);
|
$cssFiles = self::findStylesheetFiles(\OC_Util::$styles);
|
||||||
} else {
|
} else {
|
||||||
|
// If we ignore the scss compiler,
|
||||||
|
// we need to load the guest css fallback
|
||||||
|
\OC_Util::addStyle('guest');
|
||||||
$cssFiles = self::findStylesheetFiles(\OC_Util::$styles, false);
|
$cssFiles = self::findStylesheetFiles(\OC_Util::$styles, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->assign('cssfiles', array());
|
$this->assign('cssfiles', array());
|
||||||
$this->assign('printcssfiles', []);
|
$this->assign('printcssfiles', []);
|
||||||
$this->assign('versionHash', self::$versionHash);
|
$this->assign('versionHash', self::$versionHash);
|
||||||
|
|
Loading…
Reference in a new issue