|
1 |
| -{% extends 'ux_packages/package.html.twig' %} |
2 |
| - |
3 |
| -{% block package_header %} |
4 |
| - {% component PackageHeader with { |
5 |
| - package: 'swup', |
6 |
| - eyebrowText: 'Slick Page Transitions' |
7 |
| - } %} |
8 |
| - {% block title_header %} |
9 |
| - Ajax Page Transitions with <em>Swup</em> |
10 |
| - {% endblock %} |
11 |
| - |
12 |
| - {% block sub_content %} |
13 |
| - Replace full page refreshes with Ajax-powered, stylized page transitions (an alternative to Turbo). |
14 |
| - {% endblock %} |
15 |
| - {% endcomponent %} |
16 |
| -{% endblock %} |
17 |
| - |
18 |
| -{% block code_block_left %} |
19 |
| - <twig:CodeBlock filename="src/Controller/UxPackage/SwupController.php"/> |
20 |
| -{% endblock %} |
21 |
| - |
22 |
| -{% block code_block_right %} |
23 |
| - <twig:CodeBlock |
24 |
| - filename="templates/ux_packages/swup.html.twig" |
25 |
| - targetTwigBlock="swup_specific_demo_content" |
26 |
| - /> |
27 |
| -{% endblock %} |
28 |
| - |
29 |
| -{% block demo_title %}UX Swup{% endblock %} |
30 |
| - |
31 |
| -{% block demo_content %} |
32 |
| - {% block swup_specific_demo_content %} |
33 |
| - <div data-controller="symfony--ux-swup--swup" id="swup" data-turbo="false"> |
34 |
| - |
35 |
| - <div class="PackageList"> |
36 |
| - {% for package in results %} |
37 |
| - {{ include('components/Package/PackageListItem.html.twig', {package}) }} |
38 |
| - {% endfor %} |
39 |
| - </div> |
40 |
| - |
41 |
| - <div class="mt-3"> |
42 |
| - <nav class="Pagination"> |
43 |
| - {% for num in 1..pages %} |
44 |
| - <a href="{{ path('app_swup', num > 1 ? {page: num} : {}) }}" |
45 |
| - aria-current="{{ page == num ? 'true' : 'false' }}"> |
46 |
| - {{ num }} |
47 |
| - </a> |
48 |
| - {% endfor %} |
49 |
| - </nav> |
50 |
| - </div> |
| 1 | +{% extends 'base.html.twig' %} |
| 2 | + |
| 3 | +{% set meta = { |
| 4 | + title: package.humanName ~ ' - Symfony UX 2', |
| 5 | + description: package.description, |
| 6 | + canonical: url(package.route), |
| 7 | + social: { |
| 8 | + title: package.tagline ~ ' - Symfony UX 2' ~ package.humanName|u.trimStart('UX '), |
| 9 | + description: package.description|striptags, |
| 10 | + image: { |
| 11 | + url: absolute_url(asset(package.getSocialImage('1200x675'))), |
| 12 | + type: 'image/png', |
| 13 | + width: 1200, |
| 14 | + height: 675, |
| 15 | + alt: package.humanName ~ ' - Component Icon', |
| 16 | + }, |
| 17 | + } |
| 18 | +} %} |
| 19 | + |
| 20 | +{% block main %} |
| 21 | + <main class="deprecated-package"> |
| 22 | + <div class=""> |
| 23 | + <p class="deprecated-badge">Deprecated Package</p> |
| 24 | + <h1 class="mb-4">UX Swup 2.x</h1> |
| 25 | + <p>This component is <strong>deprecated</strong> and will not receive further updates. Please consider |
| 26 | + using <a href="/turbo" class="link">Symfony UX Turbo</a> for modern page |
| 27 | + transitions.</p> |
51 | 28 | </div>
|
52 |
| - {% endblock %} |
| 29 | + </main> |
| 30 | +{% endblock %} |
53 | 31 |
|
54 |
| - <div class="d-flex eyebrows pt-3 gap-2 align-items-center justify-content-center flex-wrap"> |
55 |
| - <div>Ajax-powered page navigation</div> |
56 |
| - <twig:ux:icon name="circle-fill" /> |
57 |
| - <div>URL in address bar changes</div> |
58 |
| - <twig:ux:icon name="circle-fill" /> |
59 |
| - <div>Customizable transitions</div> |
60 |
| - </div> |
| 32 | +{% block stylesheets %} |
| 33 | + {{ parent() }} |
| 34 | + <style> |
| 35 | + .deprecated-package { |
| 36 | + display: grid; |
| 37 | + place-content: center; |
| 38 | + text-align: center; |
| 39 | + padding-top: 5rem; |
| 40 | + max-width: 36rem; |
| 41 | + margin-block: auto; |
| 42 | + align-self: center; |
| 43 | + } |
| 44 | + .deprecated-badge { |
| 45 | + opacity: 0.85; |
| 46 | + background: orange; |
| 47 | + display: inline-block; |
| 48 | + padding: .1rem .6rem; |
| 49 | + border-radius: .1rem; |
| 50 | + box-shadow: 0 0 -3px 4px rgb(0 0 0 / .1); |
| 51 | + color: #000; |
| 52 | + font-size: .875rem; |
| 53 | + text-shadow: 0 1px 4px #fff; |
| 54 | + transform-origin: center; |
| 55 | + transform: translateY(0rem) rotate(11deg) translateX(8rem); |
| 56 | + } |
| 57 | + </style> |
61 | 58 | {% endblock %}
|
0 commit comments