Skip to content

Commit b6a2999

Browse files
committed
More simplifications
1 parent 872a074 commit b6a2999

8 files changed

Lines changed: 58 additions & 196 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<aside class="complementary-content">
2+
<!-- feed links, default flavor is RSS, so we don't need to specify a flavor on the first feed_link -->
3+
<p><txp:feed_link class="feed-rss" label="RSS" /> / <txp:feed_link class="feed-atom" flavor="atom" label="Atom" /></p>
4+
5+
<!-- if links exist, renders a links list -->
6+
<txp:evaluate test="linklist">
7+
<section>
8+
<h4><txp:text item="links" /></h4>
9+
<!-- links by default to form: 'plainlinks.txp' unless you specify a different form -->
10+
<txp:linklist wraptag="ul" break="li" />
11+
</section>
12+
</txp:evaluate>
13+
</aside>

dist/four-point-seven/pages/archive.txp

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -94,29 +94,7 @@
9494

9595
</main>
9696

97-
<!-- Complementary content -->
98-
<aside class="complementary-content">
99-
100-
<!-- feed links, default flavor is RSS, so we don't need to specify a flavor on the first feed_link -->
101-
<p>
102-
<txp:feed_link class="feed-rss" label="RSS" />
103-
/
104-
<txp:feed_link class="feed-atom" flavor="atom" label="Atom" />
105-
</p>
106-
107-
<!-- if links exist, renders a links list -->
108-
<txp:evaluate test="linklist">
109-
<section>
110-
<h4>
111-
<txp:text item="links" />
112-
</h4>
113-
114-
<!-- links by default to form: 'plainlinks.txp' unless you specify a different form -->
115-
<txp:linklist wraptag="ul" break="li" />
116-
</section>
117-
</txp:evaluate>
118-
119-
</aside>
97+
<txp:output_form form="body_aside" />
12098

12199
</div> <!-- /.container -->
122100
</div> <!-- /.wrapper -->

dist/four-point-seven/pages/default.txp

Lines changed: 14 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -57,81 +57,43 @@
5757

5858
<!-- is this the search result page? also omits the pagination links below (uses pagination format within search_results.txp instead) -->
5959
<txp:if_search>
60-
61-
<h1 itemprop="name">
62-
<txp:text item="search_results" />
63-
</h1>
60+
<h1 itemprop="name"><txp:text item="search_results" /></h1>
6461
<txp:output_form form="search_results" />
6562

6663
<txp:else />
67-
68-
<!-- else is this an article category list? -->
69-
<txp:if_category>
70-
71-
<h1 itemprop="name">
72-
<txp:text item="category" />
73-
<txp:category title="1" />
74-
</h1>
75-
<txp:article form="article_listing" limit="5" wraptag="ul" class="article-list" />
64+
<!-- else is this the front page? -->
65+
<txp:if_variable name="front-page">
66+
<!-- links by default to form: 'default.txp' unless you specify a different form -->
67+
<txp:article limit="5" />
7668

7769
<txp:else />
78-
7970
<!-- else is this an article author list? -->
8071
<txp:if_author>
72+
<h1 itemprop="name"><txp:text item="author" /> <txp:author /></h1>
8173

82-
<h1 itemprop="name">
83-
<txp:text item="author" />
84-
<txp:author />
85-
</h1>
86-
<txp:article form="article_listing" limit="5" wraptag="ul" class="article-list" />
87-
88-
<!-- else display articles normally -->
8974
<txp:else />
90-
91-
<!-- links by default to form: 'default.txp' unless you specify a different form -->
92-
<txp:article limit="5" />
93-
75+
<!-- else is this an article category list? -->
76+
<txp:if_category>
77+
<h1 itemprop="name"><txp:text item="category" /> <txp:category title="1" /></h1>
78+
</txp:if_category>
9479
</txp:if_author>
95-
</txp:if_category>
80+
<txp:article form="article_listing" limit="10" wraptag="ul" class="article-list" />
81+
</txp:if_variable>
9682

97-
<!-- add pagination links to foot of article listings/category listings/author listings if there are more articles available -->
83+
<!-- add pagination links to foot of front page/author listings/category listings if there are more articles available -->
9884
<txp:evaluate wraptag="p" class="paginator">
9985
<txp:newer rel="prev">
10086
<txp:text item="newer" />
10187
</txp:newer>
102-
10388
<txp:older rel="next">
10489
<txp:text item="older" />
10590
</txp:older>
10691
</txp:evaluate>
107-
10892
</txp:if_search>
10993

11094
</main>
11195

112-
<!-- Complementary content -->
113-
<aside class="complementary-content">
114-
115-
<!-- feed links, default flavor is RSS, so we don't need to specify a flavor on the first feed_link -->
116-
<p>
117-
<txp:feed_link class="feed-rss" label="RSS" />
118-
/
119-
<txp:feed_link class="feed-atom" flavor="atom" label="Atom" />
120-
</p>
121-
122-
<!-- if links exist, renders a links list -->
123-
<txp:evaluate test="linklist">
124-
<section>
125-
<h4>
126-
<txp:text item="links" />
127-
</h4>
128-
129-
<!-- links by default to form: 'plainlinks.txp' unless you specify a different form -->
130-
<txp:linklist wraptag="ul" break="li" />
131-
</section>
132-
</txp:evaluate>
133-
134-
</aside>
96+
<txp:output_form form="body_aside" />
13597

13698
</div> <!-- /.container -->
13799
</div> <!-- /.wrapper -->

dist/four-point-seven/pages/error_default.txp

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,7 @@
3838
</p>
3939
</main>
4040

41-
<!-- Complementary content -->
42-
<aside class="complementary-content">
43-
44-
<!-- feed links, default flavor is RSS, so we don't need to specify a flavor on the first feed_link -->
45-
<p>
46-
<txp:feed_link class="feed-rss" label="RSS" />
47-
/
48-
<txp:feed_link class="feed-atom" flavor="atom" label="Atom" />
49-
</p>
50-
51-
<!-- if links exist, renders a links list -->
52-
<txp:evaluate test="linklist">
53-
<section>
54-
<h4>
55-
<txp:text item="links" />
56-
</h4>
57-
58-
<!-- links by default to form: 'plainlinks.txp' unless you specify a different form -->
59-
<txp:linklist wraptag="ul" break="li" />
60-
</section>
61-
</txp:evaluate>
62-
63-
</aside>
41+
<txp:output_form form="body_aside" />
6442

6543
</div> <!-- /.container -->
6644
</div> <!-- /.wrapper -->
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<aside class="complementary-content">
2+
<!-- feed links, default flavor is RSS, so we don't need to specify a flavor on the first feed_link -->
3+
<p><txp:feed_link class="feed-rss" label="RSS" /> / <txp:feed_link class="feed-atom" flavor="atom" label="Atom" /></p>
4+
5+
<!-- if links exist, renders a links list -->
6+
<txp:evaluate test="linklist">
7+
<section>
8+
<h4><txp:text item="links" /></h4>
9+
<!-- links by default to form: 'plainlinks.txp' unless you specify a different form -->
10+
<txp:linklist wraptag="ul" break="li" />
11+
</section>
12+
</txp:evaluate>
13+
</aside>

src/templates/pages/archive.txp

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -94,29 +94,7 @@
9494

9595
</main>
9696

97-
<!-- Complementary content -->
98-
<aside class="complementary-content">
99-
100-
<!-- feed links, default flavor is RSS, so we don't need to specify a flavor on the first feed_link -->
101-
<p>
102-
<txp:feed_link class="feed-rss" label="RSS" />
103-
/
104-
<txp:feed_link class="feed-atom" flavor="atom" label="Atom" />
105-
</p>
106-
107-
<!-- if links exist, renders a links list -->
108-
<txp:evaluate test="linklist">
109-
<section>
110-
<h4>
111-
<txp:text item="links" />
112-
</h4>
113-
114-
<!-- links by default to form: 'plainlinks.txp' unless you specify a different form -->
115-
<txp:linklist wraptag="ul" break="li" />
116-
</section>
117-
</txp:evaluate>
118-
119-
</aside>
97+
<txp:output_form form="body_aside" />
12098

12199
</div> <!-- /.container -->
122100
</div> <!-- /.wrapper -->

src/templates/pages/default.txp

Lines changed: 14 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -57,81 +57,43 @@
5757

5858
<!-- is this the search result page? also omits the pagination links below (uses pagination format within search_results.txp instead) -->
5959
<txp:if_search>
60-
61-
<h1 itemprop="name">
62-
<txp:text item="search_results" />
63-
</h1>
60+
<h1 itemprop="name"><txp:text item="search_results" /></h1>
6461
<txp:output_form form="search_results" />
6562

