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
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": [
"eslint:recommended",
"next",
// "next/babel",
"next/core-web-vitals",
"prettier"
],
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
## Getting Started

First, install dependencies:

```bash
npm install
# or
yarn
```

Then run the development server:

```bash
npm run dev
# or
Expand All @@ -16,17 +19,20 @@ yarn dev
### Settings

Create a file `.env.local` and put inside:

1. NEXT_PUBLIC_SANITY_URL="https://f2g1h82s.api.sanity.io/v2021-10-21/data/query/production", where **f2g1h82s** is your sanity project ID
2. NEXT_PUBLIC_SANITY_LATEST_PROJECTS="?query=...", your query to get latest projects
3. NEXT_PUBLIC_SANITY_ALL_PROJECTS="?query=...", your query to get all projects
4. NEXT_PUBLIC_SANITY_TOKEN="", sanity token created in sanity studio under API section

Run Sanity (localhost:3333)


#### **`!!! Make sure to have installed Sanity globally`**

Then:

```bash
cd sanity && sanity start
```
It runs local server at localhost:3333

It runs local server at localhost:3333
4 changes: 2 additions & 2 deletions app/sections/project/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import Link from "next/link";
import useSWR from "swr";
import { HeadingDivider, Loader } from "components";
import { fetcher } from "utils/fetcher";
import { SiteRoutes } from "constants";
import Error from "../../error";
import { ErrorBoundary } from "react-error-boundary";
import { Projects } from "../../projects/components/Projects";
import { SITE_ROUTES } from "../../../constants";

const url = `${process.env.NEXT_PUBLIC_SANITY_URL}${process.env.NEXT_PUBLIC_SANITY_LATEST_PROJECTS}`;

Expand Down Expand Up @@ -42,7 +42,7 @@ export function ProjectsSection() {
</Suspense>

<Link
href={SiteRoutes.projects}
href={SITE_ROUTES.projects}
tabIndex={-1}
aria-label="Go to projects page"
ref={btnRef}
Expand Down
2 changes: 1 addition & 1 deletion app/sections/technologies/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useRef } from "react";
import { LazyMotion, domAnimation, useInView } from "framer-motion";
import { HeadingDivider } from "components";
import { TECHNOLOGIES } from "constants";
import { TECHNOLOGIES } from "../../../constants";

export function TechnologiesSection() {
const textRef = useRef(null);
Expand Down
5 changes: 4 additions & 1 deletion components/AppMetadata.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const description =
"Software developer from Moldova, Republic of, who loves to develop beautiful websites, single page applications, customer relationship management or code from scratch using React and Next.js";
const url = "https://vasile-novatchii.netlify.app";
export const AppMetadata = {
metadataBase: new URL("https://vasile-novatchii.netlify.app/"),
title: {
default: `Portfolio | ${author}`,
template: `%s | ${author}`
Expand All @@ -13,7 +14,9 @@ export const AppMetadata = {
},
keywords: [
"Vasile Novatchii",
"Vasile Novatchii - developer",
"Vasile Novatchii - software developer",
"Frontend developer",
"Flutter developer",
"Portfolio website",
"Frontend Developer Portfolio"
],
Expand Down
8 changes: 2 additions & 6 deletions components/ConnectMedia.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@

import { LazyMotion, domAnimation, m } from "framer-motion";
import { initial, animate, exit, transition } from "utils/motions";
import { socialMedia } from "constants";
import { SOCIAL_MEDIA } from "../constants";

export function ConnectMedia() {
if (socialMedia.length === 0) {
return null;
}

return (
<LazyMotion features={domAnimation}>
<m.nav role="menu" initial={initial} animate={animate} exit={exit} transition={transition}>
<ul className="flex items-center gap-5">
{socialMedia.map((item) => (
{SOCIAL_MEDIA.map((item) => (
<li key={item.id}>
<a
href={item.url}
Expand Down
10 changes: 5 additions & 5 deletions components/Logo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Link from "next/link";
import { usePathname } from "next/navigation";
import { LazyMotion, domAnimation, m } from "framer-motion";
import { initial, animate, exit, transition } from "utils/motions";
import { SiteRoutes, SiteStrings } from "constants";
import { SITE_ROUTES, SITE_STRINGS } from "../constants";

export function Logo() {
const pathname = usePathname();
Expand All @@ -18,12 +18,12 @@ export function Logo() {
exit={exit}
transition={transition}
>
{pathname === SiteRoutes?.projects ? (
<Link href={SiteRoutes.home} aria-label="Go to home page" role="link">
{SiteStrings?.textLogo}
{pathname === SITE_ROUTES.projects ? (
<Link href={SITE_ROUTES.home} aria-label="Go to home page" role="link">
{SITE_STRINGS.textLogo}
</Link>
) : (
<>{SiteStrings?.textLogo}</>
<>{SITE_STRINGS.textLogo}</>
)}
</m.h3>
</LazyMotion>
Expand Down
14 changes: 7 additions & 7 deletions components/Menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { LazyMotion, domAnimation, m } from "framer-motion";
import { useScrollTo } from "hooks";
import { BsArrowReturnLeft } from "react-icons/bs";
import { initial, animate, exit, transition } from "utils";
import { menu, SiteRoutes, SiteStrings } from "constants";
import { MENU_OPTIONS, SITE_ROUTES, SITE_STRINGS } from "../constants";

export function Menu({ onClick = () => {} }) {
let content, mainMenu, backMenu;
Expand All @@ -23,7 +23,7 @@ export function Menu({ onClick = () => {} }) {
mainMenu = (
<m.nav initial={initial} animate={animate} exit={exit} transition={transition} role="menu">
<ul className="flex justify-center gap-5 flex-col md:flex-row items-start md:items-center">
{menu?.sort(sortAscending).map((menuItem) => (
{MENU_OPTIONS.sort(sortAscending).map((menuItem) => (
<li key={menuItem.id}>
<a
href={menuItem.url}
Expand All @@ -42,21 +42,21 @@ export function Menu({ onClick = () => {} }) {
backMenu = (
<m.div initial={initial} animate={animate} exit={exit} transition={transition}>
<Link
href={SiteRoutes?.home}
title={SiteStrings?.backToMainPageTitle}
href={SITE_ROUTES.home}
title={SITE_STRINGS.backToMainPageTitle}
className="icon-link-btn"
>
<span>
<BsArrowReturnLeft />
</span>
{SiteStrings?.backToMainText}
{SITE_STRINGS.backToMainText}
</Link>
</m.div>
);

content = pathname === SiteRoutes?.projects ? backMenu : mainMenu;
content = pathname === SITE_ROUTES.projects ? backMenu : mainMenu;

if (menu?.length === 0) {
if (MENU_OPTIONS.length === 0) {
return null;
}

Expand Down
10 changes: 5 additions & 5 deletions constants/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from "./strings";
export * from "./routes.js";
export * from "./menu.js";
export * from "./social_media.js";
export * from "./technologies.js";
export { SITE_STRINGS } from "./strings";
export { SITE_ROUTES } from "./routes.js";
export { MENU_OPTIONS } from "./menu.js";
export { SOCIAL_MEDIA } from "./social_media.js";
export { TECHNOLOGIES } from "./technologies.js";
2 changes: 1 addition & 1 deletion constants/menu.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const menu = [
export const MENU_OPTIONS = [
{ id: "0", name: "Introduction", url: "#intro" },
{ id: "1", name: "About", url: "#about" },
{ id: "2", name: "Projects", url: "#projects" },
Expand Down
2 changes: 1 addition & 1 deletion constants/routes.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const SiteRoutes = {
export const SITE_ROUTES = {
home: "/",
projects: "/projects"
};
2 changes: 1 addition & 1 deletion constants/social_media.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BsFillEnvelopeOpenFill, BsGithub, BsLinkedin } from "react-icons/bs";

export const socialMedia = [
export const SOCIAL_MEDIA = [
{
id: "linkedin",
icon: <BsLinkedin />,
Expand Down
2 changes: 1 addition & 1 deletion constants/strings.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const SiteStrings = {
export const SITE_STRINGS = {
textLogo: "@Vasile",
backToMainPageTitle: "Back to main page",
goToMainPageTitle: "Go to main page",
Expand Down
2 changes: 1 addition & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"isolatedModules": true,
"noEmit": true
},
"include": ["app", "public", "styles", "pages", "constants", "utils"],
"include": ["app", "public", "styles", "pages", "utils"],
"paths": {},
"exclude": ["node_modules"]
}
10 changes: 5 additions & 5 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
plugins: {
tailwindcss: {},
autoprefixer: {}
}
};
2 changes: 1 addition & 1 deletion sanity/config/@sanity/data-aspects.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"listOptions": {}
"listOptions": {}
}
8 changes: 4 additions & 4 deletions sanity/config/@sanity/default-layout.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"toolSwitcher": {
"order": [],
"hidden": []
}
"toolSwitcher": {
"order": [],
"hidden": []
}
}
12 changes: 6 additions & 6 deletions sanity/config/@sanity/default-login.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"providers": {
"mode": "append",
"redirectOnSingle": false,
"entries": []
},
"loginMethod": "dual"
"providers": {
"mode": "append",
"redirectOnSingle": false,
"entries": []
},
"loginMethod": "dual"
}
6 changes: 3 additions & 3 deletions sanity/config/@sanity/form-builder.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"images": {
"directUploads": true
}
"images": {
"directUploads": true
}
}
2 changes: 1 addition & 1 deletion sanity/config/@sanity/vision.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"defaultApiVersion": "2021-10-21"
"defaultApiVersion": "2021-10-21"
}
Loading