extends vibenews.web.layout

block title
	- import vibe.textfilter.urlencode;
	- title = "";
	meta(name="description", content="#{info.settings.description}")

block vibenews.navigation
	- import vibenews.webstrings;
	ul
		li
			a(href="./")= forumIndexNavCaption

block vibenews.body
	include vibenews.inc.gravatar

	- foreach( cat; info.categories )
		- if( cat.groups.length == 0 ) continue;
		section
			h2.skeleton= cat.title
			
			table.overview.forum-overview
				col.forum
				col.num-topics
				col.num-posts
				col.last-post
				tr
					th.forum Forum
					th.num-topics Topics
					th.num-posts Posts
					th.last-post Last post
				- foreach (i, grp; cat.groups)
					tr(class=i % 2 ? "odd" : "even")
						td.forum
							.primary
								a.title(href="groups/#{grp.name}/")= grp.caption
							.secondary
								|= grp.description
						td.num-topics= grp.numberOfTopics
						td.num-posts= grp.numberOfPosts
						td.last-post
							- if( grp.lastPostDate.length )
								- if (info.settings.showLastPostAvatars)
									- mixinAvatarImage(grp.lastPoster.email, 32);
								.primary
									a(href="groups/#{grp.name}/post/#{grp.lastPostNumber}")
										| by #{grp.lastPoster.name}
								.secondary
									|= grp.lastPostDate