Moved to blade components

This commit is contained in:
2020-10-12 16:52:48 +05:00
parent d180f2a885
commit 118567491a
11 changed files with 316 additions and 309 deletions

View File

@@ -1,6 +1,6 @@
@extends('layouts.app')
<x-layout>
@section('meta')
<x-slot name="meta">
<title>{{$article->meta['title']}} | Karudhaas</title>
<meta name="description" content="Discover Stories,Daily news and inspiration for maldivian readers." />
@@ -15,9 +15,9 @@
<meta property="og:url" content="https://karudhaas.net/" />
<meta property="og:site_name" content="karudhaas.net" />
<meta property="og:image" content="{{$article->featured_image}}">
@endsection
</x-slot>
@section('content')
<div>
<div class="mb-4 md:mb-0 w-full max-w-screen-md mx-auto relative" style="height: 24em;">
<div class="absolute left-0 bottom-0 w-full h-full z-10"
@@ -94,4 +94,4 @@
</div>
</div>
</div>
@endsection
</x-layout>

View File

@@ -0,0 +1,31 @@
<footer class="border-t mt-10">
<div class="container mx-auto flex flex-col items-center justify-center pt-10">
<div class="flex justify-center pb-8">
<img class="w-12 h-12" src="/images/icon.png" />
</div>
<ul class="flex flex-wrap font-medium text-gray-700 pb-8 justify-center max-w-xl">
<li class="pb-4 md:pb-2 px-4 md:px-2">
<a href="/preview" class="hover:underline">Preview</a>
</li>
<li>
<a href="/about" class="hover:underline">About</a>
</li>
<li class="pb-4 md:pb-2 px-4 md:px-2">
<a href="/privacy" class="hover:underline">Privacy</a>
</li>
</ul>
<news-letter></news-letter>
<div class="py-8 flex">
<p class="text-gray-600">Made with ❤️ in Maldives. By <span><a href="https://github.com/jinas123"
class="text-blue-600 hover:underline">@jinas123</a>, <a href="https://github.com/Dharisd"
class="text-blue-600 hover:underline">@dharisd</a>, <a href="https://github.com/shihaamabr"
class="text-blue-600 hover:underline">@shihaamabr</a>
</span></p>
</div>
</div>
</footer>

View File

@@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="/images/icon.png" />
@yield('meta')
{{$meta ?? ''}}
<link href="{{ mix('/css/app.css') }}" rel="stylesheet">
<link rel="stylesheet" href="/css/styles.css">
@@ -24,10 +24,16 @@
<main class="mt-12">
@yield('content')
{{ $slot }}
</main>
@include('partials.footer')
<x-footer>
<x-slot name="credits">
<a href="https://github.com/jinas123" class="text-blue-600 hover:underline">@jinas123</a>,
<a href="https://github.com/Dharisd" class="text-blue-600 hover:underline">@dharisd</a>,
<a href="https://github.com/shihaamabr" class="text-blue-600 hover:underline">@shihaamabr</a>
</x-slot>
</x-footer>
</div>

View File

@@ -1,6 +1,6 @@
@extends('layouts.app')
<x-layout>
@section('meta')
<x-slot name="meta">
<title>Karudhaas</title>
<meta name="description" content="Discover Stories,Daily news and inspiration for maldivian readers." />
@@ -15,9 +15,8 @@
<meta property="og:url" content="https://karudhaas.net" />
<meta property="og:site_name" content="karudhaas.net" />
<meta property="og:image" content="/images/ogi.jpg">
@endsection
</x-slot>
@section('content')
<todays-pick></todays-pick>
<discover-topics></discover-topics>
@@ -25,4 +24,5 @@
<available-sources></available-sources>
<recent-stories></recent-stories>
@endsection
</x-layout>

View File

@@ -1,6 +1,4 @@
@extends('layouts.app')
@section('content')
<x-layout>
@if(!isset($articles))
<div class="mb-10">
<div>
@@ -71,4 +69,5 @@
</div>
@endif
@endsection
</x-layout>

View File

@@ -1,6 +1,6 @@
@extends('layouts.app')
<x-layout>
@section('meta')
<x-slot name="meta">
<title>Karudhaas | Namespaces</title>
<meta name="description" content="Discover Stories,Daily news and inspiration for maldivian readers." />
@@ -15,9 +15,8 @@
<meta property="og:url" content="https://karudhaas.net" />
<meta property="og:site_name" content="karudhaas.net" />
<meta property="og:image" content="/images/og.jpg">
@endsection
</x-slot>
@section('content')
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2 mb-10">
@foreach (config('karudhaas.topic_filters') as $key => $namespace)
@@ -31,4 +30,5 @@
</div>
@endsection
</x-layout>

