Skip to content

Commit 13b8b4f

Browse files
committed
Reusable partial and used in twigs
1 parent b10f243 commit 13b8b4f

170 files changed

Lines changed: 1624 additions & 4043 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/App/templates/layout/default.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
<li class="nav-item"><a class="nav-link" href="https://docs.dotkernel.org/" target="_blank" rel="noopener">Documentation</a></li>
5959
<li class="nav-item"><a class="nav-link" href="{{ url('page::dotkernel-packages-oss-lifecycle') }}">Packages Lifecycle</a></li>
6060
<li class="nav-item"><a class="nav-link" href="{{ url('page::category-resource', {slug: 'how-to'}) }}">How to's</a></li>
61+
<li class="nav-item"><a class="nav-link" href="https://github.com/orgs/dotkernel/discussions" target="_blank" rel="noopener">Discussion</a></li>
6162
<li class="nav-item"><a class="nav-link" href="{{ url('page::blog') }}">Blog</a></li>
6263
<li class="nav-item"><a class="nav-link" href="{{ url('page::categories') }}">Categories</a></li>
6364
<li class="nav-item"><a class="nav-link nav-cta mx-2 " href="{{ url('page::contact') }}">Contact us</a></li>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<div class="wrap">
2+
<div class="post-hero-v2">
3+
{% if back_href is defined %}
4+
<div class="hero-top-row">
5+
<a href="{{ back_href }}" class="breadcrumb-back">
6+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 18l-6-6 6-6"/></svg>
7+
{{ back_label }}
8+
</a>
9+
<div class="hero-badge">
10+
<span>{{ badge }}</span>
11+
</div>
12+
</div>
13+
{% else %}
14+
<div class="hero-badge">
15+
<span>{{ badge }}</span>
16+
</div>
17+
{% endif %}
18+
19+
<h1>{{ title }}</h1>
20+
21+
{% if author_name is defined %}
22+
<div class="post-meta-v2 mt-3">
23+
<span class="meta-item">
24+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 3.6-6 8-6s8 2 8 6"/></svg>
25+
By <a href="{{ path('page::author-resource', {slug: author_slug}) }}">{{ author_name }}</a>
26+
</span>
27+
{% if post_date is defined %}
28+
<span class="meta-item">
29+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></svg>
30+
{{ post_date|date('M d, Y') }}
31+
</span>
32+
{% endif %}
33+
</div>
34+
{% endif %}
35+
{% if also_on is defined %}
36+
<div class="post-meta-v2 mt-3">
37+
<span class="meta-item">
38+
Also on
39+
</span>
40+
{% if author_github is defined and author_github %}
41+
<span class="meta-item">
42+
<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true">
43+
<path d="M12 .5C5.73.5.5 5.73.5 12c0 5.09 3.29 9.4 7.86 10.93.57.1.79-.25.79-.55 0-.27-.01-1.17-.02-2.12-3.2.7-3.88-1.36-3.88-1.36-.52-1.34-1.28-1.7-1.28-1.7-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.55-.29-5.24-1.28-5.24-5.7 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.18 1.18a11 11 0 0 1 5.8 0c2.2-1.49 3.17-1.18 3.17-1.18.63 1.59.24 2.76.12 3.05.74.81 1.19 1.84 1.19 3.1 0 4.43-2.7 5.4-5.27 5.69.42.36.78 1.07.78 2.16 0 1.56-.01 2.82-.01 3.2 0 .31.21.66.8.55A11.5 11.5 0 0 0 23.5 12c0-6.27-5.23-11.5-11.5-11.5z"/>
44+
</svg>
45+
<a href="https://github.com/{{ author_github }}" target="_blank" rel="noopener noreferrer">{{ author_github }}</a>
46+
</span>
47+
{% endif %}
48+
</div>
49+
{% endif %}
50+
</div>
51+
</div>

src/Blog/templates/page/author-resource.html.twig

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,14 @@
44
{% block title %}{{ author.name }}{% endblock %}
55

