Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
SethSharp committed Aug 26, 2024
1 parent 94fb9a4 commit 497fdd9
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ public function __invoke(): Response
AllowedFilter::custom('q', new BlogSearchFilter()),
])
->when($currentStatus->value === BlogStatus::PUBLISHED->value, fn ($query) => $query->orderByDesc('published_at'))
->paginate(9)
->withQueryString();
->paginate(10);

return Inertia::render('Dashboard/Blogs/Index', [
'blogs' => $blogs,
Expand Down
82 changes: 4 additions & 78 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@alpinejs/intersect": "^3.13.7",
"@headlessui/vue": "^1.7.16",
"@heroicons/vue": "^2.0.18",
"@sethsharp/ui": "1.0.0-alpha.2.0.36",
"@sethsharp/ui": "1.0.0-alpha.2.0.40",
"@tiptap/extension-bubble-menu": "^2.2.1",
"@tiptap/extension-code-block-lowlight": "^2.2.4",
"@tiptap/extension-document": "^2.2.1",
Expand Down
18 changes: 14 additions & 4 deletions resources/js/Layouts/AuthenticatedLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
import { ref } from 'vue'
import { useDark } from '@vueuse/core'
import { Head, Link } from '@inertiajs/vue3'
import { Notifications, Dropdown, DropdownMenuLink, SecondaryButton, Toggle } from '@sethsharp/ui'
import {
Notifications,
Dropdown,
DropdownMenuLink,
BaseDropdownMenuItem,
SecondaryButton,
Toggle,
} from '@sethsharp/ui'
import NavLink from '@/Components/Links/NavLink.vue'
import ApplicationLogo from '@/Components/ApplicationLogo.vue'
import ResponsiveNavLink from '@/Components/Links/ResponsiveNavLink.vue'
Expand Down Expand Up @@ -89,9 +96,12 @@ const isDark = useDark({
Portfolio
</DropdownMenuLink>

<div class="flex justify-start px-2">
Dark Mode: <Toggle v-model="isDark" />
</div>
<BaseDropdownMenuItem>
<div class="flex gap-2">
<span class="my-auto">Dark Mode: </span>
<Toggle v-model="isDark" />
</div>
</BaseDropdownMenuItem>

<DropdownMenuLink
method="post"
Expand Down
14 changes: 11 additions & 3 deletions resources/js/Layouts/IndexTagsLayout.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<script setup>
import { Tabs } from '@sethsharp/ui'
import { onMounted } from 'vue'
import { Pagination, Tabs } from '@sethsharp/ui'
import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout.vue'
defineProps({
const props = defineProps({
status: String,
tabs: Object,
count: Number,
Expand All @@ -12,6 +13,11 @@ defineProps({
required: false,
},
})
onMounted(() => {
props.data.links.shift()
props.data.links.pop()
})
</script>

<template>
Expand All @@ -21,8 +27,10 @@ defineProps({
<slot name="header" />
</div>

<Tabs :tabs="tabs" :data="data">
<Tabs :tabs="tabs">
<slot />

<Pagination :data="data" />
</Tabs>
</div>
</AuthenticatedLayout>
Expand Down
7 changes: 6 additions & 1 deletion resources/js/Pages/Dashboard/Blogs/Index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import { ref, watch } from 'vue'
import { onMounted, ref, watch } from 'vue'
import { router, Link } from '@inertiajs/vue3'
import { SecondaryButton, PrimaryButton, Text } from '@sethsharp/ui'
import Blog from '@/Components/Cards/Blog.vue'
Expand Down Expand Up @@ -33,6 +33,11 @@ watch(search, (newSearch) => {
visitSearch()
}
})
onMounted(() => {
props.blogs.links.shift()
props.blogs.links.pop()
})
</script>
<template>
Expand Down

0 comments on commit 497fdd9

Please sign in to comment.