Skip to content

Commit

Permalink
undo translate feature and do it in new branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Hetari committed Sep 6, 2024
1 parent d23e003 commit 30df956
Show file tree
Hide file tree
Showing 12 changed files with 87 additions and 406 deletions.
71 changes: 0 additions & 71 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"lenis": "^1.1.9",
"moment-timezone": "^0.5.45",
"vue": "^3.4.37",
"vue-i18n": "^9.14.0",
"vue3-lottie": "^3.3.0"
},
"devDependencies": {
Expand Down
5 changes: 2 additions & 3 deletions src/animations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import gsap from 'gsap';
import MotionPathHelper from 'gsap/MotionPathPlugin';
import ScrollTrigger from 'gsap/ScrollTrigger';
import { Ref } from 'vue';
import { i18n, lenis } from '@/main';
import { lenis } from '@/main';

gsap.registerPlugin(ScrollTrigger);
gsap.registerPlugin(MotionPathHelper);
Expand Down Expand Up @@ -208,7 +208,7 @@ const navbarEnter = (id: string) => {
};

const navbarLeave = (id: string) => {
const x = i18n.global.locale == 'ar' ? '-100%' : '100%';
const x = '100%';
gsap.to(id, {
opacity: 0,
onComplete: () => {
Expand Down Expand Up @@ -399,7 +399,6 @@ export {
resetMagneto,
animateNavbarEnter,
animateNavbarLeave,
navbarLeave,
animateLoadingPath,
animateLoadingText,
animateLoadingTextContainer,
Expand Down
7 changes: 1 addition & 6 deletions src/components/BurgerMenuBtn.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<template>
<MagneticEffect divId="magneto" textId="magnetoText">
<div
v-bind="$attrs"
class="fixed top-7 z-[20]"
:class="i18n.global.locale == 'en' ? 'right-7' : 'left-7'"
>
<div v-bind="$attrs" class="fixed right-7 top-7 z-[20]">
<div
id="magneto"
class="flex-center size-14 cursor-pointer rounded-full bg-flax-smoke-300 brightness-90 ease-in-out lg:size-[4.5rem]"
Expand All @@ -19,7 +15,6 @@
</template>

<script setup lang="ts">
import { i18n } from '@/main';
import MagneticEffect from './MagneticEffect.vue';
</script>

Expand Down
16 changes: 5 additions & 11 deletions src/components/Link.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<template>
<component
:is="tag"
class="w-fit select-none overflow-y-hidden"
:class="i18n.global.locale == 'ar' ? 'h-[2.5ch]' : 'h-[2ch] max-md:h-5'"
class="h-[2ch] w-fit select-none overflow-y-hidden max-md:h-5"
>
<a @click="gotoSection(url)" :href="url" class="group">
<p
class="font-fancy -translate-y-0 transition-all duration-300 ease-in-out"
:class="`${i18n.global.locale == 'en' ? 'group-hover:translate-y-[-100%]' : 'group-hover:translate-y-[-120%]'} ${icon ? 'flex' : ''}`"
class="font-fancy -translate-y-0 transition-all duration-300 ease-in-out group-hover:translate-y-[-100%]"
:class="{ flex: icon }"
>
<svg
v-if="icon"
Expand All @@ -17,7 +16,6 @@
viewBox="0 0 24 24"
role="img"
class="-scale-x-100 fill-current"
:class="{ '!scale-x-100': i18n.global.locale == 'ar' }"
>
<path
d="M7.82834 17.2929L10.1213 19.586L8.70709 21.0001L4 16.2929L8.7071 11.5858L10.1213 13L7.82844 15.2929L18 15.2928L17.9999 3H19.9999L20 16.2928C20 16.8451 19.5523 17.2928 19 17.2928L7.82834 17.2929Z"
Expand All @@ -27,10 +25,7 @@
</p>
<p
class="font-fancy transition-all duration-300 ease-in-out group-hover:translate-y-[-100%]"
:class="{
'translate-y-[1ch]': i18n.global.locale == 'ar',
flex: icon,
}"
:class="{ flex: icon }"
>
<svg
v-if="icon"
Expand All @@ -40,7 +35,6 @@
viewBox="0 0 24 24"
role="img"
class="-scale-x-100 fill-current"
:class="{ '!scale-x-100': i18n.global.locale == 'ar' }"
>
<path
d="M7.82834 17.2929L10.1213 19.586L8.70709 21.0001L4 16.2929L8.7071 11.5858L10.1213 13L7.82844 15.2929L18 15.2928L17.9999 3H19.9999L20 16.2928C20 16.8451 19.5523 17.2928 19 17.2928L7.82834 17.2929Z"
Expand All @@ -53,7 +47,7 @@
</template>

<script setup lang="ts">
import { i18n, lenis } from '@/main';
import { lenis } from '@/main';
const gotoSection = (url: string) => {
lenis.start();
Expand Down
Loading

0 comments on commit 30df956

Please sign in to comment.