parent
6038ee0b35
commit
43b2c739d7
|
|
@ -23,6 +23,9 @@ class HomeController extends Controller
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
if (auth()->user()) {
|
||||
return redirect(route('home'));
|
||||
}
|
||||
return view('index');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,22 @@ class PageController extends Controller
|
|||
public function profile($id)
|
||||
{
|
||||
$user = User::find($id);
|
||||
|
||||
if (!$user) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
return view('pages.profile')->with('user', $user);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,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 +97,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%;
|
||||
|
|
@ -295,3 +296,11 @@ a, #navbarusername {
|
|||
padding-bottom: 5px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.w-5 {
|
||||
display: none;
|
||||
}
|
||||
.flex {
|
||||
display: table;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
@keyframes animatedbackground {
|
||||
from {background-position-x: 0px; animation-timing-function: linear;}
|
||||
to {background-position-x: 2000px; animation-timing-function: linear;}
|
||||
}
|
||||
#alert {
|
||||
}
|
||||
#alert {
|
||||
height: fit-content;
|
||||
margin: 0px;
|
||||
position: fixed;
|
||||
|
|
@ -13,9 +13,9 @@
|
|||
padding-left: 5px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
background: linear-gradient(#f07575 10%, #e13b3b 49%, #d22 50%, #de2323 100%);
|
||||
}
|
||||
.navbar {
|
||||
background: linear-gradient(#f07575 10%, #e13b3b 49%, #d22 50%, #de2323 100%);
|
||||
}
|
||||
.navbar {
|
||||
height: 40px;
|
||||
margin: 0px;
|
||||
padding-right: 5px;
|
||||
|
|
@ -30,47 +30,89 @@
|
|||
vertical-align: middle;
|
||||
width: 100%;
|
||||
background: linear-gradient(#759CF0 10%, #3B72E1 49%, #2260DD 50%, #2362DE 100%);
|
||||
}
|
||||
.navbarbuttoncontainer, .smallnavbarbuttoncontainer, .navbarlogincontainer {
|
||||
}
|
||||
.navbarbuttoncontainer, .smallnavbarbuttoncontainer, .navbarlogincontainer {
|
||||
padding-left: 5px;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
#navbarlogincontainer, #navbarsignedincontainer {
|
||||
}
|
||||
#navbarlogincontainer, #navbarsignedincontainer {
|
||||
position: relative;
|
||||
padding-right: 10px;
|
||||
margin-right: 3%;
|
||||
margin-left: auto;
|
||||
float: inline-end;
|
||||
top: 11px;
|
||||
}
|
||||
#profilefriendscontainer p, #profilefriendscontainer a {
|
||||
}
|
||||
#profilefriendscontainer p, #profilefriendscontainer a {
|
||||
display: inline;
|
||||
}
|
||||
#profiletopcontainer {
|
||||
}
|
||||
#profiletopcontainer {
|
||||
margin-bottom: 30px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
#profilemiddlecontainer {
|
||||
}
|
||||
.onlinestatus_website {
|
||||
color: #2260DD;
|
||||
}
|
||||
.onlinestatus_ingame {
|
||||
color: green;
|
||||
}
|
||||
.onlinestatus_offline {
|
||||
color: black;
|
||||
}
|
||||
#yes, #no {
|
||||
width: 50%;
|
||||
}
|
||||
#FeedBox {
|
||||
width: 100%;
|
||||
height: 22px;
|
||||
}
|
||||
#FeedButton {
|
||||
width: 100%;
|
||||
height: 22px;
|
||||
}
|
||||
#logo_signup, #logo-signup p {
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
margin-right: 50%;
|
||||
}
|
||||
#btncontainer {
|
||||
width: 200px;
|
||||
}
|
||||
#feed, #profileleftcontainer {
|
||||
text-align: center;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
width: 50%;
|
||||
}
|
||||
#gamesframe, #profilerightcontainer {
|
||||
text-align: center;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
width: 50%;
|
||||
}
|
||||
.FeedContainerBox, .ProfileContainerBox {
|
||||
border-radius: 1px;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
vertical-align: top;
|
||||
display: inline-flex;
|
||||
border: 1px solid #000000;
|
||||
border-width: 1px;
|
||||
}
|
||||
#btncontainer {
|
||||
margin-left: 75%;
|
||||
}
|
||||
.navbarbutton {
|
||||
}
|
||||
.navbarbutton {
|
||||
position: relative;
|
||||
top: 10px;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
.smallnavbarbutton {
|
||||
}
|
||||
.smallnavbarbutton {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
}
|
||||
.smallnav {
|
||||
}
|
||||
.smallnav {
|
||||
height: 25px;
|
||||
margin: 0px;
|
||||
padding-left: 5px;
|
||||
|
|
@ -87,33 +129,42 @@
|
|||
text-size-adjust: auto;
|
||||
text-align: left;
|
||||
background-color: black;
|
||||
}
|
||||
.invisible {
|
||||
}
|
||||
.invisible, #invisible {
|
||||
display: none !important;
|
||||
}
|
||||
html {
|
||||
}
|
||||
html {
|
||||
margin: 0px;
|
||||
font-family: "Helvetica";
|
||||
src: url('Helvetica.ttf') format('truetype'),;
|
||||
font-style: normal;
|
||||
background-color: #2e7eff;
|
||||
background-color: rgb(49, 107, 223);
|
||||
color: white;
|
||||
animation-name: animatedbackground;
|
||||
animation-duration: 50s;
|
||||
animation-iteration-count: infinite;
|
||||
background-image: url(animated.png);
|
||||
background-image: url('../img/animated.png');
|
||||
background-position: center 100%;
|
||||
background-repeat: repeat-x;
|
||||
background-attachment: fixed;
|
||||
}
|
||||
body {
|
||||
}
|
||||
body {
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 35px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
.content {
|
||||
}
|
||||
.content_special, #content_special {
|
||||
display: inline-flex;
|
||||
width: 100%;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
align-content: center;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.content {
|
||||
color: black;
|
||||
max-width: 1000px;
|
||||
margin: auto;
|
||||
|
|
@ -124,11 +175,25 @@ body {
|
|||
background-color: rgba(255, 255, 255, 0.8);
|
||||
padding-bottom: 5px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.content p a, .content a {
|
||||
}
|
||||
.content_signup {
|
||||
color: black;
|
||||
max-width: 500px;
|
||||
margin: auto;
|
||||
margin-top: 30px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
background-color: rgba(255, 255, 255, 0.8);
|
||||
padding-bottom: 5px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.content_signup input, .content_signup button {
|
||||
width: 90%;
|
||||
}
|
||||
.content p a, .content a, .content_signup p a, .content_signup a, .content_special p a, .content_special a {
|
||||
color: black
|
||||
}
|
||||
#footer {
|
||||
}
|
||||
#footer {
|
||||
text-align: center;
|
||||
max-width: 1000px;
|
||||
margin: auto;
|
||||
|
|
@ -138,15 +203,95 @@ body {
|
|||
padding-top: 5px;
|
||||
background-color: rgba(172, 172, 172, 0.8);
|
||||
min-height: fit-content;
|
||||
}
|
||||
#footer p, #footer a {
|
||||
}
|
||||
button {
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #3D414A;
|
||||
font-family: "Helvetica";
|
||||
color: #fff;
|
||||
}
|
||||
button.bluebutton {
|
||||
background: linear-gradient(#759CF0 10%, #3B72E1 49%, #2260DD 50%, #2362DE 100%);
|
||||
}
|
||||
button:hover.bluebutton {
|
||||
background: linear-gradient(#7ca1ef 10%, #4a7de4 49%, #396fdb 50%, #3168d6 100%);
|
||||
cursor: pointer;
|
||||
}
|
||||
button:disabled.bluebutton {
|
||||
background: linear-gradient(#759CF0 10%, #3B72E1 49%, #2260DD 50%, #2362DE 100%);
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
button.greybutton {
|
||||
background: linear-gradient(#cacbcc 10%, #99999a 49%, #747474 50%, #2d2d2d 100%);
|
||||
}
|
||||
button:hover.greybutton {
|
||||
background: linear-gradient(#d1d8e6 10%, #b3b8c2 49%, #868a91 50%, #393b3e 100%);
|
||||
cursor: pointer;
|
||||
}
|
||||
button:disabled.greybutton {
|
||||
background: linear-gradient(#cacbcc 10%, #99999a 49%, #747474 50%, #2d2d2d 100%);
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
button.redbutton {
|
||||
background: linear-gradient(#e65a5a 10%, #e13535 49%, #d92c2c 50%, #df1818 100%);
|
||||
}
|
||||
button:hover.redbutton {
|
||||
background: linear-gradient(#e56c6c 10%, #dd4e4e 49%, #d14343 50%, #da2e2e 100%);
|
||||
cursor: pointer;
|
||||
}
|
||||
button:disabled.redbutton {
|
||||
background: linear-gradient(#e65a5a 10%, #e13535 49%, #d92c2c 50%, #df1818 100%);
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
button.greenbutton {
|
||||
background: linear-gradient(#5acf77 10%, #3abc44 49%, #359c32 50%, #1a5c2e 100%);
|
||||
}
|
||||
button:hover.greenbutton {
|
||||
background: linear-gradient(#75f094 10%, #39d746 49%, #21b71c 50%, #137a32 100%);
|
||||
cursor: pointer;
|
||||
}
|
||||
button:disabled.greenbutton {
|
||||
background: linear-gradient(#75f094 10%, #39d746 49%, #21b71c 50%, #137a32 100%);
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
#footer_signup {
|
||||
text-align: center;
|
||||
max-width: 500px;
|
||||
margin: auto;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-top: 5px;
|
||||
background-color: rgba(172, 172, 172, 0.8);
|
||||
min-height: fit-content;
|
||||
}
|
||||
#footer p, #footer a, #footer_signup p, #footer_signup a {
|
||||
color: black;
|
||||
}
|
||||
p,h1 {
|
||||
}
|
||||
p,h1,h2,h3,h4,h5,h6 {
|
||||
margin: 0px;
|
||||
}
|
||||
a, #navbarusername {
|
||||
}
|
||||
a, #navbarusername {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
font-weight: bolder;
|
||||
}
|
||||
}
|
||||
.nonbolded {
|
||||
font-weight: normal !important;
|
||||
}
|
||||
.logoutframe {
|
||||
color: black;
|
||||
max-width: fit-content;
|
||||
margin: auto;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
background-color: rgba(255, 255, 255, 0.3);
|
||||
padding-bottom: 5px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
|
@ -35,13 +35,6 @@
|
|||
here!</a></p>
|
||||
<p id="discord">Also, <a href="https://discord.gg/nudzQ7hkWY">Join our Discord!</a></p>
|
||||
<ul></ul>
|
||||
<h3>Page Links</h3>
|
||||
<a href="{{ route('home') }}">Home</a>
|
||||
<a href="games.html">Games</a>
|
||||
<a href="profile.html">Profile</a>
|
||||
<a href="404.html">404</a>
|
||||
<a href="logout.html">Logout</a>
|
||||
<ul></ul>
|
||||
<ul></ul>
|
||||
<h3>User Count</h3>
|
||||
<p>There are <strong>{{ App\Models\User::count() }}</strong> users registered</p>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
<meta charset="utf-8">
|
||||
<meta content="Morblox" property="og:title" />
|
||||
<meta content="MORBLOX is a work in progress revival." property="og:description" />
|
||||
<meta content="https://thomasluigi07.github.io/MORBLOX-WEBSITE/" property="og:url" />
|
||||
<meta content="https://thomasluigi07.github.io/MORBLOX-WEBSITE/MORBLOXlogo.png" property="og:image" />
|
||||
<meta content="https://morblox.us" property="og:url" />
|
||||
<meta content="https://morblox.us/img/MORBLOXlogo.png" property="og:image" />
|
||||
<meta content="#4b4b4b" data-react-helmet="true" name="theme-color" />
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
|
|
@ -22,9 +22,9 @@
|
|||
|
||||
<body>
|
||||
<div class="navbar">
|
||||
<a id="logo_full" href="{{ route('index') }}"><img alt="MORBLOX Logo"
|
||||
<a id="logo_full" href="{{ route('home') }}"><img alt="MORBLOX Logo"
|
||||
src="{{ asset('img/MORBLOXlogo.png') }}" width="200" height="40" /></a>
|
||||
<a id="logo_small" class="invisible" href="{{ route('index') }}"><img alt="MORBLOX Logo"
|
||||
<a id="logo_small" class="invisible" href="{{ route('home') }}"><img alt="MORBLOX Logo"
|
||||
src="{{ asset('img/MORBLOXlogoshort.png') }}" width="45" height="40" /></a>
|
||||
<div class="navbarbuttoncontainer">
|
||||
<a class="navbarbutton" id="smallbtn5" href="games.html">Games</a>
|
||||
|
|
@ -54,6 +54,7 @@
|
|||
<a class="smallnavbarbutton" href="friends.html">Friends</a>
|
||||
<a class="smallnavbarbutton" href="avatar.html">Avatar</a>
|
||||
<a class="smallnavbarbutton" href="Settings.html">Transactions</a>
|
||||
<a class="smallnavbarbutton" href="{{ route('users') }}">Users</a>
|
||||
</div>
|
||||
</div>
|
||||
@yield('alert')
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
@extends('layouts.app')
|
||||
@section('title')
|
||||
<title>Users - {{ env('APP_NAME') }}</title>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@if (request()->query('q'))
|
||||
<h1 id="usernameframe">Users - {{ DB::table('users')->where('name', 'LIKE', '%'.request()->query('q').'%')->count() }} found</h1>
|
||||
<a href="{{ route('users') }}" style="color:#2260DD">Clear Search</a>
|
||||
@else
|
||||
<h1 id="usernameframe">Users</h1>
|
||||
@endif
|
||||
<ul></ul>
|
||||
<ul></ul>
|
||||
<form method="GET" action="{{ route('users') }}">
|
||||
<p><input type="text" id="q" name="q" placeholder="Enter a Username..." value="{{ request()->q }}">
|
||||
<button class="greybutton" type="submit">Search</button></p>
|
||||
</form>
|
||||
<ul></ul>
|
||||
<div id="SearchContainer">
|
||||
@foreach ($users as $user)
|
||||
<div class="ProfileContainerBox" id="ProfileContainerBox1">
|
||||
<div id="ProfileContainerBox1ImageContainer">
|
||||
<a href="{{ route('profile', $user->id) }}"><img alt="Profile Image"
|
||||
src="{{ asset('img/reviewpending.png') }}" width="60px" height="100%"></a>
|
||||
</div>
|
||||
<div id="ProfileContainerBox1TextContainer">
|
||||
<a href="{{ route('profile', $user->id) }}" id="FeedContainerBox1Username">{{ $user->name }}</a>
|
||||
<p>"I'm new to MORBLOX!"</p>
|
||||
<p class="onlinestatus_website">Online</p>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<ul></ul>
|
||||
{{ $users->appends($_GET)->links() }}
|
||||
@endsection
|
||||
|
|
@ -27,4 +27,6 @@ Route::get('/user/{id}', [App\Http\Controllers\PageController::class, 'profile']
|
|||
|
||||
Route::middleware(['auth'])->group(function () {
|
||||
Route::get('/home', [App\Http\Controllers\HomeController::class, 'home'])->name('home');
|
||||
Route::get('/users', [App\Http\Controllers\PageController::class, 'users'])->name('users');
|
||||
Route::post('/users', [App\Http\Controllers\PageController::class, 'users'])->name('users');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue