1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 05:14:04 +00:00

initial commit

This commit is contained in:
Samuel Štancl 2021-04-06 18:27:18 +02:00
commit 1beb9dd34c
281 changed files with 56773 additions and 0 deletions

View file

@ -0,0 +1,23 @@
@props([
'tips',
])
<section role="feed" class="my-8">
@foreach($tips as $tip)
<article class="border-b-2 border-gray-200 py-16" x-data @click="window.location.href = '{{ route('tip.show', $tip) }}'">
<h1 class="text-3xl font-medium">
<a href="{{ route('tip.show', $tip) }}">🔥 {{ $tip->title }}</a>
</h1>
<div class="mt-4 flex justify-center w-1/2 gap-1 flex-wrap mx-auto">
@foreach($tip->images() as $image)
<img alt="{{ $tip->title }}" src="{{ $image->small() }}">
@endforeach
</div>
<section role="article" class="mt-8 text-xl prose mx-auto">
@markdown{!! $tip->content !!}@endmarkdown
</section>
</article>
@endforeach
</section>

View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title>
<link rel="stylesheet" href="{{ mix('css/app.css') }}">
<script type="module" src="{{ mix('js/app.js') }}"></script>
<link href="https://fonts.rcvd.io/iA%20Writer/stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body class="antialiased bg-white">
<div class="w-full p-3 text-center min-h-screen flex justify-between flex-col">
{{ $slot }}
<footer class="space-y-2 text-gray-700 text-sm">
<p>Found an error? Contact us at <a href="mailto:hello@laravel-code.tips" class="link">support@laravel-code.tips</a>.</p>
<p>Want to share a tip? Submit it <a href="https://airtable.com/shrBX2ZAfnuAXh3up" target="_blank" class="link">here</a>.</p>
</footer>
</div>
</body>
</html>

View file

@ -0,0 +1,53 @@
<x:layout>
<main class="mx-auto flex justify-between items-start gap-8">
<aside class="flex flex-col gap-2 mt-60">
<h2 class="text-2xl font-medium">
<a class="block" href="/">
Laravel Code Tips
</a>
</h2>
<div class="flex justify-between">
<a class="block" href="https://twitter.com/LaravelCodeTips" target="_blank">
<span class="link">Twitter</span>
</a>
<span class="px-2">·</span>
<a class="block" href="https://newsletter.laravel-code.tips" target="_blank">
<span class="link">Newsletter</span>
</a>
<span class="px-2">·</span>
<a class="block" href="https://t.me/laraveltips" target="_blank">
<span class="link">Telegram</span>
</a>
</div>
<a class="block" href="/">
<span class="link">All tips</span>
</a>
</aside>
<article class="max-w-5xl w-full mt-8">
<header class="flex justify-center flex-wrap gap-5">
<h1 class="text-4xl w-full">🔥 {{ $thread->title }}</h1>
<div class="prose text-xl">@markdown{!! $thread->content !!}@endmarkdown</div>
<x:feed :tips="$tips" />
</header>
</article>
<aside class="mt-60">
<dl class="grid grid-cols-2 gap-x-5 gap-y-4 items-center">
<dt class="text-right">Author</dt>
<dd class="text-left">
<a href="{{ $thread->author->profile_url }}" class="flex items-center gap-2" target="_blank">
<img src="{{ $thread->author->avatar }}" class="w-8 rounded-full border-blue-800 border-2">
<span class="text-blue-800">{{ $thread->author->name }}</span>
</a>
</dd>
<dt class="text-right">Tweet</dt>
<dd class="text-left text-blue-800">
<a href="{{ $thread->tweet_url }}" target="_blank">
twitter.com/...
</a>
</dd>
</dl>
</aside>
</main>
</x:layout>

View file

@ -0,0 +1,22 @@
<x:layout>
<header class="mt-8">
<h1 class="text-5xl w-full">Laravel Code Tips</h1>
<h2 class="mt-6 text-2xl text-gray-700">Make your Laravel code cleaner, faster, and safer.</h2>
<div class="mt-6 text-gray-800 text-lg">
<a class="inline" href="https://twitter.com/LaravelCodeTips" target="_blank">
<span class="link">Twitter</span>
</a>
<span class="px-1">·</span>
<a class="inline" href="https://newsletter.laravel-code.tips" target="_blank">
<span class="link">Newsletter</span>
</a>
<span class="px-1">·</span>
<a class="inline" href="https://t.me/laraveltips" target="_blank">
<span class="link">Telegram</span>
</a>
</div>
</header>
<main class="mx-auto flex justify-between items-center gap-8 w-1/2">
<x:feed :tips="$tips" />
</main>
</x:layout>

View file

@ -0,0 +1,71 @@
<x:layout>
<main class="mx-auto flex justify-between items-center gap-8">
<aside class="flex flex-col gap-2">
<h2 class="text-2xl font-medium">
<a class="block" href="/">
Laravel Code Tips
</a>
</h2>
<div class="flex justify-between">
<a class="block" href="https://twitter.com/LaravelCodeTips" target="_blank">
<span class="link">Twitter</span>
</a>
<span class="px-2">·</span>
<a class="block" href="https://newsletter.laravel-code.tips" target="_blank">
<span class="link">Newsletter</span>
</a>
<span class="px-2">·</span>
<a class="block" href="https://t.me/laraveltips" target="_blank">
<span class="link">Telegram</span>
</a>
</div>
<a class="block" href="/">
<span class="link">All tips</span>
</a>
</aside>
<article class="max-w-5xl w-full mt-8 text-xl">
<header class="flex justify-center flex-wrap gap-5">
<h1 class="text-4xl w-full">🔥 {{ $tip->title }}</h1>
<div class="flex justify-center w-1/2 gap-1 flex-wrap">
@foreach($tip->images() as $image)
<a href="{{ $image->large() }}" target="_blank">
<img alt="{{ $tip->title }}" src="{{ $image->small() }}">
</a>
@endforeach
</div>
</header>
<section role="article" class="mt-8 text-xl prose mx-auto">
@markdown{!! $tip->content !!}@endmarkdown
</section>
</article>
<aside>
<dl class="grid grid-cols-2 gap-x-5 gap-y-4 items-center">
<dt class="text-right">Author</dt>
<dd class="text-left">
<a href="{{ $tip->author->profile_url }}" class="flex items-center gap-2" target="_blank">
<img src="{{ $tip->author->avatar }}" class="w-8 rounded-full border-blue-800 border-2">
<span class="text-blue-800">{{ $tip->author->name }}</span>
</a>
</dd>
@if($tip->thread)
<dt class="text-right">Thread</dt>
<dd class="text-left text-blue-800">
<a href="{{ route('thread.show', $tip->thread->slug) }}">
{{ $tip->thread->title }}
</a>
</dd>
@endif
<dt class="text-right">Tweet</dt>
<dd class="text-left text-blue-800">
<a href="{{ $tip->tweet_url }}" target="_blank">
twitter.com/...
</a>
</dd>
</dl>
</aside>
</main>
</x:layout>