14
.editorconfig
Normal file
14
.editorconfig
Normal file
@@ -0,0 +1,14 @@
|
||||
# editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
5
.prettierrc
Normal file
5
.prettierrc
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"printWidth": 100,
|
||||
"semi": false,
|
||||
"singleQuote": true
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
defineProps<{
|
||||
title: string;
|
||||
excerpt?: string;
|
||||
image?: string;
|
||||
slug?: string;
|
||||
}>();
|
||||
title: string
|
||||
excerpt?: string
|
||||
image?: string
|
||||
slug?: string
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -16,10 +16,9 @@ defineProps<{
|
||||
</h1>
|
||||
|
||||
<p class="text-sm">
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Asperiores labore
|
||||
cupiditate ducimus, ipsam harum, adipisci laudantium similique voluptate
|
||||
officiis sunt nesciunt dolorem repellat cumque obcaecati nulla, sed dolore
|
||||
unde. Atque!
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Asperiores labore cupiditate ducimus,
|
||||
ipsam harum, adipisci laudantium similique voluptate officiis sunt nesciunt dolorem repellat
|
||||
cumque obcaecati nulla, sed dolore unde. Atque!
|
||||
</p>
|
||||
<nuxt-link class="underline" :to="slug">
|
||||
{{ slug }}
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
<template>
|
||||
<svg
|
||||
width="66"
|
||||
height="31"
|
||||
viewBox="0 0 66 31"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<svg width="66" height="31" viewBox="0 0 66 31" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M0 2C0 0.89543 0.895431 0 2 0H64C65.1046 0 66 0.89543 66 2V29C66 30.1046 65.1046 31 64 31H2C0.895429 31 0 30.1046 0 29V2Z"
|
||||
fill="#E5E5E5"
|
||||
|
||||
@@ -1,19 +1,13 @@
|
||||
<template>
|
||||
<nav class="bg-gray-900 text-white py-5 border-b border-gray-700">
|
||||
<div class="container flex justify-between mx-auto">
|
||||
<NuxtLink to="/" class="text-2xl font-medium">
|
||||
Elon's Blog
|
||||
</NuxtLink>
|
||||
<NuxtLink to="/" class="text-2xl font-medium"> Elon's Blog </NuxtLink>
|
||||
<ul class="nav flex space-x-5">
|
||||
<li>
|
||||
<NuxtLink to="/categories">
|
||||
Categories
|
||||
</NuxtLink>
|
||||
<NuxtLink to="/categories"> Categories </NuxtLink>
|
||||
</li>
|
||||
<li>
|
||||
<NuxtLink to="/blogs">
|
||||
Blogs
|
||||
</NuxtLink>
|
||||
<NuxtLink to="/blogs"> Blogs </NuxtLink>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
<script setup lang="ts">
|
||||
let x = ref('10')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<nav class="py-5 border-b border-gray-700">
|
||||
<div class="container flex justify-between mx-auto">
|
||||
<NuxtLink to="/" class="text-2xl font-medium">
|
||||
Riyad's Blog
|
||||
</NuxtLink>
|
||||
<NuxtLink to="/" class="text-2xl font-medium"> Riyad's Blog </NuxtLink>
|
||||
<ul class="nav flex space-x-5">
|
||||
<li>
|
||||
<NuxtLink to="/categories">
|
||||
Categories
|
||||
</NuxtLink>
|
||||
<NuxtLink to="/categories"> Categories </NuxtLink>
|
||||
</li>
|
||||
<li>
|
||||
<NuxtLink to="/blogs">
|
||||
Blogs
|
||||
</NuxtLink>
|
||||
<NuxtLink to="/blogs"> Blogs </NuxtLink>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Title of the page"
|
||||
description: "meta description of the page"
|
||||
title: 'Title of the page'
|
||||
description: 'meta description of the page'
|
||||
---
|
||||
|
||||
# Hello world
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Title of the page"
|
||||
description: "meta description of the page"
|
||||
title: 'Title of the page'
|
||||
description: 'meta description of the page'
|
||||
---
|
||||
|
||||
# BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Title of the page"
|
||||
description: "meta description of the page"
|
||||
title: 'Title of the page'
|
||||
description: 'meta description of the page'
|
||||
---
|
||||
|
||||
# CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Title of the page"
|
||||
description: "meta description of the page"
|
||||
title: 'Title of the page'
|
||||
description: 'meta description of the page'
|
||||
---
|
||||
|
||||
# DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
|
||||
@@ -25,4 +25,3 @@ Lorem ipsum, dolor sit amet consectetur adipisicing elit. Aperiam incidunt, ipsa
|
||||
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Aperiam incidunt, ipsa ea voluptatibus quas vitae dolorem officia vero rerum at atque non magni esse, enim ducimus asperiores numquam perspiciatis quaerat, quisquam placeat. Explicabo vero ad, reprehenderit veritatis itaque architecto cumque provident odit modi accusantium necessitatibus dolorem pariatur recusandae possimus tempora.
|
||||
|
||||
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Aperiam incidunt, ipsa ea voluptatibus quas vitae dolorem officia vero rerum at atque non magni esse, enim ducimus asperiores numquam perspiciatis quaerat, quisquam placeat. Explicabo vero ad, reprehenderit veritatis itaque architecto cumque provident odit modi accusantium necessitatibus dolorem pariatur recusandae possimus tempora.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Title of the page"
|
||||
description: "meta description of the page"
|
||||
title: 'Title of the page'
|
||||
description: 'meta description of the page'
|
||||
---
|
||||
|
||||
# Hello man
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
export default defineNuxtConfig({
|
||||
app: {
|
||||
head: {
|
||||
charset: "utf-16",
|
||||
viewport: "width=device-width,initial-scale=1",
|
||||
charset: 'utf-16',
|
||||
viewport: 'width=device-width,initial-scale=1',
|
||||
title: "Elon's Blog",
|
||||
titleTemplate: "%s - Riyad's Blog",
|
||||
meta: [{ name: "description", content: "Riyad's awesome blog" }],
|
||||
meta: [{ name: 'description', content: "Riyad's awesome blog" }],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -14,5 +14,5 @@ export default defineNuxtConfig({
|
||||
strict: true,
|
||||
},
|
||||
|
||||
modules: ["@nuxt/content", "@nuxtjs/tailwindcss"],
|
||||
});
|
||||
modules: ['@nuxt/content', '@nuxtjs/tailwindcss'],
|
||||
})
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare"
|
||||
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/content": "^2.3.0",
|
||||
@@ -14,6 +13,5 @@
|
||||
"@tailwindcss/typography": "^0.5.8",
|
||||
"nuxt": "3.0.0",
|
||||
"prettier": "2.8.1"
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
<template>
|
||||
<div>
|
||||
There will be all blogs
|
||||
</div>
|
||||
</template>
|
||||
<div>There will be all blogs</div>
|
||||
</template>
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
<div>
|
||||
{{ $route.params }}
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<template>
|
||||
<div>All categories will be here</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -1,28 +1,21 @@
|
||||
<script lang="ts" setup>
|
||||
useHead({
|
||||
title: "Home",
|
||||
title: 'Home',
|
||||
meta: [
|
||||
{
|
||||
name: "description",
|
||||
content: "Home",
|
||||
name: 'description',
|
||||
content: 'Home',
|
||||
},
|
||||
],
|
||||
titleTemplate: "Elon's Blog - %s",
|
||||
});
|
||||
const { data } = await useAsyncData("home", () =>
|
||||
queryContent("/blogs").find()
|
||||
);
|
||||
})
|
||||
const { data } = await useAsyncData('home', () => queryContent('/blogs').find())
|
||||
</script>
|
||||
<template>
|
||||
<main class="container mx-auto">
|
||||
<div class="flex m-5 p-3 flex-wrap">
|
||||
<template v-for="n in data" :key="n">
|
||||
<BlogCard
|
||||
:title="n.title || ''"
|
||||
:excerpt="n.description"
|
||||
image="sdlfkj"
|
||||
:slug="n._path"
|
||||
/>
|
||||
<BlogCard :title="n.title || ''" :excerpt="n.description" image="sdlfkj" :slug="n._path" />
|
||||
</template>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -2,4 +2,4 @@ export default {
|
||||
tailwindcss: {
|
||||
// Options
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user