Harden mobile menu backgrounds with inline styles, wire real social links, drop contact helper text
Deploy Frontend / deploy (push) Successful in 1m6s
Deploy Frontend / deploy (push) Successful in 1m6s
This commit is contained in:
1 parent
06c776a604
commit
88703ae4ea
7 files changed
+55
-26
No files matched your search
@@ -164,10 +164,6 @@ export default function ContactForm({
|
||||
className="flex flex-col gap-5"
|
||||
aria-describedby={errorEntries.length > 0 ? errorSummaryId : undefined}
|
||||
>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
پیام شما بهصورت مستقیم ذخیره و در پنل مدیریت بررسی میشود.
|
||||
</p>
|
||||
|
||||
{errorEntries.length > 0 && (
|
||||
<div
|
||||
id={errorSummaryId}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Image from "next/image";
|
||||
import { getDictionary } from "@/app/lib/functions/dictionaries";
|
||||
import { getDefaultLocale } from "@/app/lib/functions/utils";
|
||||
import Link from "next/link";
|
||||
import { SOCIAL_LINKS } from "@/app/lib/social-links";
|
||||
|
||||
export default async function Footer() {
|
||||
const dict = await getDictionary(await getDefaultLocale());
|
||||
@@ -17,13 +18,6 @@ export default async function Footer() {
|
||||
{ href: "/blog", label: dict.website.footer.Blog },
|
||||
];
|
||||
|
||||
const socialLinks = [
|
||||
{ src: "/images/icons/facebook.svg", alt: "facebook" },
|
||||
{ src: "/images/icons/twitter.svg", alt: "twitter" },
|
||||
{ src: "/images/icons/instagram.svg", alt: "instagram" },
|
||||
{ src: "/images/icons/linkedin.svg", alt: "linkedin" },
|
||||
];
|
||||
|
||||
return (
|
||||
<footer className="w-full flex flex-col">
|
||||
<div className="flex flex-col items-center gap-12 bg-muted/50 py-16 px-6 transition-colors duration-300">
|
||||
@@ -50,10 +44,12 @@ export default async function Footer() {
|
||||
</nav>
|
||||
|
||||
<div className="flex items-center gap-5">
|
||||
{socialLinks.map((social, index) => (
|
||||
{SOCIAL_LINKS.map((social, index) => (
|
||||
<a
|
||||
key={index}
|
||||
href="#"
|
||||
href={social.href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="p-2 rounded-full glass-panel transition-all duration-300 hover:scale-110 hover:text-primary group dark-invert-img"
|
||||
>
|
||||
<Image
|
||||
|
||||
@@ -4,19 +4,13 @@ import Image from "next/image";
|
||||
import { motion } from "framer-motion";
|
||||
|
||||
import { Dictionary } from "@/app/types/types";
|
||||
import { SOCIAL_LINKS } from "@/app/lib/social-links";
|
||||
|
||||
interface HeroProps {
|
||||
dict: Dictionary;
|
||||
}
|
||||
|
||||
export default function Hero({ dict }: HeroProps) {
|
||||
const socialLinks = [
|
||||
{ href: "#", src: "/images/icons/facebook.svg", alt: "facebook" },
|
||||
{ href: "#", src: "/images/icons/twitter.svg", alt: "twitter" },
|
||||
{ href: "#", src: "/images/icons/instagram.svg", alt: "instagram" },
|
||||
{ href: "#", src: "/images/icons/linkedin.svg", alt: "linkedin" },
|
||||
];
|
||||
|
||||
return (
|
||||
<section
|
||||
id="home"
|
||||
@@ -47,7 +41,7 @@ export default function Hero({ dict }: HeroProps) {
|
||||
|
||||
{/* Socials */}
|
||||
<div className="mt-8 flex items-center gap-6">
|
||||
{socialLinks.map(({ href, src, alt }, index) => (
|
||||
{SOCIAL_LINKS.map(({ href, src, alt }, index) => (
|
||||
<motion.a
|
||||
key={alt}
|
||||
href={href}
|
||||
|
||||
@@ -40,11 +40,13 @@ export default function MobileMenu({ clicked, setClicked, dict }: propsType) {
|
||||
return (
|
||||
<div className="flex">
|
||||
<div
|
||||
className={`${clicked ? "fixed end-0" : "end-[-1000px] hidden"} top-0 z-[60] flex h-full w-full bg-slate-950/80 backdrop-blur-sm lg:hidden`}
|
||||
className={`${clicked ? "fixed end-0" : "end-[-1000px] hidden"} top-0 z-[60] flex h-full w-full lg:hidden`}
|
||||
style={{ backgroundColor: "rgba(2, 6, 23, 0.85)", backdropFilter: "blur(4px)", zIndex: 60 }}
|
||||
onClick={closeMenu}
|
||||
></div>
|
||||
<div
|
||||
className={`fixed start-0 top-0 z-[70] flex h-full w-[250px] select-none flex-col items-start bg-[#fd6f00] ${clicked ? "start-0" : "start-[-260px]"} mobile-menu lg:start-[-260px]`}
|
||||
className={`fixed start-0 top-0 z-[70] flex h-full w-[250px] select-none flex-col items-start ${clicked ? "start-0" : "start-[-260px]"} mobile-menu lg:start-[-260px]`}
|
||||
style={{ backgroundColor: "#fd6f00", zIndex: 70 }}
|
||||
>
|
||||
<div className="z-50 flex w-full flex-wrap items-center justify-start bg-white px-3 py-6">
|
||||
<div className="flex w-[50px]">
|
||||
|
||||
@@ -25,11 +25,13 @@ export default function MobileMenu({ clicked, setClicked }: propsType) {
|
||||
return (
|
||||
<div className="flex">
|
||||
<div
|
||||
className={`${clicked ? "fixed end-0" : "end-[-1000px] hidden"} top-0 z-[60] flex h-full w-full bg-slate-950/80 backdrop-blur-sm lg:hidden`}
|
||||
className={`${clicked ? "fixed end-0" : "end-[-1000px] hidden"} top-0 z-[60] flex h-full w-full lg:hidden`}
|
||||
style={{ backgroundColor: "rgba(2, 6, 23, 0.85)", backdropFilter: "blur(4px)", zIndex: 60 }}
|
||||
onClick={() => setClicked(false)}
|
||||
></div>
|
||||
<div
|
||||
className={`fixed start-0 top-0 z-[70] flex h-full w-[250px] select-none flex-col items-start gap-10 bg-blog-purple ${clicked ? "start-0" : "start-[-260px]"} mobile-menu lg:start-[-260px]`}
|
||||
className={`fixed start-0 top-0 z-[70] flex h-full w-[250px] select-none flex-col items-start gap-10 ${clicked ? "start-0" : "start-[-260px]"} mobile-menu lg:start-[-260px]`}
|
||||
style={{ backgroundColor: "rgb(146, 131, 224)", zIndex: 70 }}
|
||||
>
|
||||
<div className="z-50 flex w-full flex-wrap items-center justify-start bg-blog-purple px-3 py-10">
|
||||
<div className="relative h-[30px] w-[150px] lg:h-[45px] lg:w-[225px]">
|
||||
|
||||
@@ -11,6 +11,7 @@ import Link from "next/link";
|
||||
import { redirect } from "next/navigation";
|
||||
import { renderBody } from "./body";
|
||||
import { getCoverImageSrc } from "./coverImage";
|
||||
import { AUTHOR_PROFILE_URL } from "@/app/lib/social-links";
|
||||
|
||||
async function fetchPostData(postSlug: string): Promise<PostSlugPagePostType> {
|
||||
const res = await fetch(
|
||||
@@ -222,7 +223,9 @@ export default async function SinglePost(props: PostSlugPagepropsType) {
|
||||
<p className="text-[16px] font-[400] capitalize text-blog-text-default">
|
||||
{dict.blog.postSinglePage.followMe}
|
||||
<Link
|
||||
href="/"
|
||||
href={AUTHOR_PROFILE_URL}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="ms-1 text-[16px] font-[400] lowercase text-blog-blue"
|
||||
>
|
||||
@parsaaghayi
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
export type SocialLink = {
|
||||
href: string;
|
||||
src: string;
|
||||
alt: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Every network belongs to the same person, so the handle is identical across
|
||||
* platforms. Keep the list here so the hero and the footer can never drift out
|
||||
* of sync.
|
||||
*/
|
||||
export const SOCIAL_LINKS: SocialLink[] = [
|
||||
{
|
||||
href: "https://www.facebook.com/parsaaghayi",
|
||||
src: "/images/icons/facebook.svg",
|
||||
alt: "facebook",
|
||||
},
|
||||
{
|
||||
href: "https://x.com/parsaaghayi",
|
||||
src: "/images/icons/twitter.svg",
|
||||
alt: "twitter",
|
||||
},
|
||||
{
|
||||
href: "https://www.instagram.com/parsaaghayi",
|
||||
src: "/images/icons/instagram.svg",
|
||||
alt: "instagram",
|
||||
},
|
||||
{
|
||||
href: "https://www.linkedin.com/in/parsaaghayi",
|
||||
src: "/images/icons/linkedin.svg",
|
||||
alt: "linkedin",
|
||||
},
|
||||
];
|
||||
|
||||
/** The single best place to follow the author from the blog. */
|
||||
export const AUTHOR_PROFILE_URL = "https://github.com/parsaaghayi";
|
||||
Reference in new issue
Block a user