From bf823c5063b5ad863e7e7cc313fb1406ddd14a98 Mon Sep 17 00:00:00 2001 From: horus Date: Mon, 13 Apr 2020 23:25:42 +0200 Subject: Add new page popular topics. --- resources/views/list.blade.php | 12 +++++++++++ resources/views/topicpopular.blade.php | 37 ++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 resources/views/topicpopular.blade.php (limited to 'resources') diff --git a/resources/views/list.blade.php b/resources/views/list.blade.php index f47c28a..1f6fc72 100644 --- a/resources/views/list.blade.php +++ b/resources/views/list.blade.php @@ -53,6 +53,10 @@ html {

You are looking at all articles with the topic "{{ Request::route()->parameters()["topic"] }}". We found {{ $count }} matches. +
+
+ Hint: + To view all topics, click here. Too see the most popular topics, click here instead.

@elseif ( "random" == Request::route()->getName() ) @@ -79,6 +83,14 @@ html { + @if ( "popular" == Request::route()->getName() ) +
+

+ Hint: + You are looking at the most popular articles. If you are interested in popular topics instead, click here. +

+
+ @endif @endif diff --git a/resources/views/topicpopular.blade.php b/resources/views/topicpopular.blade.php new file mode 100644 index 0000000..f6a2c8a --- /dev/null +++ b/resources/views/topicpopular.blade.php @@ -0,0 +1,37 @@ +@extends ('layouts.app') + +@section ('styles') +html { + height: inherit; +} +@endsection + +@section ('content') + +
+ +
+
+

+ Popular Topics +

+
+

+ Hint: You are looking at popular topics. If you are interested in the most popular articles instead, click here instead. +

+
+
+
+ +
+
+ @foreach ($topics as $topic) + @if ( "" != $topic->name ) + {{ ucwords($topic->name) }} ({{ $topic->count }} Articles) + @endif + @endforeach +
+
+ +
+@endsection -- cgit v1.2.3