6663
<txp:else />
67-
68-
<!-- else is this an article category list? -->
69-
<txp:if_category>
70-
71-
<h1 itemprop="name">
72-
<txp:text item="category" />
73-
<txp:category title="1" />
74-
</h1>
75-
<txp:article form="article_listing" limit="5" wraptag="ul" class="article-list" />
64+
<!-- else is this the front page? -->
65+
<txp:if_variable name="front-page">
66+
<!-- links by default to form: 'default.txp' unless you specify a different form -->
67+
<txp:article limit="5" />
7668

7769
<txp:else />
78-
7970
<!-- else is this an article author list? -->
8071
<txp:if_author>
72+
<h1 itemprop="name"><txp:text item="author" /> <txp:author /></h1>
8173

82-
<h1 itemprop="name">
83-
<txp:text item="author" />
84-
<txp:author />
85-
</h1>
86-
<txp:article form="article_listing" limit="5" wraptag="ul" class="article-list" />
87-
88-
<!-- else display articles normally -->
8974
<txp:else />
90-
91-
<!-- links by default to form: 'default.txp' unless you specify a different form -->
92-
<txp:article limit="5" />
93-
75+
<!-- else is this an article category list? -->
76+
<txp:if_category>
77+
<h1 itemprop="name"><txp:text item="category" /> <txp:category title="1" /></h1>
78+
</txp:if_category>
9479
</txp:if_author>
95-
</txp:if_category>
80+
<txp:article form="article_listing" limit="10" wraptag="ul" class="article-list" />
81+
</txp:if_variable>
9682

97-
<!-- add pagination links to foot of article listings/category listings/author listings if there are more articles available -->
83+
<!-- add pagination links to foot of front page/author listings/category listings if there are more articles available -->
9884
<txp:evaluate wraptag="p" class="paginator">
9985
<txp:newer rel="prev">
10086
<txp:text item="newer" />
10187
</txp:newer>
102-
10388
<txp:older rel="next">
10489
<txp:text item="older" />
10590
</txp:older>
10691
</txp:evaluate>
107-
10892
</txp:if_search>
10993

11094
</main>
11195

112-
<!-- Complementary content -->
113-
<aside class="complementary-content">
114-
115-
<!-- feed links, default flavor is RSS, so we don't need to specify a flavor on the first feed_link -->
116-
<p>
117-
<txp:feed_link class="feed-rss" label="RSS" />
118-
/
119-
<txp:feed_link class="feed-atom" flavor="atom" label="Atom" />
120-
</p>
121-
122-
<!-- if links exist, renders a links list -->
123-
<txp:evaluate test="linklist">
124-
<section>
125-
<h4>
126-
<txp:text item="links" />
127-
</h4>
128-
129-
<!-- links by default to form: 'plainlinks.txp' unless you specify a different form -->
130-
<txp:linklist wraptag="ul" break="li" />
131-
</section>
132-
</txp:evaluate>
133-
134-
</aside>
96+
<txp:output_form form="body_aside" />
13597

13698
</div> <!-- /.container -->
13799
</div> <!-- /.wrapper -->

src/templates/pages/error_default.txp

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,7 @@
3838
</p>
3939
</main>
4040

41-
<!-- Complementary content -->
42-
<aside class="complementary-content">
43-
44-
<!-- feed links, default flavor is RSS, so we don't need to specify a flavor on the first feed_link -->
45-
<p>
46-
<txp:feed_link class="feed-rss" label="RSS" />
47-
/
48-
<txp:feed_link class="feed-atom" flavor="atom" label="Atom" />
49-
</p>
50-
51-
<!-- if links exist, renders a links list -->
52-
<txp:evaluate test="linklist">
53-
<section>
54-
<h4>
55-
<txp:text item="links" />
56-
</h4>
57-
58-
<!-- links by default to form: 'plainlinks.txp' unless you specify a different form -->
59-
<txp:linklist wraptag="ul" break="li" />
60-
</section>
61-
</txp:evaluate>
62-
63-
</aside>
41+
<txp:output_form form="body_aside" />
6442

6543
</div> <!-- /.container -->
6644
</div> <!-- /.wrapper -->

0 commit comments

Comments
 (0)