feat: introduce the compact vehicle HUD
This commit is contained in:
@@ -18,7 +18,7 @@ import { useKeyboardNavigation } from '@/composables/useKeyboardNavigation';
|
||||
import { useMotionPreferences } from '@/composables/useMotionPreferences';
|
||||
import type { PortfolioContent, SectionId } from '@/content/types';
|
||||
import type { SceneHostState } from '@/composables/useSceneController';
|
||||
import type { MotionPolicy, QualityTier } from '@/journey/motion-policy';
|
||||
import type { MotionPolicy } from '@/journey/motion-policy';
|
||||
|
||||
declare const __PORTFOLIO_TEST_BUILD__: boolean;
|
||||
const TEST_BUILD = typeof __PORTFOLIO_TEST_BUILD__ !== 'undefined' && __PORTFOLIO_TEST_BUILD__;
|
||||
@@ -75,7 +75,6 @@ const serverDefaultPolicy: MotionPolicy = {
|
||||
reason: 'full',
|
||||
};
|
||||
const displayedPolicy = computed(() => controlsReady.value ? motion.policy.value : serverDefaultPolicy);
|
||||
const displayedQuality = computed<QualityTier>(() => controlsReady.value ? actualQuality.value : 'high');
|
||||
const displayedSceneState = computed(() => controlsReady.value ? sceneState.value : 'running');
|
||||
let removePageListeners = (): void => {};
|
||||
|
||||
@@ -173,7 +172,6 @@ onUnmounted(() => removePageListeners());
|
||||
<JourneyHud
|
||||
:journey="journey"
|
||||
:section-label="activeSectionLabel"
|
||||
:quality="displayedQuality"
|
||||
/>
|
||||
<header class="site-header">
|
||||
<h1>{{ content.identity.name }}</h1>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
||||
import IconGlyph, { type IconGlyphName } from './IconGlyph.vue';
|
||||
import type { AudioUiState } from '@/audio/types';
|
||||
import type { MotionPolicy, QualityTier } from '@/journey/motion-policy';
|
||||
|
||||
@@ -27,13 +28,31 @@ const emit = defineEmits<{
|
||||
audioVolumeChange: [volume: number];
|
||||
}>();
|
||||
|
||||
const controlRoot = ref<HTMLElement | null>(null);
|
||||
const settingsButton = ref<HTMLButtonElement | null>(null);
|
||||
const volumeButton = ref<HTMLButtonElement | null>(null);
|
||||
const settingsOpen = ref(false);
|
||||
const volumeOpen = ref(false);
|
||||
|
||||
const action = computed(() => {
|
||||
if (props.policy.reason === 'visitor-pause') return { label: 'Resume motion', event: 'resume' as const };
|
||||
if (props.policy.reason === 'saved-static') return { label: 'Enable motion', event: 'enable' as const };
|
||||
if (props.policy.reason === 'full') return { label: 'Pause motion', event: 'pause' as const };
|
||||
if (props.policy.reason === 'visitor-pause') {
|
||||
return { label: 'Resume motion', event: 'resume' as const, icon: 'play' as IconGlyphName };
|
||||
}
|
||||
if (props.policy.reason === 'saved-static') {
|
||||
return { label: 'Enable motion', event: 'enable' as const, icon: 'play' as IconGlyphName };
|
||||
}
|
||||
if (props.policy.reason === 'full') {
|
||||
return { label: 'Pause motion', event: 'pause' as const, icon: 'pause' as IconGlyphName };
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
const isAudioActive = computed(() => (
|
||||
props.audioState.kind === 'running' || props.audioState.kind === 'suspended'
|
||||
));
|
||||
const muteLabel = computed(() => props.audioMuted ? 'Unmute sound' : 'Mute sound');
|
||||
const muteIcon = computed<IconGlyphName>(() => props.audioMuted ? 'sound-muted' : 'sound');
|
||||
|
||||
const statusText = computed(() => {
|
||||
if (props.policy.reason === 'system-reduce') return 'Motion: static — reduced motion requested';
|
||||
if (props.policy.reason === 'data-saver') return 'Motion: static — data saver is active';
|
||||
@@ -41,7 +60,7 @@ const statusText = computed(() => {
|
||||
if (props.policy.reason === 'saved-static') return 'Motion: static';
|
||||
if (props.sceneStatus === 'failed' || props.sceneStatus === 'static') return 'Visuals unavailable';
|
||||
if (props.sceneStatus === 'loading' || props.sceneStatus === 'idle') return 'Motion: preparing';
|
||||
return 'Motion: active';
|
||||
return null;
|
||||
});
|
||||
|
||||
const runAction = (): void => {
|
||||
@@ -61,56 +80,186 @@ const changeQuality = (event: Event): void => {
|
||||
const changeVolume = (event: Event): void => {
|
||||
emit('audioVolumeChange', Number((event.currentTarget as HTMLInputElement).value));
|
||||
};
|
||||
|
||||
const toggleSettings = (): void => {
|
||||
settingsOpen.value = !settingsOpen.value;
|
||||
volumeOpen.value = false;
|
||||
};
|
||||
|
||||
const toggleVolume = (): void => {
|
||||
volumeOpen.value = !volumeOpen.value;
|
||||
settingsOpen.value = false;
|
||||
};
|
||||
|
||||
const closePanels = (restoreFocus = false): void => {
|
||||
const focusTarget = settingsOpen.value ? settingsButton.value : volumeButton.value;
|
||||
settingsOpen.value = false;
|
||||
volumeOpen.value = false;
|
||||
if (restoreFocus) void nextTick(() => focusTarget?.focus());
|
||||
};
|
||||
|
||||
const onDocumentPointerDown = (event: Event): void => {
|
||||
if (controlRoot.value?.contains(event.target as Node)) return;
|
||||
closePanels();
|
||||
};
|
||||
|
||||
const onDocumentKeyDown = (event: KeyboardEvent): void => {
|
||||
if (event.key !== 'Escape' || (!settingsOpen.value && !volumeOpen.value)) return;
|
||||
event.preventDefault();
|
||||
closePanels(true);
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.audioState.kind,
|
||||
() => closePanels(),
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
document.addEventListener('pointerdown', onDocumentPointerDown);
|
||||
document.addEventListener('keydown', onDocumentKeyDown);
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
document.removeEventListener('pointerdown', onDocumentPointerDown);
|
||||
document.removeEventListener('keydown', onDocumentKeyDown);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="drive-controls">
|
||||
<button v-if="action" type="button" @click="runAction">{{ action.label }}</button>
|
||||
<div v-if="audioState.kind === 'idle'" class="drive-controls__audio-start">
|
||||
<button type="button" @click="emit('audioStart')">START THE DRIVE</button>
|
||||
<span>Enables the interactive soundtrack.</span>
|
||||
</div>
|
||||
<div v-else-if="audioState.kind === 'starting'" class="drive-controls__audio-start" aria-live="polite">
|
||||
<button type="button" disabled>Starting drive…</button>
|
||||
<span>Preparing the interactive soundtrack.</span>
|
||||
</div>
|
||||
<div
|
||||
ref="controlRoot"
|
||||
class="drive-controls"
|
||||
:data-drive-state="audioState.kind"
|
||||
>
|
||||
<button
|
||||
v-if="audioState.kind === 'idle'"
|
||||
class="drive-start"
|
||||
type="button"
|
||||
aria-label="Start the drive"
|
||||
@click="emit('audioStart')"
|
||||
>
|
||||
<IconGlyph name="play" />
|
||||
<span>START THE DRIVE</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
v-else-if="audioState.kind === 'starting'"
|
||||
class="drive-start"
|
||||
type="button"
|
||||
disabled
|
||||
aria-label="Starting drive"
|
||||
aria-live="polite"
|
||||
>
|
||||
<IconGlyph name="play" />
|
||||
<span>STARTING…</span>
|
||||
</button>
|
||||
|
||||
<p v-else-if="audioState.kind === 'failed'" class="drive-controls__audio-status" role="status">
|
||||
Audio unavailable. Continue without sound.
|
||||
</p>
|
||||
<div
|
||||
v-else-if="audioState.kind === 'running' || audioState.kind === 'suspended'"
|
||||
class="drive-controls__audio"
|
||||
>
|
||||
|
||||
<div v-else-if="isAudioActive" class="drive-controls__dock" role="group" aria-label="Drive controls">
|
||||
<button
|
||||
v-if="audioState.kind === 'suspended' && audioState.resumeRequiresGesture"
|
||||
class="drive-control-button"
|
||||
type="button"
|
||||
aria-label="Resume sound"
|
||||
title="Resume sound"
|
||||
data-tooltip="Resume sound"
|
||||
@click="emit('audioResume')"
|
||||
>Resume sound</button>
|
||||
<label>
|
||||
<span>Sound volume</span>
|
||||
<input
|
||||
aria-label="Sound volume"
|
||||
type="range"
|
||||
min="0"
|
||||
max="1"
|
||||
step="0.05"
|
||||
:value="audioVolume"
|
||||
@input="changeVolume"
|
||||
>
|
||||
</label>
|
||||
<button type="button" @click="emit('audioMuteToggle')">
|
||||
{{ audioMuted ? 'Unmute sound' : 'Mute sound' }}
|
||||
>
|
||||
<IconGlyph name="play" />
|
||||
</button>
|
||||
<button
|
||||
class="drive-control-button"
|
||||
type="button"
|
||||
:aria-label="muteLabel"
|
||||
:title="muteLabel"
|
||||
:data-tooltip="muteLabel"
|
||||
@click="emit('audioMuteToggle')"
|
||||
>
|
||||
<IconGlyph :name="muteIcon" />
|
||||
</button>
|
||||
|
||||
<button
|
||||
ref="volumeButton"
|
||||
class="drive-control-button"
|
||||
type="button"
|
||||
aria-label="Sound volume"
|
||||
title="Sound volume"
|
||||
data-tooltip="Sound volume"
|
||||
aria-controls="drive-volume-panel"
|
||||
:aria-expanded="volumeOpen"
|
||||
@click="toggleVolume"
|
||||
>
|
||||
<IconGlyph name="volume" />
|
||||
</button>
|
||||
|
||||
<button
|
||||
v-if="action"
|
||||
class="drive-control-button"
|
||||
type="button"
|
||||
:aria-label="action.label"
|
||||
:title="action.label"
|
||||
:data-tooltip="action.label"
|
||||
@click="runAction"
|
||||
>
|
||||
<IconGlyph :name="action.icon" />
|
||||
</button>
|
||||
</div>
|
||||
<label>
|
||||
<span>Quality</span>
|
||||
<select :value="maximumQuality" aria-label="Quality control" @change="changeQuality">
|
||||
|
||||
<button
|
||||
v-if="audioState.kind !== 'starting'"
|
||||
ref="settingsButton"
|
||||
class="drive-control-button drive-controls__settings-trigger"
|
||||
type="button"
|
||||
aria-label="Drive settings"
|
||||
title="Drive settings"
|
||||
data-tooltip="Drive settings"
|
||||
aria-controls="drive-settings-panel"
|
||||
:aria-expanded="settingsOpen"
|
||||
@click="toggleSettings"
|
||||
>
|
||||
<IconGlyph name="settings" />
|
||||
</button>
|
||||
|
||||
<div
|
||||
v-if="volumeOpen && isAudioActive"
|
||||
id="drive-volume-panel"
|
||||
class="drive-popover drive-popover--volume"
|
||||
role="dialog"
|
||||
aria-label="Sound volume"
|
||||
>
|
||||
<label for="drive-volume">SOUND</label>
|
||||
<input
|
||||
id="drive-volume"
|
||||
aria-label="Sound volume level"
|
||||
type="range"
|
||||
min="0"
|
||||
max="1"
|
||||
step="0.05"
|
||||
:value="audioVolume"
|
||||
@input="changeVolume"
|
||||
>
|
||||
<output for="drive-volume">{{ Math.round(audioVolume * 100) }}%</output>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="settingsOpen"
|
||||
id="drive-settings-panel"
|
||||
class="drive-popover drive-popover--settings"
|
||||
role="dialog"
|
||||
aria-label="Drive settings"
|
||||
>
|
||||
<strong>DRIVE SETTINGS</strong>
|
||||
<label for="drive-quality">QUALITY</label>
|
||||
<select id="drive-quality" :value="maximumQuality" aria-label="Quality control" @change="changeQuality">
|
||||
<option value="high">High</option>
|
||||
<option value="medium">Medium</option>
|
||||
<option value="low">Low</option>
|
||||
<option value="static">Static</option>
|
||||
</select>
|
||||
</label>
|
||||
<p class="drive-controls__status" role="status">{{ statusText }}</p>
|
||||
<p v-if="statusText" class="drive-controls__status" role="status">{{ statusText }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
42
src/components/IconGlyph.vue
Normal file
42
src/components/IconGlyph.vue
Normal file
@@ -0,0 +1,42 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import {
|
||||
PhPause,
|
||||
PhPlay,
|
||||
PhSlidersHorizontal,
|
||||
PhSpeakerHigh,
|
||||
PhSpeakerX,
|
||||
PhWaveform,
|
||||
} from '@phosphor-icons/vue';
|
||||
|
||||
export type IconGlyphName = 'pause' | 'play' | 'settings' | 'sound' | 'sound-muted' | 'volume';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
name: IconGlyphName;
|
||||
size?: number;
|
||||
}>(), {
|
||||
size: 20,
|
||||
});
|
||||
|
||||
const icons = {
|
||||
pause: PhPause,
|
||||
play: PhPlay,
|
||||
settings: PhSlidersHorizontal,
|
||||
sound: PhSpeakerHigh,
|
||||
'sound-muted': PhSpeakerX,
|
||||
volume: PhWaveform,
|
||||
} as const;
|
||||
|
||||
const icon = computed(() => icons[props.name]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<component
|
||||
:is="icon"
|
||||
class="icon-glyph"
|
||||
:size="size"
|
||||
weight="regular"
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
/>
|
||||
</template>
|
||||
@@ -1,23 +1,19 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import type { JourneySnapshot } from '@/journey/types';
|
||||
import type { QualityTier } from '@/journey/motion-policy';
|
||||
|
||||
const props = defineProps<{
|
||||
journey: JourneySnapshot;
|
||||
sectionLabel: string;
|
||||
quality: QualityTier;
|
||||
}>();
|
||||
|
||||
const routePercent = computed(() => `${Math.round(Math.min(1, Math.max(0, props.journey.routeProgress)) * 100)}%`);
|
||||
const qualityLabel = computed(() => props.quality.charAt(0).toUpperCase() + props.quality.slice(1));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<aside class="journey-hud" aria-hidden="true">
|
||||
<span class="journey-hud__route">ROUTE {{ routePercent }}</span>
|
||||
<span class="journey-hud__route"><span>ROUTE</span> <strong>{{ routePercent }}</strong></span>
|
||||
<span class="journey-hud__section">{{ sectionLabel }}</span>
|
||||
<span class="journey-hud__quality">{{ qualityLabel }}</span>
|
||||
<strong v-if="journey.arrived" class="journey-hud__arrival">ARRIVED</strong>
|
||||
</aside>
|
||||
</template>
|
||||
|
||||
@@ -133,187 +133,317 @@
|
||||
|
||||
.journey-hud {
|
||||
position: fixed;
|
||||
z-index: 4;
|
||||
inset: auto 1rem 1rem auto;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, auto);
|
||||
gap: 0.25rem 0.9rem;
|
||||
min-inline-size: 12rem;
|
||||
padding: 0.75rem 0.9rem;
|
||||
border: 1px solid rgb(128 217 230 / 38%);
|
||||
background: rgb(4 9 18 / 84%);
|
||||
z-index: var(--z-hud);
|
||||
inset: auto max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) auto;
|
||||
display: flex;
|
||||
min-block-size: 44px;
|
||||
align-items: center;
|
||||
gap: 0.72rem;
|
||||
padding: 0.48rem 0.72rem;
|
||||
border: 1px solid rgb(126 220 232 / 25%);
|
||||
border-radius: 2px;
|
||||
background: var(--surface-strong);
|
||||
box-shadow: 0 0.8rem 2.4rem rgb(0 5 14 / 28%);
|
||||
color: var(--text-muted);
|
||||
font: 600 var(--step--1)/1.2 var(--mono);
|
||||
letter-spacing: 0.06em;
|
||||
font: 560 0.72rem/1 var(--mono);
|
||||
letter-spacing: 0.08em;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.journey-hud__route {
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
gap: 0.4rem;
|
||||
}
|
||||
|
||||
.journey-hud__route span {
|
||||
color: rgb(170 185 194 / 70%);
|
||||
font-size: 0.61rem;
|
||||
}
|
||||
|
||||
.journey-hud__route strong {
|
||||
color: var(--text);
|
||||
font-size: 0.76rem;
|
||||
}
|
||||
|
||||
.journey-hud__section,
|
||||
.journey-hud__arrival {
|
||||
color: var(--cyan);
|
||||
}
|
||||
|
||||
.journey-hud__section::before {
|
||||
margin-inline-end: 0.72rem;
|
||||
color: rgb(126 220 232 / 35%);
|
||||
content: '/';
|
||||
}
|
||||
|
||||
.journey-hud__arrival {
|
||||
grid-column: 1 / -1;
|
||||
padding-inline-start: 0.12rem;
|
||||
color: var(--amber);
|
||||
}
|
||||
|
||||
.drive-controls {
|
||||
position: fixed;
|
||||
z-index: 5;
|
||||
inset: auto auto 1rem 1rem;
|
||||
z-index: var(--z-popover);
|
||||
inset: auto auto max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.55rem;
|
||||
max-inline-size: calc(100vw - 2rem);
|
||||
padding: 0.55rem;
|
||||
border: 1px solid rgb(128 217 230 / 32%);
|
||||
background: rgb(4 9 18 / 88%);
|
||||
gap: 0.38rem;
|
||||
max-inline-size: calc(100vw - 1.5rem);
|
||||
font-family: var(--mono);
|
||||
font-size: var(--step--1);
|
||||
font-size: 0.72rem;
|
||||
}
|
||||
|
||||
.drive-controls__audio-start,
|
||||
.drive-controls__audio {
|
||||
.drive-controls__dock {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.55rem;
|
||||
gap: 1px;
|
||||
padding: 3px;
|
||||
border: 1px solid rgb(126 220 232 / 24%);
|
||||
border-radius: 3px;
|
||||
background: var(--surface-strong);
|
||||
box-shadow: 0 0.8rem 2.4rem rgb(0 5 14 / 28%);
|
||||
}
|
||||
|
||||
.drive-controls__audio-start span,
|
||||
.drive-controls__audio-status {
|
||||
.drive-start,
|
||||
.drive-control-button {
|
||||
min-block-size: 44px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 2px;
|
||||
font-weight: 620;
|
||||
cursor: pointer;
|
||||
transition: opacity var(--transition), transform var(--transition);
|
||||
}
|
||||
|
||||
.drive-start {
|
||||
display: inline-flex;
|
||||
min-inline-size: 12.5rem;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
padding-inline: 1rem;
|
||||
border-color: rgb(120 216 229 / 72%);
|
||||
background: rgb(120 216 229 / 94%);
|
||||
box-shadow: 0 0 1.5rem rgb(77 201 220 / 17%);
|
||||
color: #041017;
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
|
||||
.drive-start:hover:not(:disabled) {
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.drive-start:disabled {
|
||||
cursor: wait;
|
||||
opacity: 0.64;
|
||||
}
|
||||
|
||||
.drive-control-button {
|
||||
position: relative;
|
||||
display: inline-grid;
|
||||
inline-size: 44px;
|
||||
place-items: center;
|
||||
padding: 0;
|
||||
background: rgb(8 17 29 / 92%);
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.drive-controls button,
|
||||
.drive-controls select,
|
||||
.drive-controls input {
|
||||
min-block-size: 44px;
|
||||
border: 1px solid var(--line-strong);
|
||||
background: #101925;
|
||||
color: var(--text);
|
||||
.drive-control-button:hover {
|
||||
color: var(--cyan);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.drive-controls input[type="range"] {
|
||||
inline-size: 7rem;
|
||||
.drive-controls__settings-trigger {
|
||||
border-color: rgb(126 220 232 / 24%);
|
||||
background: var(--surface-strong);
|
||||
box-shadow: 0 0.8rem 2.4rem rgb(0 5 14 / 28%);
|
||||
}
|
||||
|
||||
.drive-start:focus-visible,
|
||||
.drive-start:focus,
|
||||
.drive-control-button:focus-visible,
|
||||
.drive-control-button:focus,
|
||||
.drive-popover input:focus-visible,
|
||||
.drive-popover select:focus-visible {
|
||||
outline: none;
|
||||
box-shadow: inset 0 0 0 2px var(--focus), 0 0 0 1px rgb(3 8 17 / 90%);
|
||||
}
|
||||
|
||||
.drive-control-button::after {
|
||||
position: absolute;
|
||||
inset: auto auto calc(100% + 0.5rem) 50%;
|
||||
padding: 0.32rem 0.46rem;
|
||||
transform: translate(-50%, 4px);
|
||||
border: 1px solid rgb(126 220 232 / 18%);
|
||||
background: rgb(3 8 17 / 96%);
|
||||
color: var(--text);
|
||||
content: attr(data-tooltip);
|
||||
font: 520 0.65rem/1 var(--mono);
|
||||
letter-spacing: 0.02em;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity var(--transition), transform var(--transition);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.drive-control-button:hover::after,
|
||||
.drive-control-button:focus-visible::after {
|
||||
transform: translate(-50%, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.drive-popover {
|
||||
position: absolute;
|
||||
inset: auto auto calc(100% + 0.7rem) 0;
|
||||
display: grid;
|
||||
transform-origin: left bottom;
|
||||
border: 1px solid rgb(126 220 232 / 27%);
|
||||
border-radius: 3px;
|
||||
background: var(--surface-strong);
|
||||
box-shadow: 0 1.4rem 3rem rgb(0 4 12 / 42%);
|
||||
color: var(--text);
|
||||
animation: drive-popover-in var(--transition) both;
|
||||
}
|
||||
|
||||
@keyframes drive-popover-in {
|
||||
from {
|
||||
transform: translateY(6px);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.drive-popover--volume {
|
||||
grid-template-columns: auto minmax(8rem, 1fr) auto;
|
||||
min-inline-size: 16.5rem;
|
||||
align-items: center;
|
||||
gap: 0.7rem;
|
||||
padding: 0.7rem;
|
||||
}
|
||||
|
||||
.drive-popover--settings {
|
||||
grid-template-columns: auto minmax(7rem, 1fr);
|
||||
min-inline-size: 15rem;
|
||||
gap: 0.55rem 1rem;
|
||||
padding: 0.85rem;
|
||||
}
|
||||
|
||||
.drive-popover strong,
|
||||
.drive-popover label {
|
||||
color: var(--text-muted);
|
||||
font-size: 0.64rem;
|
||||
font-weight: 560;
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
|
||||
.drive-popover strong {
|
||||
grid-column: 1 / -1;
|
||||
padding-block-end: 0.45rem;
|
||||
border-block-end: 1px solid rgb(126 220 232 / 14%);
|
||||
color: var(--cyan);
|
||||
}
|
||||
|
||||
.drive-popover input,
|
||||
.drive-popover select {
|
||||
min-block-size: 44px;
|
||||
}
|
||||
|
||||
.drive-popover input[type="range"] {
|
||||
inline-size: 100%;
|
||||
accent-color: var(--cyan);
|
||||
}
|
||||
|
||||
.drive-controls button {
|
||||
padding-inline: 0.8rem;
|
||||
.drive-popover select {
|
||||
border: 1px solid rgb(126 220 232 / 24%);
|
||||
border-radius: 2px;
|
||||
background: #08111d;
|
||||
color: var(--text);
|
||||
padding-inline: 0.65rem;
|
||||
}
|
||||
|
||||
.drive-controls label {
|
||||
.drive-popover output {
|
||||
color: var(--cyan);
|
||||
font-size: 0.68rem;
|
||||
}
|
||||
|
||||
.drive-controls__audio-status {
|
||||
display: inline-flex;
|
||||
min-block-size: 44px;
|
||||
align-items: center;
|
||||
gap: 0.45rem;
|
||||
}
|
||||
|
||||
.drive-controls select {
|
||||
padding-inline: 0.45rem;
|
||||
margin: 0;
|
||||
padding-inline: 0.85rem;
|
||||
border: 1px solid rgb(244 173 103 / 26%);
|
||||
border-radius: 2px;
|
||||
background: var(--surface-strong);
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.drive-controls__status {
|
||||
grid-column: 1 / -1;
|
||||
margin: 0;
|
||||
padding-block-start: 0.4rem;
|
||||
border-block-start: 1px solid rgb(126 220 232 / 14%);
|
||||
color: var(--text-muted);
|
||||
font-size: 0.66rem;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
html {
|
||||
scroll-padding-block-end: 11rem;
|
||||
scroll-padding-block-end: 7rem;
|
||||
}
|
||||
|
||||
#contact {
|
||||
padding-block-end: 11rem;
|
||||
padding-block-end: 7rem;
|
||||
}
|
||||
|
||||
#contact a {
|
||||
scroll-margin-block-end: 11rem;
|
||||
}
|
||||
|
||||
.journey-hud__quality {
|
||||
display: none;
|
||||
scroll-margin-block-end: 7rem;
|
||||
}
|
||||
|
||||
.drive-controls {
|
||||
inset: auto 0.5rem 0.5rem;
|
||||
}
|
||||
|
||||
.drive-controls__status {
|
||||
flex-basis: 100%;
|
||||
}
|
||||
|
||||
.drive-controls__audio-start span {
|
||||
flex-basis: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) and (min-height: 421px) {
|
||||
.site-header {
|
||||
padding-block-start: calc(
|
||||
var(--space-4) + var(--site-navigation-block-size) + 32px
|
||||
);
|
||||
inset-inline-start: max(0.5rem, env(safe-area-inset-left));
|
||||
inset-block-end: max(0.5rem, env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.journey-hud {
|
||||
inset: var(--site-navigation-block-size) 0 auto;
|
||||
display: flex;
|
||||
min-block-size: 32px;
|
||||
min-inline-size: 0;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.6rem;
|
||||
padding: 0.35rem 0.75rem;
|
||||
border-inline: 0;
|
||||
font-size: 0.7rem;
|
||||
inset-inline-end: max(0.5rem, env(safe-area-inset-right));
|
||||
inset-block-end: max(0.5rem, env(safe-area-inset-bottom));
|
||||
max-inline-size: 6.5rem;
|
||||
gap: 0.3rem;
|
||||
padding-inline: 0.55rem;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.journey-hud__arrival {
|
||||
grid-column: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 420px) and (min-height: 421px) {
|
||||
.drive-controls {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
inline-size: calc(100% - 1rem);
|
||||
gap: 0.35rem;
|
||||
font-size: 0.72rem;
|
||||
.journey-hud__route span,
|
||||
.journey-hud__section::before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.drive-controls__audio-start,
|
||||
.drive-controls__audio {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.drive-controls > button,
|
||||
.drive-controls__audio-start button,
|
||||
.drive-controls__audio button {
|
||||
inline-size: 100%;
|
||||
padding-inline: 0.45rem;
|
||||
}
|
||||
|
||||
.drive-controls__audio-start span,
|
||||
.drive-controls__audio > label {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.drive-controls > label {
|
||||
min-inline-size: 0;
|
||||
gap: 0.25rem;
|
||||
.journey-hud__section {
|
||||
max-inline-size: 4.25rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.drive-controls > label select {
|
||||
inline-size: 4.6rem;
|
||||
min-inline-size: 0;
|
||||
.journey-hud__arrival {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.drive-controls__status {
|
||||
grid-column: 2;
|
||||
margin: 0;
|
||||
align-self: center;
|
||||
.drive-start {
|
||||
min-inline-size: 9rem;
|
||||
gap: 0.6rem;
|
||||
padding-inline: 0.62rem;
|
||||
font-size: 0.6rem;
|
||||
}
|
||||
|
||||
.drive-popover {
|
||||
position: fixed;
|
||||
inset: auto 0.5rem calc(max(0.5rem, env(safe-area-inset-bottom)) + 3.25rem);
|
||||
max-inline-size: calc(100vw - 1rem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -325,13 +455,19 @@
|
||||
.drive-controls {
|
||||
position: relative;
|
||||
inset: auto;
|
||||
max-inline-size: calc(100% - 1rem);
|
||||
margin: 0.5rem;
|
||||
inline-size: fit-content;
|
||||
max-inline-size: calc(100% - 1.5rem);
|
||||
margin: 0.75rem;
|
||||
}
|
||||
|
||||
#contact {
|
||||
padding-block-end: var(--space-3);
|
||||
}
|
||||
|
||||
.drive-popover {
|
||||
position: absolute;
|
||||
inset: auto auto calc(100% + 0.5rem) 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
|
||||
Reference in New Issue
Block a user