Add (tint)

This commit is contained in:
2023-11-21 01:22:06 +08:00
parent e4bab8dcec
commit 84c68b2c0c
43 changed files with 257 additions and 143 deletions

View File

@@ -97,12 +97,10 @@ private static function setOgText($canvas, $title, $description, $website)
return $canvas;
}
private static function setOgTint($canvas, $width, $height)
{
$og_tint = Image::make(resource_path("images/tints/caption-bg.png"));
$og_tint = Image::make(resource_path('images/tints/caption-bg.png'));
// Stretch the image to the given width and height
$og_tint->resize($width, $height);
@@ -121,7 +119,7 @@ private static function setImageTint($canvas, $width, $height)
// Search for files starting with 'tint-' and count them
$tintFilesCount = count(glob($directoryPath.'/tint-*'));
$tint_image = Image::make(resource_path("images/tints/tint-" . rand(1, $tintFilesCount) . ".png"));
$tint_image = Image::make(resource_path('images/tints/tint-'.rand(1, $tintFilesCount).'.png'));
// Stretch the image to the given width and height
$tint_image->resize($width, $height);

View File

@@ -41,7 +41,6 @@ public function search(Request $request)
->orderBy('published_at', 'desc')
->cursorPaginate(10);
// breadcrumb json ld
$listItems = [];

View File

@@ -2,12 +2,11 @@
namespace App\Http\Controllers\Tests;
use App\Helpers\FirstParty\ImageGen\ImageGen;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;
use LaravelGoogleIndexing;
use App\Helpers\FirstParty\ImageGen\ImageGen;
class TestController extends Controller
{

View File

@@ -185,7 +185,6 @@ private static function setPostImage($post)
$image_content = $image_response->body();
// Get the size of the image content in KB
$imageSizeInKb = strlen($image_response->body()) / 1024;
@@ -194,12 +193,11 @@ private static function setPostImage($post)
continue;
}
$post_description = strtoupper(now()->format('j M')) . "" . $post->main_keyword . "" . markdown_min_read($post->body);
$post_description = strtoupper(now()->format('j M')).' • '.$post->main_keyword.' • '.markdown_min_read($post->body);
$image = ImageGen::getMainImage($image_content, 1007, 567);
$og_image = ImageGen::getOpenGraphImage($image_content, 1007, 567, $post->title, $post_description);
$epoch_now_timestamp = epoch_now_timestamp();
$filename = $post->slug.'-'.$epoch_now_timestamp.'.jpg';
$og_filename = $post->slug.'-'.$epoch_now_timestamp.'_og.jpg';

View File

@@ -51,8 +51,7 @@ public static function handle(NewsSerpResult $news_serp_result, $serp_counts = 1
// check timestamp
$serp_timestamp = Carbon::parse($serp_item->timestamp);
if(!$serp_timestamp->isBetween(now()->subHours(6), now()))
{
if (! $serp_timestamp->isBetween(now()->subHours(6), now())) {
continue;
}
@@ -64,9 +63,6 @@ public static function handle(NewsSerpResult $news_serp_result, $serp_counts = 1
$skipItem = false;
foreach ($blacklist_domains as $domain) {
if (str_contains($serp_item->domain, $domain)) {
$skipItem = true;

View File

@@ -7,7 +7,7 @@
'launched_epoch' => '1695513600', // 24-09-2023 00:00:00 GMT +0
'blacklist_domains_serp' => [
'https://u.today'
'https://u.today',
],
'blacklist_keywords_serp' => [

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 758 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 772 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1022 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 939 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 KiB

View File

@@ -49,6 +49,130 @@
"file": "assets/Inter-Thin-b778a52b.ttf",
"src": "resources/fonts/Inter/Inter-Thin.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-Black.ttf": {
"file": "assets/RobotoCondensed-Black-dafd7d4b.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-Black.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-BlackItalic.ttf": {
"file": "assets/RobotoCondensed-BlackItalic-8434d290.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-BlackItalic.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-Bold.ttf": {
"file": "assets/RobotoCondensed-Bold-9bc003d6.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-Bold.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-BoldItalic.ttf": {
"file": "assets/RobotoCondensed-BoldItalic-23e81357.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-BoldItalic.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-ExtraBold.ttf": {
"file": "assets/RobotoCondensed-ExtraBold-240f98d5.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-ExtraBold.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-ExtraBoldItalic.ttf": {
"file": "assets/RobotoCondensed-ExtraBoldItalic-fbe0f4a4.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-ExtraBoldItalic.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-ExtraLight.ttf": {
"file": "assets/RobotoCondensed-ExtraLight-ac6c600a.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-ExtraLight.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-ExtraLightItalic.ttf": {
"file": "assets/RobotoCondensed-ExtraLightItalic-7ce72f91.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-ExtraLightItalic.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-Italic.ttf": {
"file": "assets/RobotoCondensed-Italic-b92ae4ae.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-Italic.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-Light.ttf": {
"file": "assets/RobotoCondensed-Light-13c2f480.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-Light.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-LightItalic.ttf": {
"file": "assets/RobotoCondensed-LightItalic-82266bab.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-LightItalic.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-Medium.ttf": {
"file": "assets/RobotoCondensed-Medium-271c76f9.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-Medium.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-MediumItalic.ttf": {
"file": "assets/RobotoCondensed-MediumItalic-3e1145ca.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-MediumItalic.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-Regular.ttf": {
"file": "assets/RobotoCondensed-Regular-2af71369.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-Regular.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-SemiBold.ttf": {
"file": "assets/RobotoCondensed-SemiBold-c64d96f3.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-SemiBold.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-SemiBoldItalic.ttf": {
"file": "assets/RobotoCondensed-SemiBoldItalic-3d0de867.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-SemiBoldItalic.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-Thin.ttf": {
"file": "assets/RobotoCondensed-Thin-6ad48510.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-Thin.ttf"
},
"resources/fonts/RobotoCondensed/RobotoCondensed-ThinItalic.ttf": {
"file": "assets/RobotoCondensed-ThinItalic-5ab37aa6.ttf",
"src": "resources/fonts/RobotoCondensed/RobotoCondensed-ThinItalic.ttf"
},
"resources/images/tints/caption-bg.png": {
"file": "assets/caption-bg-49b89c07.png",
"src": "resources/images/tints/caption-bg.png"
},
"resources/images/tints/tint-1.png": {
"file": "assets/tint-1-01439484.png",
"src": "resources/images/tints/tint-1.png"
},
"resources/images/tints/tint-10.png": {
"file": "assets/tint-10-e35a8e01.png",
"src": "resources/images/tints/tint-10.png"
},
"resources/images/tints/tint-11.png": {
"file": "assets/tint-11-c306849c.png",
"src": "resources/images/tints/tint-11.png"
},
"resources/images/tints/tint-12.png": {
"file": "assets/tint-12-f07c9a6a.png",
"src": "resources/images/tints/tint-12.png"
},
"resources/images/tints/tint-2.png": {
"file": "assets/tint-2-b2c805d8.png",
"src": "resources/images/tints/tint-2.png"
},
"resources/images/tints/tint-3.png": {
"file": "assets/tint-3-e68780ba.png",
"src": "resources/images/tints/tint-3.png"
},
"resources/images/tints/tint-4.png": {
"file": "assets/tint-4-a132efdf.png",
"src": "resources/images/tints/tint-4.png"
},
"resources/images/tints/tint-5.png": {
"file": "assets/tint-5-176263cd.png",
"src": "resources/images/tints/tint-5.png"
},
"resources/images/tints/tint-6.png": {
"file": "assets/tint-6-98168110.png",
"src": "resources/images/tints/tint-6.png"
},
"resources/images/tints/tint-7.png": {
"file": "assets/tint-7-29525050.png",
"src": "resources/images/tints/tint-7.png"
},
"resources/images/tints/tint-8.png": {
"file": "assets/tint-8-341db431.png",
"src": "resources/images/tints/tint-8.png"
},
"resources/images/tints/tint-9.png": {
"file": "assets/tint-9-a29ba2de.png",
"src": "resources/images/tints/tint-9.png"
},
"resources/js/app-auth.js": {
"file": "assets/app-auth-fabb569c.js",
"imports": [

Binary file not shown.

View File

@@ -11,7 +11,8 @@
optional—it's critical for your future success. Stay updated with daily news from
<strong>FutureWalker</strong>.
</h1>
<a href="#latest-news" class="btn btn-primary px-4 rounded-pill text-decoration-none">Start reading now</a>
<a href="#latest-news" class="btn btn-primary px-4 rounded-pill text-decoration-none">Start reading
now</a>
</div>
</div>
</div>

View File

@@ -36,7 +36,6 @@
Route::get('/image_gen', [App\Http\Controllers\Tests\TestController::class, 'imageGen']);
Route::get('/incomplete/post', function (Request $request) {
$post = Post::find(1);