Skip to content
Merged
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
4 changes: 2 additions & 2 deletions app/OnlineCoursesPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public static function config(): self
'use_dynamic_content' => false,
'hero_title' => 'Online Courses',
'hero_text' => __('online-courses.online-courses-text'),
'hero_cta_text' => 'Optional secondary CTA introduction to online courses',
'hero_cta_link' => '/',
'hero_cta_text' => null,
'hero_cta_link' => null,
'intro_title' => 'EU Code Week Online Courses',
'intro_text_1' => __('online-courses.online-courses-sub-text1'),
'intro_text_2' => __('online-courses.online-courses-sub-text2'),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

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

return new class extends Migration
{
public function up(): void
{
if (! Schema::hasTable('online_courses_page')) {
return;
}

DB::table('online_courses_page')
->where('hero_cta_text', 'Optional secondary CTA introduction to online courses')
->update([
'hero_cta_text' => null,
'hero_cta_link' => null,
]);
}

public function down(): void
{
// Placeholder CTA intentionally removed; no restore.
}
};
4 changes: 2 additions & 2 deletions database/seeders/EditableStaticPagesSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ private function seedOnlineCoursesPage(): void
'use_dynamic_content' => true,
'hero_title' => 'Online Courses',
'hero_text' => __('online-courses.online-courses-text'),
'hero_cta_text' => 'Optional secondary CTA introduction to online courses',
'hero_cta_link' => '/',
'hero_cta_text' => null,
'hero_cta_link' => null,
'intro_title' => 'EU Code Week Online Courses',
'intro_text_1' => __('online-courses.online-courses-sub-text1'),
'intro_text_2' => __('online-courses.online-courses-sub-text2'),
Expand Down
67 changes: 67 additions & 0 deletions docs/getting-help-public.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Getting help with CodeWeek

This page explains how to get help with your **CodeWeek** account, activities, or
certificates. It's for teachers, organisers, and participants.

---

## How to ask for help

The fastest way to reach the CodeWeek team is the official contact channel:

