-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Raphael Badawi
committed
Jun 25, 2021
0 parents
commit 798bd05
Showing
83 changed files
with
18,986 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# define your env variables for the test env here | ||
KERNEL_CLASS='App\Kernel' | ||
APP_SECRET='$ecretf0rt3st' | ||
SYMFONY_DEPRECATIONS_HELPER=999999 | ||
PANTHER_APP_ENV=panther | ||
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots |
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,29 @@ | ||
|
||
###> symfony/framework-bundle ### | ||
/.env | ||
/.env.local | ||
/.env.local.php | ||
/.env.*.local | ||
/config/secrets/prod/prod.decrypt.private.php | ||
/public/bundles/ | ||
/public/uploads/ | ||
/var/ | ||
/vendor/ | ||
###< symfony/framework-bundle ### | ||
|
||
###> symfony/phpunit-bridge ### | ||
.phpunit.result.cache | ||
/phpunit.xml | ||
###< symfony/phpunit-bridge ### | ||
|
||
###> phpunit/phpunit ### | ||
/phpunit.xml | ||
.phpunit.result.cache | ||
###< phpunit/phpunit ### | ||
|
||
###> symfony/webpack-encore-bundle ### | ||
/node_modules/ | ||
/public/build/ | ||
npm-debug.log | ||
yarn-error.log | ||
###< symfony/webpack-encore-bundle ### |
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,13 @@ | ||
# Duck Tales | ||
|
||
## Purpose | ||
|
||
This is a basic Twitter clone, but instead of birds we have ducks. | ||
|
||
## Use | ||
|
||
- clone the repo | ||
- install PHP dependencies `composer install` | ||
- install JS dependencies `yarn install` (you may also use npm) | ||
- run `yarn watch` to transpile CSS/JS assets | ||
- run `symfony server:start` to launch the dev server (make sure you have installed Symfony globally via Composer) |
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,47 @@ | ||
/* | ||
* Welcome to your app's main JavaScript file! | ||
* | ||
* We recommend including the built version of this JavaScript file | ||
* (and its CSS file) in your base layout (base.html.twig). | ||
*/ | ||
|
||
// any CSS you import will output into a single css file (app.css in this case) | ||
import "./styles/app.scss"; | ||
|
||
// start the Stimulus application | ||
import "./bootstrap"; | ||
|
||
const quackFileUpload = document.querySelector('[for="quackFileUpload"]'); | ||
const quackFileUploadIcon = document.querySelector("#quackFileUploadIcon"); | ||
const quackFileUploadInput = document.querySelector("#quackFileUpload"); | ||
const quackImagePreview = document.querySelector("#picturePreview"); | ||
const quackImagePreviewContainer = document.querySelector( | ||
"#picturePreviewContainer" | ||
); | ||
const closePicturePreview = document.querySelector("#closePicturePreview"); | ||
|
||
if (quackFileUpload) { | ||
quackFileUpload.addEventListener("mouseenter", () => { | ||
quackFileUploadIcon.classList.add("file-upload-grayscale-icon"); | ||
}); | ||
|
||
quackFileUpload.addEventListener("mouseleave", () => { | ||
quackFileUploadIcon.classList.remove("file-upload-grayscale-icon"); | ||
}); | ||
|
||
quackFileUploadInput.addEventListener("change", () => { | ||
const file = quackFileUploadInput.files[0]; | ||
if (file) { | ||
const fileReader = new FileReader(); | ||
fileReader.addEventListener("load", () => { | ||
quackImagePreview.setAttribute("src", fileReader.result); | ||
}); | ||
fileReader.readAsDataURL(file); | ||
quackImagePreviewContainer.classList.remove("opacity-0"); | ||
} | ||
}); | ||
|
||
closePicturePreview.addEventListener("click", () => { | ||
quackImagePreviewContainer.classList.add("opacity-0"); | ||
}); | ||
} |
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,11 @@ | ||
import { startStimulusApp } from '@symfony/stimulus-bridge'; | ||
|
||
// Registers Stimulus controllers from controllers.json and in the controllers/ directory | ||
export const app = startStimulusApp(require.context( | ||
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers', | ||
true, | ||
/\.(j|t)sx?$/ | ||
)); | ||
|
||
// register any custom, 3rd party controllers here | ||
// app.register('some_controller_name', SomeImportedController); |
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 @@ | ||
{ | ||
"controllers": [], | ||
"entrypoints": [] | ||
} |
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,16 @@ | ||
import { Controller } from 'stimulus'; | ||
|
||
/* | ||
* This is an example Stimulus controller! | ||
* | ||
* Any element with a data-controller="hello" attribute will cause | ||
* this controller to be executed. The name "hello" comes from the filename: | ||
* hello_controller.js -> "hello" | ||
* | ||
* Delete this file or adapt it for your use! | ||
*/ | ||
export default class extends Controller { | ||
connect() { | ||
this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js'; | ||
} | ||
} |
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,23 @@ | ||
@import "tailwindcss/base"; | ||
@import "tailwindcss/components"; | ||
@import "tailwindcss/utilities"; | ||
|
||
::selection { | ||
color: yellow; | ||
background: #10b981; | ||
} | ||
|
||
.text-shadow { | ||
text-shadow: 1px 1px 2px #10b981; | ||
} | ||
|
||
.min-h-screen { | ||
background: url("../img/bg_duck.jpg") no-repeat; | ||
background-size: cover; | ||
} | ||
|
||
.file-upload-grayscale-icon { | ||
// can't use Tailwind's fill-current hover:text-white since the svg is loaded inside an img tag | ||
filter: invert(1); | ||
transition: filter .15s ease; | ||
} |
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 App\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,19 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
if (!ini_get('date.timezone')) { | ||
ini_set('date.timezone', 'UTC'); | ||
} | ||
|
||
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) { | ||
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php'); | ||
require PHPUNIT_COMPOSER_INSTALL; | ||
PHPUnit\TextUI\Command::main(); | ||
} else { | ||
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) { | ||
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n"; | ||
exit(1); | ||
} | ||
|
||
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php'; | ||
} |
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,104 @@ | ||
{ | ||
"type": "project", | ||
"license": "proprietary", | ||
"minimum-stability": "stable", | ||
"prefer-stable": true, | ||
"require": { | ||
"php": ">=7.2.5", | ||
"ext-ctype": "*", | ||
"ext-iconv": "*", | ||
"composer/package-versions-deprecated": "1.11.99.2", | ||
"doctrine/annotations": "^1.13", | ||
"doctrine/doctrine-bundle": "^2.4", | ||
"doctrine/doctrine-migrations-bundle": "^3.1", | ||
"doctrine/orm": "^2.9", | ||
"knplabs/knp-markdown-bundle": "^1.9", | ||
"knpuniversity/oauth2-client-bundle": "^2.8", | ||
"league/oauth2-google": "^4.0", | ||
"phpdocumentor/reflection-docblock": "^5.2", | ||
"sensio/framework-extra-bundle": "^6.1", | ||
"symfony/asset": "5.3.*", | ||
"symfony/console": "5.3.*", | ||
"symfony/dotenv": "5.3.*", | ||
"symfony/expression-language": "5.3.*", | ||
"symfony/flex": "^1.3.1", | ||
"symfony/form": "5.3.*", | ||
"symfony/framework-bundle": "5.3.*", | ||
"symfony/http-client": "5.3.*", | ||
"symfony/intl": "5.3.*", | ||
"symfony/mailer": "5.3.*", | ||
"symfony/mime": "5.3.*", | ||
"symfony/monolog-bundle": "^3.1", | ||
"symfony/notifier": "5.3.*", | ||
"symfony/process": "5.3.*", | ||
"symfony/property-access": "5.3.*", | ||
"symfony/property-info": "5.3.*", | ||
"symfony/proxy-manager-bridge": "5.3.*", | ||
"symfony/runtime": "5.3.*", | ||
"symfony/security-bundle": "5.3.*", | ||
"symfony/serializer": "5.3.*", | ||
"symfony/string": "5.3.*", | ||
"symfony/translation": "5.3.*", | ||
"symfony/twig-bundle": "^5.3", | ||
"symfony/validator": "5.3.*", | ||
"symfony/webpack-encore-bundle": "^1.12", | ||
"symfony/yaml": "5.3.*", | ||
"twig/extra-bundle": "^2.12|^3.0", | ||
"twig/intl-extra": "^3.3", | ||
"twig/twig": "^2.12|^3.0" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^9.5", | ||
"symfony/browser-kit": "^5.3", | ||
"symfony/css-selector": "^5.3", | ||
"symfony/debug-bundle": "^5.3", | ||
"symfony/maker-bundle": "^1.32", | ||
"symfony/phpunit-bridge": "^5.3", | ||
"symfony/stopwatch": "^5.3", | ||
"symfony/var-dumper": "^5.3", | ||
"symfony/web-profiler-bundle": "^5.3" | ||
}, | ||
"config": { | ||
"optimize-autoloader": true, | ||
"preferred-install": { | ||
"*": "dist" | ||
}, | ||
"sort-packages": true | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"App\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"App\\Tests\\": "tests/" | ||
} | ||
}, | ||
"replace": { | ||
"symfony/polyfill-ctype": "*", | ||
"symfony/polyfill-iconv": "*", | ||
"symfony/polyfill-php72": "*" | ||
}, | ||
"scripts": { | ||
"auto-scripts": { | ||
"cache:clear": "symfony-cmd", | ||
"assets:install %PUBLIC_DIR%": "symfony-cmd" | ||
}, | ||
"post-install-cmd": [ | ||
"@auto-scripts" | ||
], | ||
"post-update-cmd": [ | ||
"@auto-scripts" | ||
] | ||
}, | ||
"conflict": { | ||
"symfony/symfony": "*" | ||
}, | ||
"extra": { | ||
"symfony": { | ||
"allow-contrib": false, | ||
"require": "5.3.*" | ||
} | ||
} | ||
} |
Oops, something went wrong.