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

feat(home): No harvesting section refactoring #59

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: shield animation + format of the section
Tomi-Tom committed Jul 4, 2024
commit 04b19e6f7e0f46cd21a105ad1e0dd5df729ea478
77 changes: 0 additions & 77 deletions src/pages/Home/DataSecuritySection.vue

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/Home/RedefiningAIBoundariesSection.vue
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ const cards = [
src="../../assets/videos/HomeAiBoundaries.mp4"
/>
<div class="z-20 flex w-full items-center justify-center bg-gradient-to-b from-majorelle-100">
<div class="flex max-w-[1440px] flex-col justify-center pb-44 pl-16 pt-60 max-lg:px-0 max-lg:py-56">
<div class="flex max-w-[1440px] flex-col justify-center pb-44 pt-60 max-lg:px-0 max-lg:py-56">
<div class="flex flex-col items-center justify-center gap-6 px-64 pb-16 text-center max-lg:px-8">
<LTinyHeading>Decentralized from the ground up</LTinyHeading>
<h2 class="text-primary max-lg:hidden">Redefining AI Boundaries</h2>
71 changes: 71 additions & 0 deletions src/pages/Home/YouAreInControlOfYourDataSection.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<script lang="ts" setup>
import { ref, onMounted, onUnmounted } from "vue";
import LTinyHeading from "../../components/LTinyHeading.vue";

const shieldRef = ref(null);

const handleMouseMove = (event) => {

Check failure on line 7 in src/pages/Home/YouAreInControlOfYourDataSection.vue

GitHub Actions / Build

Parameter 'event' implicitly has an 'any' type.
const shield = shieldRef.value;
if (!shield) return;

const rect = shield.getBoundingClientRect();

Check failure on line 11 in src/pages/Home/YouAreInControlOfYourDataSection.vue

GitHub Actions / Build

Property 'getBoundingClientRect' does not exist on type 'never'.
const x = event.clientX - rect.left;
const y = event.clientY - rect.top;
const centerX = rect.width / 2;
const centerY = rect.height / 2;

const rotateX = ((centerY - y) / centerY) * 30; // Inverse the direction
const rotateY = ((x - centerX) / centerX) * 30; // Inverse the direction

shield.style.transform = `rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;

Check failure on line 20 in src/pages/Home/YouAreInControlOfYourDataSection.vue

GitHub Actions / Build

Property 'style' does not exist on type 'never'.
};

const handleMouseLeave = () => {
const shield = shieldRef.value;
if (!shield) return;
shield.style.transform = "rotateX(0) rotateY(0)";

Check failure on line 26 in src/pages/Home/YouAreInControlOfYourDataSection.vue

GitHub Actions / Build

Property 'style' does not exist on type 'never'.
};

onMounted(() => {
const shieldContainer = shieldRef.value?.parentElement;

Check failure on line 30 in src/pages/Home/YouAreInControlOfYourDataSection.vue

GitHub Actions / Build

Property 'parentElement' does not exist on type 'never'.
if (shieldContainer) {
shieldContainer.addEventListener("mousemove", handleMouseMove);
shieldContainer.addEventListener("mouseleave", handleMouseLeave);
}
});

onUnmounted(() => {
const shieldContainer = shieldRef.value?.parentElement;

Check failure on line 38 in src/pages/Home/YouAreInControlOfYourDataSection.vue

GitHub Actions / Build

Property 'parentElement' does not exist on type 'never'.
if (shieldContainer) {
shieldContainer.removeEventListener("mousemove", handleMouseMove);
shieldContainer.removeEventListener("mouseleave", handleMouseLeave);
}
});
</script>

<template>
<section class="flex justify-center">
<div class="w-[1440px] justify-center px-24 pb-16 pt-52 text-center max-lg:px-6 max-lg:pb-72">
<div class="flex flex-col gap-y-6 px-40">
<LTinyHeading>No Harvesting</LTinyHeading>
<h2 class="block text-primary">You are in Control of Your Data</h2>
<p class="body-small px-6">
Enjoy the peace of mind that comes with LibertAI's robust security measures. Advanced encryption protocols,
distributed data storage, and rigorous access controls ensure that your data remains safeguarded against
unauthorized access, surveillance, or exploitation.
</p>
<div class="relative mx-auto mt-8 flex items-center justify-center rounded-3xl md:h-[400px] md:w-[400px]">
<img alt="container" class="rounded-3xl" src="../../assets/home/shield_container.png" />
<img ref="shieldRef" alt="shield" class="shield-image absolute inset-0" src="../../assets/home/shield.png" />
</div>
</div>
</div>
</section>
</template>

<style scoped>
.shield-image {
transition: transform 0.1s;
transform-style: preserve-3d;
}
</style>
4 changes: 2 additions & 2 deletions src/pages/Home/index.vue
Original file line number Diff line number Diff line change
@@ -3,10 +3,10 @@ import Hero from "./HeroSection.vue";
import PartnersSection from "./PartnersSection.vue";
import FooterSection from "./FooterSection.vue";
import ChatPreviewSection from "./ChatPreviewSection.vue";
import DataSecuritySection from "./DataSecuritySection.vue";
import DataSecuritySection from "./YouAreInControlOfYourDataSection.vue";
import OpenSourceModelsSection from "./OpenSourceModelsSection.vue";
import AIBoundariesSection from "./RedefiningAIBoundariesSection.vue";
import AddToTelegramSection from "./NotYourAverageAIAssistant.vue";
import AddToTelegramSection from "./NotYourAverageAIAssistantSection.vue";
import AICustomizationSection from "./AICustomizationSection.vue";
import TheresMoreSection from "./TheresMoreSection.vue";
import FeedbacksSection from "./FeedbacksSection.vue";
You are viewing a condensed version of this merge commit. You can view the full changes here.