From 4999fa77ef0156f791d29e294585fcd920212f79 Mon Sep 17 00:00:00 2001 From: horus Date: Wed, 8 Apr 2020 07:10:03 +0200 Subject: Cleaning up the topics page. --- resources/views/topicindex.blade.php | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'resources/views/topicindex.blade.php') diff --git a/resources/views/topicindex.blade.php b/resources/views/topicindex.blade.php index 8ef2114..7de3042 100644 --- a/resources/views/topicindex.blade.php +++ b/resources/views/topicindex.blade.php @@ -6,13 +6,40 @@ html { } @endsection -@section('content') +@section ('content')
+ +
+ +
+ +@php ($curLetter = "") @foreach ($topics->get() as $topic) - @if ( "" != $topic->name ) - {{ ucwords($topic->name) }} - @endif + @if ( "" != $topic->name ) + @php ( $firstLetter = strtoupper(substr($topic->name, 0, 1)) ) + @if ( $curLetter != $firstLetter ) +
+

+ + {{ $firstLetter }} + +

+
+
+ + @php ($curLetter = $firstLetter) + + @endif + {{ ucwords($topic->name) }} + @endif @endforeach +
@endsection -- cgit v1.2.3