66
{% block page_title %}
7-
<div class="wrap">
8-
<div class="post-hero-v2">
9-
<div class="hero-top-row">
10-
<a href="{{ url('page::blog') }}" class="breadcrumb-back">
11-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 18l-6-6 6-6"/></svg>
12-
Back to Blog
13-
</a>
14-
<div class="hero-badge">
15-
<span>Author</span>
16-
</div>
17-
</div>
18-
<h1>Articles by {{ author.name }}</h1>
19-
<div class="post-meta-v2 mt-3">
20-
<span class="meta-item">
21-
Also on
22-
</span>
23-
{% if author.github %}
24-
<span class="meta-item">
25-
<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true">
26-
<path d="M12 .5C5.73.5.5 5.73.5 12c0 5.09 3.29 9.4 7.86 10.93.57.1.79-.25.79-.55 0-.27-.01-1.17-.02-2.12-3.2.7-3.88-1.36-3.88-1.36-.52-1.34-1.28-1.7-1.28-1.7-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.55-.29-5.24-1.28-5.24-5.7 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.18 1.18a11 11 0 0 1 5.8 0c2.2-1.49 3.17-1.18 3.17-1.18.63 1.59.24 2.76.12 3.05.74.81 1.19 1.84 1.19 3.1 0 4.43-2.7 5.4-5.27 5.69.42.36.78 1.07.78 2.16 0 1.56-.01 2.82-.01 3.2 0 .31.21.66.8.55A11.5 11.5 0 0 0 23.5 12c0-6.27-5.23-11.5-11.5-11.5z"/>
27-
</svg>
28-
<a href="https://github.com/{{ author.github }}" target="_blank" rel="noopener noreferrer">{{ author.github }}</a>
29-
</span>
30-
{% endif %}
31-
</div>
32-
</div>
33-
</div>
7+
{{ include('@partial/title-section.html.twig', {
8+
back_href: url('page::blog'),
9+
back_label: 'Back to Blog',
10+
badge: 'Author',
11+
title: 'Articles by ' ~ author.name,
12+
also_on: true,
13+
author_github: author.github
14+
}) }}
3415
{% endblock %}
3516

3617
{% block content %}

src/Blog/templates/page/blog-resource/android/listen-for-android-install-referrer.html.twig

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,15 @@
44
{% block title %}Listen for Android install referrer{% endblock %}
55

66
{% block page_title %}
7-
<div class="wrap">
8-
<div class="post-hero-v2">
9-
<div class="hero-top-row">
10-
<a href="{{ url('page::blog') }}" class="breadcrumb-back">
11-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 18l-6-6 6-6"/></svg>
12-
Back to Blog
13-
</a>
14-
<div class="hero-badge">
15-
<span>Android</span>
16-
</div>
17-
</div>
18-
<h1>{{ article.title }}</h1>
19-
<div class="post-meta-v2 mt-3">
20-
<span class="meta-item">
21-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 3.6-6 8-6s8 2 8 6"/></svg>
22-
By <a href="{{ path('page::author-resource', {slug: article.author.slug}) }}">{{ article.author.name }}</a>
23-
</span>
24-
<span class="meta-item">
25-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></svg>
26-
{{ article.postDate|date('M d, Y') }}
27-
</span>
28-
</div>
29-
</div>
30-
</div>
7+
{{ include('@partial/title-section.html.twig', {
8+
back_href: url('page::blog'),
9+
back_label: 'Back to Blog',
10+
badge: 'Android',
11+
title: article.title,
12+
author_name: article.author.name,
13+
author_slug: article.author.slug,
14+
post_date: article.postDate
15+
}) }}
3116
{% endblock %}
3217

3318
{% block content %}

src/Blog/templates/page/blog-resource/android/multiple-broadcast-receivers-in-the-same-app-for-the-same-action.html.twig

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,15 @@
44
{% block title %}Multiple broadcast receivers in the same app, for the same action{% endblock %}
55

66
{% block page_title %}
7-
<div class="wrap">
8-
<div class="post-hero-v2">
9-
<div class="hero-top-row">
10-
<a href="{{ url('page::blog') }}" class="breadcrumb-back">
11-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 18l-6-6 6-6"/></svg>
12-
Back to Blog
13-
</a>
14-
<div class="hero-badge">
15-
<span>Android</span>
16-
</div>
17-
</div>
18-
<h1>{{ article.title }}</h1>
19-
<div class="post-meta-v2 mt-3">
20-
<span class="meta-item">
21-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 3.6-6 8-6s8 2 8 6"/></svg>
22-
By <a href="{{ path('page::author-resource', {slug: article.author.slug}) }}">{{ article.author.name }}</a>
23-
</span>
24-
<span class="meta-item">
25-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></svg>
26-
{{ article.postDate|date('M d, Y') }}
27-
</span>
28-
</div>
29-
</div>
30-
</div>
7+
{{ include('@partial/title-section.html.twig', {
8+
back_href: url('page::blog'),
9+
back_label: 'Back to Blog',
10+
badge: 'Android',
11+
title: article.title,
12+
author_name: article.author.name,
13+
author_slug: article.author.slug,
14+
post_date: article.postDate
15+
}) }}
3116
{% endblock %}
3217

