diff --git a/assets/styles/_components.css b/assets/styles/_components.css
index b4b1a9d..fe2e729 100644
--- a/assets/styles/_components.css
+++ b/assets/styles/_components.css
@@ -8,3 +8,18 @@
@import "./components/timeline.css";
@import "./components/mail-body.css";
@import "./components/questionnaire.css";
+
+/* the entries of the header's account menu (_partials/_user_menu.html.twig) */
+.user-menu-item {
+ @apply flex items-center gap-x-3 px-4 py-2 text-ink no-underline hover:bg-page hover:text-brand;
+}
+
+/* white box on the light blue page, as the card of the apps portal (EP/apps frontend/components/ui.ts) */
+.card {
+ @apply border border-line bg-white;
+}
+
+/* heading of a section or card */
+.section-title {
+ @apply text-base font-semibold uppercase tracking-wide text-brand;
+}
diff --git a/assets/styles/app.css b/assets/styles/app.css
index e236087..615bca7 100644
--- a/assets/styles/app.css
+++ b/assets/styles/app.css
@@ -6,12 +6,45 @@
@source inline("rotate-90");
+/*
+ * Corporate design of the internal E&P tools, as defined by the apps portal (Gitea EP/apps,
+ * frontend/app/globals.css) and ported to Symfony by epbms: Lato, deep blue as the brand colour,
+ * magenta only for the main action, square shapes, light blue page.
+ * Status colours (green, red, amber) always come with text, never alone.
+ */
@theme {
--font-sans: Lato, sans-serif;
--font-weight-semibold: 700;
--font-weight-bold: 900;
- --color-primary: #3d8ccb;
- --color-secondary: #f9c700;
+
+ /* square everywhere; rounded-full stays round. Plain `rounded` reads --radius. */
+ --radius: 0px;
+ --radius-xs: 0px;
+ --radius-sm: 0px;
+ --radius-md: 0px;
+ --radius-lg: 0px;
+ --radius-xl: 0px;
+ --radius-2xl: 0px;
+ --radius-3xl: 0px;
+ --radius-4xl: 0px;
+
+ --color-brand: #18527b; /* E&P deep blue, 8.5:1 on white */
+ --color-brand-dark: #103c5b;
+ --color-brand-mid: #165883;
+ --color-brand-bright: #009fff; /* underlines and focus, never text */
+ --color-brand-light: #e3eef8;
+
+ --color-page: #ebf3fa; /* page background */
+ --color-line: #d8e3ed; /* borders */
+ --color-ink: #27272a; /* text */
+ --color-muted: #52525b; /* secondary text, 7.7:1 on white */
+
+ --color-accent: #c4097c; /* magenta of the main action */
+ --color-accent-from: #960167;
+ --color-accent-to: #fa1a8c;
+
+ /* the colour name the templates were written with, now on the brand colour */
+ --color-primary: var(--color-brand);
}
/*
@@ -24,7 +57,7 @@
::before,
::backdrop,
::file-selector-button {
- border-color: var(--color-gray-200, currentcolor);
+ border-color: var(--color-line, currentcolor);
}
button:not(:disabled),
@@ -43,4 +76,10 @@
scrollbar-width: thin;
scrollbar-color: var(--color-gray-300) transparent;
}
+
+ /* visible keyboard focus everywhere (WCAG 2.4.7) */
+ :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
+ outline: 3px solid var(--color-brand-bright);
+ outline-offset: 2px;
+ }
}
diff --git a/assets/styles/components/button.css b/assets/styles/components/button.css
index eafe76b..cb3e705 100644
--- a/assets/styles/components/button.css
+++ b/assets/styles/components/button.css
@@ -1,16 +1,28 @@
+/*
+ * Buttons as in the apps portal (EP/apps frontend/components/ui.ts): square, small bold uppercase.
+ * The default is filled brand blue; magenta (.btn--cta) only for the one main action of a page.
+ */
.btn {
- @apply inline-flex space-x-1 justify-center items-center rounded-lg text-sm uppercase font-semibold py-2.5 px-4;
- @apply bg-primary text-white hover:bg-primary/80 shadow-md disabled:opacity-50 disabled:cursor-not-allowed;
+ @apply inline-flex space-x-1 justify-center items-center text-xs uppercase tracking-wide font-semibold py-2.5 px-4 no-underline transition-colors;
+ @apply bg-brand text-white hover:bg-brand-dark disabled:opacity-50 disabled:cursor-not-allowed;
}
.btn--small {
- @apply text-xs py-1 px-2 rounded-md;
+ @apply py-1 px-2;
}
.btn--secondary {
- @apply bg-secondary text-gray-800 hover:bg-secondary/80;
+ @apply border border-brand bg-white text-brand hover:bg-brand hover:text-white;
}
-.btn--active {
- @apply shadow-none;
+.btn--cta {
+ background-image: linear-gradient(120deg, var(--color-accent-from), #9e036a 40%, var(--color-accent-to));
+}
+
+.btn--cta:hover {
+ background-image: linear-gradient(120deg, #7d0156, #8a035d 40%, #e3107c);
+}
+
+.btn--cta:disabled {
+ background-image: none;
}
diff --git a/assets/styles/components/datatable.css b/assets/styles/components/datatable.css
index 2ccd0ef..29e4772 100644
--- a/assets/styles/components/datatable.css
+++ b/assets/styles/components/datatable.css
@@ -20,12 +20,13 @@ tbody {
@apply bg-white;
}
+/* rows and head as the table head of the apps portal (EP/apps frontend/components/ui.ts) */
tr {
- @apply border border-gray-300;
+ @apply border-b border-line;
}
th {
- @apply px-4 py-2 bg-gray-200 text-left leading-4 font-bold text-primary align-top;
+ @apply px-4 py-2 bg-white border-b-2 border-brand text-left text-[11px] leading-4 font-semibold uppercase tracking-wide text-brand align-top;
}
td {
@@ -38,5 +39,5 @@ table.horizontal td {
}
.data-table tbody tr {
- @apply hover:bg-gray-100;
+ @apply hover:bg-brand-light/50;
}
diff --git a/assets/styles/components/datepicker.css b/assets/styles/components/datepicker.css
index 5f85bc8..27a4006 100644
--- a/assets/styles/components/datepicker.css
+++ b/assets/styles/components/datepicker.css
@@ -3,8 +3,8 @@
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
- background-color: var(--color-secondary);
- border-color: var(--color-secondary);
+ background-color: var(--color-brand);
+ border-color: var(--color-brand);
}
.flatpickr-monthDropdown-months,
diff --git a/assets/styles/components/toast.css b/assets/styles/components/toast.css
index 1ba1b98..75e862f 100644
--- a/assets/styles/components/toast.css
+++ b/assets/styles/components/toast.css
@@ -1,20 +1,23 @@
@import "toastify-js/src/toastify.css";
.toastify {
- @apply shadow-lg rounded-sm;
+ @apply max-w-sm border-l-4 px-4 py-3 text-sm shadow-lg;
+ background: none;
}
+/* in the colours of the alerts, as in epbms */
.toastify--success {
- @apply text-gray-100;
- background: var(--color-emerald-600);
+ @apply border-emerald-700 bg-emerald-50 text-emerald-950;
}
.toastify--warning {
- @apply text-gray-100;
- background: var(--color-red-600);
+ @apply border-red-700 bg-red-50 text-red-950;
}
.toastify--info {
- @apply text-gray-100;
- background: var(--color-blue-600);
+ @apply border-brand bg-brand-light text-ink;
+}
+
+.toastify .toast-close {
+ @apply ml-3 text-current opacity-60 hover:opacity-100;
}
diff --git a/templates/_partials/_alert.html.twig b/templates/_partials/_alert.html.twig
index 4269094..5652d2b 100644
--- a/templates/_partials/_alert.html.twig
+++ b/templates/_partials/_alert.html.twig
@@ -1,6 +1,7 @@
{% set type = type|default('info') %}
-
+{# light with a coloured left bar, as the notices of the apps portal (EP/apps Alert.tsx) #}
+
{{ icon(type == 'success' ? 'check' : 'alert', 'w-5 h-5 shrink-0') }}
{% block message %}
diff --git a/templates/base.html.twig b/templates/base.html.twig
index 2003fe1..e809022 100644
--- a/templates/base.html.twig
+++ b/templates/base.html.twig
@@ -15,7 +15,7 @@
{{ encore_entry_script_tags('app') }}
{% endblock %}
-
+
{% include '_partials/_maintenance_banner.html.twig' %}
{% block body %}{% endblock %}
{% include '_partials/_flashes.html.twig' %}
diff --git a/templates/components/messagebox.html.twig b/templates/components/messagebox.html.twig
index 485f0e6..33c9880 100644
--- a/templates/components/messagebox.html.twig
+++ b/templates/components/messagebox.html.twig
@@ -1,4 +1,4 @@
-
+
{{ icon(type == 'error' ? 'alert' : 'info', 'w-6 h-6 shrink-0') }}
{{ message }}
diff --git a/templates/forms.html.twig b/templates/forms.html.twig
index b026cf8..ca1b4e2 100644
--- a/templates/forms.html.twig
+++ b/templates/forms.html.twig
@@ -41,11 +41,11 @@
{%- block form_widget_simple -%}
{%- set type = type|default('text') -%}
{%- if type != 'hidden' -%}
- {%- set attr = attr|merge({'class': (attr.class|default('') ~ ' block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset text-sm')|trim }) -%}
+ {%- set attr = attr|merge({'class': (attr.class|default('') ~ ' block w-full rounded-md border-0 py-1.5 text-gray-900 ring-1 ring-inset ring-slate-500 focus:ring-2 focus:ring-inset text-sm')|trim }) -%}
{%- if errors|length -%}
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' ring-red-500 placeholder-red-500 focus:ring-red-500' }) -%}
{% else %}
- {%- set attr = attr|merge({'class': attr.class|default('') ~ ' placeholder:text-gray-400 focus:ring-primary' }) -%}
+ {%- set attr = attr|merge({'class': attr.class|default('') ~ ' placeholder:text-slate-500 focus:ring-brand-bright' }) -%}
{%- endif -%}
{%- if disabled is defined and disabled == true -%}
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' cursor-not-allowed' }) -%}
@@ -58,11 +58,11 @@
{%- endblock form_widget_simple -%}
{%- block textarea_widget -%}
- {%- set attr = attr|merge({'class': (attr.class|default('') ~ ' block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset text-sm')|trim }) -%}
+ {%- set attr = attr|merge({'class': (attr.class|default('') ~ ' block w-full rounded-md border-0 py-1.5 text-gray-900 ring-1 ring-inset ring-slate-500 focus:ring-2 focus:ring-inset text-sm')|trim }) -%}
{%- if errors|length -%}
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' ring-red-500 placeholder-red-500 focus:ring-red-500' }) -%}
{% else %}
- {%- set attr = attr|merge({'class': attr.class|default('') ~ ' placeholder:text-gray-400 focus:ring-primary' }) -%}
+ {%- set attr = attr|merge({'class': attr.class|default('') ~ ' placeholder:text-slate-500 focus:ring-brand-bright' }) -%}
{%- endif -%}
{%- if disabled is defined and disabled == true -%}
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' cursor-not-allowed' }) -%}
@@ -102,11 +102,11 @@
{% endblock %}
{%- block choice_widget_collapsed -%}
- {%- set attr = attr|merge({'class': (attr.class|default('') ~ ' block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset text-sm')|trim }) -%}
+ {%- set attr = attr|merge({'class': (attr.class|default('') ~ ' block w-full rounded-md border-0 py-1.5 text-gray-900 ring-1 ring-inset ring-slate-500 focus:ring-2 focus:ring-inset text-sm')|trim }) -%}
{%- if errors|length -%}
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' ring-red-500 placeholder-red-500 focus:ring-red-500' }) -%}
{% else %}
- {%- set attr = attr|merge({'class': attr.class|default('') ~ ' placeholder:text-gray-400 focus:ring-primary' }) -%}
+ {%- set attr = attr|merge({'class': attr.class|default('') ~ ' placeholder:text-slate-500 focus:ring-brand-bright' }) -%}
{%- endif -%}
{%- if disabled is defined and disabled == true -%}
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' cursor-not-allowed' }) -%}
@@ -146,7 +146,7 @@
{# 82% of destinations have seven boarding points or fewer and fit without scrolling;
the longest hold fifteen, which would otherwise stretch the form past the fields
beside it #}
-
+
{%- for child in form %}
{%- set departure = child.vars.attr['data-departure']|default('') -%}
{%- set street = child.vars.attr['data-street']|default('') -%}
@@ -441,7 +441,7 @@
{%- block datepicker_widget -%}
{%- set minDate = form.vars.min_date ? form.vars.min_date | date('Y-m-d') : null -%}
{%- set maxDate = form.vars.max_date ? form.vars.max_date | date('Y-m-d') : null -%}
- {%- set attr = attr|merge({'class': (attr.class|default('') ~ ' block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset text-sm')|trim }) -%}
+ {%- set attr = attr|merge({'class': (attr.class|default('') ~ ' block w-full rounded-md border-0 py-1.5 text-gray-900 ring-1 ring-inset ring-slate-500 focus:ring-2 focus:ring-inset text-sm')|trim }) -%}
{%- if errors|length -%}
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' ring-red-500 placeholder:red-500 focus:ring-red-500' }) -%}
{% else %}
@@ -459,11 +459,11 @@
{%- endblock datepicker_widget %}
{%- block autocomplete_widget -%}
- {%- set attr = attr|merge({'class': (attr.class|default('') ~ ' autocomplete-input block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset text-sm')|trim }) -%}
+ {%- set attr = attr|merge({'class': (attr.class|default('') ~ ' autocomplete-input block w-full rounded-md border-0 py-1.5 text-gray-900 ring-1 ring-inset ring-slate-500 focus:ring-2 focus:ring-inset text-sm')|trim }) -%}
{%- if errors|length -%}
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' ring-red-500 placeholder-red-500 focus:ring-red-500' }) -%}
{% else %}
- {%- set attr = attr|merge({'class': attr.class|default('') ~ ' placeholder:text-gray-400 focus:ring-primary' }) -%}
+ {%- set attr = attr|merge({'class': attr.class|default('') ~ ' placeholder:text-slate-500 focus:ring-brand-bright' }) -%}
{%- endif -%}
{%- if disabled is defined and disabled == true -%}
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' cursor-not-allowed' }) -%}
diff --git a/templates/paginator/sliding.html.twig b/templates/paginator/sliding.html.twig
index 5650282..9d4433d 100644
--- a/templates/paginator/sliding.html.twig
+++ b/templates/paginator/sliding.html.twig
@@ -1,12 +1,12 @@
{% if pageCount > 0 %}
-
+
{{ 'paginator.info'|trans({ '{from}': firstItemNumber, '{to}': lastItemNumber, '{total}': totalCount })|raw }}