mirror of
https://github.com/MvDevsUnion/WPetition.git
synced 2026-04-29 11:35:19 +00:00
ui changes
added privacy policy made dhiv text easier to read
This commit is contained in:
@@ -2,15 +2,18 @@ import { BrowserRouter, Routes, Route } from "react-router-dom";
|
|||||||
import { HomePage } from "@/pages/HomePage";
|
import { HomePage } from "@/pages/HomePage";
|
||||||
import { PetitionPage } from "@/pages/PetitionPage";
|
import { PetitionPage } from "@/pages/PetitionPage";
|
||||||
import { CreatePetitionPage } from "@/pages/CreatePetitionPage";
|
import { CreatePetitionPage } from "@/pages/CreatePetitionPage";
|
||||||
|
import { Layout } from "@/components/layout/Layout";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
return (
|
return (
|
||||||
<BrowserRouter>
|
<BrowserRouter>
|
||||||
|
<Layout>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/" element={<HomePage />} />
|
<Route path="/" element={<HomePage />} />
|
||||||
<Route path="/Petition/:slug" element={<PetitionPage />} />
|
<Route path="/Petition/:slug" element={<PetitionPage />} />
|
||||||
<Route path="/CreatePetition" element={<CreatePetitionPage />} />
|
<Route path="/CreatePetition" element={<CreatePetitionPage />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
|
</Layout>
|
||||||
</BrowserRouter>
|
</BrowserRouter>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
19
frontend-react/src/components/layout/Footer.tsx
Normal file
19
frontend-react/src/components/layout/Footer.tsx
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
export function Footer() {
|
||||||
|
return (
|
||||||
|
<footer className="mt-auto py-6 border-t border-slate-200">
|
||||||
|
<div className="container mx-auto px-4">
|
||||||
|
<div className="flex flex-col items-center gap-2 text-sm text-slate-500">
|
||||||
|
<span>Powered by Mv Devs Union</span>
|
||||||
|
<a
|
||||||
|
href="https://github.com/MvDevsUnion/WPetition/blob/master/privacy_policy.md"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="hover:text-slate-700 transition-colors"
|
||||||
|
>
|
||||||
|
Privacy Policy
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
);
|
||||||
|
}
|
||||||
14
frontend-react/src/components/layout/Layout.tsx
Normal file
14
frontend-react/src/components/layout/Layout.tsx
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { Footer } from "./Footer";
|
||||||
|
|
||||||
|
interface LayoutProps {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Layout({ children }: LayoutProps) {
|
||||||
|
return (
|
||||||
|
<div className="min-h-screen flex flex-col">
|
||||||
|
<main className="flex-1">{children}</main>
|
||||||
|
<Footer />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -54,7 +54,7 @@ export function PetitionBody({
|
|||||||
|
|
||||||
<button
|
<button
|
||||||
onClick={() => setIsExpanded(!isExpanded)}
|
onClick={() => setIsExpanded(!isExpanded)}
|
||||||
className={`mt-4 flex items-center gap-2 text-blue-600 hover:text-blue-700 font-medium transition-colors ${isRtl ? "flex-row-reverse" : ""}`}
|
className={`mt-4 flex items-center gap-2 text-blue-600 hover:text-blue-700 font-medium transition-colors ${isRtl ? "flex-row-reverse dhivehi" : ""}`}
|
||||||
>
|
>
|
||||||
{isExpanded ? (
|
{isExpanded ? (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -126,10 +126,16 @@
|
|||||||
/* Dhivehi text styles - using Faruma as primary font */
|
/* Dhivehi text styles - using Faruma as primary font */
|
||||||
.dhivehi {
|
.dhivehi {
|
||||||
font-family: "Faruma", "Waheed", sans-serif;
|
font-family: "Faruma", "Waheed", sans-serif;
|
||||||
|
font-size: 1.15em;
|
||||||
direction: rtl;
|
direction: rtl;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Ensure Dhivehi font applies to all child elements (for markdown content) */
|
||||||
|
.dhivehi * {
|
||||||
|
font-family: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
/* RTL document support */
|
/* RTL document support */
|
||||||
html[dir="rtl"] {
|
html[dir="rtl"] {
|
||||||
direction: rtl;
|
direction: rtl;
|
||||||
|
|||||||
@@ -418,10 +418,6 @@ export function CreatePetitionPage() {
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer className="text-center text-slate-500 text-sm mt-6 pb-4">
|
|
||||||
Powered by Mv Devs Union
|
|
||||||
</footer>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,10 +105,6 @@ export function HomePage() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer className="text-center text-slate-500 text-sm py-8">
|
|
||||||
Powered by Mv Devs Union
|
|
||||||
</footer>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,9 +53,6 @@ export function PetitionPage() {
|
|||||||
<div className="max-w-4xl mx-auto bg-card rounded-lg shadow-lg p-10">
|
<div className="max-w-4xl mx-auto bg-card rounded-lg shadow-lg p-10">
|
||||||
<ErrorState message="No petition found. Please use a valid petition URL." />
|
<ErrorState message="No petition found. Please use a valid petition URL." />
|
||||||
</div>
|
</div>
|
||||||
<footer className="text-center text-slate-500 text-sm mt-6 pb-4">
|
|
||||||
Powered by Mv Devs Union
|
|
||||||
</footer>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -114,10 +111,6 @@ export function PetitionPage() {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer className="text-center text-slate-500 text-sm mt-6 pb-4">
|
|
||||||
Powered by Mv Devs Union
|
|
||||||
</footer>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user