diff --git a/src/assets/main.css b/src/assets/main.css index 12a2a5a..09fa600 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -14,6 +14,7 @@ font-size: 40px; text-align: center; padding-top: 12px; + font-variant: small-caps; } .main-left { @@ -201,11 +202,13 @@ font-size: 36px; text-align: left; padding-left: 16px; + font-variant: small-caps; } .last-name { font-size: 40px; text-align: right; margin-right: 16px; + font-variant: small-caps; } .hobby { diff --git a/src/components/common/WordCloud.vue b/src/components/common/WordCloud.vue index c68d413..25e0ae3 100644 --- a/src/components/common/WordCloud.vue +++ b/src/components/common/WordCloud.vue @@ -14,6 +14,11 @@ fontSize: word.size + 'px', fontFamily: word.font, cursor: 'pointer', + fill: + selectedSkillStore.skill?.name === word.text + ? '#FF0000' + : '#000000', + userSelect: 'none', }" :transform="`translate(${word.x}, ${word.y})rotate(${word.rotate})`" text-anchor="middle" @@ -36,7 +41,7 @@ import cloud from "d3-cloud"; import skills from "@/data/skills"; import { defineComponent } from "vue"; -import type { Skill } from "@/data/types"; +import { useSelectedSkill } from "@/stores/counter"; export default defineComponent({ props: { @@ -54,6 +59,12 @@ export default defineComponent({ mouseY: undefined, }; }, + setup() { + const selectedSkillStore = useSelectedSkill(); + return { + selectedSkillStore, + }; + }, created() { this.computeWords(); // setInterval(() => { @@ -75,7 +86,11 @@ export default defineComponent({ this.hover = false; }, highlightText(text: string) { - console.log(text); + if (this.selectedSkillStore.skill?.name !== text) { + this.selectedSkillStore.set(text); + } else { + this.selectedSkillStore.unselect(); + } }, computeWords() { const words: (cloud.Word & { size: number; fixed?: boolean })[] = diff --git a/src/components/experiences/MyExperiences.vue b/src/components/experiences/MyExperiences.vue index 41bd841..ebd94dd 100644 --- a/src/components/experiences/MyExperiences.vue +++ b/src/components/experiences/MyExperiences.vue @@ -24,7 +24,9 @@ import RightSection from "@/components/common/RightSection.vue"; class="my-experiences-mission" v-for="mission in experience.missions" :key="mission.description" - style="" + :style="{ + color: isSelected(mission) ? 'red' : 'black', + }" >
{{ mission.skills.map((s) => s.name).join(", ") }} @@ -42,6 +44,9 @@ import RightSection from "@/components/common/RightSection.vue"; diff --git a/src/data/skills.ts b/src/data/skills.ts index e8be1e9..b6f33d4 100644 --- a/src/data/skills.ts +++ b/src/data/skills.ts @@ -19,28 +19,28 @@ const SpringBoot: Skill = { name: "SpringBoot", score: 0, parent: [Java] }; const Jee: Skill = { name: "JEE", score: 26, parent: [Java] }; const Gwt: Skill = { name: "GWT", score: 4, parent: [Java, UX] }; const Typescript: Skill = { name: "Typescript", score: 25 }; -const Codecept: Skill = { name: "CodeceptJS", score: 25 }; const Javascript: Skill = { name: "Javascript", score: 19 }; const Angular: Skill = { name: "Angular", score: 17, parent: [Typescript, UX] }; const React: Skill = { name: "React", score: 17, parent: [Typescript, UX] }; const ReactNative: Skill = { - name: "React", + name: "React Native", score: 17, parent: [Typescript, UX], }; const ExtJS: Skill = { name: "ExtJS", score: 14, parent: [Javascript, UX] }; const Bash: Skill = { name: "Bash", score: 0 }; -const HtmlCss: Skill = { name: "HtmlCss", score: 0 }; +const HtmlCss: Skill = { name: "HTML/CSS", score: 0 }; const Kotlin: Skill = { name: "Kotlin", score: 28 }; const Groovy: Skill = { name: "Groovy", score: 0 }; const DotNET: Skill = { name: ".NET", score: 0 }; const CSHARP: Skill = { name: "C#", score: 0, parent: [DotNET] }; const WPF: Skill = { name: "WPF", score: 0, parent: [DotNET, UX] }; const Blend: Skill = { name: "Blend", score: 0, parent: [DotNET, UX] }; -const Pencil: Skill = { name: "Blend", score: 0, parent: [UX] }; +const Pencil: Skill = { name: "Pencil", score: 0, parent: [UX] }; const Agility: Skill = { name: "Agility", score: 0 }; const Scrum: Skill = { name: "Scrum", score: 0, parent: [Agility] }; const Tests: Skill = { name: "Tests", score: 0 }; +const Codecept: Skill = { name: "CodeceptJS", score: 25, parent: [Tests] }; const UIAutomation: Skill = { name: "UIAutomation", score: 0, parent: [Tests] }; const JUnit: Skill = { name: "JUnit", score: 0, parent: [Tests, Java] }; const Communication: Skill = { name: "Communication", score: 0 }; diff --git a/src/stores/counter.ts b/src/stores/counter.ts index 252406e..0d9b316 100644 --- a/src/stores/counter.ts +++ b/src/stores/counter.ts @@ -1,16 +1,20 @@ import { defineStore } from "pinia"; +import type { Skill } from "@/data/types"; +import mySkills from "@/data/skills"; -export const useCounterStore = defineStore({ - id: "counter", +export const useSelectedSkill = defineStore({ + id: "skill", state: () => ({ - counter: 0, + skill: undefined as Skill | undefined, }), - getters: { - doubleCount: (state) => state.counter * 2, - }, actions: { - increment() { - this.counter++; + set(selectedSkill: string) { + this.skill = Object.keys(mySkills) + .map((p) => mySkills[p]) + .find((skill: Skill) => skill.name === selectedSkill); + }, + unselect() { + this.skill = undefined; }, }, }); diff --git a/tsconfig.config.json b/tsconfig.config.json index c2d3a30..1946ecf 100644 --- a/tsconfig.config.json +++ b/tsconfig.config.json @@ -3,6 +3,6 @@ "include": ["vite.config.*", "vitest.config.*", "cypress.config.*"], "compilerOptions": { "composite": true, - "types": ["node"] + "types": ["node"], } } diff --git a/tsconfig.json b/tsconfig.json index 939f0b4..1d437eb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,10 @@ "baseUrl": ".", "paths": { "@/*": ["./src/*"] - } + }, + "lib": [ + "es2019" + ] }, "references": [ diff --git a/vite.config.ts b/vite.config.ts index baeb8cb..34bcde4 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,6 +10,9 @@ export default defineConfig({ server: { port: 8311, }, + build: { + target: "es2019", + }, resolve: { alias: { "@": fileURLToPath(new URL("./src", import.meta.url)),