Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/views/first-aid-runbook/components/FirstAidReplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ function toneClass(severity: Severity): string {
<p class="mt-3 text-sm text-text-primary">{{ replayItem.selectedLabel }}</p>
<p class="mt-3 text-sm leading-relaxed text-text-secondary">{{ replayItem.consequence }}</p>
<div class="mt-4 grid grid-cols-3 gap-2 text-xs">
<p class="text-text-dim">Điểm: <span class="text-text-secondary">{{ replayItem.impact }}</span></p>
<p class="text-text-dim">
Điểm: <span class="text-text-secondary">{{ replayItem.impact }}</span>
</p>
<p class="text-text-dim">
Tốn: <span class="text-text-secondary">{{ replayItem.elapsedTime }}s</span>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ function handlePick(scenarioId: string) {
@click="handlePick(scenario.id)"
>
<div class="mb-3 flex items-center justify-between">
<span class="font-display text-xs tracking-[0.2em] text-text-dim">{{ scenario.badge }}</span>
<span class="font-display text-xs tracking-[0.2em] text-text-dim">{{
scenario.badge
}}</span>
<span class="inline-flex items-center gap-1 text-xs text-accent-sky">
<Icon :icon="scenario.icon" class="size-3.5" />
<span>{{ scenario.steps.length }} bước</span>
Expand All @@ -52,7 +54,9 @@ function handlePick(scenarioId: string) {
loading="lazy"
/>

<h2 class="mt-3 font-display text-2xl font-semibold text-text-primary">{{ scenario.name }}</h2>
<h2 class="mt-3 font-display text-2xl font-semibold text-text-primary">
{{ scenario.name }}
</h2>
<p class="mt-2 text-sm text-text-secondary">{{ scenario.description }}</p>
<p class="mt-2 text-xs text-text-dim">{{ scenario.summary }}</p>
</button>
Expand Down
8 changes: 6 additions & 2 deletions src/views/first-aid-runbook/components/FirstAidStepPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ function severityIcon(severity: Severity): string {
</script>

<template>
<section class="mt-8 border border-border-default bg-bg-surface p-6 animate-fade-up animate-delay-2">
<section
class="mt-8 border border-border-default bg-bg-surface p-6 animate-fade-up animate-delay-2"
>
<div class="grid gap-5 lg:grid-cols-[1.1fr_1.5fr]">
<article class="space-y-4">
<div class="flex items-center gap-2 text-accent-coral">
Expand Down Expand Up @@ -86,7 +88,9 @@ function severityIcon(severity: Severity): string {
>
<div class="flex items-center gap-2 text-xs">
<Icon :icon="severityIcon(choice.severity)" class="size-4" />
<span class="font-display tracking-widest">{{ severityLabelMap[choice.severity] }}</span>
<span class="font-display tracking-widest">{{
severityLabelMap[choice.severity]
}}</span>
</div>
<p class="mt-2 text-sm leading-relaxed text-text-primary">{{ choice.label }}</p>
</button>
Expand Down
14 changes: 11 additions & 3 deletions src/views/first-aid-runbook/components/FirstAidSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ defineProps<{
<article class="border border-border-default bg-bg-surface p-5">
<p class="font-display text-xs tracking-widest text-text-dim">LỖI NGUY HIỂM</p>
<p class="mt-2 font-display text-4xl text-accent-coral">{{ dangerCount }}</p>
<p class="mt-3 text-sm text-text-secondary">Số quyết định có nguy cơ làm tình huống xấu đi.</p>
<p class="mt-3 text-sm text-text-secondary">
Số quyết định có nguy cơ làm tình huống xấu đi.
</p>
</article>

<article class="border border-border-default bg-bg-surface p-5">
<p class="font-display text-xs tracking-widest text-text-dim">AUTO-CHỌN</p>
<p class="mt-2 font-display text-4xl text-accent-amber">{{ timeoutCount }}</p>
<p class="mt-3 text-sm text-text-secondary">Số bước bạn bị hết giờ trước khi ra quyết định.</p>
<p class="mt-3 text-sm text-text-secondary">
Số bước bạn bị hết giờ trước khi ra quyết định.
</p>
</article>
</section>

Expand All @@ -50,7 +54,11 @@ defineProps<{
<h3 class="font-display text-lg font-semibold">Ghi nhớ nhanh</h3>
</div>
<ul class="mt-4 grid gap-3 text-sm text-text-secondary md:grid-cols-2">
<li v-for="tip in debrief" :key="tip" class="flex items-start gap-2 border border-border-default bg-bg-deep p-3">
<li
v-for="tip in debrief"
:key="tip"
class="flex items-start gap-2 border border-border-default bg-bg-deep p-3"
>
<Icon icon="lucide:check" class="mt-0.5 size-4 text-accent-coral" />
<span>{{ tip }}</span>
</li>
Expand Down
27 changes: 19 additions & 8 deletions src/views/first-aid-runbook/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ function toggleReplayAuto() {
>
HOME
</RouterLink>
<div class="bg-accent-coral px-3 py-1.5 font-display text-xs font-bold tracking-widest text-bg-deep">
<div
class="bg-accent-coral px-3 py-1.5 font-display text-xs font-bold tracking-widest text-bg-deep"
>
FIRST_AID_RUNBOOK
</div>
</div>
Expand All @@ -285,14 +287,17 @@ function toggleReplayAuto() {
<section class="grid gap-5 animate-fade-up lg:grid-cols-[1.2fr_1fr]">
<article>
<p class="font-display text-sm tracking-widest text-accent-coral">// EMERGENCY DRILL</p>
<h1 class="mt-3 font-display text-4xl font-bold tracking-tight md:text-6xl">First Aid Runbook</h1>
<h1 class="mt-3 font-display text-4xl font-bold tracking-tight md:text-6xl">
First Aid Runbook
</h1>
<p class="mt-4 max-w-3xl text-sm leading-relaxed text-text-secondary md:text-base">
Bạn tập xử lý tình huống cấp cứu bằng quyết định theo bước và giới hạn thời gian.
Giao diện đã tách nhỏ component, giảm mật độ chữ và tăng hình minh họa.
Bạn tập xử lý tình huống cấp cứu bằng quyết định theo bước và giới hạn thời gian. Giao
diện đã tách nhỏ component, giảm mật độ chữ và tăng hình minh họa.
</p>
<p class="mt-2 text-xs text-text-dim">
Tình huống thực tế nguy hiểm: gọi
<span class="font-display text-accent-coral">{{ emergencyHotline }}</span>.
<span class="font-display text-accent-coral">{{ emergencyHotline }}</span
>.
</p>
</article>

Expand All @@ -311,10 +316,14 @@ function toggleReplayAuto() {
@select="switchScenario"
/>

<section class="mt-8 border border-border-default bg-bg-surface p-6 animate-fade-up animate-delay-1">
<section
class="mt-8 border border-border-default bg-bg-surface p-6 animate-fade-up animate-delay-1"
>
<div class="flex flex-wrap items-center gap-3">
<span class="font-display text-xs tracking-widest text-accent-sky">// OBJECTIVE</span>
<span class="text-xs text-text-dim">Tiến trình: {{ progressCurrent }}/{{ progressTotal || 0 }}</span>
<span class="text-xs text-text-dim"
>Tiến trình: {{ progressCurrent }}/{{ progressTotal || 0 }}</span
>
</div>

<div class="mt-3 grid gap-4 lg:grid-cols-[1.25fr_1fr]">
Expand Down Expand Up @@ -375,7 +384,9 @@ function toggleReplayAuto() {
/>
</template>

<footer class="mt-12 flex flex-wrap items-center justify-between gap-3 border-t border-border-default pt-6">
<footer
class="mt-12 flex flex-wrap items-center justify-between gap-3 border-t border-border-default pt-6"
>
<p class="text-xs text-text-dim">
Công cụ mô phỏng để tập phản xạ. Không thay thế chẩn đoán hay điều trị y khoa.
</p>
Expand Down
3 changes: 2 additions & 1 deletion src/views/freelance-cashflow-sandbox/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import type { PageMeta } from '@/types/page'

const meta: PageMeta = {
name: 'Freelance Cashflow Sandbox',
description: 'Mô phỏng dòng tiền freelancer với thanh toán trễ, quỹ thuế và quỹ khẩn cấp theo từng tháng.',
description:
'Mô phỏng dòng tiền freelancer với thanh toán trễ, quỹ thuế và quỹ khẩn cấp theo từng tháng.',
author: 'trinhminhnhat',
facebook: 'https://www.facebook.com/iamtrinhminhnhat',
category: 'finance',
Expand Down
3 changes: 2 additions & 1 deletion src/views/permission-leak-lab/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import type { PageMeta } from '@/types/page'

const meta: PageMeta = {
name: 'Permission Leak Lab',
description: 'Phòng lab trực quan hóa rủi ro quyền truy cập trình duyệt (camera, mic, location, clipboard) và metadata lộ ra.',
description:
'Phòng lab trực quan hóa rủi ro quyền truy cập trình duyệt (camera, mic, location, clipboard) và metadata lộ ra.',
author: 'trinhminhnhat',
facebook: 'https://www.facebook.com/iamtrinhminhnhat',
category: 'learn',
Expand Down
5 changes: 1 addition & 4 deletions src/views/solar-system-lab/components/LessonQuizPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,7 @@ function isCorrectChoice(question: QuizQuestion, choiceId: string): boolean {
: 'text-accent-coral'
"
>
{{
isCorrectChoice(question, selectedChoice(question.id))
? 'Đúng: '
: 'Chưa đúng: '
{{ isCorrectChoice(question, selectedChoice(question.id)) ? 'Đúng: ' : 'Chưa đúng: '
}}{{ question.explanation }}
</p>
</article>
Expand Down
56 changes: 41 additions & 15 deletions src/views/solar-system-lab/components/PlanetProfilePanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const props = defineProps<{
yearComparePercent: number
}>()

const insolationPercent = computed(() => Math.max(5, Math.round(props.seasonData.insolationIndex * 100)))
const insolationPercent = computed(() =>
Math.max(5, Math.round(props.seasonData.insolationIndex * 100)),
)

function formatNumber(value: number, digits = 1): string {
return value.toLocaleString('vi-VN', {
Expand All @@ -27,61 +29,85 @@ function formatNumber(value: number, digits = 1): string {
</script>

<template>
<aside class="border border-border-default bg-bg-surface p-4 sm:p-5 animate-fade-up animate-delay-3">
<aside
class="border border-border-default bg-bg-surface p-4 sm:p-5 animate-fade-up animate-delay-3"
>
<h2 class="flex items-center gap-3 font-display text-2xl font-semibold">
<span class="font-display text-sm tracking-widest text-accent-amber">//</span>
Hồ sơ hành tinh
</h2>

<div class="mt-4 border border-border-default bg-bg-elevated p-4">
<p class="font-display text-xs tracking-widest text-text-dim">{{ selectedPlanet.englishName }}</p>
<p class="font-display text-xs tracking-widest text-text-dim">
{{ selectedPlanet.englishName }}
</p>
<h3 class="mt-2 text-2xl font-semibold text-accent-amber">{{ selectedPlanet.name }}</h3>
<p class="mt-3 text-sm leading-relaxed text-text-secondary">{{ selectedPlanet.description }}</p>
<p class="mt-3 text-sm leading-relaxed text-text-secondary">
{{ selectedPlanet.description }}
</p>
<p class="mt-2 text-sm leading-relaxed text-accent-sky">{{ selectedPlanet.learningHint }}</p>
</div>

<dl class="mt-4 grid gap-2 text-sm">
<div class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2">
<div
class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2"
>
<dt class="text-text-secondary">Khoảng cách đến Mặt Trời</dt>
<dd class="font-semibold">{{ formatNumber(selectedDistanceMillionKm, 1) }} triệu km</dd>
</div>

<div class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2">
<div
class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2"
>
<dt class="text-text-secondary">Chu kỳ quỹ đạo</dt>
<dd class="font-semibold">{{ formatNumber(selectedPlanet.orbitalPeriodDays, 1) }} ngày</dd>
</div>

<div class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2">
<div
class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2"
>
<dt class="text-text-secondary">Vận tốc quỹ đạo</dt>
<dd class="font-semibold">{{ formatNumber(selectedOrbitSpeedKmS, 1) }} km/s</dd>
</div>

<div class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2">
<div
class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2"
>
<dt class="text-text-secondary">Đường kính</dt>
<dd class="font-semibold">{{ selectedPlanet.diameterKm.toLocaleString('vi-VN') }} km</dd>
</div>

<div class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2">
<div
class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2"
>
<dt class="text-text-secondary">Độ lệch tâm quỹ đạo (e)</dt>
<dd class="font-semibold">{{ formatNumber(selectedPlanet.eccentricity, 3) }}</dd>
</div>

<div class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2">
<div
class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2"
>
<dt class="text-text-secondary">Độ nghiêng quỹ đạo (i)</dt>
<dd class="font-semibold">{{ formatNumber(selectedPlanet.orbitalInclinationDeg, 2) }}°</dd>
</div>

<div class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2">
<div
class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2"
>
<dt class="text-text-secondary">Độ nghiêng trục quay</dt>
<dd class="font-semibold">{{ formatNumber(selectedPlanet.axialTiltDeg, 2) }}°</dd>
</div>

<div class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2">
<div
class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2"
>
<dt class="text-text-secondary">Số vệ tinh tự nhiên</dt>
<dd class="font-semibold">{{ selectedPlanet.moons }}</dd>
</div>

<div class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2">
<div
class="flex items-center justify-between border border-border-default bg-bg-elevated px-3 py-2"
>
<dt class="text-text-secondary">Chu kỳ tự quay</dt>
<dd class="font-semibold">{{ selectedPlanet.rotationLabel }}</dd>
</div>
Expand Down Expand Up @@ -168,8 +194,8 @@ function formatNumber(value: number, digits = 1): string {
v-if="seasonData.retrogradeRotation"
class="mt-3 text-xs leading-relaxed text-text-secondary"
>
Hành tinh này quay nghịch chiều (retrograde), nên cảm nhận mùa được đảo hướng so với phần lớn
các hành tinh còn lại.
Hành tinh này quay nghịch chiều (retrograde), nên cảm nhận mùa được đảo hướng so với phần
lớn các hành tinh còn lại.
</p>
</div>
</aside>
Expand Down
Loading
Loading