-
+
{{ config_cache('app.name') }}
diff --git a/resources/views/portfolio/404.blade.php b/resources/views/portfolio/404.blade.php
new file mode 100644
index 000000000..7376ba93f
--- /dev/null
+++ b/resources/views/portfolio/404.blade.php
@@ -0,0 +1,21 @@
+@extends('portfolio.layout')
+
+@section('content')
+
+
+
+
+ portfolio
+
+
+
404 - Not Found
+
+
This portfolio or post is either not active or has been removed.
+
+
+ Go back home
+
+
+
+
+@endsection
diff --git a/resources/views/portfolio/index.blade.php b/resources/views/portfolio/index.blade.php
new file mode 100644
index 000000000..45d5f9209
--- /dev/null
+++ b/resources/views/portfolio/index.blade.php
@@ -0,0 +1,36 @@
+@extends('portfolio.layout')
+
+@section('content')
+
+
+
+
+ portfolio
+
+
+
+ Loading...
+
+
+
+
+
+@endsection
+
+@push('scripts')
+
+@endpush
diff --git a/resources/views/portfolio/layout.blade.php b/resources/views/portfolio/layout.blade.php
new file mode 100644
index 000000000..14158fb37
--- /dev/null
+++ b/resources/views/portfolio/layout.blade.php
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
{!! $title ?? config_cache('app.name') !!}
+
+
+
+
+
+ @stack('meta')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @yield('content')
+
+
+
+
+ @stack('scripts')
+
+
diff --git a/resources/views/portfolio/settings.blade.php b/resources/views/portfolio/settings.blade.php
new file mode 100644
index 000000000..f846def27
--- /dev/null
+++ b/resources/views/portfolio/settings.blade.php
@@ -0,0 +1,23 @@
+@extends('portfolio.layout')
+
+@section('content')
+
+
+
+ portfolio
+
+
+
Settings
+
+
+
+
+
+@endsection
+
+@push('scripts')
+
+
+@endpush
diff --git a/resources/views/portfolio/show.blade.php b/resources/views/portfolio/show.blade.php
new file mode 100644
index 000000000..37d179295
--- /dev/null
+++ b/resources/views/portfolio/show.blade.php
@@ -0,0 +1,12 @@
+@extends('portfolio.layout', ['title' => "@{$user['username']}'s Portfolio"])
+
+@section('content')
+
+@endsection
+
+@push('scripts')
+
+
+@endpush
diff --git a/resources/views/portfolio/show_post.blade.php b/resources/views/portfolio/show_post.blade.php
new file mode 100644
index 000000000..560508071
--- /dev/null
+++ b/resources/views/portfolio/show_post.blade.php
@@ -0,0 +1,17 @@
+@extends('portfolio.layout', ['title' => "@{$user['username']}'s Portfolio Photo"])
+
+@section('content')
+
+@endsection
+
+@push('scripts')
+
+
+@endpush
+
+@push('meta')
+
+
+@endpush
diff --git a/routes/web.php b/routes/web.php
index bf4dacac9..5c32ee215 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -100,6 +100,28 @@ Route::domain(config('pixelfed.domain.admin'))->prefix('i/admin')->group(functio
});
});
+Route::domain(config('portfolio.domain'))->group(function () {
+ Route::redirect('redirect/home', config('app.url'));
+ Route::get('/', 'PortfolioController@index');
+ Route::post('api/portfolio/self/curated.json', 'PortfolioController@storeCurated');
+ Route::post('api/portfolio/self/settings.json', 'PortfolioController@getSettings');
+ Route::get('api/portfolio/account/settings.json', 'PortfolioController@getAccountSettings');
+ Route::post('api/portfolio/self/update-settings.json', 'PortfolioController@storeSettings');
+ Route::get('api/portfolio/{username}/feed', 'PortfolioController@getFeed');
+
+ Route::prefix(config('portfolio.path'))->group(function() {
+ Route::get('/', 'PortfolioController@index');
+ Route::get('settings', 'PortfolioController@settings')->name('portfolio.settings');
+ Route::post('settings', 'PortfolioController@store');
+ Route::get('{username}/{id}', 'PortfolioController@showPost');
+ Route::get('{username}', 'PortfolioController@show');
+
+ Route::fallback(function () {
+ return view('errors.404');
+ });
+ });
+});
+
Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofactor', 'localization'])->group(function () {
Route::get('/', 'SiteController@home')->name('timeline.personal');
@@ -268,6 +290,14 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
Route::post('v1/publish', 'StoryController@publishStory');
Route::delete('v1/delete/{id}', 'StoryController@apiV1Delete');
});
+
+ Route::group(['prefix' => 'portfolio'], function () {
+ Route::post('self/curated.json', 'PortfolioController@storeCurated');
+ Route::post('self/settings.json', 'PortfolioController@getSettings');
+ Route::get('account/settings.json', 'PortfolioController@getAccountSettings');
+ Route::post('self/update-settings.json', 'PortfolioController@storeSettings');
+ Route::get('{username}/feed', 'PortfolioController@getFeed');
+ });
});
Route::get('discover/tags/{hashtag}', 'DiscoverController@showTags');
@@ -352,6 +382,7 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
Route::post('warning', 'AccountInterstitialController@read');
Route::get('my2020', 'SeasonalController@yearInReview');
+ Route::get('web/my-portfolio', 'PortfolioController@myRedirect');
Route::get('web/hashtag/{tag}', 'SpaController@hashtagRedirect');
Route::get('web/username/{id}', 'SpaController@usernameRedirect');
Route::get('web/post/{id}', 'SpaController@webPost');