+
+ 言語を学ぶ
+
+
+ {LANGUAGES.map((lang) => (
+ setActiveKey(lang.key)}
+ className={`rounded-full px-2.5 py-1 text-[11px] font-medium transition-colors ${
+ activeLang.key === lang.key
+ ? "bg-tealblue-100 text-tealblue-800 dark:bg-tealblue-900/50 dark:text-tealblue-200"
+ : "bg-tealblue-50 text-tealblue-700 hover:bg-tealblue-100 dark:bg-tealblue-950/30 dark:text-tealblue-300 dark:hover:bg-tealblue-950/50"
+ }`}
+ >
+ {lang.label}
+
+ ))}
+
+
+
+
+
diff --git a/components/my-notebooks/CardFieldsForm.tsx b/components/my-notebooks/CardFieldsForm.tsx
index 721cf03..33c9142 100644
--- a/components/my-notebooks/CardFieldsForm.tsx
+++ b/components/my-notebooks/CardFieldsForm.tsx
@@ -67,7 +67,7 @@ export default function CardFieldsForm({
type="button"
onClick={() => removeSense(sense.key)}
disabled={senses.length <= 1}
- className="text-xs text-zinc-500 transition-colors hover:underline disabled:opacity-30 dark:text-zinc-500"
+ className="text-xs text-coral-600 transition-all hover:-translate-y-0.5 hover:text-coral-800 hover:underline disabled:opacity-30 dark:text-coral-400 dark:hover:text-coral-200"
>
この意味を削除
@@ -76,7 +76,7 @@ export default function CardFieldsForm({
diff --git a/components/my-notebooks/ImportForm.tsx b/components/my-notebooks/ImportForm.tsx
index e913a3f..fc54e85 100644
--- a/components/my-notebooks/ImportForm.tsx
+++ b/components/my-notebooks/ImportForm.tsx
@@ -15,7 +15,7 @@ function SubmitButton() {
@@ -56,7 +56,7 @@ export default function ImportForm() {
type="file"
accept=".xlsx"
required
- className="text-sm text-zinc-600 file:mr-3 file:rounded-full file:border-0 file:bg-zinc-100 file:px-3 file:py-1.5 file:text-sm file:font-medium file:text-zinc-700 hover:file:bg-zinc-200 dark:text-zinc-400 dark:file:bg-zinc-800 dark:file:text-zinc-200 dark:hover:file:bg-zinc-700"
+ className="text-sm text-zinc-600 file:mr-3 file:rounded-full file:border-0 file:bg-coral-100 file:px-3 file:py-1.5 file:text-sm file:font-medium file:text-coral-700 hover:file:bg-coral-200 hover:file:text-coral-800 dark:text-zinc-400 dark:file:bg-coral-900/30 dark:file:text-coral-300 dark:hover:file:bg-coral-900/50 dark:hover:file:text-coral-200"
/>
1行目を見出し行として自動で読み取ります。列の数や名前は自由です。
diff --git a/components/my-notebooks/MultiElement.tsx b/components/my-notebooks/MultiElement.tsx
index e6cb5e4..41e1a6e 100644
--- a/components/my-notebooks/MultiElement.tsx
+++ b/components/my-notebooks/MultiElement.tsx
@@ -8,6 +8,7 @@ interface MultiElementCardProps {
columnNames?: string[];
width?: number;
height?: number;
+ showHint?: boolean;
}
//以下多要素単語帳のカード
@@ -16,6 +17,7 @@ const MultiElementCard: React.FC = ({
columnNames = [],
width = 340,
height = 220,
+ showHint = true,
}) => {
//回転回数の記録
const [rotationStep, setRotationStep] = useState(0);
@@ -27,6 +29,10 @@ const MultiElementCard: React.FC = ({
// 正多角形の重心から面までの距離(奥行き押し出し量)
const tz = Math.round(width / (2 * Math.tan(Math.PI / numFaces)));
+ // 視点を上に持ち上げて見下ろす量。カードの高さに比例させることで、
+ // サイズを変えても常に同じ見下ろし角度・全体像が収まるようにする
+ const perspectiveOriginY = Math.round(height * -0.73);
+
// クリック位置(左側か右側か)に応じて回転方向を分岐
const handleClick = (e: React.MouseEvent) => {
const rect = e.currentTarget.getBoundingClientRect();
@@ -61,7 +67,7 @@ const MultiElementCard: React.FC = ({
width: `${width}px`,
height: `${height}px`,
perspective: "1000px",
- perspectiveOrigin: "50% -160px", // 視点を上に持ち上げて見下ろす
+ perspectiveOrigin: `50% ${perspectiveOriginY}px`, // 視点を上に持ち上げて見下ろす
cursor: "pointer",
userSelect: "none",
}}
@@ -114,11 +120,13 @@ const MultiElementCard: React.FC = ({
{/* 操作ガイド */}
-
- ◀ 左: 戻る
- |
- 右: 進む ▶
-
+ {showHint && (
+
+ ◀ 左: 戻る
+ |
+ 右: 進む ▶
+
+ )}
);
};
diff --git a/components/my-notebooks/ResetAllStarsButton.tsx b/components/my-notebooks/ResetAllStarsButton.tsx
index 72f6acc..f7928fb 100644
--- a/components/my-notebooks/ResetAllStarsButton.tsx
+++ b/components/my-notebooks/ResetAllStarsButton.tsx
@@ -16,7 +16,7 @@ export default function ResetAllStarsButton({ notebookId }: { notebookId: string
>
diff --git a/components/my-notebooks/ShareNotebookButton.tsx b/components/my-notebooks/ShareNotebookButton.tsx
index 0d7a9e9..883b52a 100644
--- a/components/my-notebooks/ShareNotebookButton.tsx
+++ b/components/my-notebooks/ShareNotebookButton.tsx
@@ -38,7 +38,7 @@ export default function ShareNotebookButton({
type="button"
onClick={handleToggle}
disabled={isPending}
- className="rounded-full border border-black/[.08] px-5 py-2 text-sm font-medium transition-colors hover:border-black/[.15] disabled:opacity-50 dark:border-white/[.145] dark:hover:border-white/[.25]"
+ className="rounded-full border border-coral-300 px-5 py-2 text-sm font-medium text-coral-700 transition-all hover:-translate-y-0.5 hover:border-coral-500 hover:bg-coral-50 hover:text-coral-800 hover:shadow-md hover:shadow-coral-100 disabled:opacity-50 dark:border-coral-900/50 dark:text-coral-300 dark:hover:border-coral-600 dark:hover:bg-coral-950/20 dark:hover:text-coral-200 dark:hover:shadow-none"
>
{optimisticPublic ? "公開中(クリックで非公開に)" : "リンクで共有する"}
@@ -54,7 +54,7 @@ export default function ShareNotebookButton({
diff --git a/components/pinyin/PinyinPractice.tsx b/components/pinyin/PinyinPractice.tsx
index c4b43d5..15edbcc 100644
--- a/components/pinyin/PinyinPractice.tsx
+++ b/components/pinyin/PinyinPractice.tsx
@@ -314,7 +314,7 @@ export function PinyinPractice({ characters }: PinyinPracticeProps) {
-