<div id="pagination-84654-63696" class="pagination">
    <div class="pagination__bar">
        <div class="pagination__current">Seite 1 von 110</div>

        <div class="pagination__buttons">
            <button class="navigation-button" type="button" title="Vorherige Seite" disabled>
                <svg class="icon icon--caret-left" viewBox="0 0 200 200" aria-hidden="true">
                    <use xlink:href="/assets/icons/icons.3bafb6df0d.svg#caret-left"></use>
                </svg></button>

            <a class="navigation-button" title="Nächste Seite" href="#">
                <svg class="icon icon--caret-right" viewBox="0 0 200 200" aria-hidden="true">
                    <use xlink:href="/assets/icons/icons.3bafb6df0d.svg#caret-right"></use>
                </svg></a>
        </div>
    </div>

    <form class="pagination__jump">

        <label class="pagination__jump-label" for="pagination-84654-63696-jump-input">Spring zu Seite</label>

        <input id="pagination-84654-63696-jump-input" name="p" class="pagination__jump-input" type="number" min="1" max="110" steps="1">

        <button class="pagination__jump-submit u-underline" type="submit">Los »</button>
    </form>
</div>
{% set prevUrl = prevUrl ?? false %}
{% set nextUrl = nextUrl ?? false %}
{% set id = id ??? html_id('pagination') -%}

<div {{ html_attributes({
  id: id,
  class: 'pagination',
}, attrs ?? {}) }}>
  <div class="pagination__bar">
    <div class="pagination__current">
      {{- 'Page {current} of {total}' | t('site', { current: current, total: total }) -}}
    </div>

    <div class="pagination__buttons">
      {% include '@navigation-button' with {
        title: 'Previous page' | t('site'),
        direction: 'left',
        link: prevUrl,
        disabled: not prevUrl,
      } only %}

      {% include '@navigation-button' with {
        title: 'Next page' | t('site'),
        direction: 'right',
        link: nextUrl,
        disabled: not nextUrl,
      } only %}
    </div>
  </div>

  {% if jump|default %}
    <form {{ html_attributes({
      class: 'pagination__jump',
      method: jump.method ?? false,
      action: jump.action ?? false,
    }) }}>
      {{ jump.actionInput|default ? actionInput(jump.actionInput) }}
      {{ jump.csrfInput|default ? csrfInput() }}
      {{ jump.redirectInput|default ? redirectInput(jump.redirectInput) }}
      {{ jump.successMessageInput|default ? successMessageInput(jump.successMessageInput) }}
      {{ jump.failMessageInput|default ? failMessageInput(jump.failMessageInput) }}

      {% for name, value in jump.hiddenInputs|default %}
        {{ hiddenInput(name, value) }}
      {% endfor %}

      <label class="pagination__jump-label" for="{{ 'jump-input' | namespaceInputId(id) }}">
        {{- 'Jump to page' | t('site') -}}
      </label>

      <input {{ html_attributes({
        id: 'jump-input' | namespaceInputId(id),
        name: jump.name,
        class: 'pagination__jump-input',
        type: 'number',
        min: 1,
        max: total,
        steps: 1,
      }) }}>

      <button class="pagination__jump-submit u-underline" type="submit">
        {{- 'Go »' | t('site') -}}
      </button>
    </form>
  {% endif %}
</div>
{
  "total": 110,
  "current": 1,
  "nextUrl": "#",
  "prevUrl": null,
  "jump": {
    "name": "p"
  }
}
  • Content:
    .pagination {
      font-size: var(--pagination-font-size, 1.8rem);
    }
    
    .pagination__bar {
      align-items: center;
      display: flex;
      justify-content: space-between;
    }
    
    .pagination__buttons {
      display: flex;
      gap: 2rem;
      overflow: visible;
    }
    
    .pagination__jump {
      align-items: center;
      display: flex;
      font-size: 1.6rem;
      gap: 2rem;
      justify-content: center;
      margin-block-start: 3rem;
    }
    
    .pagination__jump-input {
      background-color: var(--color-grey-x-light);
      font-size: 1.6rem;
      inline-size: 8rem;
      padding: 0.5rem 1rem;
    }
    
    .pagination__jump-submit {
      --underline-color: var(--color-orange);
      --underline-color--enter: transparent;
    
      color: var(--color-orange);
      transition-property: color, text-decoration-color;
    
      &:is(:focus:not(.has-invisible-focus), :hover:not([disabled])) {
        color: var(--color-midnight);
      }
    }
    
  • URL: /components/raw/pagination/pagination.scss
  • Filesystem Path: src/components/2-molecules/pagination/pagination.scss
  • Size: 836 Bytes

No notes defined.