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/sass/_utility.scss | 11 +++++++++++ resources/sass/app.scss | 1 + resources/views/topicindex.blade.php | 35 +++++++++++++++++++++++++++++++---- 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 resources/sass/_utility.scss (limited to 'resources') diff --git a/resources/sass/_utility.scss b/resources/sass/_utility.scss new file mode 100644 index 0000000..e84fcd0 --- /dev/null +++ b/resources/sass/_utility.scss @@ -0,0 +1,11 @@ +.text-lg { + font-size:1.125rem; +} +hr { + width: 100%; + color: white; + background-color: white; + height: 1px; + margin-top: inherit; +} + diff --git a/resources/sass/app.scss b/resources/sass/app.scss index f01e9ac..f78c4bb 100644 --- a/resources/sass/app.scss +++ b/resources/sass/app.scss @@ -9,3 +9,4 @@ @import 'background'; @import 'navbar'; +@import 'utility'; 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