Skip to content

Commit 723edae

Browse files
committed
Refactor views: Remove unused quiz, story, and summary templates to clean up the codebase
1 parent a4833fe commit 723edae

File tree

4 files changed

+10
-94
lines changed

4 files changed

+10
-94
lines changed

resources/views/quiz.blade.php

Lines changed: 0 additions & 32 deletions
This file was deleted.

resources/views/quiz/summary.blade.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,55 @@
44
<head>
55
<meta charset="UTF-8">
66
<title>Training Auswertung</title>
7+
<!-- Tailwind CSS via CDN -->
78
<script src="https://cdn.tailwindcss.com"></script>
89
</head>
910

1011
<body class="bg-gray-100">
1112
<div class="max-w-5xl mx-auto p-6">
12-
<!-- Header mit Logos -->
13+
{{-- Header with institution logos and summary title --}}
1314
<div class="flex items-center justify-between mb-6">
1415
<img src="{{ asset('images/fhp-logo.png') }}" alt="FHP Logo" class="h-16">
1516
<h1 class="text-3xl font-bold text-center">Training 1: Auswertung</h1>
1617
<img src="{{ asset('images/gfz-logo-en.png') }}" alt="GFZ Logo" class="h-16">
1718
</div>
19+
1820
<div class="bg-white shadow-lg rounded-lg p-6">
21+
{{-- Loop through each question and display its results --}}
1922
@foreach($questions as $question)
2023
<div class="mb-8 border-b pb-4">
24+
{{-- Question text --}}
2125
<h2 class="text-2xl font-semibold mb-2">{{ $question->question_text }}</h2>
26+
2227
<div class="space-y-2">
28+
{{-- Loop through options and show count and correctness --}}
2329
@foreach($question->options as $option)
2430
@php
2531
$result = $question->results->firstWhere('letter', $option->letter);
2632
$count = $result ? $result->count : 0;
2733
@endphp
2834
<div class="p-4 bg-gray-50 rounded shadow flex items-center justify-between">
35+
{{-- Option text and correct marker --}}
2936
<span class="font-medium">
3037
{{ $option->letter }}: {{ $option->option_text }}
3138
@if($option->is_correct)
3239
<span class="text-green-600">(richtig)</span>
3340
@endif
3441
</span>
42+
{{-- Display vote count --}}
3543
<span class="text-xl font-bold text-blue-600">{{ $count }}</span>
3644
</div>
3745
@endforeach
3846
</div>
3947
</div>
4048
@endforeach
4149

50+
{{-- Navigation: back to quiz and reset quiz --}}
4251
<div class="flex justify-between mt-6">
43-
<!-- Button "Zurück" -->
4452
<a href="{{ route('quiz.index') }}"
4553
class="bg-gray-500 hover:bg-gray-700 text-white font-bold py-2 px-4 rounded">
4654
Zurück
4755
</a>
48-
<!-- Button "Quiz zurücksetzen" -->
4956
<form action="{{ route('quiz.reset') }}" method="POST">
5057
@csrf
5158
<button type="submit" class="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded">

resources/views/story.blade.php

Lines changed: 0 additions & 32 deletions
This file was deleted.

resources/views/summary.blade.php

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)