Full update with new build tool.
@ -15,13 +15,6 @@
|
||||
|
||||
<!-- Generate themes. -->
|
||||
<target name="generate" depends="clean">
|
||||
<exec dir="${basedir}/build" executable="php" failonerror="true">
|
||||
<arg line="schemes.php"></arg>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- Generate themes. -->
|
||||
<target name="generate-new" depends="clean">
|
||||
<exec dir="${basedir}/build/core" executable="php" failonerror="true">
|
||||
<arg line="run.php raincolour --ansi"></arg>
|
||||
</exec>
|
||||
|
@ -151,6 +151,13 @@ class Presenter
|
||||
return call_user_func_array([$this->theme, 'first'], $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Twig helper for sublime theme RGB values.
|
||||
*
|
||||
* @param string $key
|
||||
* @param integer $amount
|
||||
* @return string
|
||||
*/
|
||||
public function uiHelper($key, $amount = 0)
|
||||
{
|
||||
$r = $this->minMax($this->theme->get($key.'_r') + $amount);
|
||||
@ -160,6 +167,12 @@ class Presenter
|
||||
return "[{$r}, {$g}, {$b}]";
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to ensure RGB values don't wrap.
|
||||
*
|
||||
* @param int $value
|
||||
* @return int
|
||||
*/
|
||||
public function minMax($value)
|
||||
{
|
||||
if ($value > 255) {
|
||||
|
@ -4,8 +4,18 @@ namespace Raincolour\DataTransformers;
|
||||
|
||||
class RgbTransformer implements TransformerInterface
|
||||
{
|
||||
/**
|
||||
* Transform theme data.
|
||||
*
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
public function transform($data)
|
||||
{
|
||||
// All transformers are in here right now.
|
||||
// Will split them up soon.
|
||||
|
||||
|
||||
// Iterate data.
|
||||
foreach ($data as $key => $value) {
|
||||
|
||||
@ -38,12 +48,15 @@ class RgbTransformer implements TransformerInterface
|
||||
|
||||
}
|
||||
|
||||
// Set the UI background if it isn't present.
|
||||
if(!isset($data['ui_bg'])) {
|
||||
$data['ui_bg'] = $data['background'];
|
||||
}
|
||||
|
||||
// Set the current year for copyrights.
|
||||
$data['year'] = date('Y');
|
||||
|
||||
// Create a UUID for the sublime text themes.
|
||||
$md5 = md5($data['theme']['name']);
|
||||
$md5 = substr_replace($md5, '-', 20, 0);
|
||||
$md5 = substr_replace($md5, '-', 16, 0);
|
||||
|
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Raincolor\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class DirectoryNotFoundException extends Exception
|
||||
{
|
||||
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Raincolor\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class ExtensionNotFoundException extends Exception
|
||||
{
|
||||
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Raincolor\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class TemplateNotFoundException extends Exception
|
||||
{
|
||||
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Raincolor\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class TitleNotFoundException extends Exception
|
||||
{
|
||||
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Raincolor\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class TypeNotFoundException extends Exception
|
||||
{
|
||||
|
||||
}
|
BIN
screenshots/arstotzka.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
screenshots/azure.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
screenshots/bold.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
screenshots/boxuk.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
screenshots/carbonight-contrast.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
screenshots/carbonight.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
screenshots/chocolate.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
screenshots/crisp.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
screenshots/darkside-contrast.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
screenshots/darkside.png
Normal file
After Width: | Height: | Size: 81 KiB |
BIN
screenshots/earthsong-contrast.png
Normal file
After Width: | Height: | Size: 90 KiB |
BIN
screenshots/earthsong-light.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
screenshots/earthsong.png
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
screenshots/freshcut-contrast.png
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
screenshots/freshcut.png
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
screenshots/frontier-contrast.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
screenshots/frontier.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
screenshots/github.png
Normal file
After Width: | Height: | Size: 81 KiB |
BIN
screenshots/gloom-contrast.png
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
screenshots/gloom.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
screenshots/glowfish-contrast.png
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
screenshots/glowfish.png
Normal file
After Width: | Height: | Size: 81 KiB |
BIN
screenshots/goldfish-contrast.png
Normal file
After Width: | Height: | Size: 88 KiB |
BIN
screenshots/goldfish.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
screenshots/grunge-contrast.png
Normal file
After Width: | Height: | Size: 88 KiB |
BIN
screenshots/grunge.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
screenshots/halflife-contrast.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
screenshots/halflife.png
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
screenshots/hyrule-contrast.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
screenshots/hyrule.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
screenshots/iceberg-contrast.png
Normal file
After Width: | Height: | Size: 89 KiB |
BIN
screenshots/iceberg.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
screenshots/juicy-contrast.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
screenshots/juicy.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
screenshots/keen-contrast.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
screenshots/keen.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
screenshots/kiwi.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
screenshots/laravel-contrast.png
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
screenshots/laravel.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
screenshots/lavender-contrast.png
Normal file
After Width: | Height: | Size: 89 KiB |
BIN
screenshots/lavender.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
screenshots/legacy.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
screenshots/mellow-contrast.png
Normal file
After Width: | Height: | Size: 88 KiB |
BIN
screenshots/mellow.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
screenshots/mintchoc.png
Normal file
After Width: | Height: | Size: 81 KiB |
BIN
screenshots/mud-contrast.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
screenshots/mud.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
screenshots/otakon.png
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
screenshots/pastel.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
screenshots/patriot-contrast.png
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
screenshots/patriot.png
Normal file
After Width: | Height: | Size: 81 KiB |
BIN
screenshots/peacock-contrast.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
screenshots/peacock.png
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
screenshots/peacocks-in-space.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
screenshots/peel.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
screenshots/piggy.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
screenshots/potpourri-contrast.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
screenshots/potpourri.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
screenshots/rainbow.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
screenshots/revelation-contrast.png
Normal file
After Width: | Height: | Size: 89 KiB |
BIN
screenshots/revelation.png
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
screenshots/shrek.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
screenshots/slate.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
screenshots/slime-contrast.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
screenshots/slime.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
screenshots/snappy-contrast.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
screenshots/snappy-light.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
screenshots/snappy.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
screenshots/solarflare-contrast.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
screenshots/solarflare.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
screenshots/sourlick-contrast.png
Normal file
After Width: | Height: | Size: 88 KiB |
BIN
screenshots/sourlick.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
screenshots/spearmint.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
screenshots/stark-contrast.png
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
screenshots/stark.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
screenshots/super.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
screenshots/tonic.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
screenshots/tribal.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
screenshots/tron-contrast.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
screenshots/tron.png
Normal file
After Width: | Height: | Size: 81 KiB |
BIN
screenshots/turnip-contrast.png
Normal file
After Width: | Height: | Size: 89 KiB |
BIN
screenshots/turnip.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
screenshots/userscape.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
screenshots/yule.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
screenshots/zacks-contrast.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
screenshots/zacks.png
Normal file
After Width: | Height: | Size: 83 KiB |