-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
82 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Proxy API base URL | ||
PROXY_API_BASE=https://jsonplaceholder.typicode.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,30 @@ | ||
<template> | ||
<div class="container"> | ||
<div | ||
class="text-center max-w-2xl mx-auto h-screen flex justify-center flex-col" | ||
> | ||
<h1 class="text-5xl font-bold sm:text-7xl tracking-tight"> | ||
Nuxt 3 Simple Starter | ||
</h1> | ||
<p class="mt-6 text-lg tracking-tight"> | ||
Nuxt 3 frontend template for third-party API integrations based on | ||
JSON-LD. | ||
</p> | ||
<div | ||
class="container py-20 text-center max-w-2xl h-[calc(100vh-144px)] flex justify-center flex-col" | ||
> | ||
<h1 class="text-5xl font-bold sm:text-7xl tracking-tight"> | ||
Nuxt 3 Simple Starter | ||
</h1> | ||
|
||
<p class="mt-6 text-lg tracking-tight"> | ||
Nuxt 3 frontend template for third-party API integrations. | ||
</p> | ||
|
||
<div class="text-center my-8"> | ||
<NuxtLink :to="localePath({ name: 'posts' })"> | ||
<button | ||
type="button" | ||
class="text-white bg-[#050708] hover:bg-[#050708]/90 focus:ring-4 focus:outline-none focus:ring-[#050708]/50 font-medium rounded-lg text-sm px-5 py-2.5 text-center" | ||
> | ||
Get Started | ||
</button> | ||
</NuxtLink> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"></script> | ||
<script setup lang="ts"> | ||
const localePath = useLocalePath(); | ||
</script> | ||
|
||
<style scoped></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<div class="container py-20"> | ||
{{ collection }} | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
useHead({ | ||
title: "Demo", | ||
description: "Nuxt 3 frontend template for third-party API integrations", | ||
}); | ||
const postStore = usePostStore(); | ||
const filters = ref({ | ||
orSearch_search: undefined, | ||
page: 1, | ||
itemsPerPage: 10, | ||
}); | ||
const { | ||
data: collection, | ||
pending: loading, | ||
error, | ||
refresh, | ||
} = await useLazyAsyncData( | ||
"/api/posts", | ||
() => postStore.collection(filters.value), | ||
{ | ||
watch: [filters], | ||
}, | ||
); | ||
</script> | ||
|
||
<style lang="scss" scoped></style> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,4 @@ | ||
interface HydraError { | ||
"@context"?: string; | ||
"@type"?: string; | ||
"hydra:title": string; | ||
"hydra:description": string; | ||
trace?: any; | ||
} | ||
|
||
interface ValidatorError { | ||
title?: string; | ||
detail?: string; | ||
} | ||
|
||
export interface ErrorResponse extends HydraError, ValidatorError { | ||
export interface ErrorResponse { | ||
code?: string; | ||
message?: string; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import type { Item } from "~/types/item"; | ||
import type { Timestampable } from "~/types/timestampable"; | ||
import type { Blameable } from "~/types/blameable"; | ||
|
||
export interface Post extends Item, Timestampable, Blameable { | ||
export interface Post extends Timestampable, Blameable { | ||
id?: number; | ||
title?: string; | ||
content?: string; | ||
body?: string; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters