From 76f23cb2084fb63ad799c8b48ca16711c8b99685 Mon Sep 17 00:00:00 2001 From: hellcp Date: Sat, 2 Jun 2018 20:11:08 +0200 Subject: [PATCH] Introduce opengraph tags to the service --- .htaccess | 1 + resources/views/discover/home.blade.php | 6 +++++- resources/views/discover/tags/show.blade.php | 6 +++++- resources/views/home.blade.php | 4 ++-- resources/views/layouts/app.blade.php | 15 +++++++++++++-- resources/views/profile/followers.blade.php | 7 ++++++- resources/views/profile/following.blade.php | 7 ++++++- resources/views/profile/show.blade.php | 9 +++++++-- resources/views/site/about.blade.php | 6 +++++- resources/views/site/bannedinstances.blade.php | 6 +++++- resources/views/site/features.blade.php | 6 +++++- resources/views/site/fediverse.blade.php | 6 +++++- resources/views/site/help.blade.php | 6 +++++- resources/views/site/libraries.blade.php | 6 +++++- resources/views/site/opensource.blade.php | 6 +++++- resources/views/site/partial/template.blade.php | 4 ++-- resources/views/site/platform.blade.php | 6 +++++- resources/views/site/privacy.blade.php | 6 +++++- resources/views/site/terms.blade.php | 6 +++++- resources/views/status/show.blade.php | 9 +++++++-- resources/views/welcome.blade.php | 2 +- 21 files changed, 105 insertions(+), 25 deletions(-) create mode 100644 .htaccess diff --git a/.htaccess b/.htaccess new file mode 100644 index 000000000..14249c50b --- /dev/null +++ b/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/resources/views/discover/home.blade.php b/resources/views/discover/home.blade.php index 0bce0f326..5bd9e3c3b 100644 --- a/resources/views/discover/home.blade.php +++ b/resources/views/discover/home.blade.php @@ -41,4 +41,8 @@ -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/discover/tags/show.blade.php b/resources/views/discover/tags/show.blade.php index bacc30178..3099b3e41 100644 --- a/resources/views/discover/tags/show.blade.php +++ b/resources/views/discover/tags/show.blade.php @@ -34,4 +34,8 @@ -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index 740323892..2f7b05cd3 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.app') +@extends('layouts.app',['title' => 'Welcome to ' . config('app.name')]) @section('content')
@@ -29,7 +29,7 @@ @endsection @push('meta') - + @endpush diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index e25fe9249..cfc7c2a1e 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -7,10 +7,21 @@ - {{ config('app.name', 'Laravel') }} - + + + + {{ $title or config('app.name', 'Laravel') }} + + + + + @stack('meta') + + + + diff --git a/resources/views/profile/followers.blade.php b/resources/views/profile/followers.blade.php index 58e79a3b4..e695ff686 100644 --- a/resources/views/profile/followers.blade.php +++ b/resources/views/profile/followers.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.app') +@extends('layouts.app',['title' => $user->username . "'s followers"]) @section('content') @@ -95,3 +95,8 @@
@endsection + +@push('meta') + + +@endpush diff --git a/resources/views/profile/following.blade.php b/resources/views/profile/following.blade.php index f04ca85e4..bce6b001a 100644 --- a/resources/views/profile/following.blade.php +++ b/resources/views/profile/following.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.app') +@extends('layouts.app',['title' => $user->username . "'s follows"]) @section('content') @@ -95,3 +95,8 @@ @endsection + +@push('meta') + + +@endpush diff --git a/resources/views/profile/show.blade.php b/resources/views/profile/show.blade.php index bb6d57a65..4dc1b3a2c 100644 --- a/resources/views/profile/show.blade.php +++ b/resources/views/profile/show.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.app') +@extends('layouts.app',['title' => $user->username . " on " . config('app.name')]) @section('content') @@ -120,4 +120,9 @@ -@endsection \ No newline at end of file +@endsection + +@push('meta') + + +@endpush diff --git a/resources/views/site/about.blade.php b/resources/views/site/about.blade.php index 433d3f283..a8d17eb05 100644 --- a/resources/views/site/about.blade.php +++ b/resources/views/site/about.blade.php @@ -9,4 +9,8 @@

