|
225 | 225 | (object) ['label' => $item['first_name'] . ' ' . $item['last_name'], 'href' => ''], |
226 | 226 | ]; |
227 | 227 |
|
| 228 | + $countryCode = strtolower(trim((string) ($item['country'] ?? ''))); |
| 229 | + if ($countryCode === 'po') { |
| 230 | + $countryCode = 'pl'; |
| 231 | + } |
| 232 | + $localFlagCodes = ['be', 'da', 'ei', 'fr', 'gm', 'gr', 'lo', 'sp', 'sz', 'uk']; |
| 233 | + $flagSrc = in_array($countryCode, $localFlagCodes, true) |
| 234 | + ? "/images/flags/{$countryCode}-flag.svg" |
| 235 | + : "https://flagcdn.com/w80/{$countryCode}.png"; |
| 236 | +
|
228 | 237 | $hasDreamJobsPageTable = \Illuminate\Support\Facades\Schema::hasTable('dream_jobs_page'); |
229 | 238 | $hasDreamJobsResourcesTable = \Illuminate\Support\Facades\Schema::hasTable('dream_jobs_resources'); |
230 | 239 | $page = $hasDreamJobsPageTable ? \App\DreamJobsPage::config() : null; |
|
276 | 285 | <h2 class="text-dark-blue text-3xl md:text-4xl md:leading-[44px] font-medium font-['Montserrat']"> |
277 | 286 | {{ $item['first_name'] }} {{ $item['last_name'] }} |
278 | 287 | </h2> |
279 | | - <img class="shadow-lg rounded w-12 h-9" width="48" src="/images/flags/{{ $item['country'] }}-flag.svg" /> |
| 288 | + <img class="shadow-lg rounded w-12 h-9" width="48" src="{{ $flagSrc }}" onerror="this.style.display='none';" /> |
280 | 289 | </div> |
281 | 290 | <div class="text-[22px] md:text-3xl text-[#333E48] font-medium font-['Montserrat'] p-0 mb-6 [&_p]:p-0 [&_p]:m-0 [&_div]:p-0 [&_div]:m-0"> |
282 | 291 | {!! $item['role'] !!} |
@@ -322,11 +331,16 @@ class="animation-element move-background duration-[1.5s] absolute z-0 lg:-bottom |
322 | 331 | <div class="absolute w-full h-full bg-light-blue hidden lg:block xl:hidden" style="clip-path: ellipse(168% 90% at 50% 90%);"></div> |
323 | 332 | <div class="absolute w-full h-full bg-light-blue hidden xl:block" style="clip-path: ellipse(108% 90% at 50% 90%);"></div> |
324 | 333 | <div class="codeweek-container-lg relative pt-20 pb-16 md:pt-48 md:pb-28"> |
| 334 | + @php |
| 335 | + $pathwayHref = \Illuminate\Support\Str::startsWith((string) $item['pathway_map_link'], ['http://', 'https://']) |
| 336 | + ? (string) $item['pathway_map_link'] |
| 337 | + : '/docs/dream-jobs/' . ltrim((string) $item['pathway_map_link'], '/'); |
| 338 | + @endphp |
325 | 339 | <h2 class="text-dark-blue text-[22px] md:text-4xl leading-[44px] font-medium font-['Montserrat'] mb-6 md:mb-10"> |
326 | 340 | Explore Career Pathway |
327 | 341 | </h2> |
328 | 342 | <img class="rounded-xl w-full h-60 md:h-auto object-cover object-center mb-6 md:mb-12" src="/images/dream-jobs/pathway-map.png" /> |
329 | | - <a class="font-normal text-xl text-dark-blue underline" target="_blank" href="/docs/dream-jobs/{{ $item['pathway_map_link'] }}">Career Pathway Map</a> |
| 343 | + <a class="font-normal text-xl text-dark-blue underline" target="_blank" href="{{ $pathwayHref }}">Career Pathway Map</a> |
330 | 344 | </div> |
331 | 345 | </section> |
332 | 346 | @endif |
|
0 commit comments