diff --git a/data/skills.tsx b/data/skills.tsx
index c951d0c..1f7d76a 100644
--- a/data/skills.tsx
+++ b/data/skills.tsx
@@ -1,5 +1,5 @@
import Icon from "@mdi/react";
-import { mdiBash, mdiLanguageCpp, mdiLanguageCsharp, mdiLanguageJava, mdiLanguageJavascript, mdiLanguagePhp, mdiLanguagePython, mdiLanguageRust, mdiLanguageTypescript, mdiReact } from "@mdi/js";
+import { mdiBash, mdiLanguageCpp, mdiLanguageCsharp, mdiLanguageJava, mdiLanguageJavascript, mdiLanguagePhp, mdiLanguagePython, mdiLanguageRust, mdiLanguageTypescript, mdiReact, mdiTranslateVariant } from "@mdi/js";
import { Android, Arduino, CssThree, Espressif, Express, Html5, Linux, Sass, Springboot, Windows } from "@icons-pack/react-simple-icons";
export interface Skill {
@@ -13,10 +13,17 @@ export interface AdditionalSkill {
icon?: JSX.Element;
}
+export interface CardColors {
+ background: string;
+ bars: string;
+ heading: string;
+}
+
export interface SkillCard {
title: string;
skillBars: Skill[];
additional?: AdditionalSkill[];
+ colors?: CardColors;
}
export interface SkillSet {
@@ -25,119 +32,137 @@ export interface SkillSet {
}
export const skills = (sizeCardIcons?: string, sizeBadgeIcons?: string): SkillSet => {
+ sizeCardIcons = sizeCardIcons || "2em";
+ sizeBadgeIcons = sizeBadgeIcons || "1em";
+
return {
cards: [{
title: "Programming Languages",
skillBars: [{
name: "TypeScript",
- icon: ,
+ icon: ,
pct: 100
}, {
name: "JavaScript",
- icon: ,
+ icon: ,
pct: 100
}, {
name: "Java",
- icon: ,
+ icon: ,
pct: 80
}, {
name: "Python 3",
- icon: ,
+ icon: ,
pct: 95
}, {
name: "PHP",
- icon: ,
+ icon: ,
pct: 50
}, {
name: "Bash",
- icon: ,
+ icon: ,
pct: 60
}, {
name: "C/C++",
- icon: ,
+ icon: ,
pct: 60
}, {
name: "Rust",
- icon: ,
+ icon: ,
pct: 80
}, {
name: "C#",
- icon: ,
+ icon: ,
pct: 40
- }]
+ }],
+ /*colors: {
+ background: "#690000",
+ bars: "#fff",
+ heading: "#fff"
+ }*/
}, {
title: "Web Technologies",
skillBars: [{
name: "TypeScript",
- icon: ,
+ icon: ,
pct: 100
}, {
name: "JavaScript",
- icon: ,
+ icon: ,
pct: 100
}, {
name: "React",
- icon: ,
+ icon: ,
pct: 80
}, {
name: "HTML5",
- icon: ,
+ icon: ,
pct: 80
}, {
name: "CSS3",
- icon: ,
+ icon: ,
pct: 90
}],
additional: [{
name: "Express",
- icon:
+ icon:
}, {
name: "Sass",
- icon:
+ icon:
}, {
name: "Spring Boot",
- icon:
- }]
+ icon:
+ }],
+ /*colors: {
+ background: "#2196f3",
+ bars: "#217fff",
+ heading: "#2043ff"
+ }*/
}, {
title: "Embedded Programming",
skillBars: [{
name: "C/C++",
- icon: ,
+ icon: ,
pct: 60
}],
additional: [{
name: "Arduino",
- icon:
+ icon:
}, {
name: "ESP",
- icon:
- }]
+ icon:
+ }],
+ /*colors: {
+ background: "#EA8585",
+ bars: "#E53E3E",
+ heading: "#661C1C"
+ }*/
}, {
title: "Operating Systems",
skillBars: [],
additional: [{
name: "Windows",
- icon:
+ icon:
}, {
name: "Linux",
- icon:
+ icon:
}, {
name: "Android",
- icon:
+ icon:
}]
}, {
title: "Languages",
skillBars: [{
name: "German (native)",
- icon: 🇩🇪,
+ icon: ,
pct: 100
}, {
name: "English (C1)",
- icon: 🇬🇧,
+ icon: ,
pct: 90
}, {
name: "Russian (basics)",
- icon: 🇷🇺,
+ icon: ,
pct: 30
}],
additional: []
diff --git a/pages/me.tsx b/pages/me.tsx
index 9b0a4ee..b2a5f42 100644
--- a/pages/me.tsx
+++ b/pages/me.tsx
@@ -1,5 +1,6 @@
import type { NextPage } from "next";
import { useEffect } from "react";
+import Color from "color";
import Layout from "../components/Blog/Layout";
import styles from "../styles/Blog/AboutMe.module.scss";
@@ -9,30 +10,42 @@ import achievements from "../data/achievements";
const Badge: NextPage<{ additional: AdditionalSkill }> = ({ additional }) => {
return
- {additional.icon || null} {additional.name}
+ {additional.icon || null}{additional.name}
;
};
const SkillBar: NextPage<{ skill: Skill }> = ({ skill }) => {
return
-
{skill.name}{skill.icon || null}
+
{skill.icon || null}
+
{skill.name}
;
};
const SkillCard: NextPage<{ card: SkillCard }> = ({ card }) => {
- return
+ const cardStyle = {
+ background: card.colors?.background,
+ "--ch-color": card.colors?.heading,
+ "--bar-color": card.colors?.bars,
+ color: undefined,
+ } as React.CSSProperties;
+
+ try {
+ cardStyle.color = Color(cardStyle.background).isDark() ? "#ddd" : "#222";
+ } catch {}
+
+ return
{card.title}
{card.skillBars.sort((bar1, bar2) => bar2.pct - bar1.pct).map((skill, i) =>
)}
-
-
- {card.additional?.map((skill, i) => )}
+ {card.additional && card.additional.length > 0 ?
+ {card.additional?.map((skill, i) => )}
+
: null}
;
};
diff --git a/styles/Blog/AboutMe.module.scss b/styles/Blog/AboutMe.module.scss
index 413742c..260d3c4 100644
--- a/styles/Blog/AboutMe.module.scss
+++ b/styles/Blog/AboutMe.module.scss
@@ -14,7 +14,7 @@
border-radius: 0.5em;
height: 100%;
position: absolute;
- background: var(--blog_color-accent);
+ background: var(--bar-color, var(--blog_color-accent));
animation: barFill 2s ease-in-out;
animation-fill-mode: forwards;
}
@@ -23,6 +23,18 @@
.badgeSet {
display: flex;
flex-direction: row;
+ margin-top: 10px;
+}
+
+.achievement {
+ display: grid;
+ grid-template-columns: 2em auto;
+ column-gap: 10px;
+ padding: 5px;
+
+ & > span:first-of-type {
+ height: 2em;
+ }
}
.badge {
@@ -32,6 +44,14 @@
border: 1px solid var(--blog_content-border);
border-radius: 0.5em;
padding: 5px;
+
+ & > span {
+ align-self: center;
+ }
+
+ & > span:first-of-type {
+ height: 1em;
+ }
}
@keyframes barFill {
@@ -41,4 +61,55 @@
100% {
width: var(--barPct);
}
+}
+
+.skillCard {
+ padding: 10px;
+ border: 1px solid var(--blog_content-border);
+ border-radius: 0.5em;
+
+ margin-bottom: 20px;
+
+ h3 {
+ margin: 0;
+ color: var(--ch-color) !important;
+ }
+
+ &:last-of-type {
+ margin-bottom: 0;
+ }
+
+ &.useDarkColor {
+ color: #222;
+ }
+ &.useLightColor {
+ color: #ddd;
+ }
+}
+
+.skillBar {
+ display: grid;
+ grid-template-columns: 2em auto;
+ column-gap: 10px;
+ padding: 10px;
+ margin: 10px 0;
+
+ & > div {
+ align-self: center;
+ }
+
+ & > div:first-of-type {
+ height: 2em;
+ grid-row: 1/3;
+ }
+
+ & > div:nth-of-type(3) {
+ text-align: center;
+ margin-top: -5px;
+ font-size: small;
+ }
+
+ &:last-of-type {
+ margin-bottom: 0;
+ }
}
\ No newline at end of file