3318
{% block content %}

src/Blog/templates/page/blog-resource/architecture/configprovider-bootstrap-modern-php-applications.html.twig

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,15 @@
44
{% block title %}ConfigProvider - Bootstrap Modern PHP Applications{% endblock %}
55

66
{% block page_title %}
7-
<div class="wrap">
8-
<div class="post-hero-v2">
9-
<div class="hero-top-row">
10-
<a href="{{ url('page::blog') }}" class="breadcrumb-back">
11-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 18l-6-6 6-6"/></svg>
12-
Back to Blog
13-
</a>
14-
<div class="hero-badge">
15-
<span>Architecture</span>
16-
</div>
17-
</div>
18-
<h1>{{ article.title }}</h1>
19-
<div class="post-meta-v2 mt-3">
20-
<span class="meta-item">
21-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 3.6-6 8-6s8 2 8 6"/></svg>
22-
By <a href="{{ path('page::author-resource', {slug: article.author.slug}) }}">{{ article.author.name }}</a>
23-
</span>
24-
<span class="meta-item">
25-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></svg>
26-
{{ article.postDate|date('M d, Y') }}
27-
</span>
28-
</div>
29-
</div>
30-
</div>
7+
{{ include('@partial/title-section.html.twig', {
8+
back_href: url('page::blog'),
9+
back_label: 'Back to Blog',
10+
badge: 'Architecture',
11+
title: article.title,
12+
author_name: article.author.name,
13+
author_slug: article.author.slug,
14+
post_date: article.postDate
15+
}) }}
3116
{% endblock %}
3217

3318
{% block content %}

src/Blog/templates/page/blog-resource/architecture/request-lifecycle-for-a-mezzio-based-application.html.twig

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,15 @@
44
{% block title %}Request Lifecycle for a Mezzio-Based Application{% endblock %}
55

66
{% block page_title %}
7-
<div class="wrap">
8-
<div class="post-hero-v2">
9-
<div class="hero-top-row">
10-
<a href="{{ url('page::blog') }}" class="breadcrumb-back">
11-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 18l-6-6 6-6"/></svg>
12-
Back to Blog
13-
</a>
14-
<div class="hero-badge">
15-
<span>Architecture</span>
16-
</div>
17-
</div>
18-
<h1>{{ article.title }}</h1>
19-
<div class="post-meta-v2 mt-3">
20-
<span class="meta-item">
21-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 3.6-6 8-6s8 2 8 6"/></svg>
22-
By <a href="{{ path('page::author-resource', {slug: article.author.slug}) }}">{{ article.author.name }}</a>
23-
</span>
24-
<span class="meta-item">
25-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></svg>
26-
{{ article.postDate|date('M d, Y') }}
27-
</span>
28-
</div>
29-
</div>
30-
</div>
7+
{{ include('@partial/title-section.html.twig', {
8+
back_href: url('page::blog'),
9+
back_label: 'Back to Blog',
10+
badge: 'Architecture',
11+
title: article.title,
12+
author_name: article.author.name,
13+
author_slug: article.author.slug,
14+
post_date: article.postDate
15+
}) }}
3116
{% endblock %}
3217

3318
{% block content %}

src/Blog/templates/page/blog-resource/architecture/understanding-middleware.html.twig

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,15 @@
44
{% block title %}Understanding Middleware{% endblock %}
55

66
{% block page_title %}
7-
<div class="wrap">
8-
<div class="post-hero-v2">
9-
<div class="hero-top-row">
10-
<a href="{{ url('page::blog') }}" class="breadcrumb-back">
11-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 18l-6-6 6-6"/></svg>
12-
Back to Blog
13-
</a>
14-
<div class="hero-badge">
15-
<span>Architecture</span>
16-
</div>
17-
</div>
18-
<h1>{{ article.title }}</h1>
19-
<div class="post-meta-v2 mt-3">
20-
<span class="meta-item">
21-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 3.6-6 8-6s8 2 8 6"/></svg>
22-
By <a href="{{ path('page::author-resource', {slug: article.author.slug}) }}">{{ article.author.name }}</a>
23-
</span>
24-
<span class="meta-item">
25-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></svg>
26-
{{ article.postDate|date('M d, Y') }}
27-
</span>
28-
</div>
29-
</div>
30-
</div>
7+
{{ include('@partial/title-section.html.twig', {
8+
back_href: url('page::blog'),
9+
back_label: 'Back to Blog',
10+
badge: 'Architecture',
11+
title: article.title,
12+
author_name: article.author.name,
13+
author_slug: article.author.slug,
14+
post_date: article.postDate
15+
}) }}
3116
{% endblock %}
3217

