Skip to content

Commit 03db59b

Browse files
committed
feat: add tailwind support for mvc+bareui
1 parent ee2eea3 commit 03db59b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/ui/server.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,17 +458,19 @@ function updateMVCBuild($appInfo, $directory, $appName)
458458

459459
$indexTemplate = file_get_contents($directory . '/' . $appName . '/app/views/index.view.php');
460460
$indexTemplate = str_replace(
461-
'<title>Document</title>',
462-
'<title>Document</title>
461+
['<title>Document</title>', '<body>'],
462+
['<title>Document</title>
463463
464464
<!-- assets() points to the public/assets folder -->
465465
<link rel="stylesheet" href="<?php echo assets(\'css/styles.css\'); ?>">' . (isset($appInfo['frontendFramework']) || (isset($appInfo['additionalFrontendOptions']) && !empty($appInfo['additionalFrontendOptions'])) ?
466466
'
467467
468468
<!-- ViewsPath() points to app/views -->
469-
<link rel="stylesheet" href="<?php echo ViewsPath(\'css/app.css\'); ?>">
470-
' : ''
471-
),
469+
<!-- <link rel="stylesheet" href="<?php echo ViewsPath(\'css/app.css\'); ?>"> -->
470+
471+
<!-- vite() loads and bundles assets you select -->
472+
<?php echo vite(\'css/app.css\'); ?>' : ''
473+
), in_array('tailwind', $appInfo['additionalFrontendOptions'] ?? []) ? '<body class="flex flex-col justify-center items-center h-screen">' : '<body>'],
472474
$indexTemplate,
473475
);
474476

0 commit comments

Comments
 (0)