View File

@@ -1,7 +1,5 @@
@extends('layouts.app')
@section('content')
<topic-filter topics="{{implode(',',$namespace['keys']) }}"
label="{{$namespace['dv_name']}}" :per_page="12" color="border-{{$namespace['color']}}-500">
<x-layout>
<topic-filter topics="{{implode(',',$namespace['keys']) }}" label="{{$namespace['dv_name']}}" :per_page="12"
color="border-{{$namespace['color']}}-500">
</topic-filter>
@endsection
</x-layout>

View File

@@ -1,6 +1,5 @@
@extends('layouts.app')
@section('meta')
<x-layout>
<x-slot name="meta">
<title>Karudhaas</title>
<meta name="description" content="Discover Stories,Daily news and inspiration for maldivian readers." />
@@ -15,17 +14,17 @@
<meta property="og:url" content="https://karudhaas.net" />
<meta property="og:site_name" content="karudhaas.net" />
<meta property="og:image" content="/images/og.jpg">
<link rel="icon" type="image/png" href="/images/icon.png" />
@endsection
</x-slot>
@section('content')
<div class="flex-1 overflow-hidden px-6 md:pl-12 md:pr-0 lg:pl-16 xl:pl-16 xl:pr-20 leading-relaxed text-lg" id="top">
<h1 class="mb-10 text-4xl font-bold text-gray-700 leading-2">What is Karudhaas App?</h1>
<div class="border-b bor"></div>
<p class="my-6 text-gray-800">
Karudhaas is a Web and a mobile app that helps you Discover Stories, Daily news, and inspirations. All with one app.
The app filters out articles from various news sites and aggregates them according to the respective article topics
Karudhaas is a Web and a mobile app that helps you Discover Stories, Daily news, and inspirations. All with one
app.
The app filters out articles from various news sites and aggregates them according to the respective article
topics
and its source. We are planning to bring some major feature upgrades later on.
</p>
<div class="mb-2 flex flex-col">
@@ -104,8 +103,10 @@
<div class="mb-5">
</div>
@endsection
@section('js')
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
@endsection
</x-layout>

View File

@@ -1,27 +0,0 @@
<footer class="border-t mt-10">
<div class="container mx-auto flex flex-col items-center justify-center pt-10">
<div class="flex justify-center pb-8">
<img class="w-12 h-12" src="/images/icon.png" />
</div>
<ul class="flex flex-wrap font-medium text-gray-700 pb-8 justify-center max-w-xl">
<li class="pb-4 md:pb-2 px-4 md:px-2">
<a href="/preview" class="hover:underline">Preview</a>
</li>
<li>
<a href="/about" class="hover:underline">About</a>
</li>
<li class="pb-4 md:pb-2 px-4 md:px-2">
<a href="/privacy" class="hover:underline">Privacy</a>
</li>
</ul>
<news-letter></news-letter>
<div class="py-8 flex">
<p class="text-gray-600">Made with ❤️ in Maldives. By <span><a href="https://github.com/jinas123" class="text-blue-600 hover:underline">@jinas123</a>, <a href="https://github.com/Dharisd" class="text-blue-600 hover:underline">@dharisd</a>, <a href="https://github.com/shihaamabr" class="text-blue-600 hover:underline">@shihaamabr</a>
</span></p>
</div>
</div>
</footer>

View File

@@ -1,6 +1,5 @@
@extends('layouts.app')
@section('meta')
<x-layout>
<x-slot name="meta">
<title>Karudhaas | {{$source->slug}}</title>
<meta name="description" content="Discover Stories,Daily news and inspiration for maldivian readers." />
@@ -15,12 +14,11 @@
<meta property="og:url" content="https://karudhaas.net" />
<meta property="og:site_name" content="karudhaas.net" />
<meta property="og:image" content="/images/og.jpg">
@endsection
</x-slot>
@section('content')
<source-view :source="{{$source}}"></source-view>
@endsection
@section('js')
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
@endsection
</x-layout>

View File

@@ -1,6 +1,6 @@
@extends('layouts.app')
<x-layout>
@section('meta')
<x-slot name="meta">
<title>Karudhaas | {{$topic->slug}}</title>
<meta name="description" content="Discover Stories,Daily news and inspiration for maldivian readers." />
@@ -15,9 +15,9 @@
<meta property="og:url" content="https://karudhaas.net" />
<meta property="og:site_name" content="karudhaas.net" />
<meta property="og:image" content="/images/og.jpg">
@endsection
</x-slot>
@section('content')
<div>
<section class="mx-auto max-w-6xl py-5">
<div class="flex flex-col">
@@ -68,4 +68,5 @@
</div>
</section>
</div>
@endsection
</x-layout>