diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index d1de2a3..10cc380 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -29,6 +29,13 @@ class LoginController extends Controller */ protected $redirectTo = RouteServiceProvider::HOME; + /** + * Login username to be used by the controller. + * + * @var string + */ + protected $username; + /** * Create a new controller instance. * @@ -37,5 +44,30 @@ class LoginController extends Controller public function __construct() { $this->middleware('guest')->except('logout'); + $this->username = $this->findUsername(); + } + + /** + * Get the login username to be used by the controller. + * + * @return string + */ + public function findUsername() + { + $login = request()->input('login'); + $fieldType = filter_var($login, FILTER_VALIDATE_EMAIL) ? 'email' : 'name'; + request()->merge([$fieldType => $login]); + + return $fieldType; + } + + /** + * Get username property. + * + * @return string + */ + public function username() + { + return $this->username; } } diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 1cb8e07..7c9d0c0 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -5,9 +5,11 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; use App\Providers\RouteServiceProvider; use App\Models\User; +use App\Models\InviteKey; use Illuminate\Foundation\Auth\RegistersUsers; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Validator; +use Illuminate\Validation\ValidationException; class RegisterController extends Controller { @@ -65,11 +67,51 @@ class RegisterController extends Controller */ protected function create(array $data) { + $this->verifyKey($data['key']); + $invited_by = $this->getInviter($data['key']); + $this->updateKeyTable($data['key']); + return User::create([ 'name' => $data['name'], 'email' => $data['email'], 'dob' => $data['dob'], 'password' => Hash::make($data['password']), + 'badges' => [3], + 'invited_by' => $invited_by, ]); } + + protected function verifyKey($key) + { + $fetchKey = InviteKey::where('key', $key)->orderBy('id', 'desc')->first(); + + if (empty($fetchKey) || !$fetchKey->active) { + throw ValidationException::withMessages(['key' => 'Incorrect invite key']); + } else { + return true; + } + } + + protected function getInviter($key) + { + $fetchKey = InviteKey::where('key', $key)->orderBy('id', 'desc')->first(); + + return $fetchKey->created_by; + } + + protected function updateKeyTable($key) : void + { + if (!User::exists()) { + $newId = 0; + } else { + $newId = User::orderBy('id', 'desc')->first()->id; + } + + $updateDetails = [ + 'user_invited' => ++$newId, + 'active' => false, + ]; + + InviteKey::where('key', $key)->orderBy('id', 'desc')->first()->update($updateDetails); + } } diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index f68452e..e2ddbeb 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -23,6 +23,9 @@ class HomeController extends Controller */ public function index() { + if (auth()->user()) { + return redirect(route('home')); + } return view('index'); } diff --git a/app/Http/Controllers/KeyController.php b/app/Http/Controllers/KeyController.php new file mode 100644 index 0000000..fd24dee --- /dev/null +++ b/app/Http/Controllers/KeyController.php @@ -0,0 +1,56 @@ +orderBy('id', 'desc')->get(); + $activeKey = InviteKey::where('created_by', Auth::id())->orderBy('id', 'desc')->first(); + + if (!$fetchKeys->isEmpty()) { + if ($activeKey->created_at->addWeek()->gt(Carbon::now())) { + $canCreate = false; + } else { + $canCreate = true; + } + } else { + $canCreate = true; + } + + $data = [ + 'canCreate' => $canCreate, + 'fetchKeys' => $fetchKeys, + ]; + + return view('invite.index')->with('data', $data); + } + + public function create() + { + $fetchKeys = InviteKey::where('created_by', Auth::id())->orderBy('id', 'desc')->get(); + $activeKey = InviteKey::where('created_by', Auth::id())->orderBy('id', 'desc')->first(); + + // Validation + if (!$fetchKeys->isEmpty() && $activeKey->created_at->addWeek()->gt(Carbon::now())) { + if (!User::isAdmin()) + abort(404); + } + + $key = new InviteKey; + $key->key = Uuid::generate()->string; + $key->created_by = Auth::id(); + $key->user_invited = 0; + $key->save(); + + return redirect()->route('key_index'); + } +} diff --git a/app/Http/Controllers/PageController.php b/app/Http/Controllers/PageController.php index c8757cc..464d104 100644 --- a/app/Http/Controllers/PageController.php +++ b/app/Http/Controllers/PageController.php @@ -2,9 +2,11 @@ namespace App\Http\Controllers; +use Illuminate\Support\Facades\DB; use Illuminate\Http\Request; use App\Models\User; + class PageController extends Controller { /** @@ -25,9 +27,33 @@ class PageController extends Controller public function profile($id) { $user = User::find($id); + $badges = DB::table('badges')->get(); + if (!$user) { abort(404); } - return view('pages.profile')->with('user', $user); + + $data = [ + 'user' => $user, + 'badges' => $badges + ]; + + return view('pages.profile')->with('data', $data); + } + + public function users(Request $request) + { + if ($request->has('q')) { + $users = DB::table('users')->where('name', 'LIKE', '%'.$request->q.'%')->paginate(10); + } else { + $users = User::paginate(10); + } + + return view('pages.users')->with('users', $users); + } + + public function settings() + { + return view('misc.settings'); } } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index d3722c2..2b02c37 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -37,12 +37,14 @@ class Kernel extends HttpKernel \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, + \App\Http\Middleware\UserLastActivity::class, ], 'api' => [ // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, 'throttle:api', \Illuminate\Routing\Middleware\SubstituteBindings::class, + \Illuminate\Routing\Middleware\SubstituteBindings::class, ], ]; diff --git a/app/Http/Middleware/UserLastActivity.php b/app/Http/Middleware/UserLastActivity.php new file mode 100644 index 0000000..88a0618 --- /dev/null +++ b/app/Http/Middleware/UserLastActivity.php @@ -0,0 +1,31 @@ +addMinute(2); // keep online for 2 min + Cache::put('is_online_' . Auth::user()->id, true, $expireTime); + + User::where('id', Auth::user()->id)->update(['last_seen' => Carbon::now()]); + } + return $next($request); + } +} diff --git a/app/Models/InviteKey.php b/app/Models/InviteKey.php new file mode 100644 index 0000000..6c12aeb --- /dev/null +++ b/app/Models/InviteKey.php @@ -0,0 +1,23 @@ + + */ + protected $fillable = [ + 'key', + 'created_by', + 'user_invited', + 'active', + ]; +} diff --git a/app/Models/User.php b/app/Models/User.php index 4b42355..bd99ad6 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Support\Facades\Auth; use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; @@ -22,6 +23,8 @@ class User extends Authenticatable 'email', 'dob', 'password', + 'badges', + 'invited_by', ]; /** @@ -41,5 +44,15 @@ class User extends Authenticatable */ protected $casts = [ 'email_verified_at' => 'datetime', + 'badges' => 'array' ]; + + public static function isAdmin() + { + if (Auth::guest() || !Auth::user()->admin) { + return false; + } else { + return true; + } + } } diff --git a/composer.json b/composer.json index 83c4de6..acb389a 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,8 @@ "laravel/framework": "^8.75", "laravel/sanctum": "^2.11", "laravel/tinker": "^2.5", - "laravel/ui": "^3.4" + "laravel/ui": "^3.4", + "webpatser/laravel-uuid": "^4.0" }, "require-dev": { "facade/ignition": "^2.5", diff --git a/composer.lock b/composer.lock index 1ca1649..ec7ac36 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cf14086919a839fe740e00554e4baff6", + "content-hash": "25ae453eae609a277c5bbd141f21342f", "packages": [ { "name": "asm89/stack-cors", @@ -959,16 +959,16 @@ }, { "name": "laravel/framework", - "version": "v8.83.16", + "version": "v8.83.17", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "6be5abd144faf517879af7298e9d79f06f250f75" + "reference": "2cf142cd5100b02da248acad3988bdaba5635e16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/6be5abd144faf517879af7298e9d79f06f250f75", - "reference": "6be5abd144faf517879af7298e9d79f06f250f75", + "url": "https://api.github.com/repos/laravel/framework/zipball/2cf142cd5100b02da248acad3988bdaba5635e16", + "reference": "2cf142cd5100b02da248acad3988bdaba5635e16", "shasum": "" }, "require": { @@ -1128,7 +1128,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-06-07T15:09:06+00:00" + "time": "2022-06-21T14:38:31+00:00" }, { "name": "laravel/sanctum", @@ -2995,16 +2995,16 @@ }, { "name": "symfony/console", - "version": "v5.4.9", + "version": "v5.4.10", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "829d5d1bf60b2efeb0887b7436873becc71a45eb" + "reference": "4d671ab4ddac94ee439ea73649c69d9d200b5000" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/829d5d1bf60b2efeb0887b7436873becc71a45eb", - "reference": "829d5d1bf60b2efeb0887b7436873becc71a45eb", + "url": "https://api.github.com/repos/symfony/console/zipball/4d671ab4ddac94ee439ea73649c69d9d200b5000", + "reference": "4d671ab4ddac94ee439ea73649c69d9d200b5000", "shasum": "" }, "require": { @@ -3074,7 +3074,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.9" + "source": "https://github.com/symfony/console/tree/v5.4.10" }, "funding": [ { @@ -3090,7 +3090,7 @@ "type": "tidelift" } ], - "time": "2022-05-18T06:17:34+00:00" + "time": "2022-06-26T13:00:04+00:00" }, { "name": "symfony/css-selector", @@ -3525,16 +3525,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.4.9", + "version": "v5.4.10", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "6b0d0e4aca38d57605dcd11e2416994b38774522" + "reference": "e7793b7906f72a8cc51054fbca9dcff7a8af1c1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/6b0d0e4aca38d57605dcd11e2416994b38774522", - "reference": "6b0d0e4aca38d57605dcd11e2416994b38774522", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e7793b7906f72a8cc51054fbca9dcff7a8af1c1e", + "reference": "e7793b7906f72a8cc51054fbca9dcff7a8af1c1e", "shasum": "" }, "require": { @@ -3578,7 +3578,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.9" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.10" }, "funding": [ { @@ -3594,20 +3594,20 @@ "type": "tidelift" } ], - "time": "2022-05-17T15:07:29+00:00" + "time": "2022-06-19T13:13:40+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.4.9", + "version": "v5.4.10", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "34b121ad3dc761f35fe1346d2f15618f8cbf77f8" + "reference": "255ae3b0a488d78fbb34da23d3e0c059874b5948" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/34b121ad3dc761f35fe1346d2f15618f8cbf77f8", - "reference": "34b121ad3dc761f35fe1346d2f15618f8cbf77f8", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/255ae3b0a488d78fbb34da23d3e0c059874b5948", + "reference": "255ae3b0a488d78fbb34da23d3e0c059874b5948", "shasum": "" }, "require": { @@ -3690,7 +3690,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.9" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.10" }, "funding": [ { @@ -3706,20 +3706,20 @@ "type": "tidelift" } ], - "time": "2022-05-27T07:09:08+00:00" + "time": "2022-06-26T16:57:59+00:00" }, { "name": "symfony/mime", - "version": "v5.4.9", + "version": "v5.4.10", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "2b3802a24e48d0cfccf885173d2aac91e73df92e" + "reference": "02265e1e5111c3cd7480387af25e82378b7ab9cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/2b3802a24e48d0cfccf885173d2aac91e73df92e", - "reference": "2b3802a24e48d0cfccf885173d2aac91e73df92e", + "url": "https://api.github.com/repos/symfony/mime/zipball/02265e1e5111c3cd7480387af25e82378b7ab9cc", + "reference": "02265e1e5111c3cd7480387af25e82378b7ab9cc", "shasum": "" }, "require": { @@ -3773,7 +3773,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.9" + "source": "https://github.com/symfony/mime/tree/v5.4.10" }, "funding": [ { @@ -3789,7 +3789,7 @@ "type": "tidelift" } ], - "time": "2022-05-21T10:24:18+00:00" + "time": "2022-06-09T12:22:40+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4845,16 +4845,16 @@ }, { "name": "symfony/string", - "version": "v5.4.9", + "version": "v5.4.10", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "985e6a9703ef5ce32ba617c9c7d97873bb7b2a99" + "reference": "4432bc7df82a554b3e413a8570ce2fea90e94097" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/985e6a9703ef5ce32ba617c9c7d97873bb7b2a99", - "reference": "985e6a9703ef5ce32ba617c9c7d97873bb7b2a99", + "url": "https://api.github.com/repos/symfony/string/zipball/4432bc7df82a554b3e413a8570ce2fea90e94097", + "reference": "4432bc7df82a554b3e413a8570ce2fea90e94097", "shasum": "" }, "require": { @@ -4911,7 +4911,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.9" + "source": "https://github.com/symfony/string/tree/v5.4.10" }, "funding": [ { @@ -4927,7 +4927,7 @@ "type": "tidelift" } ], - "time": "2022-04-19T10:40:37+00:00" + "time": "2022-06-26T15:57:47+00:00" }, { "name": "symfony/translation", @@ -5457,6 +5457,64 @@ "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, "time": "2022-06-03T18:03:27+00:00" + }, + { + "name": "webpatser/laravel-uuid", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/webpatser/laravel-uuid.git", + "reference": "df92ebbc5ea71ee9e0d6e2861178be42ef7eb330" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webpatser/laravel-uuid/zipball/df92ebbc5ea71ee9e0d6e2861178be42ef7eb330", + "reference": "df92ebbc5ea71ee9e0d6e2861178be42ef7eb330", + "shasum": "" + }, + "require": { + "php": "^7.0|^8.0" + }, + "require-dev": { + "fakerphp/faker": "^1.9.1", + "phpunit/phpunit": "^9.3.3" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Webpatser\\Uuid\\UuidServiceProvider" + ], + "aliases": { + "Uuid": "Webpatser\\Uuid\\Uuid" + } + } + }, + "autoload": { + "psr-4": { + "Webpatser\\Uuid\\": "src/Webpatser/Uuid/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christoph Kempen", + "email": "christoph@downsized.nl" + } + ], + "description": "Laravel package to generate and to validate a universally unique identifier (UUID) according to the RFC 4122 standard. Support for version 1, 3, 4 and 5 UUIDs are built-in.", + "homepage": "https://github.com/webpatser/laravel-uuid", + "keywords": [ + "UUID RFC4122" + ], + "support": { + "issues": "https://github.com/webpatser/laravel-uuid/issues", + "source": "https://github.com/webpatser/laravel-uuid" + }, + "time": "2021-03-09T07:19:24+00:00" } ], "packages-dev": [ @@ -5917,16 +5975,16 @@ }, { "name": "laravel/sail", - "version": "v1.14.10", + "version": "v1.14.11", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "0ea5d683af4d189071efcdb9e83946c10dab82c3" + "reference": "6edf45a247b3688e0d07e149570a62fd9bc11c73" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/0ea5d683af4d189071efcdb9e83946c10dab82c3", - "reference": "0ea5d683af4d189071efcdb9e83946c10dab82c3", + "url": "https://api.github.com/repos/laravel/sail/zipball/6edf45a247b3688e0d07e149570a62fd9bc11c73", + "reference": "6edf45a247b3688e0d07e149570a62fd9bc11c73", "shasum": "" }, "require": { @@ -5973,7 +6031,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2022-06-09T07:10:28+00:00" + "time": "2022-06-13T18:32:48+00:00" }, { "name": "mockery/mockery", diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 57c45f1..fd20798 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -3,6 +3,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; +use Carbon\Carbon; class CreateUsersTable extends Migration { @@ -25,6 +26,9 @@ class CreateUsersTable extends Migration $table->string('blurb')->default('Hello!'); $table->rememberToken(); $table->timestamps(); + $table->string('last_seen')->default(Carbon::now()); + $table->json('badges'); + $table->integer('invited_by'); }); } diff --git a/database/migrations/2022_06_26_010916_create_badges_table.php b/database/migrations/2022_06_26_010916_create_badges_table.php new file mode 100644 index 0000000..ed1f2d4 --- /dev/null +++ b/database/migrations/2022_06_26_010916_create_badges_table.php @@ -0,0 +1,33 @@ +id(); + $table->string('title'); + $table->string('description'); + $table->string('img'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('badges'); + } +} diff --git a/database/migrations/2022_06_27_063019_create_invite_keys_table.php b/database/migrations/2022_06_27_063019_create_invite_keys_table.php new file mode 100644 index 0000000..4d19201 --- /dev/null +++ b/database/migrations/2022_06_27_063019_create_invite_keys_table.php @@ -0,0 +1,35 @@ +id(); + $table->string('key', 36)->unique(); + $table->integer('created_by'); + $table->integer('user_invited'); + $table->boolean('active')->default(true); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('invite_keys'); + } +} diff --git a/public/GameRBLX/PrivKey.pem b/public/GameRBLX/PrivKey.pem new file mode 100644 index 0000000..5e1a390 --- /dev/null +++ b/public/GameRBLX/PrivKey.pem @@ -0,0 +1,3 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXQIBAAKBgQDAWrd/TwGJULsVRo06rCpznNmW4zLJK6LwkfTvG3wURFFBj9E9zuaKAOzHVRrHsWKJhq2BxSUze7OClgzgzFLRQHhRQFKn/skLPrV85bFakoK/dnt9h/Jyn2cD2A8Za6q90O3h9FSy9mLvCN07g07IXtauYZfOXvqyqOn4rAeUJQIDAQABAoGBAISbxddZo0iERIW1XtXtLVMI9iUEutVfZPSO2xogi5j5RD97o5gF1H+dhZ8iN9UloDYJiAJn5G6qwCWtxnEPy6NO4lMDgFMQtlpIIW9mafZ7m+AueYJtgO5elLUnFbOA39OcvFUleL9ded42yuB2wfsGdKl85+mHvn8j4zTmT0+9AkEA3H7NBFhIVf3Vj6iLXwPmamhou8T8b+HSXop0krrP/jDw/wHbl0DEJbQv+ypYdoXJo8XS2Hs39z20pCEsUo2/NwJBAN9T5aWXmVnymbdNUCDMjjer2d6Ey9ARyFgB07xHSod+HWlSCES8pcWwZZrP/I4cf2CEiAInfgak0kNNWLOWnYMCQDJEoj7UVaFtHiwDM8r0m6o0pXPxY8+p/wjYrdzpxBNiWv74EHT6Kf2ih7HOJJ7Yv3Cb4AbEiKzQH4evnGgxsp8CQQDRPK+ad/DLn0p5vMvoDv7oFfCoVM8IAMEuA3g3nKutSnGP7bWlgQHnuB9Z7qf3FagZ69HqAspGu0HsoJkMmX61AkAO5wTd+rja0MP7rT5xNVYBALtdYLWowBov4NCN7BVDkd0JzeTjMtDerirvEDuzDBrbyFtKV5rZjZpuotFc+5/t +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/public/css/app.css b/public/css/app.css index 9c09e06..0470edb 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -15,6 +15,33 @@ text-align: center; background: linear-gradient(#f07575 10%, #e13b3b 49%, #d22 50%, #de2323 100%); } +.warningtext { + color: red; +} +.popupcontainer { + top: 0%; + position: fixed; + background-color: rgba(0,0,0,0.5); + width: 100%; + height: 100%; + z-index: 100000000; +} +.popup { + color:#000000; + text-align: center; + position: fixed; + top: 50%; + left: 50%; + padding-top: 5px; + padding-bottom: 5px; + padding-left: 5px; + padding-right: 5px; + transform: translate(-50%, -50%); + width: max-content; + border-radius: 3px; + border: 1px solid #3D414A; + background: linear-gradient(#cacbcc 10%, #99999a 49%, #747474 50%, #2d2d2d 100%); +} .navbar { height: 40px; margin: 0px; @@ -89,7 +116,7 @@ background: linear-gradient(#f07575 10%, #e13b3b 49%, #d22 50%, #de2323 100%); padding-right: 5px; width: 50%; } -.FeedContainerBox { +.FeedContainerBox, .ProfileContainerBox { border-radius: 1px; text-align: left; width: 100%; @@ -97,6 +124,7 @@ background: linear-gradient(#f07575 10%, #e13b3b 49%, #d22 50%, #de2323 100%); display: inline-flex; border: 1px solid #000000; border-width: 1px; + margin-bottom: 5px; } #btncontainer { margin-left: 75%; @@ -294,4 +322,12 @@ a, #navbarusername { background-color: rgba(255, 255, 255, 0.3); padding-bottom: 5px; padding-top: 5px; +} +.w-5 { + display: none; +} +.flex { + display: table; + margin-right: auto; + margin-left: auto; } \ No newline at end of file diff --git a/public/css/app.js b/public/css/app.js new file mode 100644 index 0000000..e5b9264 --- /dev/null +++ b/public/css/app.js @@ -0,0 +1,397 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ "./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[2]!./resources/css/app.css": +/*!*****************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[2]!./resources/css/app.css ***! + \*****************************************************************************************************************************************************************************************/ +/***/ (() => { + +throw new Error("Module build failed (from ./node_modules/css-loader/dist/cjs.js):\nError: Can't resolve '../img/animated.png' in 'C:\\wamp64\\www\\morblox-site\\resources\\css'\n at finishWithoutResolve (C:\\wamp64\\www\\morblox-site\\node_modules\\enhanced-resolve\\lib\\Resolver.js:309:18)\n at C:\\wamp64\\www\\morblox-site\\node_modules\\enhanced-resolve\\lib\\Resolver.js:386:15\n at C:\\wamp64\\www\\morblox-site\\node_modules\\enhanced-resolve\\lib\\Resolver.js:435:5\n at eval (eval at create (C:\\wamp64\\www\\morblox-site\\node_modules\\tapable\\lib\\HookCodeFactory.js:33:10), :16:1)\n at C:\\wamp64\\www\\morblox-site\\node_modules\\enhanced-resolve\\lib\\Resolver.js:435:5\n at eval (eval at create (C:\\wamp64\\www\\morblox-site\\node_modules\\tapable\\lib\\HookCodeFactory.js:33:10), :27:1)\n at C:\\wamp64\\www\\morblox-site\\node_modules\\enhanced-resolve\\lib\\DescriptionFilePlugin.js:87:43\n at C:\\wamp64\\www\\morblox-site\\node_modules\\enhanced-resolve\\lib\\Resolver.js:435:5\n at eval (eval at create (C:\\wamp64\\www\\morblox-site\\node_modules\\tapable\\lib\\HookCodeFactory.js:33:10), :15:1)\n at C:\\wamp64\\www\\morblox-site\\node_modules\\enhanced-resolve\\lib\\Resolver.js:435:5"); + +/***/ }), + +/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": +/*!****************************************************************************!*\ + !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! + \****************************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var isOldIE = function isOldIE() { + var memo; + return function memorize() { + if (typeof memo === 'undefined') { + // Test for IE <= 9 as proposed by Browserhacks + // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 + // Tests for existence of standard globals is to allow style-loader + // to operate correctly into non-standard environments + // @see https://github.com/webpack-contrib/style-loader/issues/177 + memo = Boolean(window && document && document.all && !window.atob); + } + + return memo; + }; +}(); + +var getTarget = function getTarget() { + var memo = {}; + return function memorize(target) { + if (typeof memo[target] === 'undefined') { + var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself + + if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { + try { + // This will throw an exception if access to iframe is blocked + // due to cross-origin restrictions + styleTarget = styleTarget.contentDocument.head; + } catch (e) { + // istanbul ignore next + styleTarget = null; + } + } + + memo[target] = styleTarget; + } + + return memo[target]; + }; +}(); + +var stylesInDom = []; + +function getIndexByIdentifier(identifier) { + var result = -1; + + for (var i = 0; i < stylesInDom.length; i++) { + if (stylesInDom[i].identifier === identifier) { + result = i; + break; + } + } + + return result; +} + +function modulesToDom(list, options) { + var idCountMap = {}; + var identifiers = []; + + for (var i = 0; i < list.length; i++) { + var item = list[i]; + var id = options.base ? item[0] + options.base : item[0]; + var count = idCountMap[id] || 0; + var identifier = "".concat(id, " ").concat(count); + idCountMap[id] = count + 1; + var index = getIndexByIdentifier(identifier); + var obj = { + css: item[1], + media: item[2], + sourceMap: item[3] + }; + + if (index !== -1) { + stylesInDom[index].references++; + stylesInDom[index].updater(obj); + } else { + stylesInDom.push({ + identifier: identifier, + updater: addStyle(obj, options), + references: 1 + }); + } + + identifiers.push(identifier); + } + + return identifiers; +} + +function insertStyleElement(options) { + var style = document.createElement('style'); + var attributes = options.attributes || {}; + + if (typeof attributes.nonce === 'undefined') { + var nonce = true ? __webpack_require__.nc : 0; + + if (nonce) { + attributes.nonce = nonce; + } + } + + Object.keys(attributes).forEach(function (key) { + style.setAttribute(key, attributes[key]); + }); + + if (typeof options.insert === 'function') { + options.insert(style); + } else { + var target = getTarget(options.insert || 'head'); + + if (!target) { + throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); + } + + target.appendChild(style); + } + + return style; +} + +function removeStyleElement(style) { + // istanbul ignore if + if (style.parentNode === null) { + return false; + } + + style.parentNode.removeChild(style); +} +/* istanbul ignore next */ + + +var replaceText = function replaceText() { + var textStore = []; + return function replace(index, replacement) { + textStore[index] = replacement; + return textStore.filter(Boolean).join('\n'); + }; +}(); + +function applyToSingletonTag(style, index, remove, obj) { + var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE + + /* istanbul ignore if */ + + if (style.styleSheet) { + style.styleSheet.cssText = replaceText(index, css); + } else { + var cssNode = document.createTextNode(css); + var childNodes = style.childNodes; + + if (childNodes[index]) { + style.removeChild(childNodes[index]); + } + + if (childNodes.length) { + style.insertBefore(cssNode, childNodes[index]); + } else { + style.appendChild(cssNode); + } + } +} + +function applyToTag(style, options, obj) { + var css = obj.css; + var media = obj.media; + var sourceMap = obj.sourceMap; + + if (media) { + style.setAttribute('media', media); + } else { + style.removeAttribute('media'); + } + + if (sourceMap && typeof btoa !== 'undefined') { + css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); + } // For old IE + + /* istanbul ignore if */ + + + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + while (style.firstChild) { + style.removeChild(style.firstChild); + } + + style.appendChild(document.createTextNode(css)); + } +} + +var singleton = null; +var singletonCounter = 0; + +function addStyle(obj, options) { + var style; + var update; + var remove; + + if (options.singleton) { + var styleIndex = singletonCounter++; + style = singleton || (singleton = insertStyleElement(options)); + update = applyToSingletonTag.bind(null, style, styleIndex, false); + remove = applyToSingletonTag.bind(null, style, styleIndex, true); + } else { + style = insertStyleElement(options); + update = applyToTag.bind(null, style, options); + + remove = function remove() { + removeStyleElement(style); + }; + } + + update(obj); + return function updateStyle(newObj) { + if (newObj) { + if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { + return; + } + + update(obj = newObj); + } else { + remove(); + } + }; +} + +module.exports = function (list, options) { + options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of