Skip to content

Commit 518ba39

Browse files
committed
Another text layout module
1 parent 2b361a1 commit 518ba39

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<txp:article_custom limit="1" id='<txp:yield name="id" default="null" />'>
2+
<div class="layout-container<txp:if_yield name="align-vertical"> layout-align-<txp:yield name="align-vertical" /><txp:else /> layout-align-block-center</txp:if_yield><txp:if_yield name="align"> align-<txp:yield name="align" /></txp:if_yield><txp:if_yield name="padding-y"> py-<txp:yield name="padding-y" /><txp:else /> py-2</txp:if_yield>">
3+
<div class="layout-2col<txp:if_yield name="padding-cell"> px-<txp:yield name="padding-cell" /><txp:else /> px-4</txp:if_yield>">
4+
<h2><txp:title /></h2>
5+
</div>
6+
<txp:if_excerpt>
7+
<div class="layout-2col<txp:if_yield name="padding-cell"> px-<txp:yield name="padding-cell" /><txp:else /> px-4</txp:if_yield>">
8+
<h2><txp:excerpt escape="tidy, p, h1, h2, h3, h4, h5, h6" /></h2>
9+
</div>
10+
</txp:if_excerpt>
11+
</div>
12+
<txp:else />
13+
<div class="layout-container<txp:if_yield name="align-vertical"> layout-align-<txp:yield name="align-vertical" /><txp:else /> layout-align-block-center</txp:if_yield><txp:if_yield name="align"> align-<txp:yield name="align" /></txp:if_yield><txp:if_yield name="padding-y"> py-<txp:yield name="padding-y" /><txp:else /> py-2</txp:if_yield>">
14+
<div class="layout-2col<txp:if_yield name="padding-cell"> px-<txp:yield name="padding-cell" /><txp:else /> px-4</txp:if_yield>">
15+
<h2>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</h2>
16+
</div>
17+
<div class="layout-2col<txp:if_yield name="padding-cell"> px-<txp:yield name="padding-cell" /><txp:else /> px-4</txp:if_yield>">
18+
<h2>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</h2>
19+
</div>
20+
</div>
21+
<txp:output_form form="instructions">To use this module, please create an article within a <a target="_blank" rel="noopener" href="https://textpattern.com/weblog/426/feature-focus-live-pageless-sections-for-hidden-content">pageless section</a> and call it from the <code>&lt;txp:output_form /&gt;</code> tag it via its unique article <code>id</code>. Module also accepts <code>align=""</code> (allowed values: <code>left</code>, <code>right</code>, <code>center</code>, <code>inline-start</code>, <code>inline-end</code>), <code>align-vertical=""</code> (allowed values: <code>top</code>, <code>middle</code>, <code>bottom</code>, <code>block-start</code>, <code>block-end</code>), <code>padding-y=""</code> and <code>padding-cell=""</code> (allowed values: <code>0</code> to <code>5</code>). If used as a container tag, any contained content is yielded below article content.<br>For example: <code>&lt;txp:output_form form="-module--text--heading03" id="2" vertical-align="middle" padding-y="2" padding-cell="3" /&gt;</code>.</txp:output_form>
22+
</txp:article_custom>
23+
<txp:yield />
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<txp:article_custom limit="1" id='<txp:yield name="id" default="null" />'>
2+
<div class="layout-container<txp:if_yield name="align-vertical"> layout-align-<txp:yield name="align-vertical" /><txp:else /> layout-align-block-center</txp:if_yield><txp:if_yield name="align"> align-<txp:yield name="align" /></txp:if_yield><txp:if_yield name="padding-y"> py-<txp:yield name="padding-y" /><txp:else /> py-2</txp:if_yield>">
3+
<div class="layout-2col<txp:if_yield name="padding-cell"> px-<txp:yield name="padding-cell" /><txp:else /> px-4</txp:if_yield>">
4+
<h2><txp:title /></h2>
5+
</div>
6+
<txp:if_excerpt>
7+
<div class="layout-2col<txp:if_yield name="padding-cell"> px-<txp:yield name="padding-cell" /><txp:else /> px-4</txp:if_yield>">
8+
<h2><txp:excerpt escape="tidy, p, h1, h2, h3, h4, h5, h6" /></h2>
9+
</div>
10+
</txp:if_excerpt>
11+
</div>
12+
<txp:else />
13+
<div class="layout-container<txp:if_yield name="align-vertical"> layout-align-<txp:yield name="align-vertical" /><txp:else /> layout-align-block-center</txp:if_yield><txp:if_yield name="align"> align-<txp:yield name="align" /></txp:if_yield><txp:if_yield name="padding-y"> py-<txp:yield name="padding-y" /><txp:else /> py-2</txp:if_yield>">
14+
<div class="layout-2col<txp:if_yield name="padding-cell"> px-<txp:yield name="padding-cell" /><txp:else /> px-4</txp:if_yield>">
15+
<h2>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</h2>
16+
</div>
17+
<div class="layout-2col<txp:if_yield name="padding-cell"> px-<txp:yield name="padding-cell" /><txp:else /> px-4</txp:if_yield>">
18+
<h2>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</h2>
19+
</div>
20+
</div>
21+
<txp:output_form form="instructions">To use this module, please create an article within a <a target="_blank" rel="noopener" href="https://textpattern.com/weblog/426/feature-focus-live-pageless-sections-for-hidden-content">pageless section</a> and call it from the <code>&lt;txp:output_form /&gt;</code> tag it via its unique article <code>id</code>. Module also accepts <code>align=""</code> (allowed values: <code>left</code>, <code>right</code>, <code>center</code>, <code>inline-start</code>, <code>inline-end</code>), <code>align-vertical=""</code> (allowed values: <code>top</code>, <code>middle</code>, <code>bottom</code>, <code>block-start</code>, <code>block-end</code>), <code>padding-y=""</code> and <code>padding-cell=""</code> (allowed values: <code>0</code> to <code>5</code>). If used as a container tag, any contained content is yielded below article content.<br>For example: <code>&lt;txp:output_form form="-module--text--heading03" id="2" vertical-align="middle" padding-y="2" padding-cell="3" /&gt;</code>.</txp:output_form>
22+
</txp:article_custom>
23+
<txp:yield />

0 commit comments

Comments
 (0)