mirror of
https://github.com/MvDevsUnion/WPetition.git
synced 2026-02-28 04:50:35 +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 { PetitionPage } from "@/pages/PetitionPage";
|
||||
import { CreatePetitionPage } from "@/pages/CreatePetitionPage";
|
||||
import { Layout } from "@/components/layout/Layout";
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path="/" element={<HomePage />} />
|
||||
<Route path="/Petition/:slug" element={<PetitionPage />} />
|
||||
<Route path="/CreatePetition" element={<CreatePetitionPage />} />
|
||||
</Routes>
|
||||
<Layout>
|
||||
<Routes>
|
||||
<Route path="/" element={<HomePage />} />
|
||||
<Route path="/Petition/:slug" element={<PetitionPage />} />
|
||||
<Route path="/CreatePetition" element={<CreatePetitionPage />} />
|
||||
</Routes>
|
||||
</Layout>
|
||||
</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
|
||||
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 ? (
|
||||
<>
|
||||
|
||||
@@ -126,10 +126,16 @@
|
||||
/* Dhivehi text styles - using Faruma as primary font */
|
||||
.dhivehi {
|
||||
font-family: "Faruma", "Waheed", sans-serif;
|
||||
font-size: 1.15em;
|
||||
direction: rtl;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Ensure Dhivehi font applies to all child elements (for markdown content) */
|
||||
.dhivehi * {
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
/* RTL document support */
|
||||
html[dir="rtl"] {
|
||||
direction: rtl;
|
||||
|
||||
@@ -418,10 +418,6 @@ export function CreatePetitionPage() {
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<footer className="text-center text-slate-500 text-sm mt-6 pb-4">
|
||||
Powered by Mv Devs Union
|
||||
</footer>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -105,10 +105,6 @@ export function HomePage() {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<footer className="text-center text-slate-500 text-sm py-8">
|
||||
Powered by Mv Devs Union
|
||||
</footer>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -53,9 +53,6 @@ export function PetitionPage() {
|
||||
<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." />
|
||||
</div>
|
||||
<footer className="text-center text-slate-500 text-sm mt-6 pb-4">
|
||||
Powered by Mv Devs Union
|
||||
</footer>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -114,10 +111,6 @@ export function PetitionPage() {
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<footer className="text-center text-slate-500 text-sm mt-6 pb-4">
|
||||
Powered by Mv Devs Union
|
||||
</footer>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user