Skip to content

Commit

Permalink
feat: Front-end starting point and Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniputra committed May 12, 2024
1 parent b8a0e9a commit eb87511
Show file tree
Hide file tree
Showing 34 changed files with 1,484 additions and 401 deletions.
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Contributing Guide

WIP...
121 changes: 121 additions & 0 deletions dist/ngeblog-admin-assets/Form-BVNdLdiC.js

Large diffs are not rendered by default.

121 changes: 0 additions & 121 deletions dist/ngeblog-admin-assets/Form-DCLp2j7U.js

This file was deleted.

2 changes: 1 addition & 1 deletion dist/ngeblog-admin-assets/Form.css
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.is-active[data-v-5bc089e2]{--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}
.is-active[data-v-70502711]{--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}
2 changes: 1 addition & 1 deletion dist/ngeblog-admin-assets/ngeblog.css

Large diffs are not rendered by default.

37 changes: 16 additions & 21 deletions dist/ngeblog-admin-assets/ngeblog.js

Large diffs are not rendered by default.

464 changes: 278 additions & 186 deletions package-lock.json

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@
"watch": "vite build --watch"
},
"devDependencies": {
"@headlessui/vue": "^1.7.19",
"@headlessui/vue": "^1.7.22",
"@tailwindcss/typography": "^0.5.13",
"@tiptap/pm": "^2.3.1",
"@tiptap/starter-kit": "^2.3.1",
"@tiptap/vue-3": "^2.3.1",
"@tiptap/pm": "^2.3.2",
"@tiptap/starter-kit": "^2.3.2",
"@tiptap/vue-3": "^2.3.2",
"@vitejs/plugin-vue": "^5.0.4",
"@vueuse/core": "^10.9.0",
"autoprefixer": "^10.4.19",
"axios": "^1.6.8",
"daisyui": "^4.10.1",
"daisyui": "^4.11.1",
"laravel-precognition-vue": "^0.5.4",
"postcss": "^8.4.38",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.13",
"prettier-plugin-tailwindcss": "^0.5.14",
"tailwindcss": "^3.4.3",
"vite": "^5.2.8",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
"vite": "^5.2.11",
"vue": "^3.4.27",
"vue-router": "^4.3.2"
}
}
2 changes: 1 addition & 1 deletion phpunit.xml → phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
</testsuites>
<source>
<include>
<!-- <directory suffix=".php">./app</directory> -->
<directory suffix=".php">./src</directory>
</include>
</source>
<php>
<env name="DB_CONNECTION" value="testing"/>
<env name="DB_DATABASE" value=":memory:"/>
</php>
</phpunit>
9 changes: 8 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@

# Ngeblog

It's quickstart to have simple **Blogging System** for your existing laravel application. It will give you `Blogs` and `Tags` out of the box. **Ngeblog** also provides a simple admin panel built with Vue SPA.
It's a quick start to have a simple **Blogging System** for your existing or brand-new Laravel application. Ngeblog provides a simple and elegant admin panel built with Vue and DaisyUI as an SPA App.

### Features

- BlogPost with [Tiptap Editor](https://tiptap.dev).
- Tagging feature.
- Dashboard for summary information.
- and more...

### Screenshot
<p align="center">
Expand Down
38 changes: 8 additions & 30 deletions resources/js/components/ContentEditor.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="flex flex-col">
<div class="flex flex-col border pb-8">
<div
v-if="editorElement"
class="sticky top-0 z-10 mb-8 flex flex-wrap gap-1 border-b bg-white p-2"
Expand Down Expand Up @@ -48,20 +48,6 @@
>
code
</button>
<button
type="button"
class="border px-2 py-1"
@click="editorElement.chain().focus().unsetAllMarks().run()"
>
clear marks
</button>
<button
type="button"
class="border px-2 py-1"
@click="editorElement.chain().focus().clearNodes().run()"
>
clear nodes
</button>
<button
type="button"
class="border px-2 py-1"
Expand Down Expand Up @@ -220,25 +206,16 @@
<button
type="button"
class="border px-2 py-1"
@click="editorElement.chain().focus().setHardBreak().run()"
>
hard break
</button>
<button
type="button"
class="border px-2 py-1"
@click="editorElement.chain().focus().undo().run()"
:disabled="!editorElement.can().chain().focus().undo().run()"
@click="editorElement.chain().focus().unsetAllMarks().run()"
>
undo
clear marks
</button>
<button
type="button"
class="border px-2 py-1"
@click="editorElement.chain().focus().redo().run()"
:disabled="!editorElement.can().chain().focus().redo().run()"
@click="editorElement.chain().focus().clearNodes().run()"
>
redo
clear nodes
</button>
</div>
<editor-content :editor="editorElement" />
Expand All @@ -263,7 +240,7 @@ onMounted(() => {
extensions: [StarterKit],
editorProps: {
attributes: {
class: "prose prose-sm sm:prose-lg mx-auto focus:outline-none",
class: "prose prose-sm sm:prose-base lg:prose-lg mx-auto focus:outline-none dark:prose-invert",
},
},
content: props.modelValue || defaultContent,
Expand All @@ -275,6 +252,7 @@ onMounted(() => {
// this.$emit('update:modelValue', editor.getJSON())
},
});
emits("update:modelValue", editorElement.value.getHTML());
});
Expand All @@ -287,7 +265,7 @@ const defaultContent = `
Hi there,
</h2>
<p>
this is a <em>basic</em> example of <strong>tiptap</strong>. Sure, there are all kind of basic text styles you'd probably expect from a text editorElement. But wait until you see the lists:
This is a <strong>basic example of tiptap</strong>. Sure, there are all kind of basic text styles you'd probably expect from a text editorElement. But wait until you see the lists:
</p>
<ul>
<li>
Expand Down
Loading

0 comments on commit eb87511

Please sign in to comment.