diff --git a/.env.example b/.env.example index db3e5175b..7fd42e89f 100644 --- a/.env.example +++ b/.env.example @@ -1,46 +1,50 @@ -APP_NAME=Laravel +APP_NAME="PixelFed Test" APP_ENV=local APP_KEY= APP_DEBUG=true APP_URL=http://localhost +ADMIN_DOMAIN="localhost" +APP_DOMAIN="localhost" + LOG_CHANNEL=stack DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 -DB_DATABASE=homestead -DB_USERNAME=homestead -DB_PASSWORD=secret +DB_DATABASE= +DB_USERNAME= +DB_PASSWORD= BROADCAST_DRIVER=log -CACHE_DRIVER=file -SESSION_DRIVER=file +CACHE_DRIVER=redis +SESSION_DRIVER=redis SESSION_LIFETIME=120 -QUEUE_DRIVER=sync +QUEUE_DRIVER=redis REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 -MAIL_DRIVER=smtp +MAIL_DRIVER=log MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null -PUSHER_APP_ID= -PUSHER_APP_KEY= -PUSHER_APP_SECRET= -PUSHER_APP_CLUSTER=mt1 - -SESSION_DOMAIN=".pixelfed.dev" +SESSION_DOMAIN="${APP_DOMAIN}" SESSION_SECURE_COOKIE=true API_BASE="/api/1/" API_SEARCH="/api/search" OPEN_REGISTRATION=true +RECAPTCHA_ENABLED=false +ENFORCE_EMAIL_VERIFICATION=true + +MAX_PHOTO_SIZE=15000 +MAX_CAPTION_LENGTH=150 +MAX_ALBUM_LENGTH=4 MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/README.md b/README.md index c6ea6e002..15f30985f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,76 @@ -# PixelFed -Federated Image Sharing +# PixelFed: Federated Image Sharing -> This project is still in active development and not yet ready for use. \ No newline at end of file +PixelFed is a federated social image sharing platform, similar to instagram. +Federation is done using the [ActivityPub](https://activitypub.rocks/) protocol, +which is used by [Mastodon](http://joinmastodon.org/), [PeerTube](https://joinpeertube.org/en/), +[Pleroma](https://pleroma.social/), and more. Through ActivityPub PixelFed can share +and interact with these platforms, as well as other instances of PixelFed. + +**_Please note this is alpha software, not recommended for production use, +and federation is not supported yet._** + +PixelFed is very early into the development stage. If you would like to have a +permanent instance with minimal breakage, **do not use this software until +there is a stable release**. The following setup instructions are intended for +testing and development. + +## Requirements + - PHP >= 7.1.3 (7.2+ recommended for stable version) + - MySQL, Postgres (MariaDB and sqlite are not supported yet) + - Redis + - Composer + - GD or ImageMagick + - OpenSSL PHP Extension + - PDO PHP Extension + - Mbstring PHP Extension + - Tokenizer PHP Extension + - XML PHP Extension + - Ctype PHP Extension + - JSON PHP Extension + - JpegOptim + - Optipng + - Pngquant 2 + - SVGO + - Gifsicle + +## Installation + +This guide assumes you have NGINX/Apache installed, along with the dependencies. +Those will not be covered in these early docs. + +```bash +git clone https://github.com/dansup/pixelfed.git +cd pixelfed +composer install +cp .env.example .env +``` + +**Edit .env file with proper values** + +```bash +php artisan key:generate +``` + +```bash +php artisan storage:link +php artisan migrate +php artisan horizon +php artisan serve --host=localhost --port=80 +``` + +Check your browser at http://localhost + +## Communication + +The ways you can communicate on the project are below. Before interacting, please +read through the [Code Of Conduct](CODE_OF_CONDUCT.md). + +* IRC: #pixelfed on irc.freenode.net ([#freenode_#pixelfed:matrix.org through +Matrix](https://matrix.to/#/#freenode_#pixelfed:matrix.org) +* Project on Mastodon: [@pixelfed@mastodon.social](https://mastodon.social/@pixelfed) +* E-mail: [hello@pixelfed.org](mailto:hello@pixelfed.org) + +## Support + +The lead maintainer is on Patreon! You can become a Patron at +https://www.patreon.com/dansup \ No newline at end of file diff --git a/app/Http/Controllers/CommentController.php b/app/Http/Controllers/CommentController.php index 8b8eded8e..70a7825bd 100644 --- a/app/Http/Controllers/CommentController.php +++ b/app/Http/Controllers/CommentController.php @@ -34,7 +34,7 @@ class CommentController extends Controller $reply = new Status(); $reply->profile_id = $profile->id; - $reply->caption = e(strip_tags($comment)); + $reply->caption = e($comment); $reply->rendered = $comment; $reply->in_reply_to_id = $status->id; $reply->in_reply_to_profile_id = $status->profile_id; @@ -44,7 +44,7 @@ class CommentController extends Controller CommentPipeline::dispatch($status, $reply); if($request->ajax()) { - $response = ['code' => 200, 'msg' => 'Comment saved', 'username' => $profile->username, 'url' => $reply->url(), 'profile' => $profile->url()]; + $response = ['code' => 200, 'msg' => 'Comment saved', 'username' => $profile->username, 'url' => $reply->url(), 'profile' => $profile->url(), 'comment' => $reply->caption]; } else { $response = redirect($status->url()); } diff --git a/config/app.php b/config/app.php index 99e219a52..a281d980b 100644 --- a/config/app.php +++ b/config/app.php @@ -65,7 +65,7 @@ return [ | */ - 'timezone' => 'UTC', + 'timezone' => env('APP_TIMEZONE', 'UTC'), /* |-------------------------------------------------------------------------- @@ -78,7 +78,7 @@ return [ | */ - 'locale' => 'en', + 'locale' => env('APP_LOCALE', 'en'), /* |-------------------------------------------------------------------------- @@ -91,7 +91,7 @@ return [ | */ - 'fallback_locale' => 'en', + 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), /* |-------------------------------------------------------------------------- diff --git a/public/css/app.css b/public/css/app.css index d3c5687bc..bff19b1fa 100644 Binary files a/public/css/app.css and b/public/css/app.css differ diff --git a/public/img/pixelfed-icon-black.svg b/public/img/pixelfed-icon-black.svg new file mode 100644 index 000000000..ec26b5a32 Binary files /dev/null and b/public/img/pixelfed-icon-black.svg differ diff --git a/public/js/app.js b/public/js/app.js index f24ff3550..1d03a7288 100644 Binary files a/public/js/app.js and b/public/js/app.js differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index e132fcbe8..6eb24f257 100644 Binary files a/public/mix-manifest.json and b/public/mix-manifest.json differ diff --git a/resources/assets/js/components/commentform.js b/resources/assets/js/components/commentform.js index 6993240c7..a2aa50394 100644 --- a/resources/assets/js/components/commentform.js +++ b/resources/assets/js/components/commentform.js @@ -21,6 +21,7 @@ $(document).ready(function() { var username = res.data.username; var permalink = res.data.url; var profile = res.data.profile; + var reply = res.data.comment; if($('.status-container').length == 1) { var comments = el.parents().eq(3).find('.comments'); @@ -28,7 +29,7 @@ $(document).ready(function() { var comments = el.parents().eq(1).find('.comments'); } - var comment = '

