Merge pull request #70 from nurRiyad/riyad/fix
Upldate loader,animation & workflow
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "@antfu",
|
"extends": "@antfu",
|
||||||
"ignorePatterns":["/content/**"]
|
"ignorePatterns":["/content/**","/.github/**"]
|
||||||
}
|
}
|
||||||
|
|||||||
34
.github/workflows/build.yml
vendored
Normal file
34
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# This workflow will do a clean installation of node dependencies, check linting and build
|
||||||
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
|
||||||
|
|
||||||
|
name: Node.js CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ['main']
|
||||||
|
pull_request:
|
||||||
|
branches: ['main']
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check Code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Install dependency
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Check Linting
|
||||||
|
run: npm run lint
|
||||||
|
|
||||||
|
|
||||||
|
- name: Playgourd build check
|
||||||
|
run: npm run build
|
||||||
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@@ -14,6 +14,7 @@
|
|||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"cloudinary",
|
"cloudinary",
|
||||||
"Namecheap",
|
"Namecheap",
|
||||||
|
"nurriyad",
|
||||||
"Nuxt",
|
"Nuxt",
|
||||||
"spacegrotesk",
|
"spacegrotesk",
|
||||||
"Tailwindcss",
|
"Tailwindcss",
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
<script>
|
|
||||||
import { ContentLoader } from 'vue-content-loader'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: { ContentLoader },
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<ContentLoader
|
|
||||||
viewBox="0 0 400 160"
|
|
||||||
:speed="2"
|
|
||||||
primary-color="#c9c9c9"
|
|
||||||
secondary-color="#ecebeb"
|
|
||||||
>
|
|
||||||
<rect x="10" y="13" rx="0" ry="0" width="95" height="86" />
|
|
||||||
<rect x="119" y="19" rx="0" ry="0" width="219" height="16" />
|
|
||||||
<rect x="119" y="49" rx="0" ry="0" width="277" height="16" />
|
|
||||||
<rect x="119" y="82" rx="0" ry="0" width="56" height="14" />
|
|
||||||
<rect x="195" y="82" rx="0" ry="0" width="56" height="14" />
|
|
||||||
<rect x="272" y="82" rx="0" ry="0" width="56" height="14" />
|
|
||||||
</ContentLoader>
|
|
||||||
</template>
|
|
||||||
@@ -56,6 +56,7 @@ export default defineNuxtConfig({
|
|||||||
'@nuxtjs/fontaine',
|
'@nuxtjs/fontaine',
|
||||||
'@nuxtjs/color-mode',
|
'@nuxtjs/color-mode',
|
||||||
'@nuxtjs/tailwindcss',
|
'@nuxtjs/tailwindcss',
|
||||||
|
'@formkit/auto-animate',
|
||||||
'@stefanobartoletti/nuxt-social-share',
|
'@stefanobartoletti/nuxt-social-share',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
1990
package-lock.json
generated
1990
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
@@ -1,5 +1,8 @@
|
|||||||
{
|
{
|
||||||
|
"name": "@nurriyad/nuxt-blog",
|
||||||
|
"version": "1.4.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "nuxt build",
|
"build": "nuxt build",
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxt dev",
|
||||||
@@ -11,7 +14,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^0.42.0",
|
"@antfu/eslint-config": "^0.42.0",
|
||||||
"@formkit/auto-animate": "^0.8.1",
|
"@formkit/auto-animate": "^0.8.2",
|
||||||
"@nuxt/content": "^2.12.1",
|
"@nuxt/content": "^2.12.1",
|
||||||
"@nuxt/image": "^1.8.0",
|
"@nuxt/image": "^1.8.0",
|
||||||
"@nuxtjs/color-mode": "^3.3.2",
|
"@nuxtjs/color-mode": "^3.3.2",
|
||||||
@@ -29,8 +32,6 @@
|
|||||||
"nuxt": "^3.13.2",
|
"nuxt": "^3.13.2",
|
||||||
"nuxt-icon": "^0.6.8",
|
"nuxt-icon": "^0.6.8",
|
||||||
"nuxt-og-image": "^3.0.0-rc.38",
|
"nuxt-og-image": "^3.0.0-rc.38",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3"
|
||||||
"vue-content-loader": "^2.0.1"
|
}
|
||||||
},
|
|
||||||
"version": "1.4.0"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,35 +91,27 @@ defineOgImage({
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ClientOnly>
|
<div v-auto-animate class="space-y-5 my-5 px-4">
|
||||||
<div v-auto-animate class="space-y-5 my-5 px-4">
|
<template v-for="post in paginatedData" :key="post.title">
|
||||||
<template v-for="post in paginatedData" :key="post.title">
|
|
||||||
<ArchiveCard
|
|
||||||
:path="post.path"
|
|
||||||
:title="post.title"
|
|
||||||
:date="post.date"
|
|
||||||
:description="post.description"
|
|
||||||
:image="post.image"
|
|
||||||
:alt="post.alt"
|
|
||||||
:og-image="post.ogImage"
|
|
||||||
:tags="post.tags"
|
|
||||||
:published="post.published"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<ArchiveCard
|
<ArchiveCard
|
||||||
v-if="paginatedData.length <= 0"
|
:path="post.path"
|
||||||
title="No Post Found"
|
:title="post.title"
|
||||||
image="/not-found.jpg"
|
:date="post.date"
|
||||||
|
:description="post.description"
|
||||||
|
:image="post.image"
|
||||||
|
:alt="post.alt"
|
||||||
|
:og-image="post.ogImage"
|
||||||
|
:tags="post.tags"
|
||||||
|
:published="post.published"
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
|
|
||||||
<template #fallback>
|
|
||||||
<!-- this will be rendered on server side -->
|
|
||||||
<BlogLoader />
|
|
||||||
<BlogLoader />
|
|
||||||
</template>
|
</template>
|
||||||
</ClientOnly>
|
|
||||||
|
<ArchiveCard
|
||||||
|
v-if="paginatedData.length <= 0"
|
||||||
|
title="No Post Found"
|
||||||
|
image="/not-found.jpg"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-center items-center space-x-6 ">
|
<div class="flex justify-center items-center space-x-6 ">
|
||||||
<button :disabled="pageNumber <= 1" @click="onPreviousPageClick">
|
<button :disabled="pageNumber <= 1" @click="onPreviousPageClick">
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
import { autoAnimatePlugin } from '@formkit/auto-animate/vue'
|
|
||||||
|
|
||||||
export default defineNuxtPlugin((nuxtApp) => {
|
|
||||||
// Doing something with nuxtApp
|
|
||||||
nuxtApp.vueApp.use(autoAnimatePlugin)
|
|
||||||
})
|
|
||||||
Reference in New Issue
Block a user