Skip to content
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

Sitemap Package remove, Sitemap and robots.txt add, Navbar Fix for Mobile #30

Merged
merged 6 commits into from
Nov 7, 2022
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
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.next
build
node_modules
yarn.lock
Expand Down
22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
15 changes: 7 additions & 8 deletions components/nav/Navbar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import Image from 'next/image';
import Link from 'next/link';
import Search from '../reuse/Search';
import { BsGithub } from 'react-icons/bs';
Expand All @@ -9,23 +8,23 @@ const Navbar = () => {
<nav className="dark:bg-dark-color border-b dark:border-gray-500 flex justify-center items-center bg-white w-full">
<div className="flex justify-between items-center w-full max-w-[1500px] mx-auto px-5 py-4">
<Link href="/">
<a className="h-9 w-9">
<Image
<a>
<img
src="/logo.png"
alt="logo"
height={36}
width={36}
priority={true}
className="w-10 object-cover align-middle"
/>
</a>
</Link>
<Search height="h-9" />
<div className="mx-3">
<Search height="h-9" />
</div>
<a
href="https://github.com/Mridul2820/git-o-get"
target="_blank"
rel="noreferrer"
>
<BsGithub size={24} />
<BsGithub size={28} />
</a>
</div>
</nav>
Expand Down
3 changes: 1 addition & 2 deletions components/profile/ProfileFollowers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Image from 'next/image';
import Link from 'next/link';
import React from 'react';

Expand All @@ -15,7 +14,7 @@ const ProfileFollowers = ({ username, followers }) => {
{followers?.nodes.map((follow) => (
<Link href={`/user/${follow.login}`} key={follow.id}>
<a className="dark:bg-dark-gray dark:border-gray-700 flex items-center gap-3 rounded-md shadow-bs5 hover:shadow-bs2 transition-all duration-200 p-2 border-2 border-slate-300">
<Image
<img
src={follow.avatarUrl}
alt={follow.login}
height={40}
Expand Down
14 changes: 1 addition & 13 deletions components/profile/ProfileInfo.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import Image from 'next/image';
import { motion } from 'framer-motion';
import { BiBuildings } from 'react-icons/bi';
import { IoLocationOutline } from 'react-icons/io5';
Expand All @@ -8,16 +7,6 @@ import { BsLink45Deg } from 'react-icons/bs';
import { HiOutlineMail } from 'react-icons/hi';

const ProfileInfo = ({ user }) => {
const setURL = (url) => {
if (url.protocol === 'https:') {
return url;
} else if (url.protocol === 'http:') {
return url;
} else {
return 'https://' + url;
}
};

return (
<motion.div
className="py-4 px-5 shadow-bs1 rounded-md w-full h-full flex flex-col justify-center bg-white dark:bg-dark-color dark:text-white border dark:border-gray-700"
Expand All @@ -26,13 +15,12 @@ const ProfileInfo = ({ user }) => {
animate={{ scale: 1 }}
>
<div className="flex items-center gap-3">
<Image
<img
src={user.avatarUrl}
alt={user.login}
height={80}
width={80}
className="rounded-full"
priority={true}
/>
<div className="">
<h1 className="text-2xl font-bold">
Expand Down
6 changes: 3 additions & 3 deletions components/reuse/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useRouter } from 'next/router';
import { AppContext } from '../../pages/_app';

const Search = ({ height }) => {
const { isLoading, toggleLoading } = useContext(AppContext)
const { isLoading, toggleLoading } = useContext(AppContext);
const router = useRouter();
const [loading, setLoading] = useState(false);

Expand All @@ -17,7 +17,7 @@ const Search = ({ height }) => {

if (username && !hasWhiteSpaceText(username)) {
setLoading(true);
toggleLoading(true)
toggleLoading(true);
router.push(`/user/${username}`);
}
};
Expand All @@ -40,7 +40,7 @@ const Search = ({ height }) => {
<button
aria-label="search"
type="submit"
className="bg-purple-mid text-white h-full px-4 rounded-r-md"
className="bg-purple-mid text-white h-full px-2 md:px-4 rounded-r-md"
>
{isLoading ? (
<div className="animate-spin">
Expand Down
16 changes: 0 additions & 16 deletions next-sitemap.js

This file was deleted.

77 changes: 0 additions & 77 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{
"name": "git-o-get",
"private": true,
"author": "Mridul2820",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"postbuild": "next-sitemap",
"format": "prettier --write ."
"lint-fix": "next lint --fix",
"format": "prettier --write .",
"format-check": "prettier --check .",
"lint-format": "npm run lint && npm run format-check",
"lint-format-fix": "npm run lint-fix && npm run format"
},
"dependencies": {
"@apollo/client": "^3.5.6",
Expand All @@ -19,7 +23,6 @@
"lodash": "^4.17.21",
"next": "12.0.7",
"next-seo": "^4.28.1",
"next-sitemap": "^1.6.148",
"next-themes": "^0.2.1",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
11 changes: 5 additions & 6 deletions pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,17 @@ const reducer = (state, action) => {
}
return state;
};
const initialStates = { isLoading: false }
const initialStates = { isLoading: false };

function MyApp({ Component, pageProps }) {

const [state, dispatch] = useReducer(reducer, initialStates)
const [state, dispatch] = useReducer(reducer, initialStates);

const toggleLoading = async (flag) => {
dispatch({
type: 'LOADING_TOGGLE',
payload: flag
payload: flag,
});
}
};

return (
<ApolloProvider client={client}>
Expand All @@ -46,7 +45,7 @@ function MyApp({ Component, pageProps }) {
</AppContext.Provider>
</ThemeProvider>
</RecoilRoot>
</ApolloProvider >
</ApolloProvider>
);
}

Expand Down
Loading