Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

ploi-deploy/roadmap

527 stars
2 code files
View ploi-deploy/roadmap on GitHub

app/Services/Tailwind.php

Open in GitHub
class Tailwind
{
//
public function __construct(public string $name, public string $baseColor)
{
$this->shades = $this->generateColorShades($name, $this->baseColor);
}
 
public function getCssFormat(): string
{
$output = '<style>' . PHP_EOL;
$output.= ':root {' . PHP_EOL;
 
foreach ($this->shades as $shade => $color) {
$output.= "\t--color-{$shade}: {$color};" . PHP_EOL;
}
 
$output.= '}' . PHP_EOL;
$output.= '</style>';
 
return $output;
}
//
}

app/Http/Controllers/Auth/PasswordProtectionController.php

Open in GitHub
use App\Services\Tailwind;
use App\Http\Controllers\Controller;
 
class PasswordProtectionController extends Controller
{
public function __invoke()
{
$tw = new Tailwind('brand', app(\App\Settings\ColorSettings::class)->primary);
 
return view('auth.password-protection', [
'brandColors' => $tw->getCssFormat()
]);
}
//
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.