Skip to content

Fix profile tabs #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/Http/Middleware/HttpsProtocol.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Symfony\Component\HttpFoundation\BinaryFileResponse;

class HttpsProtocol
{
public function handle(Request $request, Closure $next): RedirectResponse | Response | JsonResponse
public function handle(Request $request, Closure $next): RedirectResponse | Response | JsonResponse | BinaryFileResponse
{
if (app()->environment('production') && ! $request->isSecure()) {
return redirect()->secure($request->getRequestUri());
Expand Down
2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions public/js/app.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,12 @@
*/

/*! choices.js v9.1.0 | © 2021 Josh Johnson | https://github.com/jshjohnson/Choices#readme */

/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"/js/app.js": "/js/app.js?id=ddc8fa37fd058e1a878d06ff2dd04e98",
"/js/app.js": "/js/app.js?id=7d33838f31a5f129f9e40f95493c3b47",
"/css/app.css": "/css/app.css?id=c81faad7c99dc23b2559ae4fa79951ce"
}
3 changes: 3 additions & 0 deletions resources/js/helpers/helpers.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import hljs from 'highlight.js'
import Choices from 'choices.js'
import { capitalize } from 'lodash'

window.choices = (element) => {
return new Choices(element, { maxItemCount: 3, removeItemButton: true })
}

window.capitalize = capitalize

window.highlightCode = (element) => {
element.querySelectorAll('pre code').forEach((block) => {
hljs.highlightBlock(block)
Expand Down
16 changes: 5 additions & 11 deletions resources/views/user/profile.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<x-user.status />
@endif
</h1>
<p class="text-sm font-medium text-skin-base font-normal">
<p class="text-sm text-skin-base font-normal">
{{ __('Inscrit') }} <time-ago time="{{ $user->created_at->getTimestamp() }}"/>
</p>
</div>
Expand All @@ -38,22 +38,14 @@
{{ __('Éditer') }}
</x-default-button>
@endif
@if (! $user->isLoggedInUser())
<x-default-button type="button">
<svg class="-ml-1 mr-2 h-5 w-5 text-skin-muted" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M19 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zM4 19.235v-.11a6.375 6.375 0 0112.75 0v.109A12.318 12.318 0 0110.374 21c-2.331 0-4.512-.645-6.374-1.766z" />
</svg>
<span>{{ __('Suivre') }}</span>
</x-default-button>
@endif
</div>
</div>
</div>
<div class="hidden sm:block md:hidden mt-6 min-w-0 flex-1">
<h1 class="text-2xl font-bold text-skin-inverted truncate font-sans">
{{ $user->name }}
</h1>
<p class="text-sm font-medium text-skin-base font-normal">
<p class="text-sm text-skin-base font-normal">
{{ __('Inscrit') }} <time-ago time="{{ $user->created_at->getTimestamp() }}"/>
</p>
</div>
Expand Down Expand Up @@ -169,7 +161,9 @@ class="border-transparent text-skin-base hover:text-skin-inverted-muted hover:bo
<svg class="h-10 w-10 text-skin-primary mx-auto" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12c0 1.268-.63 2.39-1.593 3.068a3.745 3.745 0 01-1.043 3.296 3.745 3.745 0 01-3.296 1.043A3.745 3.745 0 0112 21c-1.268 0-2.39-.63-3.068-1.593a3.746 3.746 0 01-3.296-1.043 3.745 3.745 0 01-1.043-3.296A3.745 3.745 0 013 12c0-1.268.63-2.39 1.593-3.068a3.745 3.745 0 011.043-3.296 3.746 3.746 0 013.296-1.043A3.746 3.746 0 0112 3c1.268 0 2.39.63 3.068 1.593a3.746 3.746 0 013.296 1.043 3.746 3.746 0 011.043 3.296A3.745 3.745 0 0121 12z" />
</svg>
<p class="mt-1 text-skin-base text-sm leading-5">{{ __(':name ne possède aucun badge', ['name' => $user->name]) }}</p>
<p class="mt-1 text-skin-base text-sm leading-5">
{{ __(':name ne possède aucun badge', ['name' => $user->name]) }}
</p>
<x-button link="#" class="mt-4">
{{ __('Voir tous les badges') }}
</x-button>
Expand Down
3 changes: 0 additions & 3 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ module.exports = {
'lg:max-w-2xl',
'lg:max-w-3xl',
'lg:max-w-4xl',
{
pattern: /^media-library/
}
],
theme: {
extend: {
Expand Down