Skip to content
Merged

Dev #3422

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Nova/DreamJobRoleModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function fields(Request $request): array
Text::make('Pathway Map Filename', 'pathway_map_link')
->nullable()
->rules('nullable', 'max:255')
->help('Filename in /public/docs/dream-jobs/, e.g. Career Pathway Map Anny Tubbs.pdf'),
->help('Either a full URL (e.g. S3 link) OR a filename in /public/docs/dream-jobs/, e.g. Career Pathway Map Anny Tubbs.pdf'),

Number::make('Position', 'position')
->min(0)
Expand Down
18 changes: 16 additions & 2 deletions resources/views/static/dream-jobs-in-digital-role.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,15 @@
(object) ['label' => $item['first_name'] . ' ' . $item['last_name'], 'href' => ''],
];

$countryCode = strtolower(trim((string) ($item['country'] ?? '')));
if ($countryCode === 'po') {
$countryCode = 'pl';
}
$localFlagCodes = ['be', 'da', 'ei', 'fr', 'gm', 'gr', 'lo', 'sp', 'sz', 'uk'];
$flagSrc = in_array($countryCode, $localFlagCodes, true)
? "/images/flags/{$countryCode}-flag.svg"
: "https://flagcdn.com/w80/{$countryCode}.png";

$hasDreamJobsPageTable = \Illuminate\Support\Facades\Schema::hasTable('dream_jobs_page');
$hasDreamJobsResourcesTable = \Illuminate\Support\Facades\Schema::hasTable('dream_jobs_resources');
$page = $hasDreamJobsPageTable ? \App\DreamJobsPage::config() : null;
Expand Down Expand Up @@ -276,7 +285,7 @@
<h2 class="text-dark-blue text-3xl md:text-4xl md:leading-[44px] font-medium font-['Montserrat']">
{{ $item['first_name'] }} {{ $item['last_name'] }}
</h2>
<img class="shadow-lg rounded w-12 h-9" width="48" src="/images/flags/{{ $item['country'] }}-flag.svg" />
<img class="shadow-lg rounded w-12 h-9" width="48" src="{{ $flagSrc }}" onerror="this.style.display='none';" />
</div>
<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">
{!! $item['role'] !!}
Expand Down Expand Up @@ -322,11 +331,16 @@ class="animation-element move-background duration-[1.5s] absolute z-0 lg:-bottom
<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>
<div class="absolute w-full h-full bg-light-blue hidden xl:block" style="clip-path: ellipse(108% 90% at 50% 90%);"></div>
<div class="codeweek-container-lg relative pt-20 pb-16 md:pt-48 md:pb-28">
@php
$pathwayHref = \Illuminate\Support\Str::startsWith((string) $item['pathway_map_link'], ['http://', 'https://'])
? (string) $item['pathway_map_link']
: '/docs/dream-jobs/' . ltrim((string) $item['pathway_map_link'], '/');
@endphp
<h2 class="text-dark-blue text-[22px] md:text-4xl leading-[44px] font-medium font-['Montserrat'] mb-6 md:mb-10">
Explore Career Pathway
</h2>
<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" />
<a class="font-normal text-xl text-dark-blue underline" target="_blank" href="/docs/dream-jobs/{{ $item['pathway_map_link'] }}">Career Pathway Map</a>
<a class="font-normal text-xl text-dark-blue underline" target="_blank" href="{{ $pathwayHref }}">Career Pathway Map</a>
</div>
</section>
@endif
Expand Down
13 changes: 12 additions & 1 deletion resources/views/static/dream-jobs-in-digital.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,14 +307,25 @@ class="w-full rounded-2xl object-cover object-center h-[calc(80vw-40px)] sm:h-au
</h2>
<div class="grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-6 lg:gap-8">
@foreach($sortedResults as $result)
@php
$countryCode = strtolower(trim((string) ($result['country'] ?? '')));
if ($countryCode === 'po') {
$countryCode = 'pl';
}
$localFlagCodes = ['be', 'da', 'ei', 'fr', 'gm', 'gr', 'lo', 'sp', 'sz', 'uk'];
$flagSrc = in_array($countryCode, $localFlagCodes, true)
? "/images/flags/{$countryCode}-flag.svg"
: "https://flagcdn.com/w80/{$countryCode}.png";
@endphp
<div class="p-4 rounded-2xl border-2 border-solid border-[#A4B8D9] flex flex-col gap-4 md:gap-8 bg-white">
<div class="flex flex-1 items-start gap-4 md:gap-8">
<div class="relative w-32 flex-shrink-0">
<img
class="block w-32 h-32 object-cover object-center rounded-lg"
src="{{ $result['image'] }}"
/>
<img class="absolute w-[26px] h-auto object-center bottom-2.5 right-2.5 shadow-lg rounded-sm" src="/images/flags/{{ $result['country'] }}-flag.svg" />
<img class="absolute w-[26px] h-auto object-center bottom-2.5 right-2.5 shadow-lg rounded-sm"
src="{{ $flagSrc }}" onerror="this.style.display='none';" />
</div>
<div class="flex flex-1 flex-col justify-between h-full">
<div class="flex-grow">
Expand Down
Loading