- **Contact form / email:** use the contact option on the CodeWeek website at
[codeweek.eu](https://codeweek.eu)

When you get in touch, please include:

1. **The email address** you registered with on CodeWeek
2. **Your CodeWeek 4all code** (if your question is about an activity or certificate)
3. **A clear description** of the problem and what you'd like help with

Including these details up front helps the team look into your request without
needing to email back and forth.

---

## Common topics

### Signing in / account access
If you can't sign in, double-check you're using the email address you originally
registered with. If you still have trouble, contact the team with that email address
and a short description of what happens when you try to log in.

### Certificates
Participation and Certificate of Excellence availability depends on the activities
registered under your 4all code. You can find and download available certificates
after signing in:

- [codeweek.eu/certificates](https://codeweek.eu/certificates)

If you believe a certificate is missing, include your **registered email** and your
**4all code** when you contact the team so they can check your specific case.

### Activities and events
For questions about adding, editing, or finding activities, contact the team with your
registered email and 4all code and describe what you're trying to do.

---

## What to expect

- The team reviews requests and replies by email.
- For account or data changes, the team verifies the details before making any change —
so please use the **same email address** associated with your CodeWeek account where
possible.
- Response times vary with demand, especially around the annual CodeWeek period.

---

## Privacy

Only share the information needed to resolve your request (typically your registered
email and 4all code). Please don't include passwords or other sensitive personal data
in your message.

---

*For more about CodeWeek, visit [codeweek.eu](https://codeweek.eu).*
6 changes: 4 additions & 2 deletions resources/views/online-courses.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@
@lang('online-courses.online-courses-text')
@endif
</p>
@if($dynamic && $page->hero_cta_text && $page->hero_cta_link)
<span class="text-dark-blue font-semibold text-lg ">
<a href="{{ $dynamic && $page->hero_cta_link ? $page->hero_cta_link : '/' }}" class="cursor-pointer text-dark-blue underline mr-1">
{{ $dynamic && $page->hero_cta_text ? $page->hero_cta_text : 'Optional secondary CTA introduction to online courses' }}
<a href="{{ $page->hero_cta_link }}" class="cursor-pointer text-dark-blue underline mr-1">
{{ $page->hero_cta_text }}
</a>
</span>
@endif

</div>
<div class="order-0 md:order-2 flex flex-1 justify-center items-center z-10"></div>
Expand Down
91 changes: 91 additions & 0 deletions scripts/fix-blog-chevron-position-remove-arrow.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#!/usr/bin/env bash
# Chevron position (right: -.8rem) + remove arrow.png from Share your stories submenu.
set -euo pipefail

THEME="${THEME:-/var/www/html/blog/wp-content/themes/eucodewe-1389}"
WP_ROOT="${WP_ROOT:-/var/www/html/blog}"
SHARE_TEXT="Share your stories"

[[ -d "$THEME" ]] || { echo "Theme not found: $THEME"; exit 1; }
[[ -d "$WP_ROOT" ]] || { echo "WP_ROOT not found: $WP_ROOT"; exit 1; }

cd "$THEME"
chmod u+w new.css 2>/dev/null || true

python3 <<'PY'
from pathlib import Path
import re

css = Path("new.css")
text = css.read_text()

# Don't hide chevron on last top-level item when it has children (Blog)
text = text.replace(
".header__menu nav > ul > li:last-child a:after {\n display: none;\n}",
".header__menu nav > ul > li:last-child:not(.menu-item-has-children) a:after {\n display: none;\n}",
)

chevron_sel = (
"li.menu-item.menu-item-type-custom.menu-item-object-custom.menu-item-has-children a:after"
)
chevron_block = """li.menu-item.menu-item-type-custom.menu-item-object-custom.menu-item-has-children a:after {
content: "";
width: 10px;
height: 10px;
background: url(https://codeweek.eu/blog/wp-content/uploads/2025/01/Vector-6.svg);
display: block;
background-size: contain;
background-repeat: no-repeat;
background-position: center;
transition: 0.3s;
right: -.8rem;
}"""

pattern = re.compile(
r"li\.menu-item\.menu-item-type-custom\.menu-item-object-custom\.menu-item-has-children a:after\s*\{[^}]+\}",
re.S,
)
if pattern.search(text):
text = pattern.sub(chevron_block, text, count=1)
print("Updated chevron rule with right: -.8rem")
else:
print("WARNING: chevron rule not found — append manually if needed")

# Remove submenu arrow layout overrides (no longer needed)
for pat in [
r"\n/\* Blog dropdown: Share your stories.*?(?=\n/\* |\Z)",
r"\n/\* Blog nav: restore dropdown chevron.*?(?=\n/\* |\Z)",
r"\n/\* Blog nav: chevron on Blog.*?(?=\n/\* |\Z)",
]:
text = re.sub(pat, "\n", text, flags=re.S)

css.write_text(text)
print("Patched new.css")
PY

echo "--- chevron rule ---"
grep -n -A12 "menu-item-has-children a:after" new.css | head -15

cd "$WP_ROOT"
command -v wp >/dev/null 2>&1 || { echo "wp-cli required for menu arrow removal"; exit 1; }

SHARE_ID=""
for menu in primary header main "Menu 1" 2; do
SHARE_ID=$(wp menu item list "$menu" --fields=db_id,title --format=csv --allow-root 2>/dev/null \
| awk -F, -v t="$SHARE_TEXT" '$2 ~ t {print $1; exit}') || true
[[ -n "${SHARE_ID:-}" ]] && break
done
SHARE_ID="${SHARE_ID:-8142}"

wp eval --allow-root "
\$id = (int) ${SHARE_ID};
delete_post_meta(\$id, 'rt-wp-menu-custom-fields');
delete_transient('rt-wp-menu-custom-fields-' . \$id);
echo \"Removed arrow custom HTML from menu item \$id\n\";
"

wp cache flush --allow-root 2>/dev/null | tail -1 || true
for svc in php8.3-fpm php8.2-fpm php8.1-fpm php8.0-fpm; do
systemctl is-active --quiet "$svc" 2>/dev/null && systemctl reload "$svc" && echo "Reloaded $svc" && break
done
echo "Done. Hard-refresh https://codeweek.eu/blog/"
19 changes: 19 additions & 0 deletions scripts/fix-blog-footer-js-stray-brace.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Remove stray }); breaking blog footer JS.
set -euo pipefail
WP_ROOT="${WP_ROOT:-/var/www/html/blog}"
cd "$WP_ROOT"
wp eval --allow-root '
$settings = get_option("auhfc_settings_sitewide");
$footer = $settings["footer"] ?? "";
$footer = str_replace(
"$(\".mobile-nav .menu-menu-1-container\").append(actionButtons);\n});\n\t});",
"$(\".mobile-nav .menu-menu-1-container\").append(actionButtons);\n});",
$footer
);
$settings["footer"] = $footer;
update_option("auhfc_settings_sitewide", $settings);
echo "Removed stray }); from footer script\n";
' 2>/dev/null | grep -v '^Deprecated:\|^Notice:\|^Warning:\|^PHP Warning:' || true
wp cache flush --allow-root 2>/dev/null | tail -1 || true
echo Done.
Loading