Skip to content

Commit

Permalink
Merge pull request #2222 from codeeu/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
alainvd authored Mar 6, 2024
2 parents b2e5f28 + 2fdf152 commit 9f2cbb3
Show file tree
Hide file tree
Showing 9 changed files with 193 additions and 8 deletions.
8 changes: 6 additions & 2 deletions app/CertificateExcellence.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ class CertificateExcellence
private $id;
private $edition;

public function __construct($edition, $name_for_certificate, $type = "excellence", )
private $number_of_activities;

public function __construct($edition, $name_for_certificate, $type, $number_of_activities)
{
$this->edition = $edition;
$this->name_of_certificate_holder = $name_for_certificate;
Expand All @@ -33,7 +35,8 @@ public function __construct($edition, $name_for_certificate, $type = "excellence
$this->resource_path = resource_path() . "/latex";
$this->pdflatex = config('codeweek.pdflatex_path');
$this->id = auth()->id() . '-' . str_random(10);
$this->type = $type;
$this->number_of_activities = $number_of_activities;
$this->type = $type ?? "excellence";

$this->templateName = "{$this->type}-{$this->edition}.tex";

Expand Down Expand Up @@ -136,6 +139,7 @@ protected function customize_and_save_latex()
if ($this->type == "super-organiser") {
$template = str_replace('<CERTIFICATE_EMAIL>', $this->tex_escape($this->email_of_certificate_holder), $template);
$template = str_replace('<CERTIFICATE_DATE>', $this->tex_escape(Carbon::now()->format('d/m/Y')), $template);
$template = str_replace('<NUMBER_OF_ACTIVITIES>', $this->tex_escape($this->number_of_activities), $template);
}

//save it locally
Expand Down
2 changes: 1 addition & 1 deletion app/Mail/NotifySuperOrganiser.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct ($user, $edition)
public function build()
{
return $this
->subject("[CodeWeekEU] You are a winner !")
->subject("[EU Code Week] You are a winner !")
->markdown('emails.en.notify-super-organiser');
}
}
2 changes: 1 addition & 1 deletion app/Mail/NotifyWinner.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct ($user, $edition)
public function build()
{
return $this
->subject("[CodeWeekEU] You are a winner !")
->subject("[EU Code Week] You are a winner !")
->markdown('emails.en.notify-winner');
}
}
2 changes: 1 addition & 1 deletion app/Mail/RemindCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct ($user)
public function build()
{
return $this
->subject("[CodeWeekEU] Your feedback and your certificate of recognition")
->subject("[EU Code Week] Your feedback and your certificate of recognition")
->markdown('emails.en.remind-creator');
}
}
Binary file removed resources/latex/images/super-organiser-2023.jpg
Binary file not shown.
Binary file added resources/latex/images/super-organiser-2023.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 91 additions & 0 deletions resources/latex/super-organiser-2023.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
\documentclass[12pt]{article}
\usepackage[T2A,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[greek,russian,english]{babel}
\usepackage{mathpazo}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[landscape,a4paper]{geometry}
\geometry{verbose,tmargin=0cm,bmargin=0cm,lmargin=3cm,rmargin=3cm}
\usepackage{fancybox}
\usepackage{calc}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{url}
\usepackage{eso-pic}
\usepackage{textcomp}
\usepackage{paratype}
\usepackage{tgpagella}

\usepackage{substitutefont}
\substitutefont{T2A}{\rmdefault}{PTSerif-TLF}

\definecolor{myblue}{RGB}{40, 53, 131}

\newcommand\BackgroundPic{%
\put(0,0){%
\parbox[b][\paperheight]{\paperwidth}{%
\vfill
\centering
\includegraphics[width=\paperwidth,height=\paperheight,%
keepaspectratio]{images/super-organiser-2023.png}%
\vfill
}}}


\begin{document}
\AddToShipoutPicture{\BackgroundPic}
~
\vspace{2.2cm}
~
\begin{center}

\vspace{6.7cm}

{\centering\Huge\
\hspace{-0.9cm}
\begin{otherlanguage*}{russian}
\textcolor{myblue}{<CERTIFICATE_HOLDER_NAME>}
\end{otherlanguage*}
\par}

\vspace{1.3cm}

{\centering\Large\
\hspace{-0.9cm}
\begin{otherlanguage*}{russian}
\textbf{<NUMBER_OF_ACTIVITIES> coding activities in 2023}
\end{otherlanguage*}
\par}

\vspace{4.8cm}

{\centering\normalsize\
\hspace{-0.9cm}
\begin{otherlanguage*}{russian}
\textcolor{black}{Brussels, <CERTIFICATE_DATE>}
\end{otherlanguage*}
\par}

\begin{table}[h]
\footnotesize
\begin{center}

\end{center}
\end{table}

\vspace{-3cm}
\end{center}
\begin{table}[h]
\footnotesize
\begin{center}
\begin{tabular}{lr}
%~\hspace{0.7cm}
\end{tabular}
\end{center}
\end{table}
\vspace{-2.2cm}
\begin{center}
%\end{tabular}

\end{center}
\end{document}
90 changes: 90 additions & 0 deletions resources/latex/super-organiser_greek-2023.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
\documentclass[12pt]{article}
\usepackage[T1,LGR,T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[greek,russian,english]{babel}
\usepackage{mathpazo}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[landscape,a4paper]{geometry}
\geometry{verbose,tmargin=0cm,bmargin=0cm,lmargin=3cm,rmargin=3cm}
\usepackage{fancybox}
\usepackage{calc}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{url}
\usepackage{eso-pic}
\usepackage{textcomp}
\usepackage{paratype}
\usepackage{tgpagella}

\usepackage{substitutefont}
\substitutefont{T2A}{\rmdefault}{PTSerif-TLF}
\substitutefont{LGR}{\rmdefault}{udidot}

\definecolor{myblue}{RGB}{40, 53, 131}

\newcommand\BackgroundPic{%
\put(0,0){%
\parbox[b][\paperheight]{\paperwidth}{%
\vfill
\centering
\includegraphics[width=\paperwidth,height=\paperheight,%
keepaspectratio]{images/super-organiser-2023.png}%
\vfill
}}}


\begin{document}
\AddToShipoutPicture{\BackgroundPic}
~
\vspace{2.2cm}
~
\begin{center}

\vspace{6.7cm}

{\centering\Huge\
\begin{otherlanguage*}{greek}
\textcolor{myblue}{<CERTIFICATE_HOLDER_NAME>}
\end{otherlanguage*}
\par}

\vspace{1.3cm}

{\centering\Large\
\hspace{-0.9cm}
\begin{otherlanguage*}{greek}
\textbf{<NUMBER_OF_ACTIVITIES> coding activities in 2023}
\end{otherlanguage*}
\par}

\vspace{4.8cm}

{\centering\normalsize\
\begin{otherlanguage*}{greek}
\textcolor{black}{Βρυξέλλες, <CERTIFICATE_DATE>}
\end{otherlanguage*}
\par}

\begin{table}[h]
\footnotesize
\begin{center}

\end{center}
\end{table}

\vspace{-3cm}
\end{center}
\begin{table}[h]
\footnotesize
\begin{center}
\begin{tabular}{lr}
%~\hspace{0.7cm}
\end{tabular}
\end{center}
\end{table}
\vspace{-2.2cm}
\begin{center}
%\end{tabular}

\end{center}
\end{document}
6 changes: 3 additions & 3 deletions resources/views/emails/en/notify-super-organiser.blade.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@component('mail::message')
Dear Code Week activity organiser,
Dear EU Code Week activity organiser,

We are delighted to let you know that you successfully completed the 2022 Code Week Super Organiser Challenge. <br/>
We are delighted to let you know that you successfully completed the 2023 EU Code Week Super Organiser Challenge. <br/>

That is organising 10 or more Code Week activities in 2022. Congratulations and thank you for playing a major part in <a href="https://blog.codeweek.eu/code-week-2022-wrap-up-in-numbers/">last year’s Code Week</a>.<br/>
That is organising 10 or more EU Code Week activities in 2023. Congratulations and thank you for playing a major part in <a href="https://blog.codeweek.eu/2023-a-remarkable-year-for-eu-code-week/">last year’s EU Code Week</a>.<br/>

We believe it is vital to bring coding, computing and computational thinking to as many people as possible – and you have helped up us reach this goal!<br/>

Expand Down

0 comments on commit 9f2cbb3

Please sign in to comment.