Skip to content

Commit 1fad96f

Browse files
committed
improve partners css
1 parent 540ebdc commit 1fad96f

File tree

6 files changed

+37
-9
lines changed

6 files changed

+37
-9
lines changed

src/partners/components/PartnerCard.vue

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const { data, hero, page } = defineProps<{
99
page?: boolean
1010
}>()
1111
12-
const { name, intro, region, logo, proficiencies } = data
12+
const { name, intro, region, logo, proficiencies, flipLogo } = data
1313
</script>
1414

1515
<template>
@@ -20,6 +20,11 @@ const { name, intro, region, logo, proficiencies } = data
2020
:href="'/partners/' + normalizeName(name) + '.html'"
2121
>
2222
<div class="info">
23+
<img
24+
class="logo dark"
25+
v-if="hero && flipLogo"
26+
:src="getLogo(logo, flipLogo)"
27+
/>
2328
<img class="logo" v-if="hero" :src="getLogo(logo)" />
2429
<h3 v-else>{{ name }}</h3>
2530
<p class="region"><Location /> {{ region.join(', ') }}</p>
@@ -29,7 +34,7 @@ const { name, intro, region, logo, proficiencies } = data
2934
<span class="proficiency" v-for="p in proficiencies">{{ p }}</span>
3035
</p>
3136
</div>
32-
<img :src="getHero(name)" :alt="name + ' hero'" />
37+
<img class="big" :src="getHero(name)" :alt="name + ' hero'" />
3338
</component>
3439
</template>
3540

@@ -68,23 +73,31 @@ h3 {
6873
.logo {
6974
margin-bottom: 1em;
7075
max-width: 240px;
76+
max-height: 120px;
7177
}
7278
73-
.dark .logo {
74-
filter: grayscale(1) invert(1);
79+
.logo.dark,
80+
.dark .logo:not(.dark) {
81+
display: none;
7582
}
7683
77-
.partner-card:not(.hero) img {
84+
.dark .logo.dark {
85+
display: inline-block;
86+
}
87+
88+
.partner-card:not(.hero) .big {
7889
margin-top: auto;
7990
}
8091
8192
.partner-card.hero .info {
8293
margin-right: 2em;
8394
}
84-
.partner-card.hero img {
95+
.partner-card.hero .big {
8596
display: inline-block;
8697
margin-left: auto;
8798
width: 60%;
99+
max-height: 360px;
100+
object-fit: cover;
88101
}
89102
90103
@media (max-width: 768px) {
@@ -97,7 +110,7 @@ h3 {
97110
.logo {
98111
max-width: 200px;
99112
}
100-
.partner-card.hero img {
113+
.partner-card.hero .big {
101114
width: 100%;
102115
}
103116
}

src/partners/components/type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export interface Partner {
22
name: string
33
logo: string
4+
flipLogo?: boolean
45
intro: string
56
description: string[]
67
proficiencies: string[]

src/partners/components/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export function getHero(name: string) {
66
return `/images/partners/${normalizeName(name)}-hero.jpg`
77
}
88

9-
export function getLogo(img: string) {
9+
export function getLogo(img: string, flip: boolean | undefined) {
10+
if (flip) img = img.replace(/(\.\w+$)/, '-dark$1')
1011
return `/images/partners/${img}`
1112
}

src/partners/partners.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
"name": "Vehikl",
44
"logo": "vehikl.svg",
5+
"flipLogo": true,
56
"intro": "Vehikl is a team of code-crushing Laravel experts. Over the years we have built a variety of web applications for customers using Laravel as our framework of choice and implemented Lean Agile development techniques to build professional applications that are functional and easy to use.",
67
"description": [
78
"Combining the power of Laravel, Lean Agile development techniques, and a diverse team with deep technical knowledge and experience allows us to provide a unique approach to make sure your work gets done as quickly, professionally, and economically as possible. Our customers range from smaller startups looking for help with working through a feature backlog as they scale, to larger established firms that need to refactor a legacy code base and build new features.",
@@ -20,6 +21,7 @@
2021
{
2122
"name": "Passionate People",
2223
"logo": "passionatepeople.png",
24+
"flipLogo": true,
2325
"intro": "We provide you with additional technical capacity to power-up your digital transformation journeys with our teams of first-class engineers and consultants. Full stack JavaScript Cloud Engineers ready to work with you and your teams.",
2426
"description": [
2527
"Founded in October 2017, Passionate People is the leading JavaScript consultancy in the Netherlands.",
@@ -108,7 +110,7 @@
108110
"Our team loves to follow the industry standards, some of which are managing git repo, code review, release deployments via CI/CD (DevOps), automated software testing, maintaining detailed technical documentation, application performance monitoring, etc.",
109111
"Email us, and let's build your software product."
110112
],
111-
"region": ["Asia", "North America", "Africa"],
113+
"region": ["North America", "Asia", "Europe"],
112114
"proficiencies": ["Vue", "Laravel", "Nuxt", "Ionic", "Node.js"],
113115
"website": {
114116
"text": "webreinvent.com",
Loading
Lines changed: 11 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)