This commit fixes layout shifts experienced in macOS Safari when hovering over top menu items. Instead of making text bold — which was causing layout shifts — the hover effect now changes the text color. This ensures a consistent UI across different browsers and platforms. Additionally, this commit fixes the styling of the privacy button located in the bottom right corner. Previously styled as an `<a>` element, it is now correctly represented as a `<button>`. Furthermore, the commit enhances HTML conformity and accessibility by correctly using `<button>` and `<a>` tags instead of relying on click interactions on `<span>` elements. This commit introduces `FlatButton` Vue component and a new `flat-button` mixin. These centralize button usage and link styles, aligning the hover/touch reactions of buttons across the application, thereby creating a more consistent user interface.
83 lines
1.5 KiB
Vue
83 lines
1.5 KiB
Vue
<template>
|
|
<ModalContainer
|
|
v-model="showDialog"
|
|
>
|
|
<div class="dialog">
|
|
<div class="dialog__content">
|
|
<slot />
|
|
</div>
|
|
<FlatButton
|
|
icon="xmark"
|
|
class="dialog__close-button"
|
|
@click="hide"
|
|
/>
|
|
</div>
|
|
</ModalContainer>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent, computed } from 'vue';
|
|
import FlatButton from '@/presentation/components/Shared/FlatButton.vue';
|
|
import ModalContainer from './ModalContainer.vue';
|
|
|
|
export default defineComponent({
|
|
components: {
|
|
ModalContainer,
|
|
FlatButton,
|
|
},
|
|
props: {
|
|
modelValue: {
|
|
type: Boolean,
|
|
required: true,
|
|
},
|
|
},
|
|
emits: {
|
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
'update:modelValue': (isOpen: boolean) => true,
|
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
},
|
|
setup(props, { emit }) {
|
|
const showDialog = computed({
|
|
get: () => props.modelValue,
|
|
set: (value) => {
|
|
if (value !== props.modelValue) {
|
|
emit('update:modelValue', value);
|
|
}
|
|
},
|
|
});
|
|
|
|
function hide() {
|
|
showDialog.value = false;
|
|
}
|
|
|
|
return {
|
|
showDialog,
|
|
hide,
|
|
};
|
|
},
|
|
});
|
|
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
@use "@/presentation/assets/styles/main" as *;
|
|
|
|
.dialog {
|
|
margin-bottom: 10px;
|
|
display: flex;
|
|
flex-direction: row;
|
|
|
|
&__content {
|
|
margin: 5%;
|
|
}
|
|
|
|
.dialog__close-button {
|
|
color: $color-primary-dark;
|
|
width: auto;
|
|
font-size: 1.5em;
|
|
margin-right: 0.25em;
|
|
align-self: flex-start;
|
|
}
|
|
}
|
|
</style>
|