Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/Roadmap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const techCategories: TechCategory[] = [
id: 1,
title: "Frontend",
technologies: [
{ id: 1, name: "HTML", link: "/roadmap/html" },
{ id: 1, name: "HTML", link: "/roadmap/html/" },
{ id: 2, name: "CSS", link: "#" },
{ id: 3, name: "JavaScript", link: "#" },
{ id: 4, name: "React", link: "https://roadmap.sh/react" },
Expand Down Expand Up @@ -320,7 +320,7 @@ const Roadmap: React.FC = () => {
{category.technologies.map((tech) => (
<li key={tech.id} className="roadmap-card">
<a href={tech.link} onClick= {(e) => {
e.preventDefault();
e.preventDefault();
handleButtonClick(tech.link); }}
className="roadmap-link">
{tech.name}
Expand Down
112 changes: 28 additions & 84 deletions src/pages/code-of-conduct/index.tsx
Original file line number Diff line number Diff line change
@@ -1,130 +1,76 @@
import React from 'react';
import Layout from '@theme/Layout';
import styled from 'styled-components';
import Link from "@docusaurus/Link";

// Styled Components
const CodeOfConductContainer = styled.div`
width: 50%;
display: block;
margin: auto;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
font-size: 16px;
line-height: 1.6;
font-family: 'Open Sans', sans-serif;
text-align: justify;

@media (max-width: 760px) {
width: 80%;
}
`;

const Title = styled.h2`
margin-bottom: 20px;
font-weight: 700;
text-align: center;
`;

const SubTitle = styled.h3`
margin-bottom: 20px;
font-weight: 700;
`;

const StyledUl = styled.ul`
margin-bottom: 20px;
`;

const StyledLi = styled.li`
margin-bottom: 20px;
`;

const StyledOl = styled.ol`
margin-bottom: 20px;
`;

const Content = styled.div`
margin-bottom: 20px;
`;

// Reusable Components
const Section = ({ title, children }) => (
<section>
<SubTitle>{title}</SubTitle>
<h3 className="text-xl font-semibold mb-4">{title}</h3>
{children}
</section>
);

// Reusable Components
const ListItem = ({ title, description }) => (
<StyledLi>
<li className="mb-4">
<strong>{title}</strong>
<p>{description}</p>
</StyledLi>
</li>
);

// Separate Sections as Components
const LastUpdated = () => (
<p><strong>Last Updated:</strong> 23rd May 2024</p>
);

// Separate Sections as Components
const OurPledge = () => (
<Section title="Our Pledge">
<p>We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.</p>
<p>We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.</p>
</Section>
);

// Separate Sections as Components
const OurStandards = () => (
<Section title="Our Standards">
<p>Examples of behavior that contributes to a positive environment for our community include:</p>
<StyledUl>
<StyledLi>Demonstrating empathy and kindness toward other people</StyledLi>
<StyledLi>Being respectful of differing opinions, viewpoints, and experiences</StyledLi>
<StyledLi>Giving and gracefully accepting constructive feedback</StyledLi>
<StyledLi>Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience</StyledLi>
<StyledLi>Focusing on what is best not just for us as individuals, but for the overall community</StyledLi>
</StyledUl>
<ul className="list-disc list-inside mb-4">
<li>Demonstrating empathy and kindness toward other people</li>
<li>Being respectful of differing opinions, viewpoints, and experiences</li>
<li>Giving and gracefully accepting constructive feedback</li>
<li>Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience</li>
<li>Focusing on what is best not just for us as individuals, but for the overall community</li>
</ul>
<p>Examples of unacceptable behavior include:</p>
<StyledUl>
<StyledLi>The use of sexualized language or imagery, and sexual attention or advances of any kind</StyledLi>
<StyledLi>Trolling, insulting or derogatory comments, and personal or political attacks</StyledLi>
<StyledLi>Public or private harassment</StyledLi>
<StyledLi>Publishing others&apos; private information, such as a physical or email address, without their explicit permission</StyledLi>
<StyledLi>Other conduct which could reasonably be considered inappropriate in a professional setting</StyledLi>
</StyledUl>
<ul className="list-disc list-inside mb-4">
<li>The use of sexualized language or imagery, and sexual attention or advances of any kind</li>
<li>Trolling, insulting or derogatory comments, and personal or political attacks</li>
<li>Public or private harassment</li>
<li>Publishing others' private information, such as a physical or email address, without their explicit permission</li>
<li>Other conduct which could reasonably be considered inappropriate in a professional setting</li>
</ul>
</Section>
);

// Separate Sections as Components
const EnforcementResponsibilities = () => (
<Section title="Enforcement Responsibilities">
<p>Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.</p>
<p>Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.</p>
</Section>
);

// Separate Sections as Components
const Scope = () => (
<Section title="Scope">
<p>This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.</p>
</Section>
);

// Separate Sections as Components
const Enforcement = () => (
<Section title="Enforcement">
<p>Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at Email. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident.</p>
</Section>
);

// Separate Sections as Components
const EnforcementGuidelines = () => (
<Section title="Enforcement Guidelines">
<p>Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:</p>
<StyledOl>
<ol className="list-decimal list-inside mb-4">
<ListItem
title="Correction"
description={
Expand Down Expand Up @@ -165,25 +111,23 @@ const EnforcementGuidelines = () => (
</>
}
/>
</StyledOl>
</ol>
</Section>
);

// Separate Sections as Components
const Attribution = () => (
<Section title="Attribution">
<p>This Code of Conduct is adapted from the <a href="https://www.contributor-covenant.org/" target="_blank" rel="noopener noreferrer">Contributor Covenant</a>, version 2.0, available at <a href="https://www.contributor-covenant.org/version/2/0/code_of_conduct/" target="_blank" rel="noopener noreferrer">https://www.contributor-covenant.org/version/2/0/code_of_conduct.html</a>.</p>
<p>Community Impact Guidelines were inspired by <a href="https://github.com/mozilla/inclusion" target="_blank" rel="noopener noreferrer">Mozilla&apos;s code of conduct enforcement ladder</a>.</p>
<p>For answers to common questions about this code of conduct, see the FAQ at <a href="https://www.contributor-covenant.org/faq/" target="_blank" rel="noopener noreferrer">https://www.contributor-covenant.org/faq/</a>. Translations are available at <a href="https://www.contributor-covenant.org/translations" target="_blank" rel="noopener noreferrer">https://www.contributor-covenant.org/translations</a>.</p>
<p>This Code of Conduct is adapted from the <Link to="https://www.contributor-covenant.org/" target="_blank" rel="noopener noreferrer">Contributor Covenant</Link>, version 2.0, available at <Link to="https://www.contributor-covenant.org/version/2/0/code_of_conduct/" target="_blank" rel="noopener noreferrer">https://www.contributor-covenant.org/version/2/0/code_of_conduct.html</Link>.</p>
<p>Community Impact Guidelines were inspired by <Link to="https://github.com/mozilla/inclusion" target="_blank" rel="noopener noreferrer">Mozilla's code of conduct enforcement ladder</Link>.</p>
<p>For answers to common questions about this code of conduct, see the FAQ at <Link to="https://www.contributor-covenant.org/faq/" target="_blank" rel="noopener noreferrer">https://www.contributor-covenant.org/faq/</Link>. Translations are available at <Link to="https://www.contributor-covenant.org/translations" target="_blank" rel="noopener noreferrer">https://www.contributor-covenant.org/translations</Link>.</p>
</Section>
);

// Code of Conduct Component
const CodeOfConduct = () => (
<Layout>
<CodeOfConductContainer>
<Title>Code Of Conduct</Title>
<Content>
<div className="max-w-4xl mx-auto p-5 mt-5 mb-5 rounded-lg shadow-md">
<h2 className="text-center text-2xl font-bold mb-5">Code Of Conduct</h2>
<div className="mb-5">
<LastUpdated />
<OurPledge />
<OurStandards />
Expand All @@ -192,8 +136,8 @@ const CodeOfConduct = () => (
<Enforcement />
<EnforcementGuidelines />
<Attribution />
</Content>
</CodeOfConductContainer>
</div>
</div>
</Layout>
);

Expand Down
Loading
Loading