[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PHUIColorPalletteExample extends PhabricatorUIExample { 4 5 public function getName() { 6 return 'Colors'; 7 } 8 9 public function getDescription() { 10 return 'A Standard Palette of Colors for use.'; 11 } 12 13 public function renderExample() { 14 15 $colors = array( 16 'c0392b' => 'Base Red {$red}', 17 'f4dddb' => '83% Red {$lightred}', 18 'e67e22' => 'Base Orange {$orange}', 19 'f7e2d4' => '83% Orange {$lightorange}', 20 'f1c40f' => 'Base Yellow {$yellow}', 21 'fdf5d4' => '83% Yellow {$lightyellow}', 22 '139543' => 'Base Green {$green}', 23 'd7eddf' => '83% Green {$lightgreen}', 24 '2980b9' => 'Base Blue {$blue}', 25 'daeaf3' => '83% Blue {$lightblue}', 26 '3498db' => 'Sky Base {$sky}', 27 'ddeef9' => '83% Sky {$lightsky}', 28 '6e5cb6' => 'Base Indigo {$indigo}', 29 'eae6f7' => '83% Indigo {$lightindigo}', 30 'da49be' => 'Base Pink {$pink}', 31 'fbeaf8' => '83% Pink {$lightpink}', 32 '8e44ad' => 'Base Violet {$violet}', 33 'ecdff1' => '83% Violet {$lightviolet}', 34 ); 35 36 $greys = array( 37 'C7CCD9' => 'Light Grey Border {$lightgreyborder}', 38 'A1A6B0' => 'Grey Border {$greyborder}', 39 '676A70' => 'Dark Grey Border {$darkgreyborder}', 40 '92969D' => 'Light Grey Text {$lightgreytext}', 41 '74777D' => 'Grey Text {$greytext}', 42 '4B4D51' => 'Dark Grey Text {$darkgreytext}', 43 'F7F7F7' => 'Light Grey Background {$lightgreybackground}', 44 'EBECEE' => 'Grey Background {$greybackground}', 45 'DFE0E2' => 'Dark Grey Background {$darkgreybackground}', 46 ); 47 48 $blues = array( 49 'DDE8EF' => 'Thin Blue Border {$thinblueborder}', 50 'BFCFDA' => 'Light Blue Border {$lightblueborder}', 51 '95A6C5' => 'Blue Border {$blueborder}', 52 '626E82' => 'Dark Blue Border {$darkblueborder}', 53 'F8F9FC' => 'Light Blue Background {$lightbluebackground}', 54 'DAE7FF' => 'Blue Background {$bluebackground}', 55 '8C98B8' => 'Light Blue Text {$lightbluetext}', 56 '6B748C' => 'Blue Text {$bluetext}', 57 '464C5C' => 'Dark Blue Text {$darkbluetext}', 58 ); 59 60 $d_column = array(); 61 foreach ($greys as $color => $name) { 62 $d_column[] = phutil_tag( 63 'div', 64 array( 65 'style' => 'background-color: #'.$color.';', 66 'class' => 'pl', 67 ), 68 $name.' #'.$color); 69 } 70 71 $b_column = array(); 72 foreach ($blues as $color => $name) { 73 $b_column[] = phutil_tag( 74 'div', 75 array( 76 'style' => 'background-color: #'.$color.';', 77 'class' => 'pl', 78 ), 79 $name.' #'.$color); 80 } 81 82 83 $c_column = array(); 84 $url = array(); 85 foreach ($colors as $color => $name) { 86 $url[] = $color; 87 $c_column[] = phutil_tag( 88 'div', 89 array( 90 'style' => 'background-color: #'.$color.';', 91 'class' => 'pl', 92 ), 93 $name.' #'.$color); 94 } 95 96 $color_url = phutil_tag( 97 'a', 98 array( 99 'href' => 'http://color.hailpixel.com/#'.implode(',', $url), 100 'class' => 'button grey mlb', 101 ), 102 'Color Palette'); 103 104 $wrap1 = id(new PHUIObjectBoxView()) 105 ->setHeaderText(pht('Greys')) 106 ->appendChild($d_column); 107 108 $wrap2 = id(new PHUIObjectBoxView()) 109 ->setHeaderText(pht('Blues')) 110 ->appendChild($b_column); 111 112 $wrap3 = id(new PHUIObjectBoxView()) 113 ->setHeaderText(pht('Colors')) 114 ->appendChild($c_column); 115 116 return phutil_tag( 117 'div', 118 array(), 119 array( 120 $wrap1, 121 $wrap2, 122 $wrap3, 123 )); 124 } 125 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |