From 5b1e0af3977c61a1803b8f5bca9f4cddd49de88c Mon Sep 17 00:00:00 2001 From: nguyen van thai Date: Wed, 12 Jun 2024 17:17:49 +0700 Subject: [PATCH] =?UTF-8?q?thainv-dev:=20t=E1=BA=A1o=20l=E1=BA=A1i=20c?= =?UTF-8?q?=E1=BA=A5u=20tr=C3=BAc=20folder=20v=C3=A0=20l=C3=A0m=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/styles/app.sass | 8 +- assets/styles/style.scss | 12 +- components/article/immerse/Poll.vue | 112 ++- components/article/immerse/Quiz.vue | 308 +++++- components/article/immerse/Survey.vue | 297 +++++- .../templates/advertising/index.ts | 1 + .../templates/advertising/index.vue | 33 + .../templates/advertising/layouts/Default.vue | 12 + .../templates/articles/index.ts | 5 + .../templates/articles/index.vue | 41 + .../templates/articles/layouts/Card.vue | 98 ++ .../articles/layouts/details/General.vue | 168 ++++ .../articles/layouts/details/Image.vue | 139 +++ .../articles/layouts/details/Podcast.vue | 10 + .../articles/layouts/details/Video.vue | 47 + .../templates/collections/index.ts | 1 + .../templates/collections/index.vue | 33 + .../templates/collections/layouts/Article.vue | 6 + .../page-component/templates/index.ts | 7 +- .../page-component/templates/index.vue | 11 +- .../templates/other/breadcrumb/Default.vue | 66 +- .../other/copyLinks/ArticleButton.vue | 9 +- .../templates/other/details/default.vue | 73 +- .../page-component/templates/other/index.vue | 2 +- .../dynamic-page/page/layouts/Default.vue | 2 +- .../page/layouts/articles/Long.vue | 2 +- definitions/cms/page.type.ts | 5 + definitions/enum/page.enum.ts | 4 + pages/bai-viet/[slug].vue | 21 +- server/api/services/[...].ts | 7 + server/models/category.ts | 14 +- server/models/poll-option.ts | 16 +- server/models/poll-response.ts | 38 +- server/models/poll.ts | 10 +- server/models/quiz.ts | 46 + server/models/survey.ts | 46 + stores/category.ts | 154 +-- stores/dynamic-page.ts | 878 +++++++++++++++++- stores/poll-option.ts | 29 +- stores/poll-response.ts | 45 +- stores/poll.ts | 37 +- stores/quiz.ts | 24 + stores/survey.ts | 24 + uno.config.ts | 1 + 44 files changed, 2674 insertions(+), 228 deletions(-) create mode 100644 components/dynamic-page/page-component/templates/advertising/index.ts create mode 100644 components/dynamic-page/page-component/templates/advertising/index.vue create mode 100644 components/dynamic-page/page-component/templates/advertising/layouts/Default.vue create mode 100644 components/dynamic-page/page-component/templates/articles/index.ts create mode 100644 components/dynamic-page/page-component/templates/articles/index.vue create mode 100644 components/dynamic-page/page-component/templates/articles/layouts/Card.vue create mode 100644 components/dynamic-page/page-component/templates/articles/layouts/details/General.vue create mode 100644 components/dynamic-page/page-component/templates/articles/layouts/details/Image.vue create mode 100644 components/dynamic-page/page-component/templates/articles/layouts/details/Podcast.vue create mode 100644 components/dynamic-page/page-component/templates/articles/layouts/details/Video.vue create mode 100644 components/dynamic-page/page-component/templates/collections/index.ts create mode 100644 components/dynamic-page/page-component/templates/collections/index.vue create mode 100644 components/dynamic-page/page-component/templates/collections/layouts/Article.vue create mode 100644 server/models/quiz.ts create mode 100644 server/models/survey.ts create mode 100644 stores/quiz.ts create mode 100644 stores/survey.ts diff --git a/assets/styles/app.sass b/assets/styles/app.sass index 5b6616a..d3af389 100644 --- a/assets/styles/app.sass +++ b/assets/styles/app.sass @@ -2,10 +2,10 @@ body font-family: 'Nunito', sans-serif -video - max-width: 100% !important - width: unset !important - height: unset !important +// video +// max-width: 100% !important +// width: unset !important +// height: unset !important iframe width: 100% !important diff --git a/assets/styles/style.scss b/assets/styles/style.scss index 5d710a1..dfab112 100644 --- a/assets/styles/style.scss +++ b/assets/styles/style.scss @@ -20,17 +20,13 @@ figure { @apply w-full; } - & a { - @apply text-primary-600 underline; - } - - & document { - @apply cursor-pointer text-primary-600 underline; + & document, & a, & custom-figure, & author { + @apply cursor-pointer text-primary-600; } } -div[layout="ARTICLE_DETAIL_EMAGAZINE"] { - & p,& figure.align-center-image, & #sub, & #title, & #intro { +div[layout="TYPE:Detail-LAYOUT:image"] { + & p,& figure.align-center-image, & #sub, & #title, & #intro, & #breakcrumb, & #navigation__bottom { @apply lg:max-w-640px mx-auto; } } diff --git a/components/article/immerse/Poll.vue b/components/article/immerse/Poll.vue index f177f4c..4bb8043 100644 --- a/components/article/immerse/Poll.vue +++ b/components/article/immerse/Poll.vue @@ -1,56 +1,110 @@ \ No newline at end of file + diff --git a/components/article/immerse/Quiz.vue b/components/article/immerse/Quiz.vue index d02bc47..fe26e5d 100644 --- a/components/article/immerse/Quiz.vue +++ b/components/article/immerse/Quiz.vue @@ -1,6 +1,310 @@ \ No newline at end of file +
+
Câu đố: {{ data?.title }}
+ + + + +
+ + + + diff --git a/components/article/immerse/Survey.vue b/components/article/immerse/Survey.vue index e10ba2d..fdcbbe2 100644 --- a/components/article/immerse/Survey.vue +++ b/components/article/immerse/Survey.vue @@ -1,6 +1,299 @@ \ No newline at end of file + +
+
Khảo sát: {{ dataSurvey?.title }}
+ + + + +
+ + + diff --git a/components/dynamic-page/page-component/templates/advertising/index.ts b/components/dynamic-page/page-component/templates/advertising/index.ts new file mode 100644 index 0000000..54793df --- /dev/null +++ b/components/dynamic-page/page-component/templates/advertising/index.ts @@ -0,0 +1 @@ +export { default as ADS_Default } from './layouts/Default.vue'; \ No newline at end of file diff --git a/components/dynamic-page/page-component/templates/advertising/index.vue b/components/dynamic-page/page-component/templates/advertising/index.vue new file mode 100644 index 0000000..66a670c --- /dev/null +++ b/components/dynamic-page/page-component/templates/advertising/index.vue @@ -0,0 +1,33 @@ + + + diff --git a/components/dynamic-page/page-component/templates/advertising/layouts/Default.vue b/components/dynamic-page/page-component/templates/advertising/layouts/Default.vue new file mode 100644 index 0000000..e07463e --- /dev/null +++ b/components/dynamic-page/page-component/templates/advertising/layouts/Default.vue @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/components/dynamic-page/page-component/templates/articles/index.ts b/components/dynamic-page/page-component/templates/articles/index.ts new file mode 100644 index 0000000..1732792 --- /dev/null +++ b/components/dynamic-page/page-component/templates/articles/index.ts @@ -0,0 +1,5 @@ +export { default as Article_Card } from './layouts/Card.vue' +export { default as Article_Detail_General } from './layouts/details/General.vue' +export { default as Article_Detail_Podcast } from './layouts/details/Podcast.vue' +export { default as Article_Detail_Video } from './layouts/details/Video.vue' +export { default as Article_Detail_Image } from './layouts/details/Image.vue' \ No newline at end of file diff --git a/components/dynamic-page/page-component/templates/articles/index.vue b/components/dynamic-page/page-component/templates/articles/index.vue new file mode 100644 index 0000000..3914c4c --- /dev/null +++ b/components/dynamic-page/page-component/templates/articles/index.vue @@ -0,0 +1,41 @@ + + + diff --git a/components/dynamic-page/page-component/templates/articles/layouts/Card.vue b/components/dynamic-page/page-component/templates/articles/layouts/Card.vue new file mode 100644 index 0000000..9ca1f79 --- /dev/null +++ b/components/dynamic-page/page-component/templates/articles/layouts/Card.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/components/dynamic-page/page-component/templates/articles/layouts/details/General.vue b/components/dynamic-page/page-component/templates/articles/layouts/details/General.vue new file mode 100644 index 0000000..7bd42a5 --- /dev/null +++ b/components/dynamic-page/page-component/templates/articles/layouts/details/General.vue @@ -0,0 +1,168 @@ + + + + diff --git a/components/dynamic-page/page-component/templates/articles/layouts/details/Image.vue b/components/dynamic-page/page-component/templates/articles/layouts/details/Image.vue new file mode 100644 index 0000000..3bd6cf9 --- /dev/null +++ b/components/dynamic-page/page-component/templates/articles/layouts/details/Image.vue @@ -0,0 +1,139 @@ + + + + diff --git a/components/dynamic-page/page-component/templates/articles/layouts/details/Podcast.vue b/components/dynamic-page/page-component/templates/articles/layouts/details/Podcast.vue new file mode 100644 index 0000000..a285f36 --- /dev/null +++ b/components/dynamic-page/page-component/templates/articles/layouts/details/Podcast.vue @@ -0,0 +1,10 @@ + + + \ No newline at end of file diff --git a/components/dynamic-page/page-component/templates/articles/layouts/details/Video.vue b/components/dynamic-page/page-component/templates/articles/layouts/details/Video.vue new file mode 100644 index 0000000..013df63 --- /dev/null +++ b/components/dynamic-page/page-component/templates/articles/layouts/details/Video.vue @@ -0,0 +1,47 @@ + + + diff --git a/components/dynamic-page/page-component/templates/collections/index.ts b/components/dynamic-page/page-component/templates/collections/index.ts new file mode 100644 index 0000000..c668821 --- /dev/null +++ b/components/dynamic-page/page-component/templates/collections/index.ts @@ -0,0 +1 @@ +export { default as Collection_Article } from './layouts/Article.vue' \ No newline at end of file diff --git a/components/dynamic-page/page-component/templates/collections/index.vue b/components/dynamic-page/page-component/templates/collections/index.vue new file mode 100644 index 0000000..8940c90 --- /dev/null +++ b/components/dynamic-page/page-component/templates/collections/index.vue @@ -0,0 +1,33 @@ + + + diff --git a/components/dynamic-page/page-component/templates/collections/layouts/Article.vue b/components/dynamic-page/page-component/templates/collections/layouts/Article.vue new file mode 100644 index 0000000..b44a96d --- /dev/null +++ b/components/dynamic-page/page-component/templates/collections/layouts/Article.vue @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/components/dynamic-page/page-component/templates/index.ts b/components/dynamic-page/page-component/templates/index.ts index bbdaead..2dee7d9 100644 --- a/components/dynamic-page/page-component/templates/index.ts +++ b/components/dynamic-page/page-component/templates/index.ts @@ -1,5 +1,6 @@ // Article export { default as Article_BasicCard } from './articles/individuals/Card.vue' + export { default as Article_BasicCollection } from './articles/collections/BasicCollection.vue' // Category @@ -7,4 +8,8 @@ export { default as BasicCategories } from './categories/BasicCategories.vue' export { default as CollectionPaging } from './pageCategories/collection_page.vue' -export { default as Dynamic_Other } from './other/index.vue' \ No newline at end of file +export { default as Dynamic_Other } from './other/index.vue' + +export { default as Dynamic_Advertising } from './advertising/index.vue' +export { default as Dynamic_Article } from './articles/index.vue' +export { default as Dynamic_Collection } from './collections/index.vue' \ No newline at end of file diff --git a/components/dynamic-page/page-component/templates/index.vue b/components/dynamic-page/page-component/templates/index.vue index 5c5485f..bfdc1ac 100644 --- a/components/dynamic-page/page-component/templates/index.vue +++ b/components/dynamic-page/page-component/templates/index.vue @@ -1,22 +1,23 @@ - \ No newline at end of file diff --git a/components/dynamic-page/page-component/templates/other/index.vue b/components/dynamic-page/page-component/templates/other/index.vue index c4a213b..591f6c4 100644 --- a/components/dynamic-page/page-component/templates/other/index.vue +++ b/components/dynamic-page/page-component/templates/other/index.vue @@ -15,7 +15,7 @@ const definedDynamicComponent: Record = { 'ARTICLE_DETAIL_EMAGAZINE': Article_Detail_Emagazine, 'ADS_DEFAULT': ADS_Default, 'ARTICLE_BUTTON': Article_Button, - COMMENT: Comment, + 'COMMENT_DEFAULT': Comment, PODCAST: Article_Detail_Podcast, VIDEO: Article_Detail_Video }; diff --git a/components/dynamic-page/page/layouts/Default.vue b/components/dynamic-page/page/layouts/Default.vue index 2fa0bf3..90349a1 100644 --- a/components/dynamic-page/page/layouts/Default.vue +++ b/components/dynamic-page/page/layouts/Default.vue @@ -37,7 +37,7 @@ const CLASS_FOR_LAYOUT = computed(() => {