Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style(frontend): changes footer copyright text #3588

Merged
merged 18 commits into from
Nov 20, 2024
Merged
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
45 changes: 27 additions & 18 deletions src/frontend/src/lib/components/core/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,35 +53,44 @@
</div>

<div
class="item pointer-events-auto flex flex-row items-center justify-end gap-2 text-sm lg:max-w-48 xl:max-w-none"
class="item pointer-events-auto px-6 text-sm md:px-0 lg:max-w-48"
class:sm:max-w-none={$authNotSignedIn}
class:lg:max-w-none={$authNotSignedIn}
class:xl:max-w-none={$authNotSignedIn}
class:xl:max-w-80={$authSignedIn}
class:1.5xl:max-w-none={$authSignedIn}
class:md:h-md:pr-4={$authNotSignedIn}
class:md:transition-all={$authSignedIn}
class:md:duration-200={$authSignedIn}
class:md:ease-in-out={$authSignedIn}
class:md:invisible={$authSignedIn}
class:1.5md:visible={$authSignedIn}
class:md:translate-x-full={$authSignedIn}
class:1.5md:translate-x-0={$authSignedIn}
class:1.5md:visible={$authSignedIn}
>
<ExternalLink
href="https://dfinity.org"
ariaLabel={replaceOisyPlaceholders($i18n.footer.alt.dfinity)}
iconVisible={false}
>
<div class="flex flex-row items-center gap-2">
<IconDfinity />
<span
class:md:hidden={$authSignedIn}
class:xl:flex={$authSignedIn}
class:md:h-md:hidden={$authNotSignedIn}
class:1.5md:h-md:flex={$authNotSignedIn}
<div class="flex flex-col items-center pt-2 sm:flex-row sm:items-start sm:gap-2">
<span class="-mt-[0.35rem]"><IconDfinity size="30" /></span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for negative margin? To align in some custom way the icon with the text? Maybe some line-height for the text could do the job?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes exactly, this is used to aligne the icon with the text. The line-height for the text did not work as needed so i had to use this.

<span
class:md:hidden={$authSignedIn}
class:xl:block={$authSignedIn}
class:md:h-md:hidden={$authNotSignedIn}
class:1.5md:h-md:block={$authNotSignedIn}
class="text-center md:text-left"
>
{replaceOisyPlaceholders($i18n.footer.text.incubated_with)}
<ExternalLink
href="https://dfinity.org"
ariaLabel={replaceOisyPlaceholders($i18n.footer.alt.dfinity)}
iconVisible={false}
color="blue"
>
{replaceOisyPlaceholders($i18n.footer.text.dfinity_foundation)}
</ExternalLink>
<span class="whitespace-nowrap"
>{replaceOisyPlaceholders($i18n.footer.text.copyright)}</span
>
{replaceOisyPlaceholders($i18n.footer.text.developed_with)}
</span>
</div>
</ExternalLink>
</span>
</div>
</div>
</div>
</footer>
6 changes: 5 additions & 1 deletion src/frontend/src/lib/components/icons/IconDfinity.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<!-- source: DFINITY foundation -->
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<script lang="ts">
export let size = '40';
</script>

<svg width={size} height={size} viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M27.7133 13C26.0363 13 24.2081 13.8493 22.2758 15.522C21.3591 16.3147 20.5674 17.164 19.9737 17.8434C19.9737 17.8434 19.9737 17.8434 19.9789 17.8485V17.8434C19.9789 17.8434 20.9164 18.8522 21.9529 19.9331C22.5102 19.2794 23.3123 18.389 24.2341 17.586C25.953 16.0985 27.0727 15.7846 27.7133 15.7846C30.1249 15.7846 32.0832 17.6735 32.0832 19.9948C32.0832 22.3007 30.1197 24.1897 27.7133 24.2051C27.604 24.2051 27.4633 24.1897 27.2862 24.1536C27.9894 24.4522 28.7446 24.6684 29.4634 24.6684C33.8801 24.6684 34.7447 21.822 34.802 21.6162C34.9322 21.0963 34.9999 20.5507 34.9999 19.9897C34.9999 16.1397 31.729 13 27.7133 13Z"
fill="url(#paint0_linear_100_44667)"
Expand Down
4 changes: 3 additions & 1 deletion src/frontend/src/lib/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@
},
"footer": {
"text": {
"developed_with": "© 2024 Developed with ❤\uFE0F at DFINITY"
"incubated_with": "Incubated with ❤\uFE0F by",
"dfinity_foundation": "DFINITY Foundation",
"copyright": "© 2024"
},
"alt": {
"dfinity": "Go to DFINITY Foundation website",
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/lib/types/i18n.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ interface I18nDapps {
}

interface I18nFooter {
text: { developed_with: string };
text: { incubated_with: string; dfinity_foundation: string; copyright: string };
alt: { dfinity: string; status: string };
}

Expand Down