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:
parent
a521790f13
commit
fd13275f7e
6 changed files with 20 additions and 7 deletions
|
@ -2889,7 +2889,7 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'phabricator-pinboard-view-css' =>
|
'phabricator-pinboard-view-css' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/c6af8d76/rsrc/css/layout/phabricator-pinboard-view.css',
|
'uri' => '/res/dbd15ab7/rsrc/css/layout/phabricator-pinboard-view.css',
|
||||||
'type' => 'css',
|
'type' => 'css',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -49,6 +49,9 @@ final class PhabricatorFileTransformController
|
||||||
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
||||||
|
|
||||||
switch ($this->transform) {
|
switch ($this->transform) {
|
||||||
|
case 'thumb-280x210':
|
||||||
|
$xformed_file = $this->executeThumbTransform($file, 280, 210);
|
||||||
|
break;
|
||||||
case 'thumb-220x165':
|
case 'thumb-220x165':
|
||||||
$xformed_file = $this->executeThumbTransform($file, 220, 165);
|
$xformed_file = $this->executeThumbTransform($file, 220, 165);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -475,6 +475,12 @@ final class PhabricatorFile extends PhabricatorFileDAO
|
||||||
return PhabricatorEnv::getCDNURI($path);
|
return PhabricatorEnv::getCDNURI($path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getThumb280x210URI() {
|
||||||
|
$path = '/file/xform/thumb-280x210/'.$this->getPHID().'/'
|
||||||
|
.$this->getSecretKey().'/';
|
||||||
|
return PhabricatorEnv::getCDNURI($path);
|
||||||
|
}
|
||||||
|
|
||||||
public function isViewableInBrowser() {
|
public function isViewableInBrowser() {
|
||||||
return ($this->getViewableMimeType() !== null);
|
return ($this->getViewableMimeType() !== null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,8 +120,8 @@ final class PhabricatorMacroListController
|
||||||
|
|
||||||
$item = new PhabricatorPinboardItemView();
|
$item = new PhabricatorPinboardItemView();
|
||||||
if ($file) {
|
if ($file) {
|
||||||
$item->setImageURI($file->getThumb220x165URI());
|
$item->setImageURI($file->getThumb280x210URI());
|
||||||
$item->setImageSize(220, 165);
|
$item->setImageSize(280, 210);
|
||||||
if ($file->getAuthorPHID()) {
|
if ($file->getAuthorPHID()) {
|
||||||
$author_handle = $this->getHandle($file->getAuthorPHID());
|
$author_handle = $this->getHandle($file->getAuthorPHID());
|
||||||
$item->appendChild(
|
$item->appendChild(
|
||||||
|
|
|
@ -52,8 +52,8 @@ final class PholioMockListController extends PholioController {
|
||||||
$item = new PhabricatorPinboardItemView();
|
$item = new PhabricatorPinboardItemView();
|
||||||
$item->setHeader('M'.$mock->getID().' '.$mock->getName())
|
$item->setHeader('M'.$mock->getID().' '.$mock->getName())
|
||||||
->setURI('/M'.$mock->getID())
|
->setURI('/M'.$mock->getID())
|
||||||
->setImageURI($mock->getCoverFile()->getThumb220x165URI())
|
->setImageURI($mock->getCoverFile()->getThumb280x210URI())
|
||||||
->setImageSize(220, 165);
|
->setImageSize(280, 210);
|
||||||
|
|
||||||
if ($mock->getAuthorPHID()) {
|
if ($mock->getAuthorPHID()) {
|
||||||
$author_handle = $this->getHandle($mock->getAuthorPHID());
|
$author_handle = $this->getHandle($mock->getAuthorPHID());
|
||||||
|
|
|
@ -8,6 +8,10 @@
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.device-phone .phabricator-pinboard-view {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.phabricator-pinboard-item-view {
|
.phabricator-pinboard-item-view {
|
||||||
margin: 0 16px 16px 0;
|
margin: 0 16px 16px 0;
|
||||||
border: 1px solid #d5d9df;
|
border: 1px solid #d5d9df;
|
||||||
|
@ -15,7 +19,7 @@
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
|
||||||
float: left;
|
float: left;
|
||||||
width: 240px;
|
width: 300px;
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +32,7 @@
|
||||||
/* On phones, show a single column of items. */
|
/* On phones, show a single column of items. */
|
||||||
.device-phone .phabricator-pinboard-item-view {
|
.device-phone .phabricator-pinboard-item-view {
|
||||||
float: none;
|
float: none;
|
||||||
margin: 0 auto 10px;
|
margin: 0 auto 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.phabricator-pinboard-item-header {
|
.phabricator-pinboard-item-header {
|
||||||
|
|
Loading…
Reference in a new issue