From 5881b7798bcac0a8f73c6780723c17ed75f05c28 Mon Sep 17 00:00:00 2001
From: Emil Gulamov <125820963+mearashadowfax@users.noreply.github.com>
Date: Thu, 15 Feb 2024 00:17:43 +0400
Subject: [PATCH] Refactor codebase
All changes aim to clean up the codebase and eliminate unused or unnecessary code.
---
src/components/ContactSection.astro | 12 ++---
src/components/ui/blocks/AccordionItem.astro | 13 ++++-
.../ui/blocks/ContactIconBlock.astro | 48 +++++++++---------
src/components/ui/blocks/IconBlock.astro | 9 ++--
src/components/ui/blocks/LeftSection.astro | 6 +--
src/components/ui/blocks/MainSection.astro | 6 +--
src/components/ui/blocks/RightSection.astro | 6 +--
src/components/ui/blocks/TabContent.astro | 8 ++-
src/components/ui/blocks/TabNav.astro | 3 +-
src/components/ui/buttons/AuthBtn.astro | 16 ++++--
src/components/ui/buttons/GithubBtn.astro | 26 ++++++----
src/components/ui/buttons/GoogleBtn.astro | 21 +++++---
src/components/ui/buttons/LoginBtn.astro | 43 +++++++++-------
src/components/ui/buttons/PrimaryCTA.astro | 49 ++++++++++++-------
src/components/ui/buttons/SecondaryCTA.astro | 22 ++++++---
src/components/ui/forms/LoginModal.astro | 36 ++++++--------
src/components/ui/forms/RecoverModal.astro | 35 ++++++-------
src/components/ui/forms/RegisterModal.astro | 36 +++++++-------
.../ui/links/FooterSocialLink.astro | 13 +++--
src/components/ui/links/NavLink.astro | 1 +
src/pages/services.astro | 6 +--
21 files changed, 238 insertions(+), 177 deletions(-)
diff --git a/src/components/ContactSection.astro b/src/components/ContactSection.astro
index 3662a87..4fa192c 100644
--- a/src/components/ContactSection.astro
+++ b/src/components/ContactSection.astro
@@ -85,10 +85,10 @@ const formSubTitle: string = "We'll get back to you in 1-2 business days.";
{
- btn ? (
+ btnExists ? (
diff --git a/src/components/ui/blocks/RightSection.astro b/src/components/ui/blocks/RightSection.astro
index 0a957fa..db6a8e1 100644
--- a/src/components/ui/blocks/RightSection.astro
+++ b/src/components/ui/blocks/RightSection.astro
@@ -5,7 +5,7 @@ import PrimaryCTA from "../buttons/PrimaryCTA.astro";
const {
title,
subTitle,
- btn,
+ btnExists,
btnTitle,
btnURL,
single,
@@ -18,7 +18,7 @@ const {
interface Props {
title: string;
subTitle: string;
- btn?: boolean;
+ btnExists?: boolean;
btnTitle?: string;
btnURL?: string;
single?: boolean;
@@ -43,7 +43,7 @@ interface Props {
>
{subTitle}
- {btn ? : null}
+ {btnExists ? : null}
{
single ? (
diff --git a/src/components/ui/blocks/TabContent.astro b/src/components/ui/blocks/TabContent.astro
index 4c285a3..5a60382 100644
--- a/src/components/ui/blocks/TabContent.astro
+++ b/src/components/ui/blocks/TabContent.astro
@@ -12,6 +12,10 @@ interface Props {
second?: boolean;
}
+const firstClass = first ? "" : "hidden";
+const secondClass = second ? "shadow-xl aspect-[5/4] bg-neutral-300 dark:bg-neutral-600 object-cover p-3 lg:aspect-auto shadow-neutral-200 rounded-xl dark:shadow-neutral-900/[.2]" :
+ "shadow-xl aspect-[3/2] object-cover lg:aspect-auto shadow-neutral-200 rounded-xl dark:shadow-neutral-900/[.2]";
+
/*
first: This prop should be set to true for the initial TabContent component in your list to ensure that it's visible when the page first loads. All subsequent TabContent components should omit this prop or set it to false.
@@ -27,13 +31,13 @@ Example:
diff --git a/src/components/ui/blocks/TabNav.astro b/src/components/ui/blocks/TabNav.astro
index a1d8906..c1f49e6 100644
--- a/src/components/ui/blocks/TabNav.astro
+++ b/src/components/ui/blocks/TabNav.astro
@@ -9,6 +9,7 @@ interface Props {
content?: string;
first?: boolean;
}
+const BUTTON_CLASS = "dark:hover:bg-neutral-700 rounded-xl p-4 text-start outline-none ring-zinc-500 transition duration-300 hover:bg-neutral-200 focus-visible:ring hs-tab-active:bg-neutral-50 hs-tab-active:shadow-md hs-tab-active:hover:border-transparent dark:ring-zinc-200 dark:focus:outline-none dark:hs-tab-active:bg-neutral-700/60 md:p-5"
/*
first: This prop should be set to true for the initial TabNav component in your list to ensure that it's visible when the page first loads. All subsequent TabNav components should omit this prop or set it to false.
@@ -22,7 +23,7 @@ Example:
+ type="submit"
+ class={`${baseClasses} ${borderClasses} ${bgColorClasses} ${hoverClasses} ${fontSizeClasses} ${disabledClasses} ${ringClasses}`}
+>{title}
\ No newline at end of file
diff --git a/src/components/ui/buttons/GithubBtn.astro b/src/components/ui/buttons/GithubBtn.astro
index f0498ae..cc87cdb 100644
--- a/src/components/ui/buttons/GithubBtn.astro
+++ b/src/components/ui/buttons/GithubBtn.astro
@@ -5,15 +5,14 @@ interface Props {
title?: string;
url?: string;
}
----
-
-
-
+ `;
+---
+
+
+
{title}
diff --git a/src/components/ui/buttons/GoogleBtn.astro b/src/components/ui/buttons/GoogleBtn.astro
index de18994..9178338 100644
--- a/src/components/ui/buttons/GoogleBtn.astro
+++ b/src/components/ui/buttons/GoogleBtn.astro
@@ -4,13 +4,13 @@ const { title } = Astro.props;
interface Props {
title: string;
}
----
-