From d1db29dce81085bf021a55fafd930dc3bc333097 Mon Sep 17 00:00:00 2001 From: Md Shayon Date: Fri, 1 Dec 2023 14:20:05 +0600 Subject: [PATCH] Incomplete web dev lab --- client/.Dockerfile.dev | 0 client/Dockerfile | 0 client/assets/css/tailwind.css | 3 +- client/components/admin/Admin.vue | 212 +------------------- client/components/article/ArticleAdd.vue | 86 ++++++++ client/components/article/ArticleExpand.vue | 59 +++++- client/components/author/Author.vue | 8 + client/components/category/Category.vue | 7 + client/components/category/CategoryAdd.vue | 3 + client/components/graphql/category.ts | 0 client/graphql/articles.ts | 30 +++ client/layouts/admin.vue | 26 ++- client/layouts/default.vue | 1 + client/nuxt.config.ts | 42 +++- client/package-lock.json | 153 +++++++++++--- client/package.json | 4 + client/pages/admin/article.vue | 26 +++ client/pages/admin/author.vue | 37 ++++ client/pages/admin/category.vue | 33 +++ client/pages/admin/comments.vue | 9 + client/pages/admin/settings.vue | 8 + client/pages/admin/tags.vue | 9 + client/types/Article.ts | 4 +- client/types/index.ts | 9 + 24 files changed, 512 insertions(+), 257 deletions(-) create mode 100644 client/.Dockerfile.dev create mode 100644 client/Dockerfile create mode 100644 client/components/article/ArticleAdd.vue create mode 100644 client/components/author/Author.vue create mode 100644 client/components/category/Category.vue create mode 100644 client/components/category/CategoryAdd.vue create mode 100644 client/components/graphql/category.ts create mode 100644 client/graphql/articles.ts create mode 100644 client/pages/admin/article.vue create mode 100644 client/pages/admin/author.vue create mode 100644 client/pages/admin/category.vue create mode 100644 client/pages/admin/comments.vue create mode 100644 client/pages/admin/settings.vue create mode 100644 client/pages/admin/tags.vue create mode 100644 client/types/index.ts diff --git a/client/.Dockerfile.dev b/client/.Dockerfile.dev new file mode 100644 index 0000000..e69de29 diff --git a/client/Dockerfile b/client/Dockerfile new file mode 100644 index 0000000..e69de29 diff --git a/client/assets/css/tailwind.css b/client/assets/css/tailwind.css index bd6213e..71ed0cc 100644 --- a/client/assets/css/tailwind.css +++ b/client/assets/css/tailwind.css @@ -1,3 +1,4 @@ @tailwind base; @tailwind components; -@tailwind utilities; \ No newline at end of file +@tailwind utilities; +/* @import 'quill/dist/quill.snow.css'; */ \ No newline at end of file diff --git a/client/components/admin/Admin.vue b/client/components/admin/Admin.vue index cdc2d2b..73b73f7 100644 --- a/client/components/admin/Admin.vue +++ b/client/components/admin/Admin.vue @@ -1,225 +1,15 @@ diff --git a/client/components/article/ArticleAdd.vue b/client/components/article/ArticleAdd.vue new file mode 100644 index 0000000..7a66b0e --- /dev/null +++ b/client/components/article/ArticleAdd.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/client/components/article/ArticleExpand.vue b/client/components/article/ArticleExpand.vue index 90ce7a7..15f2ac9 100644 --- a/client/components/article/ArticleExpand.vue +++ b/client/components/article/ArticleExpand.vue @@ -17,16 +17,14 @@

{{ data.articleByLink.createdAt }}

-

- Breakfast agreeable incommode departure it an. By ignorant at on wondered relation. Enough at tastes really so cousin am of. Extensive therefore supported - by extremity of contented. Is pursuit compact demesne invited elderly be. View him she roof tell her case has sigh. Moreover is possible he admitted - sociable concerns. By in cold no less been sent hard hill. -

+

{{ data.articleByLink.content }}

diff --git a/client/components/category/Category.vue b/client/components/category/Category.vue new file mode 100644 index 0000000..46c95af --- /dev/null +++ b/client/components/category/Category.vue @@ -0,0 +1,7 @@ + + + diff --git a/client/components/category/CategoryAdd.vue b/client/components/category/CategoryAdd.vue new file mode 100644 index 0000000..5d02856 --- /dev/null +++ b/client/components/category/CategoryAdd.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/client/components/graphql/category.ts b/client/components/graphql/category.ts new file mode 100644 index 0000000..e69de29 diff --git a/client/graphql/articles.ts b/client/graphql/articles.ts new file mode 100644 index 0000000..9e813d2 --- /dev/null +++ b/client/graphql/articles.ts @@ -0,0 +1,30 @@ +const GET_ARTICLES = gql` + query GetArticles { + allArticles(limit: 10, start: 0) { + title + link + id + content + category { + id + name + } + createdAt + author { + id + name + } + } + allAuthors { + id + name + email + } + allCategories { + id + name + } + } +`; + +export { GET_ARTICLES }; diff --git a/client/layouts/admin.vue b/client/layouts/admin.vue index 978394a..9cd7e83 100644 --- a/client/layouts/admin.vue +++ b/client/layouts/admin.vue @@ -1,7 +1,23 @@ \ No newline at end of file + + diff --git a/client/layouts/default.vue b/client/layouts/default.vue index 4ce0df9..00a1ef6 100644 --- a/client/layouts/default.vue +++ b/client/layouts/default.vue @@ -1,5 +1,6 @@