3318
{% block content %}

src/Blog/templates/page/blog-resource/best-practice/aptana-set-svn-keywords.html.twig

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,15 @@
44
{% block title %}Aptana - set SVN keywords{% endblock %}
55

66
{% block page_title %}
7-
<div class="wrap">
8-
<div class="post-hero-v2">
9-
<div class="hero-top-row">
10-
<a href="{{ url('page::blog') }}" class="breadcrumb-back">
11-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 18l-6-6 6-6"/></svg>
12-
Back to Blog
13-
</a>
14-
<div class="hero-badge">
15-
<span>Best Practice</span>
16-
</div>
17-
</div>
18-
<h1>{{ article.title }}</h1>
19-
<div class="post-meta-v2 mt-3">
20-
<span class="meta-item">
21-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 3.6-6 8-6s8 2 8 6"/></svg>
22-
By <a href="{{ path('page::author-resource', {slug: article.author.slug}) }}">{{ article.author.name }}</a>
23-
</span>
24-
<span class="meta-item">
25-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></svg>
26-
{{ article.postDate|date('M d, Y') }}
27-
</span>
28-
</div>
29-
</div>
30-
</div>
7+
{{ include('@partial/title-section.html.twig', {
8+
back_href: url('page::blog'),
9+
back_label: 'Back to Blog',
10+
badge: 'Best Practice',
11+
title: article.title,
12+
author_name: article.author.name,
13+
author_slug: article.author.slug,
14+
post_date: article.postDate
15+
}) }}
3116
{% endblock %}
3217

3318
{% block content %}
@@ -45,19 +30,19 @@ For example if you want to set the svn keyword property <em><strong>Id</strong><
4530
<ul>
4631
<li>In the file where you want to add the svn keyword property write <strong>$Id$</strong></li>
4732
</ul>
48-
<a href="/uploads/2011/04/id-file.gif"><img title="Write the ID keyword in the file" src="{{ asset('uploads/article/' ~ article.id ~ '/id-file-300x235.gif') }}" alt="" width="300" height="235"> </a>
33+
<img title="Write the ID keyword in the file" src="{{ asset('uploads/article/' ~ article.id ~ '/id-file-300x235.gif') }}" alt="" width="300" height="235">
4934
<ul>
5035
<li>Right click on the file, then follow Team -&gt; Set Property...<strong> </strong><strong>Note*</strong>: <em>Set Property...</em> will not be active if you haven't first added the file to SVN: <em>Team</em>-&gt;<em>Add to Version Controller</em></li>
5136
</ul>
52-
<a href="/uploads/2011/04/set-property.gif"><img title="Select set property..." src="{{ asset('uploads/article/' ~ article.id ~ '/set-property-300x152.gif') }}" alt="" width="300" height="152"> </a>
37+
<img title="Select set property..." src="{{ asset('uploads/article/' ~ article.id ~ '/set-property-300x152.gif') }}" alt="" width="300" height="152">
5338
<ul>
5439
<li>Select <strong>svn:keywords</strong>, and write <strong>Id</strong> in the text field <strong></strong></li>
5540
</ul>
56-
<a href="/uploads/2011/04/svn-keywords.gif"><img title="svn-keywords" src="{{ asset('uploads/article/' ~ article.id ~ '/svn-keywords-300x298.gif') }}" alt="" width="300" height="298"> </a>
41+
<img title="svn-keywords" src="{{ asset('uploads/article/' ~ article.id ~ '/svn-keywords-300x298.gif') }}" alt="" width="300" height="298">
5742

5843
When you make the SVN commit of the file, the <em>$Id$</em> keyword will be replaced with text in the format shown below:
5944

60-
<a href="/uploads/2011/04/id-file-svn.gif"><img title="Id keyword after commit" src="{{ asset('uploads/article/' ~ article.id ~ '/id-file-svn-300x141.gif') }}" alt="" width="300" height="141"> </a>
45+
<img title="Id keyword after commit" src="{{ asset('uploads/article/' ~ article.id ~ '/id-file-svn-300x141.gif') }}" alt="" width="300" height="141">
6146

6247
<h2 id="user-content-faq">Frequently Asked Questions</h2>
6348

0 commit comments

Comments
 (0)