<% page.posts.forEach(function(post){ %>
    <v-card tile elevation="24" style="margin-bottom: 5%;" href="<%= url_for(post.path) %>">
        <v-img height="240" class="white--text align-end" src=<%="/random/material-"+randomNum()+".jpg"%> gradient="to bottom, rgba(0,0,0,.1), rgba(0,0,0,.5)">
            <v-card-title style="margin-left:0.8%;"><%- post.title %></v-card-title>
			<v-card-text style="text-align: left;margin-left:0.8%;">
				<%- post.description %>
			</v-card-text>
			<v-divider style="margin-left:2%; margin-right: 2%;" class="success lighten-1"></v-divider>
			<v-card-text style="text-align: left;" class="white--text">
				<% if (post.tags && post.tags.length){ %>
					<% post.tags.forEach(function(tag){ %>	
						<v-btn text class="white--text" style="text-transform:capitalize;" href="/tags/<%-tag.name %>" ><%- tag.name %></v-btn>
					<%});%>
				<% } %>
			</v-card-text>
        </v-img>
    </v-card>
<% }); %>
<% 
    function randomNum(){
        return Math.floor(Math.random() *  + 35) + 1;
    }
 %> 
