1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-03 03:11:01 +01:00

Make the 404 page device friendly.

Summary: Fixes T5686.

Test Plan: Viewed in iOS simulator and Chrome with various viewport sizes - looked good!

Reviewers: chad, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5686

Differential Revision: https://secure.phabricator.com/D10082
This commit is contained in:
Bob Trahan 2014-07-30 13:31:16 -07:00
parent 90431fd101
commit 7aaa6329b8
2 changed files with 13 additions and 8 deletions

View file

@ -7,15 +7,16 @@ final class Aphront404Response extends AphrontHTMLResponse {
} }
public function buildResponseString() { public function buildResponseString() {
$failure = new AphrontRequestFailureView(); $failure = id(new AphrontRequestFailureView())
$failure->setHeader('404 Not Found'); ->setHeader(pht('404 Not Found'))
$failure->appendChild(phutil_tag('p', array(), pht( ->appendChild(phutil_tag('p', array(), pht(
'The page you requested was not found.'))); 'The page you requested was not found.')));
$view = new PhabricatorStandardPageView(); $view = id(new PhabricatorStandardPageView())
$view->setTitle('404 Not Found'); ->setTitle('404 Not Found')
$view->setRequest($this->getRequest()); ->setRequest($this->getRequest())
$view->appendChild($failure); ->setDeviceReady(true)
->appendChild($failure);
return $view->render(); return $view->render();
} }

View file

@ -3,11 +3,15 @@
*/ */
.aphront-request-failure-view { .aphront-request-failure-view {
margin: 2em auto; margin: 16px auto;
background: #eff2f7; background: #eff2f7;
width: 600px; width: 600px;
} }
.device .aphront-request-failure-view {
width: 90%;
}
.aphront-request-failure-view .aphront-request-failure-head { .aphront-request-failure-view .aphront-request-failure-head {
padding: 1em 2em; padding: 1em 2em;
border-bottom: 1px solid #afb2b7; border-bottom: 1px solid #afb2b7;