Skip to content

Commit

Permalink
Merge pull request #120 from trolit/develop
Browse files Browse the repository at this point in the history
 Release/2024-02-04
  • Loading branch information
trolit committed Feb 4, 2024
2 parents 2528358 + 16a16a4 commit 0cb405a
Show file tree
Hide file tree
Showing 22 changed files with 266 additions and 96 deletions.
16 changes: 12 additions & 4 deletions src/assets/constants/home-segmented-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ const CONSTRUCTED_SEGMENTS: ISegmentData[] = [];
for (const { value, dates, items } of homeSegments) {
const pointsOfInterest = getPointsOfInterest(dates, MAX_HOME_INTEREST_POINTS, HOME_GROUP_BY);

const arrayOfIndexes = getArrayOfIndexes(pointsOfInterest, items);
const arrayOfIndexes = getArrayOfIndexes(
value === HomeSegment.PROJECTS ? 'publishedAt' : 'date',
pointsOfInterest,
items,
);

CONSTRUCTED_SEGMENTS.push({
value,
Expand All @@ -52,7 +56,11 @@ for (const { value, dates, items } of homeSegments) {
});
}

function getArrayOfIndexes(pointsOfInterest: string[], source: IProject[] | IPost[] | ITrack[]): number[][] {
function getArrayOfIndexes(
dateKey: string,
pointsOfInterest: string[],
source: IProject[] | IPost[] | ITrack[],
): number[][] {
const arrayOfIndexes: number[][] = [];

for (let index = 0; index < MAX_HOME_INTEREST_POINTS; index++) {
Expand All @@ -62,10 +70,10 @@ function getArrayOfIndexes(pointsOfInterest: string[], source: IProject[] | IPos
const parsedPointsOfInterest: Dayjs[] = pointsOfInterest.map((pointOfInterest) => dayjs(pointOfInterest));

source.forEach((item: IProject | IPost | ITrack, index: number) => {
const castedItem = item as { date: string };
const castedItem = item as any;

const pointOfInterestIndex = parsedPointsOfInterest.findIndex((parsedPointOfInterest) =>
parsedPointOfInterest.isSame(dayjs(castedItem.date), HOME_GROUP_BY),
parsedPointOfInterest.isSame(dayjs(castedItem[dateKey]), HOME_GROUP_BY),
);

if (~pointOfInterestIndex) {
Expand Down
6 changes: 3 additions & 3 deletions src/assets/data/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export const PATH_TO_AVATAR = avatarImage;

export const NAME = 'p4w31 !d21k0w541';

export const TITLE = 'software development';
export const TITLE = '';

export const ABOUT_ME_PANEL_DATA = {
text: `Passionate about computers. Started from playing around with Necro's blockmaker plugin in 2008, through some level design, making first steps in Unity 3.x, creating first page (Przepisownik 2016). Active source code investigator since the end of the year 2017. Visual Studio Code and Visual Studio stand for favourite IDEs.`,
text: `Passionate about computers and games. Started from playing around with Necro's blockmaker plugin for Counter Strike in 2008 and using it at own server with AMX Mod X, through some level design, making first steps in Unity 3.x to creating first page (Przepisownik 2016) and - after finding out GitHub - constantly working on personal projects. Active source code investigator since the end of the year 2017. Visual Studio Code and Visual Studio stand for favourite IDEs.`,

links: [
{
Expand Down Expand Up @@ -54,7 +54,7 @@ export const LANGUAGES_PANEL_DATA = [

export const VSC_PANEL_DATA = [
{
name: 'CSS class names IntelliSense in HTML',
name: 'CSS class names IntelliSense',
url: 'https://marketplace.visualstudio.com/items?itemName=Zignd.html-css-class-completion',
},

Expand Down
85 changes: 55 additions & 30 deletions src/assets/data/projects.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import dayjs from 'dayjs';
import { IconDice1, IconDice2, IconDice3, IconDice4, IconDice5, IconDice6 } from '@tabler/icons-react';

import {
Expand Down Expand Up @@ -32,7 +33,8 @@ const thumbnail = DEFAULT_IMAGE_SRC;
/** Featured Projects */
const Patchron: IFeaturedProject = {
name: 'Patchron',
date: '2022-08-03',
startedAt: '2022-01-18',
publishedAt: '2022-08-03',
languages: [JAVASCRIPT_LANGUAGE],
tags: [
{
Expand All @@ -53,7 +55,8 @@ const Patchron: IFeaturedProject = {

const ProjectZero: IFeaturedProject = {
name: 'Project Zero',
date: '2019-11-24',
startedAt: '2019-06-16',
publishedAt: '2019-11-24',
languages: [CSHARP_LANGUAGE],
tags: [
{
Expand All @@ -72,7 +75,8 @@ const ProjectZero: IFeaturedProject = {

const EzGitDoc: IFeaturedProject = {
name: 'EzGitDoc',
date: '2020-02-29',
startedAt: '2020-02-23',
publishedAt: '2020-02-29',
languages: [JAVASCRIPT_LANGUAGE],
tags: [
{
Expand All @@ -95,7 +99,8 @@ const EzGitDoc: IFeaturedProject = {
const RAW_PROJECTS: IProject[] = [
{
name: 'Personal portfolio Y22',
date: '2022-12-31',
startedAt: '2022-11-04',
publishedAt: '2022-12-31',
languages: [TYPESCRIPT_LANGUAGE],
tags: [
{
Expand All @@ -117,7 +122,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: 'Personal portfolio Y20',
date: '2021-09-29',
startedAt: '2021-09-29',
publishedAt: '2021-10-03',
languages: [JAVASCRIPT_LANGUAGE],
tags: [
{
Expand All @@ -137,7 +143,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: 'tonodedo',
date: '2021-07-25',
startedAt: '2021-07-09',
publishedAt: '2021-07-25',
languages: [JAVASCRIPT_LANGUAGE],
tags: [
{
Expand All @@ -160,7 +167,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: 'Leader selection algorithm',
date: '2021-07-02',
startedAt: '2021-04-25',
publishedAt: '2021-07-02',
languages: [CSHARP_LANGUAGE],
tags: [
{
Expand All @@ -177,7 +185,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: 'Grocery store (frontend)',
date: '2020-11-26',
startedAt: '2020-10-31',
publishedAt: '2020-11-26',
languages: [TYPESCRIPT_LANGUAGE],
tags: [
{
Expand All @@ -200,7 +209,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: 'Grocery store (backend)',
date: '2020-11-27',
startedAt: '2020-09-21',
publishedAt: '2020-11-01',
languages: [JAVA_LANGUAGE],
tags: [
{
Expand All @@ -220,7 +230,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: 'Wordally',
date: '2020-08-13',
startedAt: '2020-08-09',
publishedAt: '2020-08-13',
languages: [JAVASCRIPT_LANGUAGE],
tags: [
{
Expand All @@ -242,7 +253,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: '3vry',
date: '2020-07-21',
startedAt: '2020-06-03',
publishedAt: '2020-07-21',
languages: [KOTLIN_LANGUAGE],
tags: [
{
Expand All @@ -266,7 +278,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: 'Document And Compare',
date: '2020-05-04',
startedAt: '2020-04-17',
publishedAt: '2020-04-28',
languages: [CSHARP_LANGUAGE],
tags: [
{
Expand All @@ -290,7 +303,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: 'sShuffler',
date: '2020-04-13',
startedAt: '2020-04-12',
publishedAt: '2020-04-13',
languages: [CSHARP_LANGUAGE],
tags: [
{
Expand All @@ -312,7 +326,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: 'NB Project',
date: '2019-07-17',
startedAt: '2019-05-19',
publishedAt: '2019-07-17',
languages: [CSHARP_LANGUAGE],
tags: [
{
Expand All @@ -327,7 +342,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: 'A*',
date: '2018-08-30',
startedAt: '2018-08-14',
publishedAt: '2018-08-30',
languages: [CSHARP_LANGUAGE],
tags: [
{
Expand All @@ -341,7 +357,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: 'Robots Strike',
date: '2018-09-19',
startedAt: '2018-07-29',
publishedAt: '2018-09-19',
languages: [CSHARP_LANGUAGE],
tags: [
{
Expand All @@ -358,7 +375,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: 'Last Human',
date: '2018-08-03',
startedAt: '2018-06-11',
publishedAt: '2018-08-03',
languages: [CSHARP_LANGUAGE],
tags: [
{
Expand All @@ -376,7 +394,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: 'Projekt Enigma',
date: '2018-08-14',
startedAt: '2018-07-01',
publishedAt: '2018-08-14',
languages: [CSHARP_LANGUAGE],
tags: [],
description: `Attempt to simulate three-rotor enigma as an project for science club.`,
Expand All @@ -386,7 +405,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: 'Projekt Frog',
date: '2017-11-25',
startedAt: '2017-11-18',
publishedAt: '2017-11-25',
languages: [CSHARP_LANGUAGE],
tags: [
{
Expand All @@ -400,7 +420,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: 'Przepisownik 2016',
date: '2016-07-19',
startedAt: '2016-06-20',
publishedAt: '2016-07-19',
languages: [JAVASCRIPT_LANGUAGE],
tags: [],
description:
Expand All @@ -411,7 +432,8 @@ const RAW_PROJECTS: IProject[] = [

{
name: 'Car Themed API',
date: '2020-08-19',
startedAt: '2020-08-15',
publishedAt: '2020-08-22',
languages: [CSHARP_LANGUAGE],
tags: [
{
Expand All @@ -433,14 +455,17 @@ const RAW_PROJECTS: IProject[] = [

const icons = [IconDice1, IconDice2, IconDice3, IconDice4, IconDice5, IconDice6];

export const PROJECTS = sortByDate<IProject>(RAW_PROJECTS).map(
(project, index) =>
({
...project,
thumbnail: indexToIcons(icons, index, RAW_PROJECTS.length),
address: translateStringToAddress(project.name, PROJECTS_ROUTE),
} as IExtendedProject),
);
export const PROJECTS = sortByDate<IProject>(RAW_PROJECTS).map((project, index) => {
const parsedStartDate = dayjs(project.startedAt);
const parsedPublishedAtDate = dayjs(project.publishedAt);

return {
...project,
thumbnail: indexToIcons(icons, index, RAW_PROJECTS.length),
address: translateStringToAddress(project.name, PROJECTS_ROUTE),
months: dayjs(parsedPublishedAtDate).diff(parsedStartDate, 'months') || 1,
} as IExtendedProject;
});

export const FEATURED_PROJECTS = [
{
Expand All @@ -457,4 +482,4 @@ export const FEATURED_PROJECTS = [
},
];

export const ALL_DATES = Array.from(new Set(RAW_PROJECTS.map(({ date }) => date)));
export const ALL_DATES = Array.from(new Set(RAW_PROJECTS.map(({ startedAt }) => startedAt)));
4 changes: 2 additions & 2 deletions src/assets/styles/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const useDashboardStyles = () => {

const classes = {
header: {
borderRadius: '8px 8px 0 0',
borderRadius: OVERLAY_PADDING > 0 ? '8px 8px 0 0' : '0',
},

headerDrawerScrollArea: {
Expand Down Expand Up @@ -45,7 +45,7 @@ export const useDashboardStyles = () => {
}),

'&:first-of-type': {
borderTopLeftRadius: '8px',
borderTopLeftRadius: OVERLAY_PADDING > 0 ? '8px' : 0,
},
},

Expand Down
5 changes: 5 additions & 0 deletions src/assets/styles/dashboard/projects/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export const useProjectsStyles = () => {
justifyContent: 'space-between',
padding: `0 ${DASHBOARD_PADDING}px`,
},

menuWrapper: {
display: 'flex',
gap: '5px',
},
};

return classes;
Expand Down
4 changes: 2 additions & 2 deletions src/assets/styles/profile.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createStyles } from '@mantine/core';

const PRESENTATION_GROUP_HEIGHT = '30vh';
const PRESENTATION_GROUP_HEIGHT = '25vh';

const TABS_LIST_HEIGHT = '35px';

Expand All @@ -26,7 +26,7 @@ export const useProfileStyles = () => {
},

tabs: {
height: `calc(100% - ${PRESENTATION_GROUP_HEIGHT} - ${BLOCKQUOTE_HEIGHT} - ${LINKS_GROUP_HEIGHT})`,
height: `calc(100% - ${PRESENTATION_GROUP_HEIGHT} - ${BLOCKQUOTE_HEIGHT} - ${LINKS_GROUP_HEIGHT} - 1px)`,
},

tabsList: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function ProfileCardToggler() {

return (
<Tooltip label={label} position='bottom' withArrow withinPortal>
<ActionIcon variant='light' color={PRIMARY_COLOR} onClick={() => dispatch(toggleProfileCard())}>
<ActionIcon size='xs' variant='light' color={PRIMARY_COLOR} onClick={() => dispatch(toggleProfileCard())}>
<ThemeIcon variant='filled'>
<Icon size={25} />
</ThemeIcon>
Expand Down
1 change: 1 addition & 0 deletions src/components/Dashboard/Header/Toolbar/ThemeSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export function ThemeSwitcher() {
return (
<Group position='center'>
<SegmentedControl
size='xs'
value={colorScheme}
transitionDuration={400}
onChange={(value: ColorScheme) => dispatch(toggleColorScheme(value))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ export function LinksOverlay({ links, toggleOverlay }: IProps) {
</ScrollArea>

<Button
size='sm'
size='xs'
radius='xs'
color='gray'
variant='outline'
style={{ alignSelf: 'center' }}
style={{ alignSelf: 'flex-end' }}
onClick={() => toggleOverlay((isVisible) => !isVisible)}
>
show less
Expand Down
Loading

0 comments on commit 0cb405a

Please sign in to comment.