style: adopt the E&P corporate design tokens and components
This commit is contained in:
1 parent
126a0680db
commit
acd8e78e55
12 files changed
+120
-49
No files matched your search
@@ -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;
|
||||
}
|
||||
+42
-3
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
{% set type = type|default('info') %}
|
||||
|
||||
<div class="{{ html_classes('p-4 mb-4 flex items-start space-x-2 text-gray-100 rounded-md', { 'bg-blue-600': type == 'info', 'bg-red-600': type == 'warning', 'bg-green-600': type == 'success' }) }}">
|
||||
{# light with a coloured left bar, as the notices of the apps portal (EP/apps Alert.tsx) #}
|
||||
<div class="{{ html_classes('p-4 mb-4 flex items-start space-x-2 border-l-4', { 'border-brand bg-brand-light text-ink': type == 'info', 'border-red-700 bg-red-50 text-red-950': type == 'warning', 'border-emerald-700 bg-emerald-50 text-emerald-950': type == 'success' }) }}">
|
||||
{{ icon(type == 'success' ? 'check' : 'alert', 'w-5 h-5 shrink-0') }}
|
||||
<div class="leading-relaxed text-base">
|
||||
{% block message %}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{{ encore_entry_script_tags('app') }}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body class="bg-white text-gray-700 font-sans antialiased text-sm">
|
||||
<body class="bg-page text-ink font-sans antialiased text-sm">
|
||||
{% include '_partials/_maintenance_banner.html.twig' %}
|
||||
{% block body %}{% endblock %}
|
||||
{% include '_partials/_flashes.html.twig' %}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="{{ html_classes('flex items-start space-x-4 text-white p-4 rounded-md w-full mb-8', { 'bg-primary': type != 'error', 'bg-red-500': type == 'error' }) }}">
|
||||
<div class="{{ html_classes('flex items-start space-x-4 p-4 w-full mb-8 border-l-4', { 'border-brand bg-brand-light text-ink': type != 'error', 'border-red-700 bg-red-50 text-red-950': type == 'error' }) }}">
|
||||
{{ icon(type == 'error' ? 'alert' : 'info', 'w-6 h-6 shrink-0') }}
|
||||
<span>{{ message }}</span>
|
||||
</div>
|
||||
+10
-10
@@ -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 #}
|
||||
<div class="max-h-80 divide-y divide-gray-100 overflow-y-auto rounded-md ring-1 ring-inset ring-gray-300">
|
||||
<div class="max-h-80 divide-y divide-gray-100 overflow-y-auto rounded-md ring-1 ring-inset ring-slate-500">
|
||||
{%- 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' }) -%}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{% if pageCount > 0 %}
|
||||
<div class="bg-gray-100 border border-gray-300 border-t-0 px-4 py-3 flex items-center justify-between sm:px-4">
|
||||
<div class="bg-white border border-line border-t-0 px-4 py-3 flex items-center justify-between sm:px-4">
|
||||
<div class="flex-1 flex items-center justify-between">
|
||||
<div class="flex items-center space-x-4">
|
||||
<div class="text-sm leading-5 text-gray-700">
|
||||
{{ 'paginator.info'|trans({ '{from}': firstItemNumber, '{to}': lastItemNumber, '{total}': totalCount })|raw }}
|
||||
</div>
|
||||
<select name="limit"
|
||||
class="text-sm py-1 border-gray-300"
|
||||
class="text-sm py-1 border-line"
|
||||
hx-get="{{ path(route, query|merge({(pageParameterName): 1})) }}"
|
||||
hx-replace-url="true"
|
||||
hx-target="body">
|
||||
@@ -19,43 +19,43 @@
|
||||
<nav class="relative z-0 inline-flex" hx-boost="true">
|
||||
{% if pageCount > 1 %}
|
||||
{% if first is defined and current != first %}
|
||||
<a href="{{ path(route, query|merge({(pageParameterName): first})) }}" class="relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium hover:bg-secondary hover:text-white">
|
||||
<a href="{{ path(route, query|merge({(pageParameterName): first})) }}" class="relative inline-flex items-center px-2 py-2 border border-line bg-white text-sm leading-5 font-medium hover:bg-brand hover:text-white">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5" />
|
||||
</svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if previous is defined %}
|
||||
<a href="{{ path(route, query|merge({(pageParameterName): previous})) }}" class="-ml-px relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium hover:bg-secondary hover:text-white" aria-label="Previous">
|
||||
<a href="{{ path(route, query|merge({(pageParameterName): previous})) }}" class="-ml-px relative inline-flex items-center px-2 py-2 border border-line bg-white text-sm leading-5 font-medium hover:bg-brand hover:text-white" aria-label="Previous">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5 8.25 12l7.5-7.5" />
|
||||
</svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if current > 3 %}
|
||||
<span class="-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium text-gray-700">
|
||||
<span class="-ml-px relative inline-flex items-center px-4 py-2 border border-line bg-white text-sm leading-5 font-medium text-gray-700">
|
||||
...
|
||||
</span>
|
||||
{% endif %}
|
||||
{% for page in pagesInRange %}
|
||||
<a href="{{ path(route, query|merge({(pageParameterName): page})) }}" class="-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm leading-5 font-medium focus:z-10 hover:bg-secondary {% if page == current %}bg-primary text-white hover:text-white{% else %}bg-white text-gray-700 hover:text-white{% endif %}">
|
||||
<a href="{{ path(route, query|merge({(pageParameterName): page})) }}" class="-ml-px relative inline-flex items-center px-4 py-2 border border-line text-sm leading-5 font-medium focus:z-10 hover:bg-brand {% if page == current %}bg-primary text-white hover:text-white{% else %}bg-white text-ink hover:text-white{% endif %}">
|
||||
{{ page }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% if current < pageCount - 3 %}
|
||||
<span class="-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium text-gray-700">
|
||||
<span class="-ml-px relative inline-flex items-center px-4 py-2 border border-line bg-white text-sm leading-5 font-medium text-gray-700">
|
||||
...
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if next is defined %}
|
||||
<a href="{{ path(route, query|merge({(pageParameterName): next})) }}" class="-ml-px relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium hover:bg-secondary hover:text-white" aria-label="Next">
|
||||
<a href="{{ path(route, query|merge({(pageParameterName): next})) }}" class="-ml-px relative inline-flex items-center px-2 py-2 border border-line bg-white text-sm leading-5 font-medium hover:bg-brand hover:text-white" aria-label="Next">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5" />
|
||||
</svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if last is defined and current != last %}
|
||||
<a href="{{ path(route, query|merge({(pageParameterName): last})) }}" class="-ml-px relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium hover:bg-secondary hover:text-white">
|
||||
<a href="{{ path(route, query|merge({(pageParameterName): last})) }}" class="-ml-px relative inline-flex items-center px-2 py-2 border border-line bg-white text-sm leading-5 font-medium hover:bg-brand hover:text-white">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5" />
|
||||
</svg>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% if pageCount > 0 %}
|
||||
<div class="bg-gray-100 border border-gray-200 rounded-md px-4 py-3 flex items-center justify-between sm:px-4">
|
||||
<div class="card px-4 py-3 flex items-center justify-between sm:px-4">
|
||||
<div class="flex-1 flex items-center justify-between">
|
||||
<div>
|
||||
<p class="text-sm leading-5 text-gray-700">{{ 'paginator.info'|trans({ '{from}': firstItemNumber, '{to}': lastItemNumber, '{total}': totalCount })|raw }}</p>
|
||||
@@ -8,29 +8,29 @@
|
||||
<nav class="relative z-0 inline-flex" hx-boost="true">
|
||||
{% if pageCount > 1 %}
|
||||
{% if previous is defined %}
|
||||
<a href="{{ path(route, query|merge({(pageParameterName): previous})) }}" class="relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium hover:bg-secondary hover:text-white" aria-label="Previous">
|
||||
<a href="{{ path(route, query|merge({(pageParameterName): previous})) }}" class="relative inline-flex items-center px-2 py-2 border border-line bg-white text-sm leading-5 font-medium hover:bg-brand hover:text-white" aria-label="Previous">
|
||||
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
|
||||
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if current > 3 %}
|
||||
<span class="-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium text-gray-700">
|
||||
<span class="-ml-px relative inline-flex items-center px-4 py-2 border border-line bg-white text-sm leading-5 font-medium text-gray-700">
|
||||
...
|
||||
</span>
|
||||
{% endif %}
|
||||
{% for page in pagesInRange %}
|
||||
<a href="{{ path(route, query|merge({(pageParameterName): page})) }}" class="-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm leading-5 font-medium focus:z-10 hover:bg-secondary {% if page == current %}bg-primary text-white hover:text-white{% else %}bg-white text-gray-700 hover:text-white{% endif %}">
|
||||
<a href="{{ path(route, query|merge({(pageParameterName): page})) }}" class="-ml-px relative inline-flex items-center px-4 py-2 border border-line text-sm leading-5 font-medium focus:z-10 hover:bg-brand {% if page == current %}bg-primary text-white hover:text-white{% else %}bg-white text-ink hover:text-white{% endif %}">
|
||||
{{ page }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% if current < pageCount - 3 %}
|
||||
<span class="-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium text-gray-700">
|
||||
<span class="-ml-px relative inline-flex items-center px-4 py-2 border border-line bg-white text-sm leading-5 font-medium text-gray-700">
|
||||
...
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if next is defined %}
|
||||
<a href="{{ path(route, query|merge({(pageParameterName): next})) }}" class="-ml-px relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium hover:bg-secondary hover:text-white" aria-label="Next">
|
||||
<a href="{{ path(route, query|merge({(pageParameterName): next})) }}" class="-ml-px relative inline-flex items-center px-2 py-2 border border-line bg-white text-sm leading-5 font-medium hover:bg-brand hover:text-white" aria-label="Next">
|
||||
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
|
||||
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
||||
Reference in new issue
Block a user