PageRenderTime 43ms CodeModel.GetById 20ms app.highlight 7ms RepoModel.GetById 13ms app.codeStats 1ms

/halogy/application/modules/blog/views/templates/blog_single.php

https://bitbucket.org/haloweb/halogy-1.0/
PHP | 173 lines | 122 code | 51 blank | 0 comment | 0 complexity | bdf485733874e98ab962322940c25359 MD5 | raw file
  1{include:header}
  2
  3<div id="tpl-blog" class="module">
  4
  5	<div class="col col1">
  6
  7		{if errors}
  8			<div class="error">
  9				{errors}
 10			</div>
 11		{/if}
 12		{if message}
 13			<div class="message">
 14				{message}
 15			</div>
 16		{/if}			
 17
 18		<h1 class="post-title"><a href="{post:link}">{post:title}</a></h1>
 19
 20		<p class="back">
 21			<small>
 22				<a href="/blog/">&lt; Back to blog</a>
 23				{if post:allow-comments} | <a href="#addcomment" id="addcommentlink">Add a comment</a>{/if}
 24			</small>
 25		</p>
 26
 27		<p class="posted"><small>Posted: <strong>{post:date}</strong></small></p>
 28
 29		<div class="clear"></div>
 30
 31		<div class="post-body">
 32			{post:body}
 33		</div>
 34
 35		<p class="posted"><small>
 36			Posted by: <strong>{post:author}</strong><br />
 37
 38			{if post:categories}
 39				Categories: <strong>{post:categories}<a href="{category:link}">{category}</a>  {/post:categories}</strong><br />
 40			{/if}
 41
 42			{if post:tags}
 43				Tags: <strong>{post:tags}<a href="{tag:link}">{tag}</a>  {/post:tags}</strong><br />
 44			{/if}			
 45		</small></p>
 46
 47		{if post:comments}
 48			<div id="comments">
 49
 50				<h4>Comments</h4>
 51
 52				{post:comments}
 53				<div class="comment {comment:class}" id="comment{comment:id}">
 54
 55					<div class="col1">
 56						<img src="{comment:gravatar}" width="50" />
 57					</div>
 58	
 59					<div class="col2">
 60						<p>By <strong>{comment:author}</strong> <small>on {comment:date}</small></p>
 61
 62						<p>{comment:body}</p>
 63					</div>
 64
 65				</div>
 66				{/post:comments}
 67
 68			</div>
 69		{/if}
 70
 71		<div class="clear"></div>
 72
 73		{if post:allow-comments}
 74			<a name="addcomment"></a>
 75			<div id="addcomment">
 76
 77				<h2>Add a comment</h2>		
 78
 79				<form method="post" action="{page:uri}" class="default" id="commentsform">
 80	
 81					<label for="fullName">Your Name</label>
 82					<input type="text" name="fullName" value="{form:name}" id="fullName" class="formelement" />
 83					<br class="clear" />
 84		
 85					<label for="email">Your Email</label>
 86					<input type="text" name="email" value="{form:email}" id="email" class="formelement" />
 87					<br class="clear" />
 88
 89					<label for="fullName">Your Website</label>
 90					<input type="text" name="website" value="{form:website}" id="website" class="formelement" />
 91					<br class="clear" />
 92		
 93					<label for="commentform">Comment</label>
 94					<textarea name="comment" id="commentform" class="formelement small">{form:comment}</textarea>
 95					<br class="clear" /><br />
 96
 97					<input type="submit" value="Post Comment" class="button nolabel" />
 98		
 99				</form>
100
101				<p class="back clear"><a href="#" id="totop">Back to top</a></p>
102				
103			</div>
104		{/if}
105
106	</div>
107
108	<div class="col col2">
109	
110		<form method="post" action="/blog/search/" class="default">
111
112			<label for="searchbox">Search Posts:</label><br class="clear" />
113			<input type="text" name="query" id="searchbox" maxlength="255" value="" class="searchbox" />
114			<input type="image" src="/static/images/btn_search.gif" id="searchbutton" />
115			<br class="clear" />
116
117		</form>
118		
119		<br />
120
121		<h3>Categories</h3>
122
123		<ul class="menu">
124			{if blog:categories}
125				{blog:categories}
126					<li><a href="{category:link}">{category:title}</a> ({category:count})</li>
127				{/blog:categories}
128			{else}
129				<li><small>No categories set yet.</small></li>
130			{/if}
131		</ul>
132		
133		<br />
134		
135		<h3>Recent posts</h3>
136
137		<ul class="menu">
138			{if blog:latest}
139				{blog:latest}
140					<li><a href="{latest:link}">{latest:title}</a></li>
141				{/blog:latest}
142			{else}
143				<li><small>No posts yet.</small></li>
144			{/if}
145		</ul>
146		
147		<br />
148		
149		<h3>Archive</h3>
150		
151		<ul class="menu">
152			{if blog:archive}
153				{blog:archive}
154					<li><a href="{archive:link}">{archive:title}</a> ({archive:count})</li>
155				{/blog:archive}
156			{else}
157				<li><small>Nothing to archive yet.</small></li>
158			{/if}
159		</ul>
160		
161		<br />
162
163		<h3>Subscribe to feed</h3>
164
165		<ul class="menu">
166			<li><a href="/blog/feed/">Blog RSS Feed</a></li>
167		</ul>
168		
169	</div>
170
171</div>
172
173{include:footer}