Paillasse/portail/resources/views/mes-notes.blade.php

43 lines
2.2 KiB
PHP
Raw Permalink Normal View History

@extends('layouts.app')
@section('titre', 'Mes notes')
@section('contenu')
<div class="mx-auto max-w-3xl px-5 py-10">
<h1 class="text-3xl font-extrabold" style="color:var(--sy-ink)">Mes notes</h1>
@if ($notes->isEmpty())
<p class="mt-6 font-semibold" style="color:var(--sy-muted)">Pas encore de note.</p>
@else
<section class="mt-8">
<h2 class="text-xl font-extrabold" style="color:var(--sy-ink)">Par compétence</h2>
<ul class="mt-3 grid gap-3">
@foreach ($parCompetence as $competence => $donnees)
<li class="rounded-2xl border p-4" style="border-color:var(--sy-line);background:var(--sy-surface)">
<p class="flex justify-between font-bold" style="color:var(--sy-ink)">
<span>{{ $competence }}</span>
<span class="font-mono">{{ $donnees['moyenne'] }} % <span style="color:var(--sy-muted)">({{ $donnees['nombre'] }})</span></span>
</p>
<div class="mt-2 h-3 rounded-lg" style="background:var(--sy-bg)">
<div class="h-full rounded-lg" style="width:{{ $donnees['moyenne'] }}%;background:var(--sy-blue)"></div>
</div>
</li>
@endforeach
</ul>
</section>
<section class="mt-10">
<h2 class="text-xl font-extrabold" style="color:var(--sy-ink)">Toutes mes notes</h2>
<ul class="mt-3 divide-y rounded-2xl border font-semibold" style="border-color:var(--sy-line);background:var(--sy-surface)">
@foreach ($notes as $note)
<li class="flex justify-between px-4 py-2" style="border-color:var(--sy-line);color:var(--sy-ink)">
<span>{{ $note['titre'] }}</span>
<span class="font-mono">{{ $note['note'] }}/{{ $note['note_max'] }}</span>
</li>
@endforeach
</ul>
</section>
@endif
</div>
@endsection