-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: cookbook * docs: completed the rest of recipes * docs: remove unused cosole.log * docs: removed broken links * docs: anchor image * feat: cookbook for spanish translations * docs: translatable cookbook * docs: german Kochbuch * docs: updated de config with cookbook links * feat: update german cookbook translations * chore: fix broken links (cookbook instead of example) --------- Co-authored-by: Dennis Smuda <dennis.smuda@ftapi.com>
- Loading branch information
1 parent
9bc7a72
commit d5a0b19
Showing
42 changed files
with
323 additions
and
46 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
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<script setup> | ||
import { computed } from 'vue' | ||
import { useData } from 'vitepress' | ||
import { data as recipes } from '../recipes.data.ts' | ||
const { lang } = useData() | ||
const filteredRecipes = computed(() => recipes.filter(recipe => recipe.lang === lang.value.split('-')[0])) | ||
</script> | ||
|
||
<template> | ||
<ul class="grid grid-cols-1 sm:grid-cols-2 gap-8 -mx-4 pt-8"> | ||
<li | ||
v-for="recipe of filteredRecipes" | ||
:key="recipe.title" | ||
class="list-none important-m-0" | ||
> | ||
<a | ||
:href="recipe.url" | ||
> | ||
<img | ||
:src="recipe.thumbnail" | ||
:alt="recipe.title" | ||
class="aspect-video object-cover rounded-lg" | ||
> | ||
|
||
<h3> | ||
{{ recipe.title }} | ||
<span | ||
v-for="n in recipe.difficulty" | ||
:key="n" | ||
aria-label="chili" | ||
role="img" | ||
class="text-sm" | ||
>🌶️</span> | ||
|
||
</h3></a> | ||
<p>{{ recipe.excerpt }}</p> | ||
</li> | ||
</ul> | ||
</template> |
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,28 @@ | ||
import { createContentLoader } from 'vitepress' | ||
|
||
export interface Recipe { | ||
title: string | ||
url: string | ||
excerpt: string | undefined | ||
thumbnail?: string | ||
difficulty?: number | ||
} | ||
|
||
declare const data: Recipe[] | ||
export { data } | ||
|
||
export default createContentLoader('/**/cookbook/*.md', { | ||
excerpt: true, | ||
transform(raw): Recipe[] { | ||
return raw | ||
.map(({ url, frontmatter, excerpt }) => ({ | ||
title: frontmatter.title, | ||
url, | ||
lang: url.split('/')[1].length === 2 ? url.split('/')[1] : 'en', | ||
thumbnail: frontmatter.thumbnail, | ||
difficulty: frontmatter.difficulty, | ||
excerpt: frontmatter.excerpt || frontmatter.description || excerpt, | ||
})).filter(recipe => recipe.title) | ||
.sort((a, b) => b.title - a.title) | ||
}, | ||
}) |
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
8 changes: 8 additions & 0 deletions
8
docs/examples/basic-animations.md → docs/cookbook/basic-animations.md
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Cookbook 🍳🧑🍳 | ||
|
||
Discover guided recipes to help you get started with the basics of using Tres. Each recipe is designed to help you understand the core concepts of Tres and how to use them in your projects. | ||
|
||
<Cookbook /> |
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
8 changes: 8 additions & 0 deletions
8
docs/examples/load-textures.md → docs/cookbook/load-textures.md
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
8 changes: 8 additions & 0 deletions
8
docs/examples/orbit-controls.md → docs/cookbook/orbit-controls.md
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
8 changes: 8 additions & 0 deletions
8
docs/de/examples/basic-animations.md → docs/de/cookbook/basic-animations.md
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Kochbuch (Cookbook) 🍳🧑🍳 | ||
|
||
In diesem "Kochbuch" findest du erlesene Rezepte, um den Einstieg in die Grundlagen von Tres zu erleichtern. Jedes Rezept ist darauf ausgelegt, Kernkonzepte von Tres zu vermitteln und zu zeigen, wie die Anwendung aussieht. | ||
|
||
<Cookbook /> |
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
8 changes: 8 additions & 0 deletions
8
docs/de/examples/load-models.md → docs/de/cookbook/load-models.md
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
8 changes: 8 additions & 0 deletions
8
docs/de/examples/load-textures.md → docs/de/cookbook/load-textures.md
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
Oops, something went wrong.