Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Commit f03b923

Browse files
committed
Merge branch 'main' into chore/nuxthub
2 parents fe9e083 + e5d98f5 commit f03b923

File tree

56 files changed

+4078
-3506
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+4078
-3506
lines changed

.github/workflows/autofix.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17-
- uses: pnpm/action-setup@v2
17+
- uses: pnpm/action-setup@v4
1818
- uses: actions/setup-node@v4
1919
with:
2020
node-version: lts/*
21+
cache: pnpm
2122

2223
- name: Install
2324
run: pnpm install --frozen-lockfile

components/FileIcon.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,40 @@ const props = defineProps<{
88
const FILE_ICONS = [
99
{
1010
match: /\.vue$/,
11-
icon: 'i-logos-vue',
11+
icon: 'i-catppuccin-vue',
1212
},
1313
{
1414
match: /nuxt\.config\.\w+$/,
15-
icon: 'i-logos-nuxt-icon scale-110',
15+
icon: 'i-catppuccin-nuxt',
1616
},
1717
{
1818
match: /package\.json$/,
19-
icon: 'i-file-icons-npm text-red scale-110',
19+
icon: 'i-catppuccin-npm',
2020
},
2121
{
2222
match: /\.[mc]?tsx?$/,
23-
icon: 'i-file-icons-typescript-alt text-blue3',
23+
icon: 'i-catppuccin-typescript',
2424
},
2525
{
2626
match: /\.[mc]?jsx?$/,
27-
icon: 'i-devicon-javascript',
27+
icon: 'i-catppuccin-javascript',
2828
},
2929
]
3030
3131
const icon = computed(() => {
3232
if (props.isDirectory) {
3333
return props.isDirectoryOpen
34-
? 'i-ph:folder-open-duotone scale-120'
35-
: 'i-ph:folder-simple-duotone scale-120'
34+
? 'i-catppuccin-folder-open'
35+
: 'i-catppuccin-folder'
3636
}
3737
for (const { match, icon } of FILE_ICONS) {
3838
if (match.test(props.path))
3939
return icon
4040
}
41-
return 'i-ph:file-duotone scale-120'
41+
return 'i-catppuccin-file'
4242
})
4343
</script>
4444

4545
<template>
46-
<div :class="icon" />
46+
<div :class="icon" light="brightness-60 hue-rotate-180 invert-100 saturate-200" scale-110 />
4747
</template>

components/PanelDocs.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script setup lang="ts">
22
import type { NavItem, ParsedContent } from '@nuxt/content'
33
4+
const runtime = useRuntimeConfig()
45
const {
56
navigation,
67
page,
@@ -58,7 +59,7 @@ const ui = useUiState()
5859
5960
const sourceUrl = computed(() =>
6061
page.value?._file
61-
? `https://github.com/nuxt/learn.nuxt.com/edit/main/content/${page.value._file}`
62+
? `${runtime.public.repoUrl}/edit/main/content/${page.value._file}`
6263
: undefined,
6364
)
6465

components/PanelEditorFileSystemTree.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const folderCaret = computed(() => {
5757
:style="{
5858
paddingLeft: `${0.2 + 0.8 * (props.depth)}rem`,
5959
}"
60-
:class="isFileSelected ? 'bg-active' : 'saturate-0 text-faded'"
60+
:class="isFileSelected ? 'bg-active' : 'text-faded'"
6161
w-full flex items-center gap-1 px2 py1 text-left text-sm
6262
@click="handleClick"
6363
>

components/TheNav.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const guide = useGuideStore()
55
const runtime = useRuntimeConfig()
66
const commands = useCommandsStore()
77
8-
const repo = 'https://github.com/nuxt/learn.nuxt.com'
98
const buildTime = new Date(runtime.public.buildTime)
109
const timeAgo = useTimeAgo(buildTime)
1110
@@ -53,7 +52,7 @@ addCommands(
5352
<NuxtTutorialLogo h-2em />
5453
</NuxtLink>
5554
<NuxtLink
56-
:href="repo"
55+
:href="runtime.public.repoUrl"
5756
target="_blank"
5857
>
5958
<div block translate-y--2 rounded bg-orange:10 px2 py1 text-xs text-orange>
@@ -94,7 +93,7 @@ addCommands(
9493
<template #popper>
9594
<div px5 py4 grid="~ gap-y-3 gap-x-2 cols-[max-content_1fr] items-center">
9695
<div i-ph-package-duotone text-xl />
97-
<NuxtLink :to="`${repo}/commit/${runtime.public.gitSha}`" target="_blank" title="View on GitHub">
96+
<NuxtLink :to="`${runtime.public.repoUrl}/commit/${runtime.public.gitSha}`" target="_blank" title="View on GitHub">
9897
<time :datetime="buildTime.toISOString()" :title="buildTime.toLocaleString()">
9998
Built {{ timeAgo }} (<code>{{ runtime.public.gitSha.slice(0, 5) }}</code>)
10099
</time>
@@ -116,7 +115,7 @@ addCommands(
116115
rounded p2
117116
title="GitHub"
118117
hover="bg-active"
119-
:href="repo"
118+
:href="runtime.public.repoUrl"
120119
target="_blank"
121120
>
122121
<div i-carbon-logo-github text-2xl />

content/0.index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ ogImage:
1515

1616
## Nuxt とは?
1717

18-
Nuxt は、[Vue.js](https://vuejs.org) を使用して、型安全でパフォーマンスが高く本番環境に適したフルスタックの Web アプリケーションやウェブサイトを作成するための直感的で拡張可能な方法を提供する、無料で[オープンソースのフレームワーク](https://github.com/nuxt/nuxt)です。Nuxt はベンダーロックインがなく、アプリケーションを[**どこでも、エッジ上でも**](https://nuxt.com/blog/nuxt-on-the-edge)デプロイすることができます。
18+
Nuxt は、[Vue.js](https://vuejs.org) を使用して、型安全でパフォーマンスが高く本番環境に適したフルスタックの Web アプリケーションやウェブサイトを作成するための直感的で拡張可能な方法を提供する、無料で [オープンソースのフレームワーク](https://github.com/nuxt/nuxt) です。Nuxt はベンダーロックインがなく、アプリケーションを [**どこでも、エッジ上でも**](https://nuxt.com/blog/nuxt-on-the-edge) デプロイすることができます。
1919

2020
## はじめに
2121

22-
このチュートリアルでは、HTML、CSS、JavaScript の基本的な概念に既に精通していることを前提としています。Nuxt は[Vue](https://vuejs.org) の上に構築されたフルスタックフレームワークのため、Vue の基本的なチュートリアルも提供しています。
22+
このチュートリアルでは、HTML、CSS、JavaScript の基本的な概念に既に精通していることを前提としています。Nuxt は [Vue](https://vuejs.org) の上に構築されたフルスタックフレームワークのため、Vue の基本的なチュートリアルも提供しています。
2323

2424
以下のトピックをクリックして学習を始めてください:
2525

content/1.vue/1.index.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ ogImage: true
44

55
# Vueの基本
66

7-
Nuxt は、[Vue 3](https://vuejs.org/)というユーザーインターフェイスを構築するためのプログレッシブなフレームワークを使用しています。このセクションでは、Vue の基本について説明します。
7+
Nuxt は、[Vue.js](https://ja.vuejs.org/) というユーザーインターフェイスを構築するためのプログレッシブなフレームワークを使用しています。このセクションでは、Vue の基本について説明します。\
8+
エディタに表示されているのは、[Vueシングルファイルコンポーネント](https://ja.vuejs.org/guide/scaling-up/sfc)(SFC)です。
89

9-
エディタに表示されているのは、[Vueシングルファイルコンポーネント](https://vuejs.org/guide/scaling-up/sfc.html)(SFC)です
10+
SFC は、HTML、CSS、および JavaScript を 1 つの `.vue` ファイル内にまとめた再利用可能な自己完結型のコードブロックです。これは、JavaScript ロジックを定義するための [`<script setup>`](https://ja.vuejs.org/api/sfc-script-setup) ブロック、HTML テンプレートを定義するための `<template>` ブロック、および CSS スタイルを定義するためのオプションの `<style>` ブロックで構成されています。右側のプレイグラウンドで実際に操作してみるか、[公式のVueドキュメント](https://ja.vuejs.org/guide/scaling-up/sfc) で詳細を読むことができます
1011

11-
SFC は、HTML、CSS、および JavaScript を 1 つの `.vue` ファイル内にまとめた再利用可能な自己完結型のコードブロックです。これは、JavaScript ロジックを定義するための[`<script setup>`](https://vuejs.org/api/sfc-script-setup.html)ブロック、HTML テンプレートを定義するための `<template>` ブロック、および CSS スタイルを定義するためのオプションの `<style>` ブロックで構成されています。右側のプレイグラウンドで実際に操作してみるか、[公式のVueドキュメント](https://v3.vuejs.org/guide/single-file-component.html)で詳細を読むことができます。
12-
13-
Nuxt では、Vue SFC をそのままサポートしており、アプリケーションを構築するために使用することを強くお勧めします。Nuxt が Vue のデフォルトの Vue SFC と異なる点の 1 つは、[Vueユーティリティを自動インポート](https://nuxt.com/docs/guide/concepts/auto-imports)することです。そのため、`ref``computed` などの Vue API を直接インポートせずに使用することができます。
12+
Nuxt では Vue SFC をそのままサポートしており、アプリケーションを構築するために使用することを強くお勧めします。Nuxt が Vue のデフォルトの Vue SFC と異なる点の 1 つは、[Vueユーティリティを自動インポート](https://nuxt.com/docs/guide/concepts/auto-imports) することです。そのため、`ref``computed` などの Vue API を直接インポートせずに使用することができます。
1413

1514
::note
16-
**ヒント**: Vue コンポーネントを定義する方法はいくつかありますが、一般的には[Composition API](https://vuejs.org/guide/introduction.html#composition-api)を使用した[`<script setup>`](https://vuejs.org/api/sfc-script-setup.html)を使用することをお勧めします。これにより、より良い開発者体験を得ることができます。Vue を初めて使用する場合、異なる選択肢をすべて理解することにこだわる必要はありません。私たちの推奨する方法を採用すれば、最も直感的に Vue を始められるでしょう。
15+
**ヒント**: Vue コンポーネントを定義する方法はいくつかありますが、一般的には [Composition API](https://ja.vuejs.org/guide/introduction) を使用した [`<script setup>`](https://ja.vuejs.org/api/sfc-script-setup) を使用することをお勧めします。これにより、より良い開発者体験を得ることができます。Vue を初めて使用する場合、異なる選択肢をすべて理解することにこだわる必要はありません。私たちの推奨する方法を採用すれば、最も直感的に Vue を始められるでしょう。
1716
::
1817

1918
今後、以下のトピックについて説明します:

content/1.vue/2.reactivity/.template/files/app.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<script setup>
1+
<script setup lang="ts">
22
const count = ref(1)
33
const doubled = computed(() => count.value * 2)
44

content/1.vue/2.reactivity/.template/solutions/app.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
<script setup>
1+
<script setup lang="ts">
22
const count = ref(1)
33
const multiplier = ref(2)
44
const result = computed(() => count.value * multiplier.value)
55
66
function increment() {
77
count.value++
88
}
9+
910
function multiply() {
1011
multiplier.value++
1112
}

0 commit comments

Comments
 (0)