Skip to content

Commit

Permalink
🎂
Browse files Browse the repository at this point in the history
  • Loading branch information
atmonshi committed Apr 19, 2022
1 parent 1fbc907 commit 6c54d21
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 16 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 align="center">Lara Zeus Sky</h1>

<p align="center">
<a href="https://larazeus.com"><img src="https://larazeus.com/images/zeus-sky-banner.png" /></a>
<a href="https://larazeus.com"><img src="https://larazeus.com/images/sky-banner.png" /></a>
</p>

<p align="center">
Expand Down Expand Up @@ -77,6 +77,12 @@ visit the url `/admin` to manage the Letters, and `/blog`.

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

## Support
available support channels:
* using our channel `#sky` on [Discord](https://filamentphp.com/discord)
* open an issue on [GitHub](https://github.com/lara-zeus/sky/issues)
* email us using the [contact center](https://atm-code.com/contact-us/lara-zeus)

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
Expand Down
13 changes: 6 additions & 7 deletions database/factories/PostFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ class PostFactory extends Factory
public function definition()
{
return [
'user_id' => 1,
'title' => $this->faker->word,
'slug' => $this->faker->slug(2),
'description' => $this->faker->sentence,
'content' => $this->faker->sentence,
'user_id' => 1,
'title' => $this->faker->word,
'slug' => $this->faker->slug(2),
'description' => $this->faker->sentence,
'content' => $this->faker->sentence,
'published_at' => now(),
'post_type' => $this->faker->randomElement(['page','post']),
'tags' => $this->faker->randomElement([['dev'], ['talk'], ['laravel']]),
'post_type' => $this->faker->randomElement([ 'page', 'post' ]),
];
}
}
12 changes: 10 additions & 2 deletions database/seeders/SkySeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,24 @@
namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use LaraZeus\Sky\Models\Post;
use LaraZeus\Sky\Models\Tag;

class SkySeeder extends Seeder
{
public function run()
{
Tag::create([ 'name' => 'laravel', 'type' => 'category' ]);
Tag::create([ 'name' => 'talks', 'type' => 'category' ]);
Tag::create([ 'name' => 'dev', 'type' => 'category' ]);

Post::factory()
->count(8)
->create();

foreach (Post::all() as $post) { // loop through all posts
$random_tags = Tag::all()->random(1)->first()->name;
$post->syncTagsWithType([ $random_tags ], 'category');
}
}
}
9 changes: 9 additions & 0 deletions docs/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,14 @@ to customize the default views for sky:
php artisan vendor:publish --tag=zeus-sky-views
```

## Publishing Translations

to customize the translations:

```bash
php artisan vendor:publish --tag=zeus-sky-translations
```


## themes
soon
7 changes: 7 additions & 0 deletions docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@ and more in the way:
- authers
- menus
- comments
- RSS
- and more!

## Support
available support channels:
* using our channel `#sky` on [Discord](https://filamentphp.com/discord)
* open an issue on [GitHub](https://github.com/lara-zeus/sky/issues)
* email us using the [contact center](https://atm-code.com/contact-us/lara-zeus)
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<li class="px-1 py-4 border-b border-t border-white hover:border-primary-600 transition duration-300">
<a href="{{ route('tags',['category',$tag->slug]) }}" class="flex items-center text-gray-600 cursor-pointer">
{{ $tag->name }}
<span class="text-gray-500 ltr:ml-auto rtl:mr-auto">{{ $tag->posts_count }} <span class="text-xs">Post</span></span>
<span class="text-gray-500 ltr:ml-auto rtl:mr-auto">{{ $tag->posts_published_count }} <span class="text-xs">Post</span></span>
<i class='text-gray-500 bx bx-right-arrow-alt ltr:ml-1 rtl:mr-1'></i>
</a>
</li>
Expand Down
2 changes: 0 additions & 2 deletions resources/views/themes/zeus/partial/sidebar/pages.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<div class="flex items-center space-x-3 rtl:space-x-reverse">
@if(!$post->getMedia('posts')->isEmpty())
<img src="{{ $post->getFirstMediaUrl('posts') }}" class="h-6 w-6 shadow-md rounded-[2rem] rounded-bl-none z-0 object-cover"/>
@else
<img src="https://images.unsplash.com/photo-1492562080023-ab3db95bfbce?ixlib=rb-1.2.1&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;auto=format&amp;fit=crop&amp;w=731&amp;q=80" class="h-6 w-6 shadow-md rounded-[2rem] rounded-bl-none z-0 object-cover"/>
@endif
<div class="w-full text-lg">{{ $post->title ?? '' }}</div>
</div>
Expand Down
2 changes: 0 additions & 2 deletions resources/views/themes/zeus/partial/sidebar/recent.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<div class="flex items-center space-x-3 rtl:space-x-reverse">
@if(!$post->getMedia('posts')->isEmpty())
<img src="{{ $post->getFirstMediaUrl('posts') }}" class="h-6 w-6 shadow-md rounded-[2rem] rounded-bl-none z-0 object-cover"/>
@else
<img src="https://images.unsplash.com/photo-1492562080023-ab3db95bfbce?ixlib=rb-1.2.1&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;auto=format&amp;fit=crop&amp;w=731&amp;q=80" class="h-6 w-6 shadow-md rounded-[2rem] rounded-bl-none z-0 object-cover"/>
@endif
<div class="w-full text-lg">{{ $post->title ?? '' }}</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Livewire/Posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function render()
->with([
'posts' => Post::NotSticky()->orderBy('published_at', 'desc')->get(),
'pages' => Post::page()->orderBy('published_at', 'desc')->whereNull('parent_id')->get(),
'tags' => Tag::withCount('posts')->where('type', 'category')->get(),
'tags' => Tag::withCount('postsPublished')->where('type', 'category')->get(),// $this->tag->postsPublished
'stickies' => Post::sticky()->get(),
'recent' => Post::posts()->take(5)->get(),
])
Expand Down

0 comments on commit 6c54d21

Please sign in to comment.