Skip to content

Commit 29e5c85

Browse files
authored
Merge pull request #3 from proxify-ab/feat/dev-titles
Feat/dev titles
2 parents 2b5edf3 + d0ef8cc commit 29e5c85

10 files changed

+45
-32
lines changed

src/developers/[developerSlug].md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
---
22
page: true
33
footer: false
4-
title: Vue Developers
4+
title: Vue Developer
55
---
66

77
<script setup>
88
import { useData } from 'vitepress'
9+
import { onMounted, ref } from 'vue'
10+
import developersData from './developers.json'
911
import Page from './components/DeveloperPage.vue'
1012

1113
const { page } = useData()
14+
const developer = ref(developersData.find(dev => dev.slug === page.value.params.developerSlug) || {})
15+
16+
onMounted(() => {
17+
if (developer.value) {
18+
document.title = `${developer.value.name} - Vue Developer | Vue.js`
19+
}
20+
})
1221
</script>
1322

14-
<Page :developerId="page.params.developerId" :developerSlug="page.params.developerSlug" />
23+
<Page :developer="developer" />

src/developers/[developerSlug].paths.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
return {
66
params: {
77
developerId: developer.id,
8-
developerSlug: `${developer.id}-${developer.alias.toLowerCase()}-freelance-developer`
8+
developerSlug: developer.slug,
99
}
1010
}
1111
})

