63 lines
983 B
ReStructuredText
63 lines
983 B
ReStructuredText
|
|
.. page:: titlePage
|
|
|
|
.. class:: centredtitle
|
|
|
|
How I deal with repetition?
|
|
|
|
.. page::
|
|
|
|
.. class:: centredtitle
|
|
|
|
Avoid repetition by extracting components
|
|
|
|
.. page::
|
|
|
|
.. class:: centredtitle
|
|
|
|
Does something justify becoming a component?
|
|
|
|
.. page::
|
|
|
|
.. class:: centredtitle
|
|
|
|
Could the duplication be moved elsewhere?
|
|
|
|
.. raw:: pdf
|
|
|
|
TextAnnotation "Twig partials, Vue components, WordPress template parts."
|
|
|
|
.. page:: standardPage
|
|
|
|
Loops
|
|
=====
|
|
|
|
.. code-block:: twig
|
|
:linenos:
|
|
:include: code/20-loops.txt
|
|
|
|
Includes
|
|
========
|
|
|
|
.. code-block:: twig
|
|
:linenos:
|
|
:include: code/21-includes.txt
|
|
|
|
.. raw:: pdf
|
|
|
|
TextAnnotation "Move the duplicate markup into a partial, so there's only one version. Pass data in."
|
|
|
|
Extracting CSS components
|
|
=========================
|
|
|
|
.. code-block:: css
|
|
:linenos:
|
|
:include: code/css-apply-before.txt
|
|
|
|
Extracting CSS components
|
|
=========================
|
|
|
|
.. code-block:: css
|
|
:linenos:
|
|
:include: code/css-apply-after.txt
|