Skip to content

Commit

Permalink
Add new landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Apr 17, 2020
1 parent d918a68 commit 84e203a
Show file tree
Hide file tree
Showing 11 changed files with 233 additions and 108 deletions.
13 changes: 11 additions & 2 deletions app/Http/Controllers/SiteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ public function home(Request $request)

public function homeGuest()
{
return view('site.index');
$data = Cache::remember('site:landing:data', now()->addHours(3), function() {
return [
'stats' => [
'posts' => App\Util\Lexer\PrettyNumber::convert(App\Status::count()),
'likes' => App\Util\Lexer\PrettyNumber::convert(App\Like::count()),
'hashtags' => App\Util\Lexer\PrettyNumber::convert(App\StatusHashtag::count())
],
];
});
return view('site.index', compact('data'));
}

public function homeTimeline(Request $request)
Expand Down Expand Up @@ -105,7 +114,7 @@ public function redirectUrl(Request $request)
$this->validate($request, [
'url' => 'required|url'
]);
$url = urldecode(request()->input('url'));
$url = request()->input('url');
return view('site.redirect', compact('url'));
}

Expand Down
Binary file added public/_landing/1.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/_landing/2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/_landing/3.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/_landing/4.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/_landing/5.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/_landing/6.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/_landing/7.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/_landing/8.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/_landing/9.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
328 changes: 222 additions & 106 deletions resources/views/site/index.blade.php

Large diffs are not rendered by default.

0 comments on commit 84e203a

Please sign in to comment.