Refactor template content_title()
and prev/next buttons feature
those were intertwined but now are a bit more separate, much better
This commit is contained in:
parent
9f743daf07
commit
eafe3737dc
8 changed files with 72 additions and 45 deletions
|
@ -160,7 +160,25 @@
|
|||
## Page Title
|
||||
<section id="content-title" class="hero is-primary">
|
||||
<div class="container">
|
||||
${self.content_title()}
|
||||
% if capture(self.content_title):
|
||||
|
||||
% if show_prev_next is not Undefined and show_prev_next:
|
||||
<div style="float: right;">
|
||||
% if prev_url:
|
||||
${h.link_to("« Older", prev_url, class_='button autodisable')}
|
||||
% else:
|
||||
${h.link_to("« Older", '#', class_='button', disabled='disabled')}
|
||||
% endif
|
||||
% if next_url:
|
||||
${h.link_to("Newer »", next_url, class_='button autodisable')}
|
||||
% else:
|
||||
${h.link_to("Newer »", '#', class_='button', disabled='disabled')}
|
||||
% endif
|
||||
</div>
|
||||
% endif
|
||||
|
||||
<h1 class="title">${self.content_title()}</h1>
|
||||
% endif
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
@ -208,7 +226,7 @@
|
|||
<%def name="title()"></%def>
|
||||
|
||||
<%def name="content_title()">
|
||||
<h1 class="title">${self.title()}</h1>
|
||||
${self.title()}
|
||||
</%def>
|
||||
|
||||
<%def name="header_core()">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue