Skip to content

Commit e8f4efb

Browse files
committed
utcode-learnの宣伝を追加、alert用アイコンを1ファイルにまとめる
1 parent a6146bf commit e8f4efb

File tree

3 files changed

+107
-15
lines changed

3 files changed

+107
-15
lines changed

app/daisyAlertIcon.tsx

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
// https://daisyui.com/components/alert/ のコード例のsvgのコピペ
2+
3+
export function DaisyInfoIcon() {
4+
return (
5+
<svg
6+
xmlns="http://www.w3.org/2000/svg"
7+
fill="none"
8+
viewBox="0 0 24 24"
9+
className="stroke-info h-6 w-6 shrink-0"
10+
>
11+
<path
12+
strokeLinecap="round"
13+
strokeLinejoin="round"
14+
strokeWidth="2"
15+
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
16+
></path>
17+
</svg>
18+
);
19+
}
20+
21+
export function DaisySuccessIcon() {
22+
return (
23+
<svg
24+
xmlns="http://www.w3.org/2000/svg"
25+
className="h-6 w-6 shrink-0 stroke-current"
26+
fill="none"
27+
viewBox="0 0 24 24"
28+
>
29+
<path
30+
strokeLinecap="round"
31+
strokeLinejoin="round"
32+
strokeWidth="2"
33+
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
34+
/>
35+
</svg>
36+
);
37+
}
38+
39+
export function DaisyWarningIcon() {
40+
return (
41+
<svg
42+
xmlns="http://www.w3.org/2000/svg"
43+
className="h-6 w-6 shrink-0 stroke-current"
44+
fill="none"
45+
viewBox="0 0 24 24"
46+
>
47+
<path
48+
strokeLinecap="round"
49+
strokeLinejoin="round"
50+
strokeWidth="2"
51+
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
52+
/>
53+
</svg>
54+
);
55+
}
56+
57+
export function DaisyErrorIcon() {
58+
return (
59+
<svg
60+
xmlns="http://www.w3.org/2000/svg"
61+
className="h-6 w-6 shrink-0 stroke-current"
62+
fill="none"
63+
viewBox="0 0 24 24"
64+
>
65+
<path
66+
strokeLinecap="round"
67+
strokeLinejoin="round"
68+
strokeWidth="2"
69+
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
70+
/>
71+
</svg>
72+
);
73+
}

app/page.tsx

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ import { getPagesList } from "@/lib/docs";
44
import clsx from "clsx";
55
import { LanguageIcon } from "./terminal/icons";
66
import { RuntimeLang } from "@my-code/runtime/languages";
7-
import { ChatImage, FeatureCard, PracticeImage, RuntimeImage } from "./featureCard";
7+
import {
8+
ChatImage,
9+
FeatureCard,
10+
PracticeImage,
11+
RuntimeImage,
12+
} from "./featureCard";
13+
import { DaisyInfoIcon } from "./daisyAlertIcon";
814

915
export const metadata: Metadata = {
1016
title: "my.code(); へようこそ",
@@ -107,9 +113,33 @@ export default async function Home() {
107113
<h2 id="tutorials" className="text-3xl font-bold mb-4 text-center">
108114
さあ、学習を始めましょう
109115
</h2>
110-
<p className="text-center opacity-70 mb-10">
116+
<p className="text-center opacity-70 mb-4">
111117
豊富なラインナップから、学びたい言語を選択してください。
118+
<br />
119+
my.code();
120+
ならあなたがまだ触ったことがない言語を気軽に体験することができます。
112121
</p>
122+
<div className="alert alert-info alert-dash mb-4 w-max max-w-full mx-auto">
123+
<DaisyInfoIcon />
124+
<span>
125+
プログラミング未経験の方、何から始めればいいかわからない...という方は、
126+
<br className="hidden md:block" />
127+
まずは
128+
<a
129+
className="link mx-1"
130+
style={{
131+
color: "#25c2a0",
132+
fontFamily:
133+
'system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
134+
}}
135+
href="https://learn.utcode.net"
136+
target="_blank"
137+
>
138+
ut.code(); Learn
139+
</a>
140+
でプログラミングの基礎を学ぶことをおすすめします!
141+
</span>
142+
</div>
113143
<div
114144
className="grid items-center gap-4"
115145
style={{

app/terminal/page.tsx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import sub_h from "./samples/sub.h?raw";
2525
import sub_cpp from "./samples/sub.cpp?raw";
2626
import main2_rs from "./samples/main2.rs?raw";
2727
import sub_rs from "./samples/sub.rs?raw";
28+
import { DaisyInfoIcon } from "@/daisyAlertIcon";
2829

2930
export default function RuntimeTestPage() {
3031
return (
@@ -281,19 +282,7 @@ function MochaTest() {
281282
</div>
282283
) : (
283284
<div className="alert mt-16 sm:mt-4 w-80">
284-
<svg
285-
xmlns="http://www.w3.org/2000/svg"
286-
fill="none"
287-
viewBox="0 0 24 24"
288-
className="stroke-info h-6 w-6 shrink-0"
289-
>
290-
<path
291-
strokeLinecap="round"
292-
strokeLinejoin="round"
293-
strokeWidth="2"
294-
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
295-
></path>
296-
</svg>
285+
<DaisyInfoIcon />
297286
テストが完了しました
298287
</div>
299288
)}

0 commit comments

Comments
 (0)