' + username + ''+ commenttext + '1s

'; + var comment = '

' + username + ''+ reply + '1s

'; comments.prepend(comment); diff --git a/resources/assets/sass/custom.scss b/resources/assets/sass/custom.scss index 6b04d2ba2..f21bbbf77 100644 --- a/resources/assets/sass/custom.scss +++ b/resources/assets/sass/custom.scss @@ -193,6 +193,13 @@ body, button, input, textarea { } } +@media (max-width: map-get($grid-breakpoints, "sm")) { + .card-md-rounded-0 { + border-width: 1px 0; + border-radius:0 !important; + } +} + @keyframes loading-bar { from { background-position: 0 0; } to { background-position: 100vw 0; } @@ -235,6 +242,12 @@ body, button, input, textarea { background-position: 50%; } + +.status-photo img { + object-fit: contain; + max-height: calc(100vh - (6rem)); +} + @keyframes fadeInDown { 0% { opacity: 0; @@ -248,4 +261,5 @@ body, button, input, textarea { .details-animated[open] { animation-name: fadeInDown; animation-duration: 0.5s; -} \ No newline at end of file +} + diff --git a/resources/lang/de/navmenu.php b/resources/lang/de/navmenu.php new file mode 100644 index 000000000..bfaf81d23 --- /dev/null +++ b/resources/lang/de/navmenu.php @@ -0,0 +1,13 @@ + 'Mein Profil anschauen', + 'myTimeline' => 'Meine Timeline', + 'publicTimeline' => 'Öffentliche Timeline', + 'remoteFollow' => 'Aus der Ferne folgen', + 'settings' => 'Einstellungen', + 'admin' => 'Administration', + 'logout' => 'Abmelden', + +]; \ No newline at end of file diff --git a/resources/lang/de/notification.php b/resources/lang/de/notification.php index d393089f2..4f2040552 100644 --- a/resources/lang/de/notification.php +++ b/resources/lang/de/notification.php @@ -5,5 +5,6 @@ return [ 'likedPhoto' => 'gefällt dein Foto.', 'startedFollowingYou' => 'folgt dir nun.', 'commented' => 'hat deinen Post kommentiert.', + 'mentionedYou' => 'hat dich erwähnt.' ]; \ No newline at end of file diff --git a/resources/lang/en/profile.php b/resources/lang/en/profile.php index 50b6f2429..01c79be62 100644 --- a/resources/lang/en/profile.php +++ b/resources/lang/en/profile.php @@ -4,5 +4,5 @@ return [ 'emptyTimeline' => 'This user has no posts yet!', 'emptyFollowers' => 'This user has no followers yet!', 'emptyFollowing' => 'This user is not following anyone yet!', - 'savedWarning' => 'Only you can see what you\'ve saved', -]; \ No newline at end of file + 'savedWarning' => 'Only you can see what you’ve saved', +]; diff --git a/resources/lang/he/navmenu.php b/resources/lang/he/navmenu.php new file mode 100644 index 000000000..32d78da75 --- /dev/null +++ b/resources/lang/he/navmenu.php @@ -0,0 +1,13 @@ + 'צפה בפרופיל שלי', + 'myTimeline' => 'ציר הזמן שלי', + 'publicTimeline' => 'ציר הזמן הציבורי', + 'remoteFollow' => 'עקיבה מרחוק', + 'settings' => 'הגדרות', + 'admin' => 'מנהל', + 'logout' => 'התנתק', + +]; diff --git a/resources/lang/he/notification.php b/resources/lang/he/notification.php index b529138df..40b51127d 100644 --- a/resources/lang/he/notification.php +++ b/resources/lang/he/notification.php @@ -5,5 +5,6 @@ return [ 'likedPhoto' => 'אהבו את התמונה שלך.', 'startedFollowingYou' => 'התחיל לעקוב אחריך.', 'commented' => 'הגיב על הפוסט שלך.', + 'mentionedYou' => 'הזכיר אותך.' ]; diff --git a/resources/views/errors/403.blade.php b/resources/views/errors/403.blade.php index 8a7ecc329..26168b479 100644 --- a/resources/views/errors/403.blade.php +++ b/resources/views/errors/403.blade.php @@ -5,9 +5,9 @@
-

403 - Forbidden

+

403 – Forbidden

-@endsection \ No newline at end of file +@endsection diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php index 9ab90868f..ff1024304 100644 --- a/resources/views/errors/404.blade.php +++ b/resources/views/errors/404.blade.php @@ -5,9 +5,9 @@
-

404 - Page Not Found

+

404 – Page Not Found

-@endsection \ No newline at end of file +@endsection diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php index e479008cf..ba0a94299 100644 --- a/resources/views/errors/503.blade.php +++ b/resources/views/errors/503.blade.php @@ -5,10 +5,10 @@
-

503 - Service Unavailable

+

503 – Service Unavailable

Our services are overloaded at the moment, please try again later.

-@endsection \ No newline at end of file +@endsection diff --git a/resources/views/layouts/partial/nav.blade.php b/resources/views/layouts/partial/nav.blade.php index 29e3e63c6..36d16714b 100644 --- a/resources/views/layouts/partial/nav.blade.php +++ b/resources/views/layouts/partial/nav.blade.php @@ -1,8 +1,8 @@