Files
privacy.sexy/src/presentation/components/TheFooter/TheFooter.vue
undergroundwires d5bbc321f9 Change fonts for improved readability
Key changes:

- Change main font to Roboto Slab for enhanced readability.
- Change code font to 'Source Code Pro' for consistent monospace code
  rendering.
- Import and set code font explicitly for uniform appearance across
  platforms.
- Update Slabo 27px (logo font) version from v6 to v14.
- Update Yesteryear (cursive font) version from v8 to v18.
- Drop support for historic browser-specific formats, retaining only
  WOFF2 for modern and TTF for legacy browsers.
- Use `font-display: swap` to improve perceived load times and minimize
  layout shifts.

Supporting changes:

- Simplify font-weight usage to 'normal' and 'bold' for consistency.
- Adjust inline code padding for better scalability and prevent
  overflow.
- Introduce `$font-main` as main font variable.
- Remove specification of main font as it's best practice to rely on the
  default font defined on `body` style.
- Specify font in code area to ensure it uses the code font consistently
  as the rest of the application.
- Remove local font search through `local` to simplify the import logic
  and prioritize consistency over performance.
- Import bold font explicitly (`font-weight: 700`) for smooth and
  consistent rendering.
- Move `font-family` definitions to `_typography.scss` to better adhere
  to the common standards and conventions.
- Refactor font variables to have `font-family-` prefix instead of
  `font-` to improve clarity and differentiation between `font-size`
  variables.
- Rename 'artistic' font to 'cursive' for preciseness and clarity.
- Use smaller font sizes to match the new main font size, as Roboto Slab
  is relatively larger.
- Add missing fallbacks for serif fonts to improve fault tolerance.
- Change padding slightly on toggle switch for revert buttons to align
  well with new main font and its sizing.
2024-02-16 11:27:31 +01:00

143 lines
3.9 KiB
Vue

<template>
<div>
<div class="footer">
<div class="footer__section">
<span v-if="isRunningAsDesktopApplication" class="footer__section__item">
<AppIcon class="icon" icon="globe" />
<span>
Online version at <a :href="homepageUrl" target="_blank" rel="noopener noreferrer">{{ homepageUrl }}</a>
</span>
</span>
<span v-else class="footer__section__item">
<DownloadUrlList />
</span>
</div>
<div class="footer__section">
<div class="footer__section__item">
<a :href="feedbackUrl" target="_blank" rel="noopener noreferrer">
<AppIcon class="icon" icon="face-smile" />
<span>Feedback</span>
</a>
</div>
<div class="footer__section__item">
<a :href="repositoryUrl" target="_blank" rel="noopener noreferrer">
<AppIcon class="icon" icon="github" />
<span>Source Code</span>
</a>
</div>
<div class="footer__section__item">
<a :href="releaseUrl" target="_blank" rel="noopener noreferrer">
<AppIcon class="icon" icon="tag" />
<span>v{{ version }}</span>
</a>
</div>
<div class="footer__section__item">
<FlatButton
label="Privacy"
icon="user-secret"
flat
@click="showPrivacyDialog()"
/>
</div>
</div>
</div>
<ModalDialog v-model="isPrivacyDialogVisible">
<PrivacyPolicy />
</ModalDialog>
</div>
</template>
<script lang="ts">
import {
defineComponent, ref, computed,
} from 'vue';
import ModalDialog from '@/presentation/components/Shared/Modal/ModalDialog.vue';
import AppIcon from '@/presentation/components/Shared/Icon/AppIcon.vue';
import { injectKey } from '@/presentation/injectionSymbols';
import FlatButton from '@/presentation/components/Shared/FlatButton.vue';
import DownloadUrlList from './DownloadUrlList.vue';
import PrivacyPolicy from './PrivacyPolicy.vue';
export default defineComponent({
components: {
ModalDialog,
PrivacyPolicy,
DownloadUrlList,
AppIcon,
FlatButton,
},
setup() {
const { projectDetails } = injectKey((keys) => keys.useApplication);
const { isRunningAsDesktopApplication } = injectKey((keys) => keys.useRuntimeEnvironment);
const isPrivacyDialogVisible = ref(false);
const version = computed<string>(() => projectDetails.version.toString());
const homepageUrl = computed<string>(() => projectDetails.homepage);
const repositoryUrl = computed<string>(() => projectDetails.repositoryWebUrl);
const releaseUrl = computed<string>(() => projectDetails.releaseUrl);
const feedbackUrl = computed<string>(() => projectDetails.feedbackUrl);
function showPrivacyDialog() {
isPrivacyDialogVisible.value = true;
}
return {
isRunningAsDesktopApplication,
isPrivacyDialogVisible,
showPrivacyDialog,
version,
homepageUrl,
repositoryUrl,
releaseUrl,
feedbackUrl,
};
},
});
</script>
<style scoped lang="scss">
@use "@/presentation/assets/styles/main" as *;
.icon {
margin-right: 0.5em;
}
.footer {
display: flex;
justify-content: space-between;
@media screen and (max-width: $media-screen-big-width) {
flex-direction: column;
align-items: center;
}
&__section {
display: flex;
@media screen and (max-width: $media-screen-big-width) {
justify-content: space-around;
width: 100%;
&:not(:first-child) {
margin-top: 0.7em;
}
}
flex-wrap: wrap;
&__item:not(:first-child) {
&::before {
content: "|";
padding: 0 5px;
}
@media screen and (max-width: $media-screen-big-width) {
margin-top: 3px;
&::before {
content: "";
padding: 0;
}
}
}
}
}
</style>