feat: added tailwindcss
This commit is contained in:
parent
e106ee4c4c
commit
315f7e9896
5 changed files with 94 additions and 0 deletions
18
.gitignore
vendored
18
.gitignore
vendored
|
@ -14,6 +14,9 @@ Icon
|
||||||
# ---------------
|
# ---------------
|
||||||
|
|
||||||
.lock
|
.lock
|
||||||
|
#Remove the next two line for real project repositories
|
||||||
|
composer.lock
|
||||||
|
package-lock.json
|
||||||
|
|
||||||
# Editors
|
# Editors
|
||||||
# (sensitive workspace files)
|
# (sensitive workspace files)
|
||||||
|
@ -49,3 +52,18 @@ Icon
|
||||||
|
|
||||||
/site/config/.license
|
/site/config/.license
|
||||||
|
|
||||||
|
# Vendor
|
||||||
|
# ---------------
|
||||||
|
|
||||||
|
/vendor
|
||||||
|
/node_modules
|
||||||
|
|
||||||
|
# Content
|
||||||
|
# ---------------
|
||||||
|
|
||||||
|
/content
|
||||||
|
|
||||||
|
# Compiled files
|
||||||
|
# ---------------
|
||||||
|
|
||||||
|
/public/css
|
18
package.json
Normal file
18
package.json
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"name": "kirby-moin",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Watch and build tailwindcss",
|
||||||
|
"scripts": {
|
||||||
|
"watch": "npx @tailwindcss/cli -i ./src/css/tailwind.css -o ./public/css/app.css --content './site/**/*.php' -w",
|
||||||
|
"build": "npx @tailwindcss/cli -i ./src/css/tailwind.css -o ./public/css/app.css --content './site/**/*.php' -m"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://git@deichrakete.space/deichrakete/kirby-moin.git"
|
||||||
|
},
|
||||||
|
"author": "Stephan Plöhn",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"tailwindcss": "^4.1.12"
|
||||||
|
}
|
||||||
|
}
|
44
site/snippets/layouts/main.php
Normal file
44
site/snippets/layouts/main.php
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @var Site $site
|
||||||
|
* @var Page $page
|
||||||
|
* @var Slot $slot
|
||||||
|
* @var Slots $slots
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Kirby\Cms\Page;
|
||||||
|
use Kirby\Cms\Site;
|
||||||
|
use Kirby\Template\Slot;
|
||||||
|
use Kirby\Template\Slots;
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<html lang="de">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>
|
||||||
|
<?= $page->title() ?> | <?= $site->title() ?>
|
||||||
|
</title>
|
||||||
|
<?= css('css/app.css') ?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<header>
|
||||||
|
<h1>
|
||||||
|
<a href="<?= $site->url() ?>">
|
||||||
|
<?= $site->title() ?>
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<?= $slot ?>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
by <?= $site->title() ?>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1 +1,14 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @var Page $page
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Kirby\Cms\Page;
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php snippet('layouts/main', slots: true) ?>
|
||||||
|
|
||||||
|
<?php slot() ?>
|
||||||
<h1><?= $page->title() ?></h1>
|
<h1><?= $page->title() ?></h1>
|
||||||
|
<?php endslot();
|
1
src/css/tailwind.css
Normal file
1
src/css/tailwind.css
Normal file
|
@ -0,0 +1 @@
|
||||||
|
@import "tailwindcss";
|
Loading…
Add table
Add a link
Reference in a new issue