Skip to content

Commit

Permalink
test of stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
SethSharp committed Sep 19, 2024
1 parent 4079914 commit 0057e7d
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 64 deletions.
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/lumuix": "^1.0.0-alpha.1.2",
"@sethsharp/lumuix": "^1.0.0-alpha.1.2.1",
"@tiptap/extension-bubble-menu": "^2.2.1",
"@tiptap/extension-code-block-lowlight": "^2.2.4",
"@tiptap/extension-document": "^2.2.1",
Expand Down
113 changes: 61 additions & 52 deletions resources/js/Components/Blogs/CreateEditForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
FormGrid,
Form,
ImageUpload,
Label,
Description,
} from '@sethsharp/lumuix'
import Editor from '@/Components/Editor/Editor.vue'
import { getBlogCoverImage } from '@/Helpers/helpers.js'
Expand Down Expand Up @@ -114,79 +116,86 @@ window.addEventListener('beforeunload', confirmLeave)
</FormElement>
<FormElement>
<Checkbox
v-model="form.is_draft"
label="Is Draft"
:error="form.errors.is_draft"
:show-label="false"
/>
<Checkbox id="is_draft" v-model="form.is_draft" label="Is Draft" />
<Error :message="form.errors.is_draft" />
</FormElement>
<FormGrid>
<Text id="title" v-model="form.title" :error="form.errors.title" label="Title" />
<Combobox
v-model="form.collection_id"
:options="collectionOptions"
label="Collection"
allow-search
width-class="w-full md:w-96"
:error="form.errors.collection_id"
/>
<FormElement>
<Label id="title"> Title </Label>
<Text id="title" v-model="form.title" :error="form.errors.title" label="Title" />
</FormElement>
<FormElement class="flex flex-col space-y-2">
<Label id="collection"> Collection </Label>
<Combobox
v-model="form.collection_id"
:options="collectionOptions"
allow-search
width-class="w-full md:w-96"
/>
<Error :message="form.errors.collection_id" />
</FormElement>
</FormGrid>
<FormGrid>
<Text
id="slug"
v-model="form.slug"
label="Slug (must be lowercase separated by '-')"
:error="form.errors.slug"
placeholder="a-new-blog-of-mine"
:description="
'Can be left empty, title will be slugified and entered here. When viewing the blog in the web it will appear as blogs/' +
(form.slug ? form.slug : form.title ? form.title : 'some-value')
"
/>
<Combobox
v-model="form.tags"
:options="tagOptions"
label="Tags"
width-class="w-full md:w-96"
multiple
allow-search
:error="form.errors.tags"
/>
<FormElement>
<Label id="slug"> (must be lowercase separated by '-') </Label>
<Text id="slug" v-model="form.slug" placeholder="a-new-blog-of-mine" />
<Description>
{{
'Can be left empty, title will be slugified and entered here. When viewing the blog in the web it will appear as blogs/' +
(form.slug ? form.slug : form.title ? form.title : 'some-value')
}}
</Description>
<Error :message="form.errors.slug" />
</FormElement>
<FormElement class="flex flex-col space-y-2">
<Label> Tags </Label>
<Combobox
v-model="form.tags"
:options="tagOptions"
width-class="w-full md:w-96"
multiple
allow-search
/>
<Error :message="form.errors.tags" />
</FormElement>
</FormGrid>
<FormElement>
<Label> Meta Title </Label>
<Text
id="meta-title"
v-model="form.meta_title"
label="Meta Title"
description="Serves as a SEO title for Google to read (can be the same as your regular title)"
:error="form.errors.meta_title"
/>
<Description>
Serves as a SEO title for Google to read (can be the same as your regular title)
</Description>
<Error :message="form.errors.meta_title" />
</FormElement>
<FormElement>
<TextArea
id="meta-description"
v-model="form.meta_description"
label="Meta Description"
description="Serves as a small blurb on the blog, used both in Google previews and within the portfolio site itself."
:error="form.errors.meta_description"
/>
<Label> Meta Description </Label>
<TextArea id="meta-description" v-model="form.meta_description" />
<Description>
Serves as a small blurb on the blog, used both in Google previews and within the
portfolio site itself.</Description
>
<Error :message="form.errors.meta_description" />
</FormElement>
<FormElement>
<Text
id="meta-tags"
v-model="form.meta_tags"
label="Meta Tags"
description="Helps Google understand the content of the page - similar to how hashtags work on Instagram"
:error="form.errors.meta_tags"
/>
<Label> Meta Tags</Label>
<Text id="meta-tags" v-model="form.meta_tags" />
<Description>
description="Helps Google understand the content of the page - similar to how
hashtags work on Instagram"
</Description>
<Error :message="form.errors.meta_tags" />
</FormElement>
<FormElement>
Expand Down
17 changes: 6 additions & 11 deletions resources/js/Pages/Auth/Login.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { Head, useForm } from '@inertiajs/vue3'
import { PrimaryButton, Text, FormElement, Checkbox } from '@sethsharp/lumuix'
import { PrimaryButton, Text, FormElement, Checkbox, Label, Error } from '@sethsharp/lumuix'
import GuestLayout from '@/Layouts/GuestLayout.vue'
defineProps({
Expand Down Expand Up @@ -35,26 +35,21 @@ const submit = () => {

<form @submit.prevent="submit">
<FormElement>
<Label> Email </Label>
<Text
type="email"
v-model="form.email"
required
autofocus
autocomplete="username"
label="Email"
:error="form.errors.email"
/>
<Error :message="form.errors.email" />
</FormElement>

<FormElement>
<Text
type="password"
v-model="form.password"
required
label="Password"
autocomplete="password"
:error="form.errors.password"
/>
<Label> Password</Label>
<Text type="password" v-model="form.password" required autocomplete="password" />
<Error :message="form.errors.password" />
</FormElement>

<FormElement>
Expand Down

0 comments on commit 0057e7d

Please sign in to comment.