1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +01:00

Widen pinboard to 280x210.

Summary: This widens pinboard images to 280x210, which neatly fits on an iPhone 4, and gives more visual space to Macros and Mocks.

Test Plan: Test Pinboard in Chrome and iOS simulator.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5224
This commit is contained in:
Chad Little 2013-03-05 08:05:51 -08:00
parent a521790f13
commit fd13275f7e
6 changed files with 20 additions and 7 deletions

View file

@ -2889,7 +2889,7 @@ celerity_register_resource_map(array(
),
'phabricator-pinboard-view-css' =>
array(
'uri' => '/res/c6af8d76/rsrc/css/layout/phabricator-pinboard-view.css',
'uri' => '/res/dbd15ab7/rsrc/css/layout/phabricator-pinboard-view.css',
'type' => 'css',
'requires' =>
array(

View file

@ -49,6 +49,9 @@ final class PhabricatorFileTransformController
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
switch ($this->transform) {
case 'thumb-280x210':
$xformed_file = $this->executeThumbTransform($file, 280, 210);
break;
case 'thumb-220x165':
$xformed_file = $this->executeThumbTransform($file, 220, 165);
break;

View file

@ -475,6 +475,12 @@ final class PhabricatorFile extends PhabricatorFileDAO
return PhabricatorEnv::getCDNURI($path);
}
public function getThumb280x210URI() {
$path = '/file/xform/thumb-280x210/'.$this->getPHID().'/'
.$this->getSecretKey().'/';
return PhabricatorEnv::getCDNURI($path);
}
public function isViewableInBrowser() {
return ($this->getViewableMimeType() !== null);
}

View file

@ -120,8 +120,8 @@ final class PhabricatorMacroListController
$item = new PhabricatorPinboardItemView();
if ($file) {
$item->setImageURI($file->getThumb220x165URI());
$item->setImageSize(220, 165);
$item->setImageURI($file->getThumb280x210URI());
$item->setImageSize(280, 210);
if ($file->getAuthorPHID()) {
$author_handle = $this->getHandle($file->getAuthorPHID());
$item->appendChild(

View file

@ -52,8 +52,8 @@ final class PholioMockListController extends PholioController {
$item = new PhabricatorPinboardItemView();
$item->setHeader('M'.$mock->getID().' '.$mock->getName())
->setURI('/M'.$mock->getID())
->setImageURI($mock->getCoverFile()->getThumb220x165URI())
->setImageSize(220, 165);
->setImageURI($mock->getCoverFile()->getThumb280x210URI())
->setImageSize(280, 210);
if ($mock->getAuthorPHID()) {
$author_handle = $this->getHandle($mock->getAuthorPHID());

View file

@ -8,6 +8,10 @@
margin: 1em 0;
}
.device-phone .phabricator-pinboard-view {
padding: 0;
}
.phabricator-pinboard-item-view {
margin: 0 16px 16px 0;
border: 1px solid #d5d9df;
@ -15,7 +19,7 @@
border-radius: 3px;
float: left;
width: 240px;
width: 300px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
text-align: left;
}
@ -28,7 +32,7 @@
/* On phones, show a single column of items. */
.device-phone .phabricator-pinboard-item-view {
float: none;
margin: 0 auto 10px;
margin: 0 auto 16px;
}
.phabricator-pinboard-item-header {