Initial setup

This commit is contained in:
Alexis
2022-12-09 23:32:05 +01:00
parent 59b4805965
commit 7e61f617c2
15 changed files with 17151 additions and 0 deletions

13
.editorconfig Normal file
View File

@@ -0,0 +1,13 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

8
.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
node_modules
*.log*
.nuxt
.nitro
.cache
.output
.env
dist

1
ap Submodule

Submodule ap added at ed48d4ec55

7
app.vue Normal file
View File

@@ -0,0 +1,7 @@
<template>
<div>
<NuxtLayout>
<NuxtPage/>
</NuxtLayout>
</div>
</template>

3
assets/css/main.css Normal file
View File

@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

View File

@@ -0,0 +1 @@
# La prochaine relève Front-End

15
nuxt.config.ts Normal file
View File

@@ -0,0 +1,15 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
modules: [
'@nuxt/content'
],
css: ['~/assets/css/main.css'],
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
})

17035
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

17
package.json Normal file
View File

@@ -0,0 +1,17 @@
{
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@nuxt/content": "^2.2.2",
"autoprefixer": "^10.4.13",
"nuxt": "3.0.0",
"postcss": "^8.4.19",
"tailwindcss": "^3.2.4"
}
}

17
pages/blog/[slug].vue Normal file
View File

@@ -0,0 +1,17 @@
<script setup lang="ts">
import { MarkdownParsedContent } from '@nuxt/content/dist/runtime/types';
const route = useRoute()
const { data } = await useAsyncData('article', () => queryContent<MarkdownParsedContent>(`/blog/${route.params.slug}`).findOne())
if (!data.value?.title) {
throw showError({ statusCode: 404, statusMessage: 'Aucun article ici !'})
}
</script>
<template>
<main>
<ContentRenderer v-if="data" :value="data" />
</main>
</template>

5
pages/blog/index.vue Normal file
View File

@@ -0,0 +1,5 @@
<template>
<div>
Blog
</div>
</template>

5
pages/error.vue Normal file
View File

@@ -0,0 +1,5 @@
<template>
<div>
Erreur
</div>
</template>

5
pages/index.vue Normal file
View File

@@ -0,0 +1,5 @@
<template>
<div>
Accueil
</div>
</template>

15
tailwind.config.js Normal file
View File

@@ -0,0 +1,15 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./components/**/*.{js,vue,ts}",
"./layouts/**/*.vue",
"./pages/**/*.vue",
"./plugins/**/*.{js,ts}",
"./nuxt.config.{js,ts}",
"./app.vue",
],
theme: {
extend: {},
},
plugins: [],
}

4
tsconfig.json Normal file
View File

@@ -0,0 +1,4 @@
{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}