summaryrefslogtreecommitdiff
path: root/ssh/resources/views/topicindex.blade.php
diff options
context:
space:
mode:
Diffstat (limited to 'ssh/resources/views/topicindex.blade.php')
-rw-r--r--ssh/resources/views/topicindex.blade.php50
1 files changed, 50 insertions, 0 deletions
diff --git a/ssh/resources/views/topicindex.blade.php b/ssh/resources/views/topicindex.blade.php
new file mode 100644
index 0000000..67b0de4
--- /dev/null
+++ b/ssh/resources/views/topicindex.blade.php
@@ -0,0 +1,50 @@
+@extends('layouts.app')
+
+@section('styles')
+@include ('layouts.footer-style')
+html {
+ height: inherit;
+}
+@endsection
+
+@section ('content')
+
+<div class="text-center container">
+
+<div class="container row text-white text-lg">
+ <ul class="list-inline">
+ @foreach ($letters as $letter)
+ <li class="list-inline-item">
+ <a href="#{{$letter->name}}" class="text-white">{{$letter->name}}</a>
+ </li>
+ @endforeach
+ </ul>
+</div>
+
+@php ($curLetter = "")
+@foreach ($topics->get() as $topic)
+ @if ( "" != $topic->name )
+ @php ( $firstLetter = strtoupper(substr($topic->name, 0, 1)) )
+ @if ( $curLetter != $firstLetter )
+ <div class="container row">
+ <h2 id="{{$firstLetter}}">
+ <a class="text-white" href="#{{$firstLetter}}">
+ {{ $firstLetter }}
+ </a>
+ </h2>
+ </div>
+ <hr>
+
+ @php ($curLetter = $firstLetter)
+
+ @endif
+ <a href="{{ route('topic', $topic->name) }}" class="btn btn-lg btn-outline-primary">{{ ucwords($topic->name) }}</a>
+ @endif
+@endforeach
+
+</div>
+@endsection
+
+@section ('footer')
+ @include ('layouts.footer')
+@endsection