Update private profile view, add rel=me support, hide avatar/bio when not logged in and add robots meta tag to block search engine indexing on private profiles

This commit is contained in:
Daniel Supernault 2023-03-25 03:38:38 -06:00
parent 38f1a1db26
commit ab4bb9a020
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
5 changed files with 51 additions and 38 deletions

View file

@ -0,0 +1,38 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="mobile-web-app-capable" content="yes">
<title>{{ $title ?? config('app.name', 'Pixelfed') }}</title>
<link rel="manifest" href="{{url('/manifest.json')}}">
<meta property="og:site_name" content="{{ config('app.name', 'pixelfed') }}">
<meta property="og:title" content="{{ $title ?? config('app.name', 'pixelfed') }}">
<meta property="og:type" content="article">
<meta property="og:url" content="{{url(request()->url())}}">
@stack('meta')
<meta name="medium" content="image">
<meta name="theme-color" content="#10c5f8">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="shortcut icon" type="image/png" href="{{url('/img/favicon.png?v=2')}}">
<link rel="apple-touch-icon" type="image/png" href="{{url('/img/favicon.png?v=2')}}">
<link rel="canonical" href="{{url(request()->url())}}">
<link href="{{ mix('css/app.css') }}" rel="stylesheet" data-stylesheet="light">
@stack('styles')
</head>
<body>
@include('layouts.partial.nav')
<main id="content">
@yield('content')
</main>
@include('layouts.partial.footer')
<script type="text/javascript" src="{{ mix('js/manifest.js') }}"></script>
<script type="text/javascript" src="{{ mix('js/vendor.js') }}"></script>
<script type="text/javascript" src="{{ mix('js/app.js') }}"></script>
<script type="text/javascript" src="{{ mix('js/components.js') }}"></script>
@stack('scripts')
</body>
</html>

View file

@ -10,7 +10,7 @@
<meta name="mobile-web-app-capable" content="yes">
<title>{{ $title ?? config_cache('app.name') }}</title>
<link rel="manifest" href="/manifest.json">
<link rel="manifest" href="{{url('/manifest.json')}}">
<meta property="og:site_name" content="{{ config_cache('app.name') }}">
<meta property="og:title" content="{{ $title ?? config_cache('app.name') }}">
@ -21,8 +21,8 @@
<meta name="medium" content="image">
<meta name="theme-color" content="#10c5f8">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="shortcut icon" type="image/png" href="/img/favicon.png?v=2">
<link rel="apple-touch-icon" type="image/png" href="/img/favicon.png?v=2">
<link rel="shortcut icon" type="image/png" href="{{url('/img/favicon.png?v=2')}}">
<link rel="apple-touch-icon" type="image/png" href="{{url('/img/favicon.png?v=2')}}">
<link rel="canonical" href="{{url(request()->url())}}">
@if(request()->cookie('dark-mode'))
@ -58,30 +58,6 @@
<script type="text/javascript" src="{{ mix('js/app.js') }}"></script>
<script type="text/javascript" src="{{ mix('js/components.js') }}"></script>
@stack('scripts')
<div class="mobile-footer-spacer d-block d-sm-none mt-5"></div>
<div class="mobile-footer d-block d-sm-none fixed-bottom">
<div class="card card-body rounded-0 pt-2 pb-4 box-shadow" style="border-top:1px solid #F1F5F8">
<ul class="nav nav-pills nav-fill d-flex align-items-middle">
<li class="nav-item">
<a class="nav-link text-dark" href="/"><i class="fal fa-home fa-2x"></i></a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" href="/discover"><i class="fal fa-search fa-2x"></i></a>
</li>
<li class="nav-item">
<div class="nav-link cursor-pointer text-dark" onclick="App.util.compose.post()">
<i class="fal fa-plus-circle fa-2x"></i>
</div>
</li>
<li class="nav-item">
<a class="nav-link text-dark" href="/account/activity"><i class="fal fa-bell fa-2x"></i></a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" href="/i/me"><i class="fal fa-user fa-2x"></i></a>
</li>
</ul>
</div>
</div>
</body>
</html>
@endauth
@ -91,7 +67,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="mobile-web-app-capable" content="yes">
<title>{{ $title ?? config('app.name', 'Pixelfed') }}</title>

View file

@ -7,17 +7,18 @@
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="mobile-web-app-capable" content="yes">
<title>{{ $title ?? config_cache('app.name') }}</title>
<link rel="manifest" href="/manifest.json">
<link rel="manifest" href="{{url('/manifest.json')}}">
<meta property="og:site_name" content="{{ config_cache('app.name') }}">
<meta property="og:title" content="{{ $title ?? config_cache('app.name') }}">
<meta property="og:type" content="article">
<meta property="og:url" content="{{url(request()->url())}}">
@stack('meta')
<meta name="medium" content="image">
<meta name="theme-color" content="#10c5f8">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="shortcut icon" type="image/png" href="/img/favicon.png?v=2">
<link rel="apple-touch-icon" type="image/png" href="/img/favicon.png?v=2">
<link rel="shortcut icon" type="image/png" href="{{url('/img/favicon.png?v=2')}}">
<link rel="apple-touch-icon" type="image/png" href="{{url('/img/favicon.png?v=2')}}">
<link rel="canonical" href="{{url(request()->url())}}">
<link href="{{ mix('css/app.css') }}" rel="stylesheet" data-stylesheet="light">
<link href="{{ mix('css/spa.css') }}" rel="stylesheet" data-stylesheet="light">

View file

@ -3,7 +3,7 @@
<div class="row">
<div class="col-12 col-md-4 d-flex">
<div class="profile-avatar mx-auto">
<img class="rounded-circle box-shadow" src="{{$user->avatarUrl()}}" width="172px" height="172px">
<img class="rounded-circle box-shadow" src="/storage/avatars/default.jpg?v=1" width="172px" height="172px">
</div>
</div>
<div class="col-12 col-md-8 d-flex align-items-center">

View file

@ -1,4 +1,4 @@
@extends('layouts.app',['title' => $user->username . " on " . config('app.name')])
@extends('layouts.app-guest',['title' => $user->username . " on " . config('app.name')])
@section('content')
@if (session('error'))
@ -7,7 +7,9 @@
</div>
@endif
@include('profile.partial.private-info')
@if($user->website)
<a class="d-none" href="{{$user->website}}" rel="me external nofollow noopener">{{$user->website}}</a>
@endif
<div class="container">
<div class="profile-timeline mt-2 mt-md-4">
<div class="">
@ -29,9 +31,5 @@
@endsection
@push('meta')
<meta property="og:description" content="{{$user->bio}}">
<meta property="og:image" content="{{$user->avatarUrl()}}">
@if($user->remote_url)
<meta name="robots" content="noindex, nofollow">
@endif
@endpush