Skip to content

Commit

Permalink
Merge pull request #7 from max1mde/legal_pages
Browse files Browse the repository at this point in the history
feat: privacy policy & impressum
  • Loading branch information
max1mde authored Dec 10, 2024
2 parents bcfd68b + f749ea7 commit 36ee0c9
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 1 deletion.
67 changes: 66 additions & 1 deletion CONFIG.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@
"route":"/contact",
"email":"[email protected]",
"direct_contact":"Reach Me Directly",
"legal":{
"enabled":true,
"name":"Maxim",
"address":"Vaitape - Bora Bora",
"email":"[email protected]",
"phone":"911",
"tax_id":"Not Applicable",
"legal_disclaimer":"This is a personal portfolio website for informational purposes."
},
"social_links":[
{
"name":"GitHub",
Expand All @@ -120,7 +129,7 @@
],
"contact_form":{
"enabled":true,
"send_button": "Send Message",
"send_button":"Send Message",
"success_message":"Message sent successfully!",
"failure_message":"Failed to send message. Please try again.",
"error_message":"An error occurred. Please try again.",
Expand All @@ -145,6 +154,62 @@
}
]
}
},
"privacy":{
"enabled":true,
"header":"Privacy Policy",
"route":"/privacy",
"content":{
"contact_title": "Contact",
"contact": "[email protected]",
"introduction":"This portfolio website is designed with minimal data collection and maximum user privacy in mind.",
"sections":[
{
"title":"Information Collection",
"description":"We collect the following types of information:",
"details":[
"Name, email, and message content submitted through the contact form",
"IP address for rate limiting and security purposes",
"Potential tracking of client-side interactions for website functionality"
]
},
{
"title":"Data Processing and Storage",
"description":"Data collection and processing details:",
"details":[
"Contact form submissions are processed in-memory and not permanently stored",
"IP addresses are temporarily tracked for rate limiting (maximum 30 minutes)",
"No persistent user data is saved or stored long-term"
]
},
{
"title":"Third-Party Services",
"description":"Potential data collection by third-party services:",
"details":[
"Image hosting services (e.g., shields.io) may collect IP address during image requests",
"Standard browser and server logs may capture additional metadata"
]
},
{
"title":"Data Protection",
"description":"We implement the following protection measures:",
"details":[
"Rate limiting to prevent abuse of contact form",
"Validation of submitted form data",
"No storage of sensitive personal information"
]
},
{
"title":"User Rights",
"description":"Users have the right to:",
"details":[
"Request information about data collection",
"Request deletion of any potential stored information",
"Opt-out of non-essential data collection"
]
}
]
}
}
},
"card":{
Expand Down
41 changes: 41 additions & 0 deletions src/app/contact/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import {
FaSpotify,
FaXbox,
FaFacebook,
FaMapMarkerAlt,
FaPhone,
} from "react-icons/fa";

const SocialIcon = ({ name }) => {
Expand Down Expand Up @@ -180,6 +182,45 @@ export default function Contact() {
</div>
)}

{config.pages.contact.legal.enabled && (
<div className="mt-12 bg-black/50 rounded-lg p-6">
<h2 className="text-2xl font-semibold mb-4 text-center">
Legal Disclosure
</h2>
<div className="space-y-2 text-center">
{config.pages.contact.legal.name && (
<p className="flex items-center justify-center gap-2">
<FaMapMarkerAlt className="inline-block" />
{config.pages.contact.legal.name}
</p>
)}
{config.pages.contact.legal.address && (
<p className="flex items-center justify-center gap-2">
<FaMapMarkerAlt className="inline-block" />
{config.pages.contact.legal.address}
</p>
)}
{config.pages.contact.legal.email && (
<p className="flex items-center justify-center gap-2">
<FaEnvelope className="inline-block" />
{config.pages.contact.legal.email}
</p>
)}
{config.pages.contact.legal.phone && (
<p className="flex items-center justify-center gap-2">
<FaPhone className="inline-block" />
{config.pages.contact.legal.phone}
</p>
)}
{config.pages.contact.legal.legal_disclaimer && (
<p className="text-sm text-gray-400 mt-4">
{config.pages.contact.legal.legal_disclaimer}
</p>
)}
</div>
</div>
)}

<div className="mt-12 text-center">
<h2 className="text-2xl font-semibold mb-4">
{config.pages.contact.direct_contact}
Expand Down
40 changes: 40 additions & 0 deletions src/app/privacy/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
"use client";

import config from "/CONFIG.json";

export default function Privacy() {
const privacy = config.pages.privacy;

return (
<div className="container mx-auto px-4 py-8 max-w-2xl">
<h1 className="c-cursor-text text-3xl font-bold text-center mb-10">
{privacy.header}
</h1>

<div className="bg-black/50 shadow-md rounded-lg p-8 space-y-6">
<p className="mb-6">{privacy.content.introduction}</p>

{privacy.content.sections.map((section, index) => (
<div key={index} className="mb-6">
<h2 className="text-2xl font-semibold mb-4">{section.title}</h2>
<p>{section.description}</p>
{section.details && (
<ul className="list-disc list-inside text-gray-400 space-y-2">
{section.details.map((detail, detailIndex) => (
<li key={detailIndex}>{detail}</li>
))}
</ul>
)}
</div>
))}

<div className="mt-8 pt-4 border-t border-gray-700">
<h3 className="text-xl font-semibold mb-4">
{privacy.content.contact_title}
</h3>
<p>{privacy.content.contact}</p>
</div>
</div>
</div>
);
}

0 comments on commit 36ee0c9

Please sign in to comment.