Skip to content

Added Code of Conduct and Cookie Policy Page #207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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 docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,11 @@ const config = {
},
{
label: "Code of Conduct",
to: "#",
to: "/code-of-conduct",
},
{
label: "Cookie Policy",
to: "#",
to: "/cookie-policy",
},
],
},
Expand Down
178 changes: 178 additions & 0 deletions src/pages/code-of-conduct/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
import React from 'react';
import Layout from '@theme/Layout';
import styles from 'styled-components';

/**
* Code of Conduct
**/

const CodeOfConductContainer = styles.div`
max-width: 800px;
margin: 0 auto;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
margin-top: 20px;
margin-bottom: 20px;
font-size: 16px;
line-height: 1.6;
font-family: 'Open Sans', sans-serif;
text-align: justify;
`;

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

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

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

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

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

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

/**
* Code of Conduct - section
**/

const Section = ({ title, children }) => (
<section>
<SubTitle>{title}</SubTitle>
{children}
</section>
);

/**
* Code of Conduct - list item
**/

const ListItem = ({ title, description }) => (
<StyledLi>
<strong>{title}</strong>
<p>{description}</p>
</StyledLi>
);

/**
* Code of Conduct
**/

const Codeofconduct = () => {
return (
<Layout>
<CodeOfConductContainer>
<Title>Code Of Conduct</Title>
<Content>
<p><strong>Last Updated:</strong> 23rd May 2024</p>

<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>

<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>
<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>
</Section>

<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>

<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>

<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>

<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>
<ListItem
title="Correction"
description={
<>
<strong>Community Impact:</strong> Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
<br />
<strong>Consequence:</strong> A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
</>
}
/>
<ListItem
title="Warning"
description={
<>
<strong>Community Impact:</strong> A violation through a single incident or series of actions.
<br />
<strong>Consequence:</strong> A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
</>
}
/>
<ListItem
title="Temporary Ban"
description={
<>
<strong>Community Impact:</strong> A serious violation of community standards, including sustained inappropriate behavior.
<br />
<strong>Consequence:</strong> A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
</>
}
/>
<ListItem
title="Permanent Ban"
description={
<>
<strong>Community Impact:</strong> Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
<br />
<strong>Consequence:</strong> A permanent ban from any sort of public interaction within the community.
</>
}
/>
</StyledOl>
</Section>

<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>
</Section>
</Content>
</CodeOfConductContainer>
</Layout>
);
};

export default Codeofconduct;
117 changes: 117 additions & 0 deletions src/pages/cookie-policy/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
import React from 'react';
import Layout from '@theme/Layout';
import styles from 'styled-components';

/**
* Cookie Policy
**/

const CookiePolicyContainer = styles.div`
max-width: 800px;
margin: 0 auto;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
margin-top: 20px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove margin-top: 20px; , margin-bottom: 20px; and update margin: 20px auto;

margin-bottom: 20px;
font-size: 16px;
line-height: 1.6;
font-family: 'Open Sans', sans-serif;
text-align: justify;
`;

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

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

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

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

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

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

/**
* Cookie Section
**/

const CookieSection = ({ title, children }) => (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the case of tsx you need to define react function for example

bad practices

const CookieSection = ({ title, children }) => (
<section>
    <SubTitle>{title}</SubTitle>
    {children}
  </section>
);

good practices

const CookieSection: React.FC = ({ title, children }) => {
  return (
     <section>
     <SubTitle>{title}</SubTitle>
          {children}
      </section>
    );
};

<section>
<SubTitle>{title}</SubTitle>
{children}
</section>
);

/**
* Cookie Policy
**/

const Cookiepolicy = () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also define const Cookiepolicy = () => { to const Cookiepolicy: React.FC = () => {

return (
<Layout>
<CookiePolicyContainer>
<Title>Cookie Policy</Title>
<Content>
<p><strong>Last Updated:</strong> 23rd May 2024</p>
<CookieSection title="Our Mission">
<p>Welcome to CodeHarborHub. Our mission is to provide accessible and comprehensive educational resources to learners of all levels. This Cookie Policy explains how we use cookies on our website.</p>
</CookieSection>
<CookieSection title="What Are Cookies?">
<p>Cookies are small text files stored on your device when you visit a website. They help the site to remember your preferences and activities over time.</p>
</CookieSection>
<CookieSection title="How We Use Cookies">
<p>We use cookies to:</p>
<StyledUl>
<StyledLi>Enhance your user experience</StyledLi>
<StyledLi>Analyze our website traffic</StyledLi>
<StyledLi>Provide personalized content and advertisements</StyledLi>
</StyledUl>
</CookieSection>
<CookieSection title="Types of Cookies We Use">
<StyledOl>
<StyledLi><strong>Essential Cookies</strong></StyledLi>
<p>These cookies are necessary for our website to function properly and cannot be switched off in our systems.</p>
<StyledLi><strong>Performance Cookies</strong></StyledLi>
<p>These cookies help us understand how visitors interact with our website by collecting and reporting information anonymously.</p>
<StyledLi><strong>Functionality Cookies</strong></StyledLi>
<p>These cookies enable the website to provide enhanced functionality and personalization based on your interactions.</p>
<StyledLi><strong>Targeting/Advertising Cookies</strong></StyledLi>
<p>These cookies are used to deliver ads more relevant to you and your interests. They may be set by us or by third-party providers.</p>
</StyledOl>
</CookieSection>
<CookieSection title="Managing Cookies">
<p>You can manage or disable cookies through your browser settings. For more information on how to do this, visit your browser’s help section.</p>
</CookieSection>
<CookieSection title="Third-Party Cookies">
<p>We may use third-party cookies for various purposes such as analytics and advertising. These cookies are governed by the privacy policies of the respective third parties.</p>
</CookieSection>
<CookieSection title="Cookie Policy Updates">
<p>We may update this Cookie Policy from time to time. We will notify you of any significant changes by posting the new policy on our website and updating the date at the top of this page.</p>
</CookieSection>
<CookieSection title="Contact Us">
<p>If you have any questions or concerns about our Cookie Policy, please contact us at:</p>
<p><a href="mailto:ajaydhangar49@gmail.com" target="_blank" rel="noopener noreferrer">ajaydhangar49@gmail.com</a></p>
</CookieSection>
</Content>
</CookiePolicyContainer>
</Layout>
);
};

export default Cookiepolicy;