css
This commit is contained in:
@@ -156,6 +156,6 @@ class AuthController extends Controller
|
||||
|
||||
private function loginRateLimiterKey(Request $request, string $username): string
|
||||
{
|
||||
return Str::lower($username).'|'.$request->ip();
|
||||
return Str::lower($username) . '|' . $request->ip();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class UploadController extends Controller
|
||||
public function markdownImage(Request $request): JsonResponse
|
||||
{
|
||||
$validated = $request->validate([
|
||||
'image' => ['required', 'file', 'image', 'mimes:jpg,jpeg,png,webp,gif', 'max:'.self::MAX_FILE_KB],
|
||||
'image' => ['required', 'file', 'image', 'mimes:jpg,jpeg,png,webp,gif', 'max:' . self::MAX_FILE_KB],
|
||||
], [
|
||||
'image.required' => '请选择要上传的图片。',
|
||||
'image.image' => '仅支持图片文件上传。',
|
||||
@@ -77,22 +77,22 @@ class UploadController extends Controller
|
||||
$thumbBinary = $this->encodeWebp($thumbImage, self::THUMB_WEBP_QUALITY);
|
||||
|
||||
$subDir = now()->format('Y/m/d');
|
||||
$baseName = now()->format('YmdHis').'-'.Str::lower(Str::random(8));
|
||||
$baseName = now()->format('YmdHis') . '-' . Str::lower(Str::random(8));
|
||||
$mainPath = "markdown-images/{$subDir}/{$baseName}.webp";
|
||||
$thumbPath = "markdown-images/{$subDir}/{$baseName}_thumb.webp";
|
||||
|
||||
Storage::disk('public')->put($mainPath, $mainBinary);
|
||||
Storage::disk('public')->put($thumbPath, $thumbBinary);
|
||||
|
||||
$mainUrl = '/storage/'.ltrim($mainPath, '/');
|
||||
$thumbUrl = '/storage/'.ltrim($thumbPath, '/');
|
||||
$mainUrl = '/storage/' . ltrim($mainPath, '/');
|
||||
$thumbUrl = '/storage/' . ltrim($thumbPath, '/');
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'url' => $mainUrl,
|
||||
'thumb_url' => $thumbUrl,
|
||||
'filename' => basename($mainPath),
|
||||
'markdown' => '',
|
||||
'markdown' => '',
|
||||
]);
|
||||
} catch (Throwable $exception) {
|
||||
report($exception);
|
||||
|
||||
1096
resources/css/home.css
Normal file
1096
resources/css/home.css
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@ import tailwindcss from '@tailwindcss/vite';
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
laravel({
|
||||
input: ['resources/css/app.css', 'resources/js/app.js'],
|
||||
input: ['resources/css/app.css', 'resources/css/home.css', 'resources/js/app.js'],
|
||||
refresh: true,
|
||||
}),
|
||||
tailwindcss(),
|
||||
|
||||
Reference in New Issue
Block a user