mirror of
				https://github.com/openresty/openresty.git
				synced 2024-10-13 00:29:41 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			430 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			430 B
		
	
	
	
		
			C
		
	
	
	
	
	
[%
 | 
						|
   SET prev_post = undef;
 | 
						|
   SET next_post = undef;
 | 
						|
   FOREACH post IN posts;
 | 
						|
     IF post.id < current;
 | 
						|
        prev_post = post;
 | 
						|
     ELSE;
 | 
						|
        next_post = post;
 | 
						|
     END;
 | 
						|
    END -%]
 | 
						|
[% IF next_post %]
 | 
						|
<a href="#post-[% next_post.id %]">
 | 
						|
    « [% next_post.title %]
 | 
						|
</a>
 | 
						|
[% END %]
 | 
						|
 |
 | 
						|
<a href="#post-list"> Main </a>
 | 
						|
 |
 | 
						|
[% IF prev_post %]
 | 
						|
<a href="#post-[% prev_post.id %]">
 | 
						|
    [% prev_post.title %] »
 | 
						|
</a>
 | 
						|
[% END %]
 | 
						|
 |