Skip to content

Commit

Permalink
Release 2.1
Browse files Browse the repository at this point in the history
Release 2.1
  • Loading branch information
Z-100 authored Apr 6, 2024
2 parents 9f1107e + 59bd592 commit 0ea8b45
Show file tree
Hide file tree
Showing 26 changed files with 209 additions and 204 deletions.
58 changes: 29 additions & 29 deletions package-lock.json

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

Binary file added public/images/r7-mobile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/r7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
name="description"
content="Z-100's CV website :)"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo171.png" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logos/elmo-logo.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>Vayan - Z-100</title>
</head>
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
3 changes: 0 additions & 3 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow: /contact
Disallow: /demo
Disallow: /projects
48 changes: 16 additions & 32 deletions src/components/content/ContentSection.tsx
Original file line number Diff line number Diff line change
@@ -1,54 +1,38 @@
import React from 'react'
import {TextSection} from "../../domain";

type ImagePos = 'left' | 'right' | 'top'
type TextPos = 'left' | 'right' | 'centered'

interface ContentSectionProps {
textSection: TextSection,
textPos?: TextPos,
image?: string,
}

export const ContentSection = ({textSection, textPos = 'left', image}: ContentSectionProps) => {
export const ContentSection = ({textSection, textPos = 'left'}: ContentSectionProps) => {

function getImagePos(textPos: TextPos): ImagePos {
if (textPos === 'left') return 'right'
if (textPos === 'right') return 'left'
if (textPos === 'centered') return 'top'

throw Error(`Unknown property: ${textPos}`);
}
function mapTextToP(text: string | string[], textPos: TextPos): JSX.Element {

if (typeof text !== 'string') {
return (
<ul className="mb-8 ml-5 list-disc">
{text?.map((li, index) => (
<li key={index} className="mb-2">{li}</li>
))}
</ul>
);
}

function mapTextToP(text: string, textPos: TextPos): JSX.Element {
return (
<>
<div className="mb-8">
{text.split("\n").map((line, i) => (
<>
{ /* Ik this is a cheap solution */
line === 'br' ? <br/> : <p className={"text-" + textPos} key={i}>{line}</p>
}
</>
<p className={"text-" + textPos} key={i}>{line || <br/>}</p>
))}
</>
);
}

const imagePos = getImagePos(textPos)

if (!textSection.texts && image) {
return (
<div className="flex flex-row my-5">
<div>
<h1>{textSection.title}</h1>
{mapTextToP(textSection.text, textPos)}
</div>
<img className={"text-" + imagePos} src={image} alt={textSection.title}/>
</div>
);
}

if (!textSection.texts) {
if (!textSection.subTexts) {
return (
<div className="my-5">
<h1 className="mb-2">{textSection.title}</h1>
Expand All @@ -61,7 +45,7 @@ export const ContentSection = ({textSection, textPos = 'left', image}: ContentSe
<div className="my-5">
<h1 className="mb-2">{textSection.title}</h1>
{mapTextToP(textSection.text, textPos)}
{textSection.texts!.map((text, i) => (
{textSection.subTexts!.map((text, i) => (
<>
<h2 className="mb-1 mt-2">{text.title}</h2>
{mapTextToP(text.text, textPos)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/content/ProjectSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const ProjectSection = ({ name, shortDesc, desc, url, image }: ProjectSec
<Link to={url}
target={"_blank"}
className="w-full h-48 object-cover">
<h3 className="text-xl font-bold mb-2">➡️ {name}</h3>
<h3 className="text-xl font-bold py-2 pr-2 hover:underline focus:underline text-link-2 visited:text-link-1">GitHub/{name}</h3>
</Link>
<p className="text-gray-700 text-base">{shortDesc}</p>
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/components/navigation/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Navbar = () => {

return (
<>
<div className="fixed top-0 w-full bg-dark-1 h-16">
<div className="fixed top-0 w-full bg-dark-1 h-16 z-50">
<div className="w-[50%] ml-[25%] h-full flex gap-6 items-center justify-center">
{routerData.map(route => (
<Link key={route.name}
Expand Down
20 changes: 9 additions & 11 deletions src/components/router/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ import {Route, Routes} from "react-router-dom";

export const Router = () => {
return (
<div className="w-full md:w-[80%]">
<Routes>
{routerData.map(({path, element, name}) => (
<Route
key={name}
path={path}
element={element}
/>
))}
</Routes>
</div>
<Routes>
{routerData.map(({path, element, name}) => (
<Route
key={name}
path={path}
element={element}
/>
))}
</Routes>
);
}
46 changes: 0 additions & 46 deletions src/domain/mock-db/featured-projects-data.ts

This file was deleted.

1 change: 1 addition & 0 deletions src/domain/mock-db/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './socials-data';
export * from './text-data';
export * from './projects-data';
18 changes: 0 additions & 18 deletions src/domain/mock-db/planned-projects-data.ts

This file was deleted.

Loading

0 comments on commit 0ea8b45

Please sign in to comment.