PixelFed is a federated image sharing platform, powered by the ActivityPub protocol.

-@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/bannedinstances.blade.php b/resources/views/site/bannedinstances.blade.php index aca13d885..c52aa4ed7 100644 --- a/resources/views/site/bannedinstances.blade.php +++ b/resources/views/site/bannedinstances.blade.php @@ -6,4 +6,8 @@

Banned Instances


-@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/features.blade.php b/resources/views/site/features.blade.php index 6d7ea4cdb..d2ba7f1e1 100644 --- a/resources/views/site/features.blade.php +++ b/resources/views/site/features.blade.php @@ -6,4 +6,8 @@

Features


-@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/fediverse.blade.php b/resources/views/site/fediverse.blade.php index 2f7cc9ddd..436f73332 100644 --- a/resources/views/site/fediverse.blade.php +++ b/resources/views/site/fediverse.blade.php @@ -14,4 +14,8 @@
  • Pleroma - A federated twitter alternative.
  • -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/help.blade.php b/resources/views/site/help.blade.php index 59a9cb2ae..3ba51f775 100644 --- a/resources/views/site/help.blade.php +++ b/resources/views/site/help.blade.php @@ -6,4 +6,8 @@

    Help


    -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/libraries.blade.php b/resources/views/site/libraries.blade.php index 97ded54f6..d6156acac 100644 --- a/resources/views/site/libraries.blade.php +++ b/resources/views/site/libraries.blade.php @@ -6,4 +6,8 @@

    Libraries


    -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/opensource.blade.php b/resources/views/site/opensource.blade.php index 9688a90e3..a48832dfb 100644 --- a/resources/views/site/opensource.blade.php +++ b/resources/views/site/opensource.blade.php @@ -9,4 +9,8 @@

    The software that powers this website is called PixelFed and anyone can download the source code and run their own instance!

    -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/partial/template.blade.php b/resources/views/site/partial/template.blade.php index 31cd0aa95..f79c6a334 100644 --- a/resources/views/site/partial/template.blade.php +++ b/resources/views/site/partial/template.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.app') +@extends('layouts.app',['title' => 'About ' . config('app.name')]) @section('content') @@ -22,4 +22,4 @@ -@endsection \ No newline at end of file +@endsection diff --git a/resources/views/site/platform.blade.php b/resources/views/site/platform.blade.php index e8f71bb9e..5d3e7b620 100644 --- a/resources/views/site/platform.blade.php +++ b/resources/views/site/platform.blade.php @@ -6,4 +6,8 @@

    Platform/API Terms Of Use


    -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/privacy.blade.php b/resources/views/site/privacy.blade.php index aa99d8e2f..576f1af20 100644 --- a/resources/views/site/privacy.blade.php +++ b/resources/views/site/privacy.blade.php @@ -77,4 +77,8 @@

    Originally adapted from the Mastodon privacy policy.

    -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/terms.blade.php b/resources/views/site/terms.blade.php index 383eb331c..001642731 100644 --- a/resources/views/site/terms.blade.php +++ b/resources/views/site/terms.blade.php @@ -6,4 +6,8 @@

    Terms Of Use


    -@endsection \ No newline at end of file +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/status/show.blade.php b/resources/views/status/show.blade.php index 7c882def9..7fa7f5590 100644 --- a/resources/views/status/show.blade.php +++ b/resources/views/status/show.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.app') +@extends('layouts.app',['title' => $user->username . " posted a photo: " . $status->likes()->count() . " likes, " . $status->comments()->count() . " comments" ]) @section('content') @@ -84,4 +84,9 @@ -@endsection \ No newline at end of file +@endsection + +@push('meta') + + +@endpush diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 855c3fb7a..15e76492f 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -10,5 +10,5 @@ @endsection @push('meta') - + @endpush