src/developers/components/CloudinaryImage.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<script setup lang="ts">
22
import { computed } from 'vue'
3+
import partnerConfig from '../partnerConfig.js'
4+
5+
const { cloudinaryUrl } = partnerConfig
36
47
const props = withDefaults(defineProps<{
58
src: string,
@@ -17,8 +20,6 @@ const props = withDefaults(defineProps<{
1720
faceRecognition: false,
1821
});
1922
20-
const cloudinaryUrl = 'https://res.cloudinary.com/proxify-io/image/upload'
21-
2223
const imageSrc = computed(() => {
2324
const attributes = [
2425
'f_auto',

src/developers/components/DeveloperCard.vue

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,29 @@
11
<script setup lang="ts">
2-
import { computed } from 'vue'
32
import { DeveloperProfile } from './type'
43
import { truncateTextFromArray } from './utils'
54
import { VTIconMapPin } from '@vue/theme'
65
import CloudinaryImage from './CloudinaryImage.vue'
76
import DeveloperProficiencies from './DeveloperProficiencies.vue'
87
import DeveloperCompensations from './DeveloperCompensations.vue'
9-
import { useRouter } from 'vitepress'
10-
11-
const router = useRouter()
128
139
const props = defineProps<{
1410
data: DeveloperProfile
1511
hero?: boolean
1612
}>()
1713
18-
const { id, alias, name, description, compensations, proficiencies, location } = props.data
14+
const { id, slug, name, description, compensations, proficiencies, location } = props.data
1915
20-
const profileImage = computed(() => `/vue/developers/${id}.jpg`)
21-
const trimmedDescription = computed(() => truncateTextFromArray(description, 220))
16+
const profileLink = `/developers/${slug}.html`
17+
const profileImage = `/vue/developers/${id}.jpg`
18+
const trimmedDescription = truncateTextFromArray(description, 220)
2219
23-
function openDeveloperPage() {
24-
router.go(`./developers/${id}-${alias.toLowerCase()}-freelance-developer.html`)
25-
}
2620
</script>
2721

2822
<template>
29-
<div
23+
<a
3024
class="developer-card"
3125
:class="{ 'developer-card--hero': hero }"
32-
@click="openDeveloperPage"
26+
:href="profileLink"
3327
>
3428
<div class="developer-card__header">
3529
<div v-if="!hero && profileImage" class="developer-card__avatar">
@@ -80,7 +74,7 @@ function openDeveloperPage() {
8074
:height="605"
8175
/>
8276
</div>
83-
</div>
77+
</a>
8478
</template>
8579

8680
<style scoped>

src/developers/components/DeveloperCompensations.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ defineProps<{
1313
<h4 v-if="title">{{ title }}</h4>
1414
<div>
1515
<div v-if="compensations" class="developer-compensations__list">
16-
<div v-for="(compensation, key) in compensations" :key="key">
16+
<div v-for="(compensation, key) in compensations" :key="`compensation-${key}`">
1717
{{ compensation }}
1818
</div>
1919
</div>

src/developers/components/DeveloperPage.vue

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<script setup lang="ts">
22
import { computed } from 'vue'
3-
import data from '../developers.json'
43
import partnerConfig from '../partnerConfig.js'
5-
import { DeveloperProfiles } from './type'
4+
import { DeveloperProfile } from './type'
65
import { generateUTMUrl } from './utils'
76
import { VTIconChevronLeft, VTIconMapPin } from '@vue/theme'
87
import CloudinaryImage from './CloudinaryImage.vue'
@@ -15,17 +14,12 @@ import DeveloperPageFooter from './DeveloperPageFooter.vue'
1514
import { useRoute } from 'vitepress'
1615
1716
const props = defineProps<{
18-
developerId: number
19-
developerSlug: string
17+
developer: DeveloperProfile
2018
}>()
2119
22-
const developer = (data as DeveloperProfiles).find(
23-
(developer) => developer.id === props.developerId
24-
)!
20+
const { id, name, location, description, compensations, proficiencies, experiences, education } = props.developer
2521
26-
const { id, name, location, description, compensations, proficiencies, experiences, education } = developer
27-
28-
const profileImage = computed(() => `/vue/developers/${id}.jpg`)
22+
const profileImage = `/vue/developers/${id}.jpg`
2923
3024
const route = useRoute()
3125
const hireUsLink = computed(() => generateUTMUrl(partnerConfig.hireUsButtonUrl, route.path))
@@ -63,7 +57,7 @@ const hireUsLink = computed(() => generateUTMUrl(partnerConfig.hireUsButtonUrl,
6357
</p>
6458

6559
<div v-if="description" class="developer-page__description">
66-
<p v-for="desc in description" :key="desc">{{ desc }}</p>
60+
<p v-for="(desc, key) in description" :key="`p-desc-${key}`">{{ desc }}</p>
6761
</div>
6862
</div>
6963

src/developers/components/DeveloperProficiencies.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ const toggleShowAll = (event: Event) => {
3737
<div class="developer-proficiencies">
3838
<h4 v-if="title" class="developer-proficiencies__title">{{ title }}</h4>
3939
<div class="developer-proficiencies__list">
40-
<span class="developer-proficiencies__item" v-for="p in visibleProficiencies" :key="p">{{ p }}</span>
40+
<span class="developer-proficiencies__item" v-for="(p, key) in visibleProficiencies" :key="`prof-${key}`">{{ p }}</span>
4141
<button
4242
v-if="shouldShowButton"
43-
@click.stop="toggleShowAll"
4443
class="developer-proficiencies__toggle"
44+
@click.stop="toggleShowAll"
4545
>
4646
{{ showAll ? 'Show less' : 'Show all' }}
4747
</button>

src/developers/components/type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export interface DeveloperCompensations {
2929

3030
export interface DeveloperProfile {
3131
id: number;
32+
slug: string;
3233
name: string;
3334
alias: string;
3435
description: string[];

src/developers/developers.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
"id": 1346,
44
"name": "Stelios Kitziris",
5+
"slug": "stelios-vue-node-fullstack-developer",
56
"alias": "Stelios",
67
"description": [
78
"Stelios is a fullstack developer with over six years of commercial experience, specializing in the MEVN stack.",
@@ -219,6 +220,7 @@
219220
{
220221
"id": 2535,
221222
"name": "Tomek Jankowski",
223+
"slug": "tomek-vue-node-fullstack-developer",
222224
"alias": "Tomek",
223225
"description": [
224226
"Tomek is a fullstack developer with over 17 years of commercial experience. Over the years, he has transitioned from using PHP to mastering modern tech stacks, focusing on Vue.js and Node.js in the last six years. His expertise in these technologies has driven the development and support of robust, high-traffic systems.",
@@ -356,6 +358,7 @@
356358
{
357359
"id": 3021,
358360
"name": "Vardan Hayrapetyan",
361+
"slug": "vardan-vue-node-fullstack-developer",
359362
"alias": "Vardan",
360363
"description": [
361364
"Vardan is a frontend-heavy fullstack developer with expertise in Vue.js, and Node.js. With six years of experience, he has worked on several large-scale web applications, particularly excelling in the real estate sector.",
@@ -545,6 +548,7 @@
545548
{
546549
"id": 5486,
547550
"name": "Abdulqudus Abubakre",
551+
"slug": "abdulqudus-vue-frontend-developer",
548552
"alias": "Abdulqudus",
549553
"description": [
550554
"Abdulqudus is a senior frontend developer with over six years of commercial experience. His main framework of choice is Vue.js. He has also worked with frameworks like Nuxt.js and Vuetify for over three years. He is a fan of TDD and uses Cypress as a main testing tool in all his projects.",
@@ -747,6 +751,7 @@
747751
{
748752
"id": 5328,
749753
"name": "Santiago Anaya",
754+
"slug": "santiago-anaya-vue-ruby-fullstack-developer",
750755
"alias": "Santiago",
751756
"description": [
752757
"Santiago is a fullstack engineer with over six years of commercial experience, focusing on frontend development. He is an expert in Vue.js. On the backend, he uses Ruby on Rails and various relational databases, particularly PostgreSQL.",
@@ -889,6 +894,7 @@
889894
{
890895
"id": 5697,
891896
"name": "Harshit Sangani",
897+
"slug": "harshit-vue-frontend-developer",
892898
"alias": "Harshit",
893899
"description": [
894900
"Harshit is a frontend engineer with over six years of commercial experience, specializing in Vue.js. He has been integral to various stages of the software development lifecycle, from ideation to deployment, ensuring top-notch user experiences and scalable applications.",
@@ -1076,6 +1082,7 @@
10761082
{
10771083
"id": 3709,
10781084
"name": "Kostiantyn Draliuk",
1085+
"slug": "kostiantyn-vue-frontend-developer",
10791086
"alias": "Kostiantyn",
10801087
"description": [
10811088
"Kostiantyn is a frontend developer with eight years of commercial experience. His primary expertise lies in Vue.js, where he has demonstrated exceptional proficiency in building robust and scalable web applications.",
@@ -1229,6 +1236,7 @@
12291236
{
12301237
"id": 5022,
12311238
"name": "Eduard Miskov",
1239+
"slug": "eduard-miskov-vue-frontend-developer",
12321240
"alias": "Eduard",
12331241
"description": [
12341242
"Eduard is a frontend developer with over seven years of commercial experience. His primary expertise is crafting visually appealing and user-friendly web applications using Vue.js.",
@@ -1532,6 +1540,7 @@
15321540
{
15331541
"id": 4747,
15341542
"name": "Emmanuel Sackey",
1543+
"slug": "emmanuel-vue-js-ts-nuxt-nest-fullstack-dev",
15351544
"alias": "Emmanuel",
15361545
"description": [
15371546
"Emmanuel is a frontend-heavy fullstack developer with seven years of professional experience, proficient in Vue.js and Node.js. His main focus is on creating user-friendly web pages and dependable back-end systems.",
@@ -1735,6 +1744,7 @@
17351744
{
17361745
"id": 1020,
17371746
"name": "Abdusaid Umarov",
1747+
"slug": "abdusaid-html-css-vue-typescript-frontend-dev",
17381748
"alias": "Abdusaid",
17391749
"intro": "Abdusaid is a Senior Frontend Developer with over six years of experience, where he’s made a name for himself in Vue.js and Nuxt.js. His skill in Vue.js is top-notch, proven by the perfect 100% score he achieved on the Proxify test.",
17401750
"description": [

src/developers/partnerConfig.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const websiteLabel = 'proxify.io'
77
const websiteUrl = 'https://proxify.io/'
88
const applyUrl = 'https://career.proxify.io/apply'
99
const hireUrl = 'https://proxify.io/hire-vuejs'
10+
const cloudinaryUrl = 'https://res.cloudinary.com/proxify-io/image/upload'
1011

1112

1213
const partnerConfig = {
@@ -19,6 +20,9 @@ const partnerConfig = {
1920
websiteUrl: websiteUrl,
2021
hireUsButtonUrl: hireUrl,
2122

23+
// Cloudinary storage URL
24+
cloudinaryUrl: cloudinaryUrl,
25+
2226
// Hero Section
2327
pageHeroBanner: {
2428
title: 'Vue Developers',

0 commit comments

Comments
 (0)