Skip to content

Commit

Permalink
Change default background color
Browse files Browse the repository at this point in the history
Blue Nyan background instead of white for placeholders
Suggested by @dreeco
  • Loading branch information
Devenet committed Jul 7, 2017
1 parent 72b8779 commit 8e17b87
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
Binary file modified assets/img/nyan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/nyan_social.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
define('CACHE_IMG_NAME', 'nyan_%sx%s.jpeg');
define('SOCIAL_TITLE', 'Nyan Cat Placeholder');
define('SOCIAL_DESC', 'Replace your depressing image placeholder by a happy Nyan Cat image placeholder.');
define('SOCIAL_IMG', URL.'/assets/img/nyan.png');
define('SOCIAL_IMG', URL.'/assets/img/nyan_social.png');

function parsingError()
{
Expand Down Expand Up @@ -106,7 +106,7 @@ public function display()

$dest = imagecreatetruecolor($this->width, $this->height);

$white = imagecolorallocate($dest, 255, 255, 255);
$white = imagecolorallocate($dest, 1, 38, 77);
imagefilledrectangle($dest, 0, 0, $this->width, $this->height, $white);
imageinterlace($dest, 1);
imagecopyresized($dest, $src, $width_gap, $height_gap, 0, 0, $width, $height, IMG_SOURCE_WIDTH, IMG_SOURCE_HEIGHT);
Expand Down Expand Up @@ -177,7 +177,7 @@ public function display()
<body>

<header class="dvt">
<h1><a href="<?php echo URL; ?>" class="img-link"><img src="<?php echo URL; ?>/100/50" alt="Nyan Cat" /></a></h1>
<h1><a href="<?php echo URL; ?>" class="img-link"><img src="<?php echo URL; ?>/assets/img/nyan.png" alt="Nyan Cat" /></a></h1>
<h2>Nyan Cat Placeholder</h2>
</header>

Expand Down
Binary file modified nyan/default.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8e17b87

Please sign in to comment.