From cbc1e010f10d14c77d94d37c2a2607ca8ccdda03 Mon Sep 17 00:00:00 2001 From: Farhan Date: Sun, 29 Oct 2023 20:53:36 +0700 Subject: [PATCH] update --- .gitignore | 3 + api_test.rest | 4 +- components/HeadingTitle.vue | 2 +- components/NewsFeedCardItem.vue | 85 ++++ components/Search.vue | 13 +- components/articles/ArticleCardBackground.vue | 39 +- .../articles/ArticleListSingleColumn.vue | 37 +- .../ArticleListSingleVerticalColumn.vue | 33 +- components/articles/ArticleListThumbnail.vue | 29 +- .../articles/ArticleListThumbnailNumber.vue | 33 +- components/articles/ArticleListTitle.vue | 31 +- .../hero/ParallaxBackgroundHeroSwipe.vue | 18 +- components/navbar/NavbarSticky.vue | 4 +- components/news/NewsCardItemFeatured.vue | 228 +++++++++ components/news/NewsCardItemListThumbnail.vue | 239 ++++++++++ .../news/NewsCardItemListThumbnailMini.vue | 229 +++++++++ components/news/NewsCardItemSingleColumn.vue | 226 +++++++++ components/news/NewsHeadingName.vue | 0 components/search/SearchResults.vue | 24 +- layouts/default.vue | 5 +- nuxt.config.ts | 22 +- package-lock.json | 331 ++++++++++++- package.json | 2 + pages/[id].vue | 24 +- pages/articles/[id].vue | 9 +- pages/articles/category/[id].vue | 55 +-- pages/articles/index.vue | 147 +----- pages/category/[id].vue | 277 +++++++++++ pages/events/index.vue | 5 +- pages/index.vue | 227 ++++----- pages/search/[id].vue | 7 +- server/api/index.ts | 3 + server/api/posts/[id].ts | 19 +- server/api/posts/index.ts | 5 +- server/middleware/log.ts | 3 + utils/data/getInitialPostsData.ts | 436 ++++++++++++++++-- utils/data/test.ts | 0 37 files changed, 2264 insertions(+), 590 deletions(-) create mode 100644 components/NewsFeedCardItem.vue create mode 100644 components/news/NewsCardItemFeatured.vue create mode 100644 components/news/NewsCardItemListThumbnail.vue create mode 100644 components/news/NewsCardItemListThumbnailMini.vue create mode 100644 components/news/NewsCardItemSingleColumn.vue create mode 100644 components/news/NewsHeadingName.vue create mode 100644 pages/category/[id].vue create mode 100644 server/api/index.ts create mode 100644 server/middleware/log.ts create mode 100644 utils/data/test.ts diff --git a/.gitignore b/.gitignore index 893cecc..151ec7f 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,6 @@ logs .env .env.* !.env.example + + +sw.* \ No newline at end of file diff --git a/api_test.rest b/api_test.rest index 70b806f..b196cae 100644 --- a/api_test.rest +++ b/api_test.rest @@ -1,8 +1,8 @@ ### -GET https://smartnation.id/wp-json/wp/v2/categories/148 +GET http://localhost:3000/api/v1/articles ### GET http://localhost:3000/api/categories ### -GET http://localhost:3000/api/posts \ No newline at end of file +GET http://localhost:3000/api/posts/smart-city-standar-nasional-indonesia-sni-untuk-kota-cerdas \ No newline at end of file diff --git a/components/HeadingTitle.vue b/components/HeadingTitle.vue index 632ef6f..2173307 100644 --- a/components/HeadingTitle.vue +++ b/components/HeadingTitle.vue @@ -8,7 +8,7 @@ h1 { color: #D71149; font-family: Poppins; - font-size: 20px; + font-size: 22px; font-style: normal; font-weight: 700; line-height: 120%; diff --git a/components/NewsFeedCardItem.vue b/components/NewsFeedCardItem.vue new file mode 100644 index 0000000..885ec93 --- /dev/null +++ b/components/NewsFeedCardItem.vue @@ -0,0 +1,85 @@ + + + + + \ No newline at end of file diff --git a/components/Search.vue b/components/Search.vue index 3e70129..c01b831 100644 --- a/components/Search.vue +++ b/components/Search.vue @@ -1,8 +1,5 @@ @@ -33,9 +24,7 @@ onBeforeMount(() => { - + diff --git a/components/articles/ArticleCardBackground.vue b/components/articles/ArticleCardBackground.vue index 431bdf6..4bcce99 100644 --- a/components/articles/ArticleCardBackground.vue +++ b/components/articles/ArticleCardBackground.vue @@ -1,25 +1,21 @@ @@ -112,16 +108,19 @@ const props = defineProps({ posts: { type: Object as PropType } } top: 50% !important; } } + @media (max-width: 768px) { .figure .figure-caption { top: 60%; } } + @media (min-width: 960px) { .figure .figure-caption { top: 70% !important; } } + /* @media (max-width: 960px) { .figure .figure-caption { top: 50% !important; @@ -133,6 +132,7 @@ const props = defineProps({ posts: { type: Object as PropType } } top: 45% !important; } } + /* @media (max-width: 1200px) { .figure .figure-caption { top: 50% !important; @@ -144,6 +144,7 @@ const props = defineProps({ posts: { type: Object as PropType } } top: 50% !important; } } + /* @media (max-width: 1400px) { .figure .figure-caption { top: 50% !important; diff --git a/components/articles/ArticleListSingleColumn.vue b/components/articles/ArticleListSingleColumn.vue index bdb9ea6..20ce017 100644 --- a/components/articles/ArticleListSingleColumn.vue +++ b/components/articles/ArticleListSingleColumn.vue @@ -1,40 +1,27 @@