-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added base skeleton for a landing page (#905)
* Added base skeleton for a landing page * added tailwindcss symfony bundle * small fixes * moved config out of kernel * added missing dependency * fixed namespace * fixed NS in console app
- Loading branch information
Showing
27 changed files
with
4,161 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
APP_ENV=dev | ||
APP_SECRET=04f48bdb7d5426b4c5ba6aaf3d00a1fa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.env.local | ||
vendor/ | ||
var/ | ||
public/assets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Flow PHP - Web | ||
|
||
## Prerequisite | ||
To run web page locally, you need to have Symfony CLI installed locally. | ||
Instruction on how to install it can be found here: [https://symfony.com/download](https://symfony.com/download). | ||
|
||
## Setup | ||
Install all dependencies: | ||
```shell | ||
composer install | ||
``` | ||
|
||
Create a local certificate authority for the server: | ||
```shell | ||
symfony server:ca:install | ||
``` | ||
|
||
Run symfony web server: | ||
```shell | ||
symfony server:start --dir=public -d | ||
``` | ||
|
||
Build assets: | ||
```shell | ||
bin/console tailwind:build | ||
``` | ||
|
||
Page will be accessible from [https://127.0.0.1:8000](https://127.0.0.1:8000) url. | ||
|
||
To stop symfony web server, execute: | ||
```shell | ||
symfony local:server:stop --dir=public | ||
``` | ||
|
||
## Working with CSS using Tailwind | ||
We strive to eliminate usage of Node and NPM in Flow PHP, so we decided to use standalone CLI executable here. | ||
To generated CSS using Tailwind, execute: | ||
```shell | ||
bin/console tailwind:build | ||
``` | ||
|
||
It'll fetch executable file and create CSS that will be served from web server. | ||
Or if you want to keep it running in the watch mode, execute: | ||
```shell | ||
bin/console tailwind:build --watch | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
use Flow\Website\Kernel; | ||
use Symfony\Bundle\FrameworkBundle\Console\Application; | ||
|
||
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) { | ||
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".'); | ||
} | ||
|
||
require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; | ||
|
||
return function (array $context) { | ||
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); | ||
|
||
return new Application($kernel); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"name": "flow-php/web", | ||
"description": "Flow PHP ETL - Web", | ||
"type": "project", | ||
"require": { | ||
"symfony/http-kernel": "^6.4", | ||
"symfony/http-foundation": "^6.4", | ||
"symfony/routing": "^6.4", | ||
"symfony/framework-bundle": "^6.4", | ||
"symfony/twig-bundle": "^6.4", | ||
"symfony/asset-mapper": "^6.4", | ||
"symfony/asset": "^6.4", | ||
"symfony/runtime": "^6.4", | ||
"symfony/console": "^6.4", | ||
"symfony/yaml": "^6.4", | ||
"symfony/dotenv": "^6.4" | ||
}, | ||
"require-dev": { | ||
"symfony/web-profiler-bundle": "^6.4", | ||
"symfonycasts/tailwind-bundle": "^0.5.0", | ||
"norberttech/static-content-generator-bundle": "1.x-dev" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Flow\\Website\\": "src/Flow/Website/" | ||
} | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"symfony/runtime": true | ||
} | ||
}, | ||
"scripts": { | ||
"assets:clear": "rm -rf public/assets", | ||
"assets:build": [ | ||
"@assets:clear", | ||
"bin/console tailwind:build", | ||
"bin/console asset-map:compile" | ||
] | ||
} | ||
} |
Oops, something went wrong.