func: add initial structure
This commit is contained in:
parent
6f55d0a531
commit
be8f1bdb4c
9
.gitignore
vendored
Normal file
9
.gitignore
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
# Composer
|
||||
/vendor/
|
||||
|
||||
# Bun
|
||||
node_modules/
|
||||
bun.lock*
|
||||
|
||||
# Tailwind
|
||||
public/assets/css/tw.css
|
17
composer.json
Normal file
17
composer.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "aidan/tinytalk",
|
||||
"description": "Blogging without all the extras",
|
||||
"license": "Unlicense",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Aidan\\Tinytalk\\": "src/"
|
||||
}
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "Aidan",
|
||||
"email": "aidan@p0ntus.com"
|
||||
}
|
||||
],
|
||||
"require": {}
|
||||
}
|
23
package.json
Normal file
23
package.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "tinytalk",
|
||||
"module": "index.ts",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build:css": "bunx @tailwindcss/cli -i ./public/assets/css/tw-pre.css -o ./public/assets/css/tw.css",
|
||||
"build:css:watch": "bunx @tailwindcss/cli -i ./public/assets/css/tw-pre.css -o ./public/assets/css/tw.css --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "latest"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "^5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tailwindcss/cli": "^4.1.4",
|
||||
"tailwindcss": "^4.1.4"
|
||||
},
|
||||
"trustedDependencies": [
|
||||
"@parcel/watcher"
|
||||
]
|
||||
}
|
1
public/assets/css/tw-pre.css
Normal file
1
public/assets/css/tw-pre.css
Normal file
@ -0,0 +1 @@
|
||||
@import "tailwindcss";
|
11
public/index.php
Normal file
11
public/index.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
$uri = $_SERVER['REQUEST_URI'];
|
||||
|
||||
if ($uri === '/' || $uri === '/index.php') {
|
||||
(new \Aidan\Tinytalk\Controller\HomeController())->index();
|
||||
} else {
|
||||
http_response_code(404);
|
||||
echo "404 Not Found";
|
||||
}
|
8
src/Controller/HomeController.php
Normal file
8
src/Controller/HomeController.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace Aidan\Tinytalk\Controller;
|
||||
|
||||
class HomeController {
|
||||
public function index() {
|
||||
include __DIR__ . '/../../templates/home.php';
|
||||
}
|
||||
}
|
14
templates/home.php
Normal file
14
templates/home.php
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>TinyTalk</title>
|
||||
|
||||
<link rel="stylesheet" href="/assets/css/tw.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="text-3xl font-bold">TinyTalk</h1>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user