Skip to content
Merged

Dev #3522

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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ vue-i18n-locales.generated.js
vite.config.js
.DS_Store
resources/excel/example.xlsx
resources/ai-agent-plans/*
26 changes: 26 additions & 0 deletions app/Nova/TrainingResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,22 @@ public function fields(Request $request): array
->nullable()
->help('Optional pill text in the header banner'),

Text::make('Hero button text', 'hero_button_text')
->nullable()
->help('Optional primary CTA shown in the hero section.'),

Text::make('Hero button URL', 'hero_button_url')
->nullable()
->help('Supports full URLs, root-relative paths, or #anchors.'),

Text::make('Hero secondary button text', 'hero_secondary_button_text')
->nullable()
->help('Optional outline CTA shown beside the hero primary button.'),

Text::make('Hero secondary button URL', 'hero_secondary_button_url')
->nullable()
->help('Supports full URLs, root-relative paths, or #anchors.'),

Trix::make('Intro', 'intro')
->nullable()
->help('Optional intro block shown above the main content'),
Expand Down Expand Up @@ -126,6 +142,16 @@ public function fields(Request $request): array
->nullable()
->help('Optional text shown in a highlighted callout box (register on map, hashtags, etc).'),

Trix::make('About box section', 'about_box_section')
->nullable()
->help('Optional blue info card shown below register box (supports heading, text, lists).'),

Number::make('Anchor offset', 'anchor_offset')
->min(0)
->step(1)
->nullable()
->help('Optional scroll offset in pixels for in-page anchor links (useful with sticky headers).'),

Text::make('Button text', 'button_text')->nullable(),

Text::make('Button URL', 'button_url')
Expand Down
7 changes: 7 additions & 0 deletions app/TrainingResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ class TrainingResource extends Model
'card_image',
'page_title',
'hero_author',
'hero_button_text',
'hero_button_url',
'hero_secondary_button_text',
'hero_secondary_button_url',
'intro',
'highlight_box',
'video_url',
Expand All @@ -28,6 +32,8 @@ class TrainingResource extends Model
'pdf_links_section',
'contacts_section',
'register_box_section',
'about_box_section',
'anchor_offset',
'button_text',
'button_url',
'secondary_button_text',
Expand All @@ -43,6 +49,7 @@ class TrainingResource extends Model
protected $casts = [
'active' => 'boolean',
'position' => 'integer',
'anchor_offset' => 'integer',
];

public function scopeActive($query)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('training_resources', function (Blueprint $table) {
$table->string('hero_button_text')->nullable()->after('hero_author');
$table->string('hero_button_url')->nullable()->after('hero_button_text');
$table->string('hero_secondary_button_text')->nullable()->after('hero_button_url');
$table->string('hero_secondary_button_url')->nullable()->after('hero_secondary_button_text');
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('training_resources', function (Blueprint $table) {
$table->dropColumn([
'hero_button_text',
'hero_button_url',
'hero_secondary_button_text',
'hero_secondary_button_url',
]);
});
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('training_resources', function (Blueprint $table) {
$table->longText('about_box_section')->nullable()->after('register_box_section');
$table->unsignedInteger('anchor_offset')->nullable()->after('about_box_section');
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('training_resources', function (Blueprint $table) {
$table->dropColumn([
'about_box_section',
'anchor_offset',
]);
});
}
};
106 changes: 106 additions & 0 deletions database/seeders/TrainingResourceDiscoverDigitalProgrammeSeeder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?php

namespace Database\Seeders;

use App\TrainingResource;
use Illuminate\Database\Seeder;

class TrainingResourceDiscoverDigitalProgrammeSeeder extends Seeder
{
/**
* Seed a ready-to-edit Discover Digital Programme training resource.
*/
public function run(): void
{
TrainingResource::updateOrCreate(
['slug' => 'discover-digital-programme'],
[
'card_title' => 'Discover Digital Programme',
'card_author' => 'Code4Europe | Deliverable D4.2 | Public toolkit',
// Temporary thumbnail until final artwork is provided.
'card_image' => '/images/banner_training.svg',
'page_title' => 'Discover Digital Programme',
'hero_author' => 'Code4Europe | Deliverable D4.2 | Public toolkit',
'hero_button_text' => 'Open the complete toolkit',
'hero_button_url' => 'https://codeweek-resources.s3.eu-west-1.amazonaws.com/+discover-digital-toolkit/DDP_toolkit.pdf',
'hero_secondary_button_text' => 'Get the one-pagers pack',
'hero_secondary_button_url' => '#key-one-pagers',
'intro' => <<<HTML
<p>A practical toolkit for higher education institutions (HEIs) with an ICT and STEM focus to engage secondary school students through school visits, campus experiences, and digital outreach, supporting learners in the senior cycle of secondary education to imagine themselves in technology careers and understand the academic pathways that will lead them there.</p>
HTML,
'content' => <<<HTML
<h2>How the toolkit works</h2>
<p>The toolkit is organised as a flexible, non-prescriptive set of steps and formats. It structures engagement into two mirroring frameworks: <strong>STEM On Tour</strong> (bringing higher education into schools and community settings) and <strong>STEM In</strong> (bringing students into a higher education institution through campus visits, open days, and themed events). HEIs may implement either framework independently or combine both for greater impact.</p>
<h3>Start here</h3>
<ol>
<li>Establish essential preparation (contacts + GDPR).</li>
<li>Choose your delivery format: STEM On Tour and/or STEM In.</li>
<li>Plan evaluation and feedback to measure outcomes.</li>
<li>Use digital outreach and communication to build awareness and follow-up.</li>
</ol>
<div style="margin-top: 2.25rem;">
<h2>Roadmap</h2>
<p>Use this roadmap if you do not have time to read the full deliverable. The one-pagers mirror the toolkit flow and provide a practical checklist for implementation.</p>
<a href="https://codeweek-resources.s3.eu-west-1.amazonaws.com/+discover-digital-toolkit/DDP_toolkit_roadmap.pdf" target="_blank" rel="noopener noreferrer">
<img src="https://codeweek-resources.s3.eu-west-1.amazonaws.com/+discover-digital-toolkit/DDP_toolkit_roadmap.svg" alt="Discover Digital Programme roadmap" />
</a>
</div>
HTML,
'body_image' => null,
'body_image_alt' => 'Discover Digital Programme roadmap',
'pdf_links_section' => <<<HTML
<h2 id="key-one-pagers">Key one-pagers</h2>
<p>These documents summarise the main operational parts of the toolkit.</p>
<ul>
<li><a href="https://codeweek-s3.s3.eu-west-1.amazonaws.com/files/Essential_Preparation_for_STEM_Engagement+Activities.pdf" target="_blank" rel="noopener noreferrer">Essential Preparation for STEM Engagement Activities</a></li>
<li><a href="https://codeweek-s3.s3.eu-west-1.amazonaws.com/files/STEM_On_Tour.pdf" target="_blank" rel="noopener noreferrer">STEM On Tour</a></li>
<li><a href="https://codeweek-s3.s3.eu-west-1.amazonaws.com/files/STEM_In.pdf" target="_blank" rel="noopener noreferrer">STEM In</a></li>
<li><a href="https://codeweek-s3.s3.eu-west-1.amazonaws.com/files/Evaluation_and_Feedback.pdf" target="_blank" rel="noopener noreferrer">Evaluation and Feedback</a></li>
<li><a href="https://codeweek-s3.s3.eu-west-1.amazonaws.com/files/Digital_Outreach_and_Communication.pdf" target="_blank" rel="noopener noreferrer">Digital Outreach and Communication</a></li>
</ul>
<h2>Useful detail info</h2>
<p>These documents provide the supporting operational detail referenced in the key one-pagers.</p>
<ul>
<li><a href="https://codeweek-resources.s3.eu-west-1.amazonaws.com/+discover-digital-toolkit/01_Register_of_Processing_Activities.pdf" target="_blank" rel="noopener noreferrer">1 - Register of Processing Activities</a></li>
<li><a href="https://codeweek-resources.s3.eu-west-1.amazonaws.com/+discover-digital-toolkit/02_STEM_On_Tour-Roles_and_Responsibilities.pdf" target="_blank" rel="noopener noreferrer">2 - STEM On Tour - Roles and Responsibilities</a></li>
<li><a href="https://codeweek-resources.s3.eu-west-1.amazonaws.com/+discover-digital-toolkit/03_STEM_On_Tour-Implementation_Timeline.pdf" target="_blank" rel="noopener noreferrer">3 - STEM On Tour - Implementation Timeline</a></li>
<li><a href="https://codeweek-resources.s3.eu-west-1.amazonaws.com/+discover-digital-toolkit/04_STEM_In_Roles_and_Responsibilities.pdf" target="_blank" rel="noopener noreferrer">4 - STEM In Roles and Responsibilities</a></li>
<li><a href="https://codeweek-resources.s3.eu-west-1.amazonaws.com/+discover-digital-toolkit/05_STEM_In-Implementation_Timeline.pdf" target="_blank" rel="noopener noreferrer">5 - STEM In - Implementation Timeline</a></li>
<li><a href="https://codeweek-resources.s3.eu-west-1.amazonaws.com/+discover-digital-toolkit/06_Evaluation_and_Feedback-Scoreboard.pdf" target="_blank" rel="noopener noreferrer">6 - Evaluation and Feedback - Scoreboard</a></li>
<li><a href="https://codeweek-resources.s3.eu-west-1.amazonaws.com/+discover-digital-toolkit/07_Digital_Outreach_and_Communication-Schedule.pdf" target="_blank" rel="noopener noreferrer">7 - Digital Outreach and Communication - Schedule</a></li>
<li><a href="https://codeweek-resources.s3.eu-west-1.amazonaws.com/+discover-digital-toolkit/08_Questionnaires_Examples.pdf" target="_blank" rel="noopener noreferrer">8 - Questionnaires Examples</a></li>
<li><a href="https://codeweek-resources.s3.eu-west-1.amazonaws.com/+discover-digital-toolkit/09_HEI_Presentation_Guide.pdf" target="_blank" rel="noopener noreferrer">9 - HEI Presentation Guide</a></li>
<li><a href="https://codeweek-s3.s3.eu-west-1.amazonaws.com/files/HEI_presentation_template.pptx" target="_blank" rel="noopener noreferrer">10 - HEI Presentation Template</a></li>
</ul>
HTML,
'button_text' => 'Open the complete toolkit',
'button_url' => 'https://codeweek-resources.s3.eu-west-1.amazonaws.com/+discover-digital-toolkit/DDP_toolkit.pdf',
'secondary_button_text' => 'Download printable materials',
'secondary_button_url' => '#key-one-pagers',
'contacts_section' => null,
'register_box_section' => <<<HTML
<h2>Share your activity and build the pipeline</h2>
<p>Register school visits, campus visits, open days, workshops, and outreach actions on the EU Code Week platform to support visibility, coordination, and cumulative impact across the ecosystem.</p>
HTML,
'about_box_section' => <<<HTML
<h2>About this toolkit</h2>
<p>The programme serves as a bridge between secondary and higher education at a critical stage in the student journey. It addresses two common challenges: students who feel overwhelmed by the range of choices available and students who disengage because higher education feels distant or irrelevant. The toolkit provides structured guidance, adaptable frameworks and models, and opportunities to experience what a future educational path in STEM can look and feel like, while also engaging families and key stakeholders within secondary education.</p>
<h3>At a glance</h3>
<ul>
<li>Designed for HEIs specialising in ICT and STEM that engage directly with secondary schools to raise awareness of degree opportunities and inspire interest in advanced digital careers among secondary school students.</li>
<li>Promotes a combination of activities such as campus visits, discovery days, and digital career orientation sessions that together provide a well-rounded experience and help students to gain first-hand insight into both the academic and social environment, and to raise awareness about the opportunities offered by higher education.</li>
<li>Includes guidance for outreach, logistics, materials, evaluation, and digital communication.</li>
</ul>
HTML,
'anchor_offset' => 120,
'third_button_text' => 'Register an activity',
'third_button_url' => 'https://codeweek.eu/add?skip=1',
'meta_title' => 'Discover Digital Programme - Toolkit',
'meta_description' => 'A practical toolkit for HEIs to engage secondary school students through STEM outreach, campus experiences, and digital communication.',
'position' => 50,
// Keep unpublished so it is visible only via signed preview URL.
'active' => false,
]
);
}
}
33 changes: 33 additions & 0 deletions resources/views/codingathome/banner.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
@php
$author = $author ?? 'By EUCodeWeek';
$primaryButtonText = $primaryButtonText ?? null;
$primaryButtonUrl = $primaryButtonUrl ?? null;
$secondaryButtonText = $secondaryButtonText ?? null;
$secondaryButtonUrl = $secondaryButtonUrl ?? null;
$isExternalLink = static function (?string $url): bool {
$url = trim((string) $url);

return \Illuminate\Support\Str::startsWith($url, ['http://', 'https://', '//']);
};
@endphp

