-
+
+
+
@@ -425,8 +514,25 @@ const Navbar = ({ toggleTheme, currentTheme }) => {
style={{ marginLeft: 8 }}
>
Open main menu
-
@@ -454,14 +560,19 @@ const Navbar = ({ toggleTheme, currentTheme }) => {
offset={-110}
onSetActive={() => setActiveSection(item.key)}
onClick={() => {
- setActiveSection(item.key);
- if (item.key === "home") scroll.scrollToTop({ duration: 600 });
+ setActiveSection(item.key);
+ if (item.key === "home")
+ scroll.scrollToTop({ duration: 600 });
setMenuOpen(false);
}}
- className={`block w-full text-right px-3 py-2 rounded-md font-semibold text-base ${isActive ? "text-amber-400" : "text-slate-200 hover:text-amber-400"}`}
+ className={`block w-full text-right px-3 py-2 rounded-md font-semibold text-base ${isActive ? "text-amber-400" : "text-[#313131] dark:text-slate-200 hover:text-amber-400"}`}
aria-current={isActive ? "page" : undefined}
>
-
{item.label}
+
+ {item.label}
+
);
@@ -475,4 +586,4 @@ const Navbar = ({ toggleTheme, currentTheme }) => {
);
};
-export default Navbar;
\ No newline at end of file
+export default Navbar;
diff --git a/src/Components/Sections/Home/Home.jsx b/src/Components/Sections/Home/Home.jsx
index dc7edd3..f2a37e8 100644
--- a/src/Components/Sections/Home/Home.jsx
+++ b/src/Components/Sections/Home/Home.jsx
@@ -14,11 +14,13 @@ export default function EngineeringHeroFlowbite() {
const { t, i18n } = useTranslation();
const defaultConfig = {
- main_title: "عندما تطلب الرؤية مستشارًا، ويحتاج المخطط منفذًا استراتيجيًا…\nنكون القرار بالقيادة من الرؤية حتى التسليم",
+ main_title:
+ "عندما تطلب الرؤية مستشارًا، ويحتاج المخطط منفذًا استراتيجيًا…\nنكون القرار بالقيادة من الرؤية حتى التسليم",
subtitle:
"حلول متكاملة تشمل التصميم، التنفيذ، التشغيل، والصيانة\nللمشاريع الصناعية والمدنية، وفق أحدث المعايير والتقنيات",
primary_color: "#e67e22",
- background_color: "#000000",
+ // background_color: "transparent",
+ background_color: "#7c2a2aff",
text_color: "#ffffff",
secondary_surface: "#95a5a6",
secondary_action: "#34495e",
@@ -91,10 +93,10 @@ export default function EngineeringHeroFlowbite() {
width <= 400
? baseSize * 0.78
: width <= 640
- ? baseSize * 0.88
- : width <= 1024
- ? baseSize * 0.96
- : baseSize;
+ ? baseSize * 0.88
+ : width <= 1024
+ ? baseSize * 0.96
+ : baseSize;
const headingMultiplier = width <= 640 ? 2.6 : 3.2;
const subtitleMultiplier = width <= 640 ? 0.95 : 1.1;
const mainText = (config.main_title || defaultConfig.main_title)
@@ -106,6 +108,7 @@ export default function EngineeringHeroFlowbite() {
const maxFont = 68;
const minFont = Math.max(Math.round(responsiveBase * 1.6), 14);
const root = document.documentElement;
+ const isDark = root.classList.contains("dark");
root.style.setProperty("--base", `${responsiveBase}px`);
if (main) {
@@ -126,12 +129,14 @@ export default function EngineeringHeroFlowbite() {
const computedSize = Math.min(
Math.max(
Math.round(responsiveBase * headingMultiplier * lengthFactor),
- minFont
+ minFont,
),
- maxFont
+ maxFont,
);
main.style.fontSize = `${computedSize}px`;
- main.style.color = config.text_color || defaultConfig.text_color;
+ main.style.color = isDark
+ ? config.text_color || defaultConfig.text_color
+ : config.light_text_color || defaultConfig.light_text_color;
main.style.fontWeight = 800;
main.style.textAlign = isArabic ? "right" : "left";
main.style.whiteSpace = "normal";
@@ -139,6 +144,7 @@ export default function EngineeringHeroFlowbite() {
main.style.overflowWrap = "anywhere";
main.style.direction = isArabic ? "rtl" : "ltr";
main.style.display = "block";
+ main.style.textShadow = isDark ? "0 4px 10px rgba(0,0,0,0.5)" : "none";
}
if (sub) {
@@ -149,7 +155,9 @@ export default function EngineeringHeroFlowbite() {
sub.style.fontFamily = font;
const subSize = Math.round(responsiveBase * subtitleMultiplier);
sub.style.fontSize = `${subSize}px`;
- sub.style.color = config.text_color || defaultConfig.text_color;
+ sub.style.color = isDark
+ ? config.text_color || defaultConfig.text_color
+ : config.light_text_color || defaultConfig.light_text_color;
sub.style.textAlign = isArabic ? "right" : "left";
sub.style.maxWidth = "800px";
sub.style.whiteSpace = "normal";
@@ -161,19 +169,19 @@ export default function EngineeringHeroFlowbite() {
root.style.setProperty(
"--ehb-primary",
- config.primary_color || defaultConfig.primary_color
+ config.primary_color || defaultConfig.primary_color,
);
root.style.setProperty(
"--ehb-background",
- config.background_color || defaultConfig.background_color
+ config.background_color || defaultConfig.background_color,
);
root.style.setProperty(
"--ehb-surface",
- config.secondary_surface || defaultConfig.secondary_surface
+ config.secondary_surface || defaultConfig.secondary_surface,
);
root.style.setProperty(
"--ehb-action",
- config.secondary_action || defaultConfig.secondary_action
+ config.secondary_action || defaultConfig.secondary_action,
);
};
@@ -230,7 +238,19 @@ export default function EngineeringHeroFlowbite() {
:root { --ehb-primary: #e67e22; --ehb-background: #000000; --ehb-surface: #95a5a6; --ehb-action: #34495e; --base: 16px }
.hero-section{position:relative;width:100%;height:100%;overflow:hidden}
- .hero-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(35deg, #57acd900 0%, rgb(151 162 179 / 0%) 50%, #47718b 100%);z-index:3}
+ .hero-overlay{
+ position:absolute;
+ top:0;
+ left:0;
+ width:100%;
+ height:100%;
+ z-index:3;
+ background: transparent;
+ transition: background 0.3s ease;
+ }
+ .dark .hero-overlay {
+ background: linear-gradient(35deg, transparent 0%, transparent 50%, rgba(71, 113, 139, 0.2) 100%);
+ }
.hero-layout{position:relative;z-index:10;height:100%;display:flex;align-items:center;justify-content:space-between;padding:clamp(12px,4vw,40px);gap:2rem;direction:ltr;flex-direction:row}
.hero-layout.layout-ltr{flex-direction:row-reverse}
.hero-left{flex:1;display:flex;align-items:center;justify-content:flex-start;padding:20px;position:relative;flex-direction:column}
diff --git a/src/index.css b/src/index.css
index c16eacc..1a4c950 100644
--- a/src/index.css
+++ b/src/index.css
@@ -1,40 +1,47 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
-@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&display=swap');
+@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&display=swap");
@layer base {
- :root {
- overflow-y: scroll !important;
- --primary: #041c40;
- --secondary: #e06923;
- --tertiary: #313131;
- --bg-color: #F5EEE6;
- --text-color: #313131;
- --border-color: #d1c9be;
- }
- .dark {
- overflow-y: scroll !important;
- --primary: #041c40;
- --secondary: #e06923;
- --tertiary: #313131;
- --bg-color: #313131;
- --text-color: #F5EEE6;
- --border-color: #4a4a4a;
- }
- body {
- overflow-y: scroll !important;
- margin: 0;
- padding: 0;
- min-height: 100vh;
- width: 100vw;
- overflow-x: hidden;
- font-family: 'Cairo', system-ui, -apple-system, sans-serif;
- color: var(--text-color);
- transition: background-color 0.3s ease, color 0.3s ease;
- }
- html {
- overflow-y: scroll !important;
- scroll-behavior: smooth;
- overflow-x: hidden;
- }
-}
\ No newline at end of file
+ :root {
+ overflow-y: scroll !important;
+ --primary: #041c40;
+ --secondary: #e06923;
+ --tertiary: #313131;
+ --bg-color: #e3e8ec;
+ --text-color: #313131;
+ --border-color: #d1c9be;
+ }
+ .dark {
+ overflow-y: scroll !important;
+ --primary: #041c40;
+ --secondary: #e06923;
+ --tertiary: #313131;
+ --bg-color: #313131;
+ --text-color: #f5eee6;
+ --border-color: #4a4a4a;
+ }
+ body {
+ overflow-y: scroll !important;
+ margin: 0;
+ padding: 0;
+ min-height: 100vh;
+ width: 100vw;
+ overflow-x: hidden;
+ font-family:
+ "Cairo",
+ system-ui,
+ -apple-system,
+ sans-serif;
+ color: var(--text-color);
+ background-color: var(--bg-color);
+ transition:
+ background-color 0.3s ease,
+ color 0.3s ease;
+ }
+ html {
+ overflow-y: scroll !important;
+ scroll-behavior: smooth;
+ overflow-x: hidden;
+ }
+}
diff --git a/src/main.jsx b/src/main.jsx
index 90b57c3..ec43adf 100644
--- a/src/main.jsx
+++ b/src/main.jsx
@@ -1,15 +1,15 @@
-import React from 'react';
-import ReactDOM from 'react-dom/client';
-import App from './App';
-import './index.css';
-import './App.css';
+import React from "react";
+import ReactDOM from "react-dom/client";
+import App from "./App";
+import "./index.css";
+import "./App.css";
-document.documentElement.style.setProperty('--bg-color', '#F5EEE6');
-document.documentElement.style.setProperty('--text-color', '#131313');
+document.documentElement.style.setProperty("--bg-color", "#F5EEE6");
+document.documentElement.style.setProperty("--text-color", "#131313");
-const root = ReactDOM.createRoot(document.getElementById('root'));
+const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
-
-);
\ No newline at end of file
+ ,
+);
diff --git a/tailwind.config.js b/tailwind.config.js
index ec3770f..4baca4d 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,25 +1,22 @@
module.exports = {
- darkMode: 'class',
- content: [
- "./index.html",
- "./src/**/*.{js,ts,jsx,tsx}",
- ],
- theme: {
- extend: {
- colors: {
- primary: '#041c40',
- secondary: '#e06923',
- 'dark-bg': '#313131',
- 'light-bg': '#F5EEE6',
- },
- backdropBlur: {
- 'xs': '2px',
- 'sm': '4px',
- 'md': '8px',
- 'lg': '12px',
- 'xl': '20px',
- },
- },
+ darkMode: "class",
+ content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
+ theme: {
+ extend: {
+ colors: {
+ primary: "#041c40",
+ secondary: "#e06923",
+ "dark-bg": "#313131",
+ "light-bg": "#E3E8EC",
+ },
+ backdropBlur: {
+ xs: "2px",
+ sm: "4px",
+ md: "8px",
+ lg: "12px",
+ xl: "20px",
+ },
},
- plugins: [],
-}
\ No newline at end of file
+ },
+ plugins: [],
+};