<section class="relative flex overflow-hidden">
Expand All @@ -10,6 +19,30 @@
<h2 class="text-[#1C4DA1] text-[30px] md:text-[60px] leading-9 md:leading-[72px] font-normal font-['Montserrat'] mb-4 max-md:max-w-full max-w-[532px]">
{{$title}}
</h2>
@if(!empty($primaryButtonText) && !empty($primaryButtonUrl))
<div class="mt-6 flex flex-wrap items-center gap-4">
<a
class="inline-block bg-[#F95C22] rounded-full py-2.5 px-6 font-['Blinker'] hover:bg-hover-orange duration-300 text-base font-semibold leading-7 text-black normal-case"
href="{{ $primaryButtonUrl }}"
@if($isExternalLink($primaryButtonUrl))
target="_blank" rel="noopener noreferrer"
@endif
>
{{ $primaryButtonText }}
</a>
@if(!empty($secondaryButtonText) && !empty($secondaryButtonUrl))
<a
class="inline-block rounded-full py-2.5 px-6 border border-[#1C4DA1] text-[#1C4DA1] font-['Blinker'] text-base font-semibold leading-7 normal-case hover:bg-[#1C4DA1] hover:text-white duration-300"
href="{{ $secondaryButtonUrl }}"
@if($isExternalLink($secondaryButtonUrl))
target="_blank" rel="noopener noreferrer"
@endif
>
{{ $secondaryButtonText }}
</a>
@endif
</div>
@endif
@if ($author)
<div class="absolute top-0 -translate-y-1/2 bg-yellow py-3 md:py-4 px-8 md:px-10 rounded-full text-secondary font-semibold text-[16px] leading-[22px] max-w-[80%]">
{{$author}}
Expand Down
Loading
Loading